Documentation ¶
Index ¶
- Variables
- type Config
- type Persistence
- type Publisher
- func (p *Publisher) ConfirmMessagesProcessed(ids [][]byte) error
- func (p *Publisher) CreateDirectMessage(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey, DH bool, ...) (*whisper.NewMessage, error)
- func (p *Publisher) CreatePublicMessage(privateKey *ecdsa.PrivateKey, chatID string, payload []byte, wrap bool) (*whisper.NewMessage, error)
- func (p *Publisher) DisableInstallation(installationID string) error
- func (p *Publisher) EnableInstallation(installationID string) error
- func (p *Publisher) GetBundle(myIdentityKey *ecdsa.PrivateKey) (*protobuf.Bundle, error)
- func (p *Publisher) GetOurInstallations() ([]*multidevice.Installation, error)
- func (p *Publisher) GetPublicBundle(identityKey *ecdsa.PublicKey) (*protobuf.Bundle, error)
- func (p *Publisher) Init(db *sql.DB, protocol *chat.ProtocolService, ...)
- func (p *Publisher) LoadFilter(chat *filter.Chat) ([]*filter.Chat, error)
- func (p *Publisher) LoadFilters(chats []*filter.Chat) ([]*filter.Chat, error)
- func (p *Publisher) ProcessMessage(msg *whisper.Message, msgID []byte) error
- func (p *Publisher) ProcessNegotiatedSecret(secrets []*sharedsecret.Secret)
- func (p *Publisher) ProcessPublicBundle(myIdentityKey *ecdsa.PrivateKey, bundle *protobuf.Bundle) ([]*multidevice.Installation, error)
- func (p *Publisher) RemoveFilters(chats []*filter.Chat) error
- func (p *Publisher) SetInstallationMetadata(installationID string, data *multidevice.InstallationMetadata) error
- func (p *Publisher) Start(online func() bool, startTicker bool) error
- func (p *Publisher) Stop() error
- type SQLLitePersistence
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") // ErrNoProtocolMessage means that a message was not a protocol message, // that is it could not be unmarshaled. ErrNoProtocolMessage = errors.New("not a protocol message") )
Functions ¶
This section is empty.
Types ¶
type Persistence ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func (*Publisher) ConfirmMessagesProcessed ¶
func (*Publisher) CreateDirectMessage ¶
func (p *Publisher) CreateDirectMessage(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey, DH bool, payload []byte) (*whisper.NewMessage, error)
CreateDirectMessage creates a 1:1 chat message
func (*Publisher) CreatePublicMessage ¶
func (p *Publisher) CreatePublicMessage(privateKey *ecdsa.PrivateKey, chatID string, payload []byte, wrap bool) (*whisper.NewMessage, error)
CreatePublicMessage sends a public chat message to the underlying transport
func (*Publisher) DisableInstallation ¶
DisableInstallation disables an installation for multi-device sync.
func (*Publisher) EnableInstallation ¶
EnableInstallation enables an installation for multi-device sync.
func (*Publisher) GetOurInstallations ¶
func (p *Publisher) GetOurInstallations() ([]*multidevice.Installation, error)
GetOurInstallations returns all the installations available given an identity
func (*Publisher) GetPublicBundle ¶
func (*Publisher) LoadFilter ¶
func (*Publisher) LoadFilters ¶
func (*Publisher) ProcessMessage ¶
func (*Publisher) ProcessNegotiatedSecret ¶
func (p *Publisher) ProcessNegotiatedSecret(secrets []*sharedsecret.Secret)
func (*Publisher) ProcessPublicBundle ¶
func (p *Publisher) ProcessPublicBundle(myIdentityKey *ecdsa.PrivateKey, bundle *protobuf.Bundle) ([]*multidevice.Installation, error)
func (*Publisher) SetInstallationMetadata ¶
func (p *Publisher) SetInstallationMetadata(installationID string, data *multidevice.InstallationMetadata) error
SetInstallationMetadata sets the metadata for our own installation
type SQLLitePersistence ¶
type SQLLitePersistence struct {
// contains filtered or unexported fields
}
func NewSQLLitePersistence ¶
func NewSQLLitePersistence(db *sql.DB) *SQLLitePersistence
func (*SQLLitePersistence) GetLastAcked ¶
func (s *SQLLitePersistence) GetLastAcked(identity []byte) (int64, error)
func (*SQLLitePersistence) GetLastPublished ¶
func (s *SQLLitePersistence) GetLastPublished() (int64, error)
func (*SQLLitePersistence) SetLastAcked ¶
func (s *SQLLitePersistence) SetLastAcked(identity []byte, lastAcked int64) error
func (*SQLLitePersistence) SetLastPublished ¶
func (s *SQLLitePersistence) SetLastPublished(lastPublished int64) error
Click to show internal directories.
Click to hide internal directories.