Documentation ¶
Index ¶
- type Account
- func (a *Account) AddBeacon(newBeacon beacon.Beacon)
- func (a *Account) AddSharedSeed(ss beacon.SharedSeed)
- func (a *Account) MarshalJSON() ([]byte, error)
- func (a *Account) Payee() bool
- func (a *Account) Payer() bool
- func (a *Account) Ready() bool
- func (a *Account) RemoveBeacon(toRemove beacon.Beacon)
- func (a *Account) RemoveSharedSeed(ss beacon.SharedSeed)
- func (a *Account) UnmarshalJSON(b []byte) (err error)
- type DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // AccountName is the name of the account AccountName string `json:"account_name"` // AccountUUID is the uuid for the account AccountUUID string `json:"account_uuid"` // Wad is the wad used by the account Wad wad.Wad `json:"wad"` SharedSeeds []beacon.SharedSeed `json:"shared_seeds"` // Beacons is a list of beacons associated with the account Beacons []beacon.Beacon `json:"beacons"` }
Account represents a terminus account.
func AdbFromFile ¶
AdbFromFile reads an account db out of a file.
func (*Account) AddSharedSeed ¶
func (a *Account) AddSharedSeed(ss beacon.SharedSeed)
AddSharedSeed adds a shared seed from the account.
func (*Account) MarshalJSON ¶
MarshalJSON encodes an Account as a json payload.
func (*Account) Ready ¶
Ready determines if an account is ready for use. Right now this always returns true since the account's only use files right now.
func (*Account) RemoveBeacon ¶
RemoveBeacon removes a beacon from the Account.
func (*Account) RemoveSharedSeed ¶
func (a *Account) RemoveSharedSeed(ss beacon.SharedSeed)
RemoveSharedSeed removes a shared seed from the account.
func (*Account) UnmarshalJSON ¶
UnmarshalJSON decodes an account from a json payload.
type DB ¶ added in v0.63.0
type DB struct { Details Account // map of beacon string to most recent error when trying to connect ConnectionAttempts map[string]error // contains filtered or unexported fields }
DB represents the data store for a single account.
func GetAccountDbs ¶
GetAccountDbs get a list of accoutdbs from our config file in python this is an iter, but I can only assume we're not using this for a large number of accounts (hopefully).
func GetPersistedAccounts ¶
GetPersistedAccounts gets a list of accounts from a file DB.
func NewAccountDb ¶
NewAccountDb creates an account db from a name/config.
func (*DB) AddConnectionAttempt ¶ added in v0.63.0
AddConnectionAttempt adds a connection attempt to the current account.
func (*DB) GetDisconnectedBeacons ¶ added in v0.63.0
GetDisconnectedBeacons gets an array of beacons which have disconnected.
func (DB) GetSummaryString ¶ added in v0.63.0
GetSummaryString gets a list of all beacons/locations/etc in the database.