publisher

package
v0.26.0-alpha.30 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrPFSNotEnabled is returned when an endpoint PFS only is called but
	// PFS is disabled
	ErrPFSNotEnabled = errors.New("pfs not enabled")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	PfsEnabled     bool
	DataDir        string
	InstallationID string
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config, w *whisper.Whisper) *Service

func (*Service) ConfirmMessagesProcessed

func (s *Service) ConfirmMessagesProcessed(ids [][]byte) error

func (*Service) DisableInstallation

func (s *Service) DisableInstallation(myIdentityKey *ecdsa.PublicKey, installationID string) error

DisableInstallation disables an installation for multi-device sync.

func (*Service) EnableInstallation

func (s *Service) EnableInstallation(myIdentityKey *ecdsa.PublicKey, installationID string) error

EnableInstallation enables an installation for multi-device sync.

func (*Service) GetBundle

func (s *Service) GetBundle(myIdentityKey *ecdsa.PrivateKey) (*protobuf.Bundle, error)

func (*Service) GetNegotiatedChat

func (s *Service) GetNegotiatedChat(identity *ecdsa.PublicKey) *filter.Chat

func (*Service) GetPublicBundle

func (s *Service) GetPublicBundle(identityKey *ecdsa.PublicKey) (*protobuf.Bundle, error)

func (*Service) InitProtocolWithEncyptionKey

func (s *Service) InitProtocolWithEncyptionKey(address string, encKey string) error

InitProtocolWithEncyptionKey creates an instance of ProtocolService given an address and encryption key.

func (*Service) InitProtocolWithPassword

func (s *Service) InitProtocolWithPassword(address string, password string) error

InitProtocolWithPassword creates an instance of ProtocolService given an address and password used to generate an encryption key.

func (*Service) LoadFilter

func (s *Service) LoadFilter(chat *filter.Chat) ([]*filter.Chat, error)

func (*Service) LoadFilters

func (s *Service) LoadFilters(chats []*filter.Chat) ([]*filter.Chat, error)

func (*Service) ProcessMessage

func (s *Service) ProcessMessage(dedupMessage dedup.DeduplicateMessage) error

func (*Service) ProcessPublicBundle

func (s *Service) ProcessPublicBundle(myIdentityKey *ecdsa.PrivateKey, bundle *protobuf.Bundle) ([]multidevice.IdentityAndIDPair, error)

func (*Service) RemoveFilter

func (s *Service) RemoveFilter(chat *filter.Chat) error

func (*Service) SendDirectMessage

func (s *Service) SendDirectMessage(msg chat.SendDirectMessageRPC) (*whisper.NewMessage, error)

SendDirectMessage sends a 1:1 chat message to the underlying transport

func (*Service) SendPublicMessage

func (s *Service) SendPublicMessage(signature string, chatID string, payload []byte, wrap bool) (*whisper.NewMessage, error)

SendPublicMessage sends a public chat message to the underlying transport

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

type SignalHandler

type SignalHandler struct{}

SignalHandler sends signals on protocol events

func (SignalHandler) BundleAdded

func (h SignalHandler) BundleAdded(identity string, installationID string)

func (SignalHandler) DecryptMessageFailed

func (h SignalHandler) DecryptMessageFailed(pubKey string)

func (SignalHandler) WhisperFilterAdded

func (h SignalHandler) WhisperFilterAdded(filters []*signal.Filter)

Jump to

Keyboard shortcuts

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