messengerutil

package
v2.328.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TyberEventAcknowledgeReceived = "Acknowledge received"
)

Variables

This section is empty.

Functions

func B64DecodeBytes

func B64DecodeBytes(s string) ([]byte, error)

func B64EncodeBytes

func B64EncodeBytes(b []byte) string

func EnsureValidBase64CID

func EnsureValidBase64CID(str string) error

func GroupPKFromContactPK

func GroupPKFromContactPK(ctx context.Context, client protocoltypes.ProtocolServiceClient, contactPK []byte) ([]byte, error)

func StreamInteraction

func StreamInteraction(dispatcher Dispatcher, db AugmentedInteractionFetcher, cid string, isNew bool) error

func TimestampMs

func TimestampMs(t time.Time) int64

Types

type AugmentedInteractionFetcher

type AugmentedInteractionFetcher interface {
	GetAugmentedInteraction(cid string) (*mt.Interaction, error)
}

type Dispatcher

type Dispatcher interface {
	StreamEvent(typ mt.StreamEvent_Type, msg proto.Message, isNew bool) error
	Notify(typ mt.StreamEvent_Notified_Type, title, body string, msg proto.Message) error
	IsEnabled() bool
}

type NoopDispatcher

type NoopDispatcher struct{}

func (*NoopDispatcher) IsEnabled

func (*NoopDispatcher) IsEnabled() bool

func (*NoopDispatcher) Notify

func (*NoopDispatcher) Notify(typ mt.StreamEvent_Notified_Type, title, body string, msg proto.Message) error

func (*NoopDispatcher) StreamEvent

func (*NoopDispatcher) StreamEvent(typ mt.StreamEvent_Type, msg proto.Message, isNew bool) error

Jump to

Keyboard shortcuts

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