Documentation ¶
Index ¶
- func DecryptOutOfStoreMessageEnv(gd cryptoutil.GroupDatastoreReadOnly, env *pushtypes.OutOfStoreMessageEnvelope, ...) (*protocoltypes.OutOfStoreMessage, error)
- func DecryptPushDataFromServer(data []byte, serverPK, ownSK *[32]byte) ([]byte, error)
- func PushDecrypt(ctx context.Context, rootDir string, input []byte, opts *PushDecryptOpts) (*messengertypes.PushReceivedData, *accounttypes.AccountMetadata, error)
- func PushDecryptStandalone(rootDir string, inputB64 string) (*pushtypes.DecryptedPush, error)
- func PushEnrich(rawPushData *messengertypes.PushReceivedData, ...) (*pushtypes.DecryptedPush, error)
- type EventHandler
- type MessengerPushReceiver
- type PushDecryptOpts
- type PushHandler
- type PushHandlerOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptOutOfStoreMessageEnv ¶
func DecryptOutOfStoreMessageEnv(gd cryptoutil.GroupDatastoreReadOnly, env *pushtypes.OutOfStoreMessageEnvelope, groupPK crypto.PubKey) (*protocoltypes.OutOfStoreMessage, error)
func PushDecrypt ¶
func PushDecrypt(ctx context.Context, rootDir string, input []byte, opts *PushDecryptOpts) (*messengertypes.PushReceivedData, *accounttypes.AccountMetadata, error)
func PushDecryptStandalone ¶
func PushDecryptStandalone(rootDir string, inputB64 string) (*pushtypes.DecryptedPush, error)
func PushEnrich ¶
func PushEnrich(rawPushData *messengertypes.PushReceivedData, accountData *accounttypes.AccountMetadata, logger *zap.Logger) (*pushtypes.DecryptedPush, error)
Types ¶
type EventHandler ¶
type EventHandler interface {
HandleOutOfStoreAppMessage(groupPK []byte, message *protocoltypes.OutOfStoreMessage, payload []byte) (*messengertypes.Interaction, error)
}
type MessengerPushReceiver ¶
type MessengerPushReceiver interface {
PushReceive(ctx context.Context, input []byte) (*messengertypes.PushReceive_Reply, error)
}
func NewPushReceiver ¶
func NewPushReceiver(pushHandler PushHandler, evtHandler EventHandler, logger *zap.Logger) MessengerPushReceiver
type PushDecryptOpts ¶
type PushHandler ¶
type PushHandler interface { PushReceive(payload []byte) (*protocoltypes.PushReceive_Reply, error) PushPK() *[cryptoutil.KeySize]byte UpdatePushServer(server *protocoltypes.PushServer) error }
func NewPushHandler ¶
func NewPushHandler(opts *PushHandlerOpts) (PushHandler, error)
func NewPushHandlerViaProtocol ¶
func NewPushHandlerViaProtocol(ctx context.Context, serviceClient protocoltypes.ProtocolServiceClient) PushHandler
type PushHandlerOpts ¶
type PushHandlerOpts struct { Logger *zap.Logger PushKey *[cryptoutil.KeySize]byte DatastoreDir string RootDatastore ds.Datastore GroupDatastore *cryptoutil.GroupDatastore MessageKeystore *cryptoutil.MessageKeystore AccountCache ds.Datastore }
Click to show internal directories.
Click to hide internal directories.