chore: Mostly ports SSHBackend.
This commit is contained in:
parent
0d92d27427
commit
2c6b5eb5b9
5 changed files with 98 additions and 62 deletions
|
@ -1,6 +1,9 @@
|
|||
package backendutil
|
||||
|
||||
import "git.terah.dev/imterah/hermes/backend/commonbackend"
|
||||
import (
|
||||
"capnproto.org/go/capnp/v3"
|
||||
"git.terah.dev/imterah/hermes/backend/commonbackend"
|
||||
)
|
||||
|
||||
type BackendInterface interface {
|
||||
StartBackend(arguments []byte) (bool, error)
|
||||
|
@ -8,7 +11,15 @@ type BackendInterface interface {
|
|||
GetBackendStatus() (bool, error)
|
||||
StartProxy(command *commonbackend.AddProxy) (bool, error)
|
||||
StopProxy(command *commonbackend.RemoveProxy) (bool, error)
|
||||
GetAllClientConnections() []*commonbackend.ProxyClientConnection
|
||||
CheckParametersForConnections(clientParameters *commonbackend.CheckClientParameters) *commonbackend.CheckParametersResponse
|
||||
CheckParametersForBackend(arguments []byte) *commonbackend.CheckParametersResponse
|
||||
GetAllClientConnections(seg *capnp.Segment) []*commonbackend.Connection
|
||||
CheckParametersForConnections(clientParameters *commonbackend.CheckClientParameters) *CheckParametersResponse
|
||||
CheckParametersForBackend(arguments []byte) *CheckParametersResponse
|
||||
}
|
||||
|
||||
// Sent as a response to either CheckClientParameters or CheckBackendParameters
|
||||
type CheckParametersResponse struct {
|
||||
Type string // Will be 'checkParametersResponse' always
|
||||
InResponseTo string // Will be either 'checkClientParameters' or 'checkServerParameters'
|
||||
IsValid bool // If true, valid, and if false, invalid
|
||||
Message string // String message from the client (ex. failed to unmarshal JSON: x is not defined)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue