Documentation ¶
Index ¶
- type Middleware
- type RPCServer
- func (server *RPCServer) BackupHSMSecret(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) BackupSysconfig(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableClearnetIBD(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableRootLogin(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableSSHPasswordLogin(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableTor(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableTorElectrs(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableTorMiddleware(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) EnableTorSSH(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) FinalizeSetupWizard(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) GetBaseInfo(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetBaseInfoResponse) error
- func (server *RPCServer) GetBaseUpdateProgress(args rpcmessages.AuthGenericRequest, ...) error
- func (server *RPCServer) GetServiceInfo(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetServiceInfoResponse) error
- func (server *RPCServer) GetServiceStatus(dummyArg bool, reply *rpcmessages.GetServiceStatusResponse) error
- func (server *RPCServer) GetSetupStatus(dummyArg bool, reply *rpcmessages.SetupStatusResponse) error
- func (server *RPCServer) GetSystemEnv(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetEnvResponse) error
- func (server *RPCServer) IsBaseUpdateAvailable(args rpcmessages.AuthGenericRequest, ...) error
- func (server *RPCServer) RebootBase(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) ReindexBitcoin(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) RestoreHSMSecret(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) RestoreSysconfig(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) ResyncBitcoin(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) Serve(dummyArg bool, dummyPointer *bool) error
- func (server *RPCServer) SetHostname(args *rpcmessages.SetHostnameArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) SetLoginPassword(args rpcmessages.SetLoginPasswordArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) ShutdownBase(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) UpdateBase(args rpcmessages.UpdateBaseArgs, reply *rpcmessages.ErrorResponse) error
- func (server *RPCServer) UserAuthenticate(args *rpcmessages.UserAuthenticateArgs, ...) error
- func (server *RPCServer) UserChangePassword(args *rpcmessages.UserChangePasswordArgs, reply *rpcmessages.ErrorResponse) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware interface { /* --- 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 /* --- Authentication --- */ ValidateToken(token string) error }
Middleware provides an interface to the middleware package.
type RPCServer ¶
type RPCServer struct { RPCConnection *rpcConn // contains filtered or unexported fields }
RPCServer provides rpc calls to the middleware
func NewRPCServer ¶
func NewRPCServer(middleware Middleware) *RPCServer
NewRPCServer returns a new RPCServer
func (*RPCServer) BackupHSMSecret ¶
func (server *RPCServer) BackupHSMSecret(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
BackupHSMSecret sends the middleware's ErrorResponse over rpc
func (*RPCServer) BackupSysconfig ¶
func (server *RPCServer) BackupSysconfig(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
BackupSysconfig sends the middleware's ErrorResponse over rpc
func (*RPCServer) EnableClearnetIBD ¶
func (server *RPCServer) EnableClearnetIBD(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableClearnetIBD enables/disables the tor hidden service for SSH. The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) EnableRootLogin ¶
func (server *RPCServer) EnableRootLogin(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableRootLogin enables/disables the ssh login of the root user The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) EnableSSHPasswordLogin ¶
func (server *RPCServer) EnableSSHPasswordLogin(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableSSHPasswordLogin enables/disables the ssh login with a password (in addition to ssh keys) The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) EnableTor ¶
func (server *RPCServer) EnableTor(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableTor enables/disables the tor.service and configures bitcoind and lightningd. The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) EnableTorElectrs ¶
func (server *RPCServer) EnableTorElectrs(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableTorElectrs enables/disables the tor hidden service for Electrs. The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) EnableTorMiddleware ¶
func (server *RPCServer) EnableTorMiddleware(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableTorMiddleware enables/disables the tor hidden service for the middleware. The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) EnableTorSSH ¶
func (server *RPCServer) EnableTorSSH(args rpcmessages.ToggleSettingArgs, reply *rpcmessages.ErrorResponse) error
EnableTorSSH enables/disables the tor hidden service for SSH. The boolean argument passed is used to for enabling and disabling. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) FinalizeSetupWizard ¶
func (server *RPCServer) FinalizeSetupWizard(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
FinalizeSetupWizard sends an ErrorResponse over RPC
func (*RPCServer) GetBaseInfo ¶
func (server *RPCServer) GetBaseInfo(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetBaseInfoResponse) error
GetBaseInfo sends the middleware's GetBaseInfoResponse over rpc. This includes information about the Base and the Middleware.
func (*RPCServer) GetBaseUpdateProgress ¶
func (server *RPCServer) GetBaseUpdateProgress(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetBaseUpdateProgressResponse) error
GetBaseUpdateProgress sends a GetBaseUpdateProgressResponse over RPC
func (*RPCServer) GetServiceInfo ¶
func (server *RPCServer) GetServiceInfo(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetServiceInfoResponse) error
GetServiceInfo sends the middleware's GetServiceInfoResponse over rpc. This includes information about the Base and the Middleware.
func (*RPCServer) GetServiceStatus ¶
func (server *RPCServer) GetServiceStatus(dummyArg bool, reply *rpcmessages.GetServiceStatusResponse) error
GetServiceStatus sends the middleware's GetServiceStatusResponse over rpc. Warning: This endpoint is not authenticated.
func (*RPCServer) GetSetupStatus ¶
func (server *RPCServer) GetSetupStatus(dummyArg bool, reply *rpcmessages.SetupStatusResponse) error
GetSetupStatus send the middleware's setup status as a SetupStatusResponse over rpc.
func (*RPCServer) GetSystemEnv ¶
func (server *RPCServer) GetSystemEnv(args rpcmessages.AuthGenericRequest, reply *rpcmessages.GetEnvResponse) error
GetSystemEnv sends the middleware's GetEnvResponse over rpc
func (*RPCServer) IsBaseUpdateAvailable ¶
func (server *RPCServer) IsBaseUpdateAvailable(args rpcmessages.AuthGenericRequest, reply *rpcmessages.IsBaseUpdateAvailableResponse) error
IsBaseUpdateAvailable sends a IsBaseUpdateAvailableResponse over RPC
func (*RPCServer) RebootBase ¶
func (server *RPCServer) RebootBase(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
RebootBase sends the middleware's ErrorResponse over rpc The RPC calls the bbb-cmd.sh script which initialtes a `reboot`
func (*RPCServer) ReindexBitcoin ¶
func (server *RPCServer) ReindexBitcoin(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
ReindexBitcoin sends the middleware's ErrorResponse over rpc
func (*RPCServer) RestoreHSMSecret ¶
func (server *RPCServer) RestoreHSMSecret(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
RestoreHSMSecret sends the middleware's ErrorResponse over rpc
func (*RPCServer) RestoreSysconfig ¶
func (server *RPCServer) RestoreSysconfig(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
RestoreSysconfig sends the middleware's ErrorResponse over rpc
func (*RPCServer) ResyncBitcoin ¶
func (server *RPCServer) ResyncBitcoin(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
ResyncBitcoin sends the middleware's ErrorResponse over rpc
func (*RPCServer) Serve ¶
Serve starts a GOB RPC Server
Note: the `rpc` package requires a schematically like
func (t *T) MethodName(argType T1, replyType *T2) error
or prints a confusing warning. The arguments and the returned error are only dummies.
func (*RPCServer) SetHostname ¶
func (server *RPCServer) SetHostname(args *rpcmessages.SetHostnameArgs, reply *rpcmessages.ErrorResponse) error
SetHostname sends the middleware's ErrorResponse over rpc The argument given specifies the hostname to be set
func (*RPCServer) SetLoginPassword ¶
func (server *RPCServer) SetLoginPassword(args rpcmessages.SetLoginPasswordArgs, reply *rpcmessages.ErrorResponse) error
SetLoginPassword sets the system main ssh/login password Passwords have to be at least 8 chars in length. For Unicode passwords the number of unicode chars is counted and not the byte count. It sends the middleware's ErrorResponse over rpc.
func (*RPCServer) ShutdownBase ¶
func (server *RPCServer) ShutdownBase(args rpcmessages.AuthGenericRequest, reply *rpcmessages.ErrorResponse) error
ShutdownBase sends the middleware's ErrorResponse over rpc The RPC calls the bbb-cmd.sh script which initialtes a `shutdown now`
func (*RPCServer) UpdateBase ¶
func (server *RPCServer) UpdateBase(args rpcmessages.UpdateBaseArgs, reply *rpcmessages.ErrorResponse) error
UpdateBase updates the Base image and sends a ErrorResponse over RPC
func (*RPCServer) UserAuthenticate ¶
func (server *RPCServer) UserAuthenticate(args *rpcmessages.UserAuthenticateArgs, reply *rpcmessages.UserAuthenticateResponse) error
UserAuthenticate sends the middleware's ErrorResponse over rpc Args given specify the username and the password
func (*RPCServer) UserChangePassword ¶
func (server *RPCServer) UserChangePassword(args *rpcmessages.UserChangePasswordArgs, reply *rpcmessages.ErrorResponse) error
UserChangePassword sends the middleware's ErrorResponse over rpc The Arg given specify the username and the new password