Documentation ¶
Index ¶
- type Account
- type ColorHash
- type CustomizationColor
- type Database
- func (db *Database) Close() error
- func (db *Database) DeleteAccount(keyUID string) error
- func (db *Database) DeleteIdentityImage(keyUID string) error
- func (db *Database) GetAccount(keyUID string) (*Account, error)
- func (db *Database) GetAccountKDFIterationsNumber(keyUID string) (kdfIterationsNumber int, err error)
- func (db *Database) GetAccounts() (rst []Account, err error)
- func (db *Database) GetIdentityImage(keyUID, it string) (*images.IdentityImage, error)
- func (db *Database) GetIdentityImages(keyUID string) (iis []*images.IdentityImage, err error)
- func (db *Database) SaveAccount(account Account) error
- func (db *Database) StoreIdentityImages(keyUID string, iis []images.IdentityImage, publish bool) (err error)
- func (db *Database) SubscribeToIdentityImageChanges() chan struct{}
- func (db *Database) UpdateAccount(account Account) error
- func (db *Database) UpdateAccountKeycardPairing(keyUID string, keycardPairing string) error
- func (db *Database) UpdateAccountTimestamp(keyUID string, loginTimestamp int64) error
- type MultiAccountMarshaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Name string `json:"name"` Timestamp int64 `json:"timestamp"` Identicon string `json:"identicon"` ColorHash ColorHash `json:"colorHash"` ColorID int64 `json:"colorId"` CustomizationColor CustomizationColor `json:"customizationColor,omitempty"` KeycardPairing string `json:"keycard-pairing"` KeyUID string `json:"key-uid"` Images []images.IdentityImage `json:"images"` KDFIterations int `json:"kdfIterations,omitempty"` }
Account stores public information about account.
func (*Account) FromProtobuf ¶ added in v0.106.1
func (a *Account) FromProtobuf(ma *protobuf.MultiAccount)
func (*Account) ToProtobuf ¶ added in v0.106.1
func (a *Account) ToProtobuf() *protobuf.MultiAccount
type CustomizationColor ¶ added in v0.140.1
type CustomizationColor string
const ( CustomizationColorPrimary CustomizationColor = "primary" CustomizationColorPurple CustomizationColor = "purple" CustomizationColorIndigo CustomizationColor = "indigo" CustomizationColorTurquoise CustomizationColor = "turquoise" CustomizationColorBlue CustomizationColor = "blue" CustomizationColorGreen CustomizationColor = "green" CustomizationColorYellow CustomizationColor = "yellow" CustomizationColorOrange CustomizationColor = "orange" CustomizationColorRed CustomizationColor = "red" CustomizationColorPink CustomizationColor = "pink" CustomizationColorBrown CustomizationColor = "brown" CustomizationColorSky CustomizationColor = "sky" CustomizationColorArmy CustomizationColor = "army" CustomizationColorMagenta CustomizationColor = "magenta" CustomizationColorCopper CustomizationColor = "copper" CustomizationColorCamel CustomizationColor = "camel" CustomizationColorYinYang CustomizationColor = "yinyang" CustomizationColorBeige CustomizationColor = "beige" )
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func InitializeDB ¶
InitializeDB creates db file at a given path and applies migrations.
func (*Database) DeleteAccount ¶
func (*Database) DeleteIdentityImage ¶ added in v0.65.0
func (*Database) GetAccount ¶ added in v0.106.1
func (*Database) GetAccountKDFIterationsNumber ¶ added in v0.111.5
func (*Database) GetAccounts ¶
func (*Database) GetIdentityImage ¶ added in v0.65.0
func (db *Database) GetIdentityImage(keyUID, it string) (*images.IdentityImage, error)
func (*Database) GetIdentityImages ¶ added in v0.65.0
func (db *Database) GetIdentityImages(keyUID string) (iis []*images.IdentityImage, err error)
Account images
func (*Database) SaveAccount ¶
func (*Database) StoreIdentityImages ¶ added in v0.65.0
func (*Database) SubscribeToIdentityImageChanges ¶ added in v0.66.2
func (db *Database) SubscribeToIdentityImageChanges() chan struct{}
func (*Database) UpdateAccount ¶
func (*Database) UpdateAccountKeycardPairing ¶ added in v0.83.0
type MultiAccountMarshaller ¶ added in v0.65.0
type MultiAccountMarshaller interface {
ToMultiAccount() *Account
}
Click to show internal directories.
Click to hide internal directories.