Versions in this module Expand all Collapse all v0 v0.1.0 Jul 23, 2020 Changes in this version + const ActiveUID + const DBVersion + const Version + const WalletKey + var ErrNilMessageID = errors.New("msgdb: messageID nil") + func Create(dbname string, passphrase []byte, iter int) error + func Rekey(dbname string, oldPassphrase, newPassphrase []byte, newIter int) error + type ContactType int64 + const BlackList + const GrayList + const WhiteList + type MsgDB struct + func Open(dbname string, passphrase []byte) (*MsgDB, error) + func (msgDB *MsgDB) AddAccount(myID, contactID string, privkey *[ed25519.PrivateKeySize]byte, server string, ...) error + func (msgDB *MsgDB) AddContact(myID, mappedID, unmappedID, fullName string, contactType ContactType) error + func (msgDB *MsgDB) AddInQueue(myID, contactID string, date int64, msg string) error + func (msgDB *MsgDB) AddMessage(selfID, peerID string, date int64, sent bool, message string, sign bool, ...) error + func (msgDB *MsgDB) AddMessageIDCache(myID, contactID, messageID string) error + func (msgDB *MsgDB) AddNym(mappedID, unmappedID, fullName string) error + func (msgDB *MsgDB) AddOutQueue(myID string, msgID int64, encMsg, nymaddress string, minDelay, maxDelay int32) error + func (msgDB *MsgDB) AddValue(key, value string) error + func (msgDB *MsgDB) ClearResendOutQueue(myID string) error + func (msgDB *MsgDB) Close() error + func (msgDB *MsgDB) DB() *sql.DB + func (msgDB *MsgDB) DelInQueue(iqIdx int64) error + func (msgDB *MsgDB) DelMessage(myID string, msgNum int64) error + func (msgDB *MsgDB) DelNym(mappedID string) error + func (msgDB *MsgDB) GetAccount(myID, contactID string) (privkey *[ed25519.PrivateKeySize]byte, server string, secret *[64]byte, ...) + func (msgDB *MsgDB) GetAccountTime(myID, contactID string) (int64, error) + func (msgDB *MsgDB) GetAccounts(myID string) ([]string, error) + func (msgDB *MsgDB) GetContact(myID, contactID string) (unmappedID, fullName string, contactType ContactType, err error) + func (msgDB *MsgDB) GetContacts(myID string, blocked bool) ([]string, error) + func (msgDB *MsgDB) GetInQueue() (iqIdx int64, myID, contactID, msg string, envelope bool, err error) + func (msgDB *MsgDB) GetMessage(myID string, msgNum int64) (from, to, msg string, date int64, err error) + func (msgDB *MsgDB) GetMessageIDCache(myID, contactID string) (map[string]bool, error) + func (msgDB *MsgDB) GetMsgIDs(myID string) ([]*MsgID, error) + func (msgDB *MsgDB) GetNym(mappedID string) (unmappedID, fullName string, err error) + func (msgDB *MsgDB) GetNyms(mapped bool) ([]string, error) + func (msgDB *MsgDB) GetOutQueue(myID string) (oqIdx int64, msg, nymaddress string, minDelay, maxDelay int32, envelope bool, ...) + func (msgDB *MsgDB) GetUndeliveredMessage(myID string) (msgNum int64, contactID string, msg []byte, sign bool, ...) + func (msgDB *MsgDB) GetUpkeepAccounts(myID string) (int64, error) + func (msgDB *MsgDB) GetUpkeepAll(myID string) (int64, error) + func (msgDB *MsgDB) GetValue(key string) (string, error) + func (msgDB *MsgDB) Incremental(pages int64) error + func (msgDB *MsgDB) ReadMessage(msgNum int64) error + func (msgDB *MsgDB) RemoveContact(myID, contactID string) error + func (msgDB *MsgDB) RemoveInQueue(iqIdx int64, plainMsg, fromID string, drop bool) error + func (msgDB *MsgDB) RemoveMessageIDCache(myID, contactID, messageID string) error + func (msgDB *MsgDB) RemoveOutQueue(oqIdx, date int64) error + func (msgDB *MsgDB) RetractOutQueue(oqIdx int64) error + func (msgDB *MsgDB) SetAccountLastMsg(myID, contactID string, lastMessageTime int64) error + func (msgDB *MsgDB) SetAccountTime(myID, contactID string, loadTime int64) error + func (msgDB *MsgDB) SetInQueue(iqIdx int64, msg string) error + func (msgDB *MsgDB) SetOutQueue(oqIdx int64, envMsg string) error + func (msgDB *MsgDB) SetResendOutQueue(oqIdx int64) error + func (msgDB *MsgDB) SetUpkeepAccounts(myID string, t int64) error + func (msgDB *MsgDB) SetUpkeepAll(myID string, t int64) error + func (msgDB *MsgDB) Status() (autoVacuum string, freelistCount int64, err error) + func (msgDB *MsgDB) Vacuum(autoVacuumMode string) error + func (msgDB *MsgDB) Version() (string, error) + type MsgID struct + Date int64 + From string + Incoming bool + MsgID int64 + Read bool + Sent bool + Subject string + To string