Versions in this module Expand all Collapse all v0 v0.1.1 Jul 7, 2021 v0.1.0 Jul 6, 2021 Changes in this version + const MasterDeviceId + const MessageTypeCiphertext + const MessageTypeKeyExchange + const MessageTypePrekeyBundle + const MessageTypeReceipt + const MessageTypeUnidentifiedSender + const MessageTypeUnknown + type AccountAttributes struct + RegistrationID uint32 + type Client struct + func New(httpClient *http.Client, endpoint, jwt, storePath string) *Client + func (c *Client) Close() error + func (c *Client) NewWSClient() (*WSMessagingClient, error) + func (c *Client) PrepareEncryptedMessages(recipientID string, deviceID uint32, messages [][]byte) ([]Message, error) + func (c *Client) ReceiveMessages() ([]*Message, bool, error) + func (c *Client) RefreshToken(authToken string) + func (c *Client) RegisterAccount() error + func (c *Client) RegisterKeys() error + func (c *Client) RegisterTemporaryAccount() error + func (c *Client) SendMessages(recipientID string, deviceID uint32, messages [][]byte) error + func (c *Client) SessionCipher(recipientID string, deviceID uint32) *axolotl.SessionCipher + type Device struct + ID uint32 + PreKey PreKey + RegistrationID uint32 + SignedPreKey SignedPreKey + type LevelDBAxolotlStore struct + func (l *LevelDBAxolotlStore) Close() error + func (l *LevelDBAxolotlStore) ContainsPreKey(id uint32) bool + func (l *LevelDBAxolotlStore) ContainsSession(recipientID string, deviceID uint32) bool + func (l *LevelDBAxolotlStore) ContainsSignedPreKey(id uint32) bool + func (l *LevelDBAxolotlStore) DeleteAllSessions(string) + func (l *LevelDBAxolotlStore) DeleteSession(recipientID string, deviceID uint32) + func (l *LevelDBAxolotlStore) GetIdentityKeyPair() (*axolotl.IdentityKeyPair, error) + func (l *LevelDBAxolotlStore) GetLocalRegistrationID() (uint32, error) + func (l *LevelDBAxolotlStore) GetSubDeviceSessions(string) []uint32 + func (l *LevelDBAxolotlStore) IsTrustedIdentity(string, *axolotl.IdentityKey) bool + func (l *LevelDBAxolotlStore) LoadPreKey(id uint32) (*axolotl.PreKeyRecord, error) + func (l *LevelDBAxolotlStore) LoadSession(recipientID string, deviceID uint32) (*axolotl.SessionRecord, error) + func (l *LevelDBAxolotlStore) LoadSignedPreKey(id uint32) (*axolotl.SignedPreKeyRecord, error) + func (l *LevelDBAxolotlStore) LoadSignedPreKeys() []axolotl.SignedPreKeyRecord + func (l *LevelDBAxolotlStore) RemovePreKey(id uint32) + func (l *LevelDBAxolotlStore) RemoveSignedPreKey(id uint32) + func (l *LevelDBAxolotlStore) SaveIdentity(id string, key *axolotl.IdentityKey) error + func (l *LevelDBAxolotlStore) StoreIdentityKeyPair(kp *axolotl.IdentityKeyPair) error + func (l *LevelDBAxolotlStore) StorePreKey(id uint32, r *axolotl.PreKeyRecord) error + func (l *LevelDBAxolotlStore) StoreRegistrationID(id uint32) error + func (l *LevelDBAxolotlStore) StoreSession(recipientID string, deviceID uint32, r *axolotl.SessionRecord) error + func (l *LevelDBAxolotlStore) StoreSignedPreKey(id uint32, r *axolotl.SignedPreKeyRecord) error + type Message struct + Content []byte + DestDeviceID uint32 + DestRegistrationID uint32 + Guid uuid.UUID + ServerTimestamp int64 + Source string + SourceDevice uint32 + Type int32 + type Messages struct + Destination string + Messages []Message + Timestamp int64 + type MessagingCommand struct + Args interface{} + Command string + ID string + type MessagingCommandResponse struct + Error string + ID string + OK int + type PreKey struct + ID uint32 + PublicKey []byte + type PrekeyState struct + Devices []Device + IdentityKey []byte + type PrivateKeyStore interface + Close func() error + StoreIdentityKeyPair func(*axolotl.IdentityKeyPair) error + StoreRegistrationID func(uint32) error + type SignedPreKey struct + ID uint32 + PublicKey []byte + Signature []byte + type WSMessagePayload struct + Data json.RawMessage + Type string + type WSMessagingClient struct + func (c *WSMessagingClient) Close() + func (c *WSMessagingClient) Command(cmd MessagingCommand) MessagingCommandResponse + func (c *WSMessagingClient) SendWhisperMessages(to string, deviceID uint32, messages [][]byte) MessagingCommandResponse + func (c *WSMessagingClient) WhisperMessages() <-chan *Message