Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Config() *config.Config DefaultAppConfig() config.AppConfig Coin(string) (coin.Coin, error) AccountsStatus() string Testing() bool Accounts() []accounts.Interface CreateAndAddAccount( coin coin.Coin, code string, name string, getSigningConfiguration func() (*signing.Configuration, error), persist bool, ) error UserLanguage() language.Tag OnAccountInit(f func(accounts.Interface)) OnAccountUninit(f func(accounts.Interface)) OnDeviceInit(f func(device.Interface)) OnDeviceUninit(f func(deviceID string)) DevicesRegistered() map[string]device.Interface OnBitBoxBaseInit(f func(bitboxbase.Interface)) OnBitBoxBaseUninit(f func(bitboxBaseID string)) BitBoxBasesDetected() map[string]string BitBoxBasesRegistered() map[string]bitboxbase.Interface Start() <-chan interface{} RegisterKeystore(keystore.Keystore) DeregisterKeystore() Register(device device.Interface) error Deregister(deviceID string) TryMakeNewBase(ip string) (bool, error) Rates() map[string]map[string]float64 BitBoxBaseDeregister(bitboxBaseID string) DownloadCert(string) (string, error) CheckElectrumServer(string, string) error RegisterTestKeystore(string) NotifyUser(string) SystemOpen(string) error ReinitializeAccounts() }
Backend models the API of the backend.
type ConnectionData ¶
type ConnectionData struct {
// contains filtered or unexported fields
}
ConnectionData contains the port and authorization token for communication with the backend.
func NewConnectionData ¶
func NewConnectionData(port int, token string) *ConnectionData
NewConnectionData creates a connection data struct which holds the port and token for the API. If the port is -1 or the token is empty, we assume dev-mode.
type Handlers ¶
Handlers provides a web api to the backend.
func NewHandlers ¶
func NewHandlers( backend Backend, connData *ConnectionData, ) *Handlers
NewHandlers creates a new Handlers instance.
Click to show internal directories.
Click to hide internal directories.