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 DefaultConfig() config.AppConfig Coin(string) *btc.Coin WalletStatus() string Testing() bool Accounts() []*btc.Account UserLanguage() language.Tag OnWalletInit(f func(*btc.Account)) OnWalletUninit(f func(*btc.Account)) OnDeviceInit(f func(device.Interface)) OnDeviceUninit(f func(deviceID string)) DevicesRegistered() []string Start() <-chan interface{} Keystores() keystore.Keystores RegisterKeystore(keystore.Keystore) DeregisterKeystore() Register(device device.Interface) error Deregister(deviceID string) Rates() map[string]map[string]float64 DownloadCert(string) (string, error) CheckElectrumServer(string, string) error }
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.