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, filter *filter.Service)
- 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) 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 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) 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) Get ¶
func (s *SQLLitePersistence) Get() (int64, error)
func (*SQLLitePersistence) Set ¶
func (s *SQLLitePersistence) Set(lastPublished int64) error
Click to show internal directories.
Click to hide internal directories.