Documentation ¶
Index ¶
- Constants
- Variables
- type Account
- type Database
- func (db *Database) AddressExists(address types.Address) (exists bool, err error)
- func (db Database) Close() error
- func (db *Database) DeleteAccount(address types.Address) error
- func (db *Database) GetAccounts() ([]Account, error)
- func (db *Database) GetAddresses() (rst []types.Address, err error)
- func (db *Database) GetChatAddress() (rst types.Address, err error)
- func (db *Database) GetConfig(typ string, value interface{}) error
- func (db *Database) GetConfigBlob(typ string) (rst json.RawMessage, err error)
- func (db *Database) GetConfigBlobs(types []string) (map[string]json.RawMessage, error)
- func (db *Database) GetWalletAddress() (rst types.Address, err error)
- func (db *Database) SaveAccounts(accounts []Account) (err error)
- func (db *Database) SaveConfig(typ string, value interface{}) error
Constants ¶
View Source
const (
// NodeConfigTag tag for a node configuration.
NodeConfigTag = "node-config"
)
Variables ¶
View Source
var ( // ErrWalletNotUnique returned if another account has `wallet` field set to true. ErrWalletNotUnique = errors.New("another account is set to be default wallet. disable it before using new") // ErrChatNotUnique returned if another account has `chat` field set to true. ErrChatNotUnique = errors.New("another account is set to be default chat. disable it before using new") )
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Address types.Address `json:"address"` Wallet bool `json:"wallet"` Chat bool `json:"chat"` Type string `json:"type,omitempty"` Storage string `json:"storage,omitempty"` Path string `json:"path,omitempty"` PublicKey types.HexBytes `json:"public-key,omitempty"` Name string `json:"name"` Color string `json:"color"` }
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database sql wrapper for operations with browser objects.
func (*Database) AddressExists ¶
AddressExists returns true if given address is stored in database.
func (*Database) DeleteAccount ¶ added in v0.38.1
func (*Database) GetAccounts ¶
func (*Database) GetChatAddress ¶
func (*Database) GetConfigBlob ¶
func (db *Database) GetConfigBlob(typ string) (rst json.RawMessage, err error)
func (*Database) GetConfigBlobs ¶
func (*Database) GetWalletAddress ¶
func (*Database) SaveAccounts ¶
func (*Database) SaveConfig ¶
Click to show internal directories.
Click to hide internal directories.