Documentation ¶
Index ¶
- Constants
- Variables
- type Account
- type Database
- func (db *Database) AddressExists(address common.Address) (exists bool, err error)
- func (db Database) Close() error
- func (db *Database) GetAccounts() ([]Account, error)
- func (db *Database) GetAddresses() (rst []common.Address, err error)
- func (db *Database) GetChatAddress() (rst common.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 common.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 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) GetAccounts ¶
func (*Database) GetAddresses ¶
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.