mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
7cd7430d31
* Moved all configs into config.go * Completed build out of new config structures * Completed SenderClient process flow * Completed sync data Mounter and client integration * Completed installation data Mounter and client integration * House keeping, small refactor to match conventions. PayloadEncryptor is passed by value and used as a pointer to the instance value and not a shared pointer. * Reintroduced explicit Mounter field type * Completed ReceiverClient structs and flows * Finished BaseClient function parity with old acc * Integrated new Clients into tests Solved some test breaks caused by encryptors sharing pointers to their managed payloads * Built out SenderServer and ReceiverServer structs With all associated functions and integrated with endpoints. * Updated tests to handle new Server types * Added docs and additional refinement * Renamed some files to better match the content of those files * Added json tags to config fields that were missing explicit tags. * fix tests relating to payload locking * Addressing feedback from @ilmotta * Addressed feedback from @qfrank
42 lines
1.2 KiB
Go
42 lines
1.2 KiB
Go
package pairing
|
|
|
|
import (
|
|
"github.com/gorilla/sessions"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
// PayloadMounterReceiver represents a struct that can:
|
|
// - mount payload data from a PayloadRepository or a PayloadLoader into memory (PayloadMounter.Mount)
|
|
// - prepare data to be sent encrypted (PayloadMounter.ToSend) via some transport
|
|
// - receive and prepare encrypted transport data (PayloadReceiver.Receive) to be stored
|
|
// - prepare the received (PayloadReceiver.Received) data to be stored to a PayloadRepository or a PayloadStorer
|
|
type PayloadMounterReceiver interface {
|
|
PayloadMounter
|
|
PayloadReceiver
|
|
}
|
|
|
|
// PayloadRepository represents a struct that can both load and store data to an internally managed data store
|
|
type PayloadRepository interface {
|
|
PayloadLoader
|
|
PayloadStorer
|
|
}
|
|
|
|
type PayloadLocker interface {
|
|
// LockPayload prevents future excess to outbound safe and received data
|
|
LockPayload()
|
|
}
|
|
|
|
type HandlerServer interface {
|
|
GetLogger() *zap.Logger
|
|
GetCookieStore() *sessions.CookieStore
|
|
DecryptPlain([]byte) ([]byte, error)
|
|
}
|
|
|
|
type ProtobufMarshaler interface {
|
|
MarshalProtobuf() ([]byte, error)
|
|
}
|
|
|
|
type ProtobufUnmarshaler interface {
|
|
UnmarshalProtobuf([]byte) error
|
|
}
|