Documentation ¶
Overview ¶
Package handlers implements an api for the bitbox-wallet-app to talk to. It also takes care of running the noise encryption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
Handlers provides a web api
func NewHandlers ¶
func NewHandlers(middlewareInstance Middleware, dataDir string) *Handlers
NewHandlers returns a handler instance.
type Middleware ¶
type Middleware interface { // Start triggers the main middleware event loop that emits events to be caught by the handlers. Start() <-chan Event /* --- RPCs --- */ BackupHSMSecret() rpcmessages.ErrorResponse BackupSysconfig() rpcmessages.ErrorResponse EnableClearnetIBD(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse EnableRootLogin(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse EnableSSHPasswordLogin(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse EnableTor(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse EnableTorElectrs(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse EnableTorMiddleware(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse EnableTorSSH(rpcmessages.ToggleSettingArgs) rpcmessages.ErrorResponse FinalizeSetupWizard() rpcmessages.ErrorResponse GetBaseInfo() rpcmessages.GetBaseInfoResponse GetBaseUpdateProgress() rpcmessages.GetBaseUpdateProgressResponse GetServiceInfo() rpcmessages.GetServiceInfoResponse GetServiceStatus() rpcmessages.GetServiceStatusResponse IsBaseUpdateAvailable() rpcmessages.IsBaseUpdateAvailableResponse RebootBase() rpcmessages.ErrorResponse ReindexBitcoin() rpcmessages.ErrorResponse RestoreHSMSecret() rpcmessages.ErrorResponse RestoreSysconfig() rpcmessages.ErrorResponse ResyncBitcoin() rpcmessages.ErrorResponse SetHostname(rpcmessages.SetHostnameArgs) rpcmessages.ErrorResponse SetLoginPassword(rpcmessages.SetLoginPasswordArgs) rpcmessages.ErrorResponse SetupStatus() rpcmessages.SetupStatusResponse ShutdownBase() rpcmessages.ErrorResponse SystemEnv() rpcmessages.GetEnvResponse UpdateBase(rpcmessages.UpdateBaseArgs) rpcmessages.ErrorResponse UserAuthenticate(rpcmessages.UserAuthenticateArgs) rpcmessages.UserAuthenticateResponse UserChangePassword(rpcmessages.UserChangePasswordArgs) rpcmessages.ErrorResponse GetMiddlewareVersion() string ValidateToken(token string) error VerifyAppMiddlewarePairing(channelHash []byte) (bool, error) }
Middleware provides an interface to the middleware package.
Click to show internal directories.
Click to hide internal directories.