sqlstore

package
v0.0.0-...-45d6d20 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig(db *sql.DB) *Config

func (Config) GetHTTPPassword

func (c Config) GetHTTPPassword() (string, error)

func (Config) GetHTTPSignalingKey

func (c Config) GetHTTPSignalingKey() ([]byte, error)

func (Config) GetServer

func (c Config) GetServer() (string, error)

func (Config) GetTel

func (c Config) GetTel() (string, error)

func (Config) SetHTTPPassword

func (c Config) SetHTTPPassword(p string) error

func (Config) SetHTTPSignalingKey

func (c Config) SetHTTPSignalingKey(b []byte) error

type ContactStore

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

func NewContactStore

func NewContactStore(db *sql.DB) *ContactStore

func (ContactStore) Get

func (s ContactStore) Get(tel string) (*libsignal.Contact, error)

func (ContactStore) Save

func (s ContactStore) Save(ct *libsignal.Contact) error

type GroupStore

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

func NewGroupStore

func NewGroupStore(db *sql.DB) *GroupStore

func (GroupStore) Get

func (s GroupStore) Get(hexid string) (*libsignal.Group, error)

func (GroupStore) GetAll

func (s GroupStore) GetAll() ([]*libsignal.Group, error)

func (GroupStore) Save

func (s GroupStore) Save(gr *libsignal.Group) error

type IdentityStore

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

func NewIdentityStore

func NewIdentityStore(db *sql.DB) *IdentityStore

func (IdentityStore) GetIdentityKeyPair

func (s IdentityStore) GetIdentityKeyPair() (*axolotl.IdentityKeyPair, error)

func (IdentityStore) GetLocalRegistrationID

func (s IdentityStore) GetLocalRegistrationID() (uint32, error)

func (IdentityStore) IsTrustedIdentity

func (s IdentityStore) IsTrustedIdentity(id string, key *axolotl.IdentityKey) bool

func (IdentityStore) SaveIdentity

func (s IdentityStore) SaveIdentity(id string, key *axolotl.IdentityKey) error

func (IdentityStore) SetIdentityKeyPair

func (s IdentityStore) SetIdentityKeyPair(ikp *axolotl.IdentityKeyPair) error

func (IdentityStore) SetLocalRegistrationID

func (s IdentityStore) SetLocalRegistrationID(id uint32) error

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

func (KeyValue) Bytes

func (kv KeyValue) Bytes() ([]byte, error)

func (*KeyValue) SetBytes

func (kv *KeyValue) SetBytes(b []byte)

func (KeyValue) String

func (kv KeyValue) String() string

type PreKeyStore

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

func NewPreKeyStore

func NewPreKeyStore(db *sql.DB) *PreKeyStore

func (PreKeyStore) ContainsPreKey

func (s PreKeyStore) ContainsPreKey(id uint32) bool

func (PreKeyStore) LoadPreKey

func (s PreKeyStore) LoadPreKey(id uint32) (*axolotl.PreKeyRecord, error)

func (PreKeyStore) RemovePreKey

func (s PreKeyStore) RemovePreKey(id uint32)

func (PreKeyStore) StorePreKey

func (s PreKeyStore) StorePreKey(id uint32, record *axolotl.PreKeyRecord) error

type SessionStore

type SessionStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSessionStore

func NewSessionStore(db *sql.DB) *SessionStore

func (*SessionStore) ContainsSession

func (s *SessionStore) ContainsSession(recipientID string, deviceID uint32) bool

func (*SessionStore) DeleteAllSessions

func (s *SessionStore) DeleteAllSessions(recipientID string)

func (*SessionStore) DeleteSession

func (s *SessionStore) DeleteSession(recipientID string, deviceID uint32)

func (*SessionStore) GetSubDeviceSessions

func (s *SessionStore) GetSubDeviceSessions(recipientID string) []uint32

func (*SessionStore) LoadSession

func (s *SessionStore) LoadSession(recipientID string, deviceID uint32) (*axolotl.SessionRecord, error)

func (*SessionStore) StoreSession

func (s *SessionStore) StoreSession(recipientID string, deviceID uint32, record *axolotl.SessionRecord) error

type SignedPreKeyStore

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

func NewSignedPreKeyStore

func NewSignedPreKeyStore(db *sql.DB) *SignedPreKeyStore

func (SignedPreKeyStore) ContainsSignedPreKey

func (s SignedPreKeyStore) ContainsSignedPreKey(id uint32) bool

func (SignedPreKeyStore) LoadSignedPreKey

func (s SignedPreKeyStore) LoadSignedPreKey(id uint32) (*axolotl.SignedPreKeyRecord, error)

func (SignedPreKeyStore) RemoveSignedPreKey

func (s SignedPreKeyStore) RemoveSignedPreKey(id uint32)

func (SignedPreKeyStore) StoreSignedPreKey

func (s SignedPreKeyStore) StoreSignedPreKey(id uint32, record *axolotl.SignedPreKeyRecord) error

Jump to

Keyboard shortcuts

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