bertypush

package
v2.372.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: Apache-2.0, MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptPushDataFromServer

func DecryptPushDataFromServer(data []byte, serverPK, ownSK *[32]byte) ([]byte, error)

func FormatDecryptedPush added in v2.327.0

func FormatDecryptedPush(decrypted *pushtypes.DecryptedPush, printer *message.Printer) *pushtypes.FormatedPush

func PushDecryptStandalone

func PushDecryptStandalone(logger *zap.Logger, rootDir string, inputB64 string, ks accountutils.NativeKeystore) (*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, bool, 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 PushDecryptOpts struct {
	Logger           *zap.Logger
	Keystore         accountutils.NativeKeystore
	ExcludedAccounts []string
}

type PushHandler

type PushHandler interface {
	PushReceive(ctx context.Context, payload []byte) (*protocoltypes.PushReceive_Reply, error)
	PushPK() *[cryptoutil.KeySize]byte
	UpdatePushServer(ctx context.Context, 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL