Documentation
¶
Index ¶
- Constants
- func ExpandPath(path string) string
- func ExpandPaths(paths []string) []string
- func ResolveConfigValue(raw map[string]interface{}, key string) (string, error)
- func Run(name string, args ...string) ([]byte, error)
- func RunWithEnv(env []string, name string, args ...string) ([]byte, error)
- func String(raw map[string]interface{}, key string) string
- func StringSlice(raw map[string]interface{}, key string) []string
- func WriteError(message string) error
- func WriteErrorResponse(req Request, code, message string) error
- func WriteResponse(req Request, result interface{}, warnings []Warning) error
- func WriteResult(v interface{}) error
- func WriteRuntimeResult(v interface{}) error
- type ConnectorCapability
- type ConnectorDescribeParams
- type ConnectorDescribeResult
- type ConnectorExecResult
- type ConnectorOperation
- type ConnectorPlan
- type ConnectorPrepareParams
- type ConnectorPrepareResult
- type ConnectorRuntimeParams
- type ConnectorTarget
- type Error
- type HealthCheckParams
- type HealthCheckResult
- type InventoryListParams
- type InventoryListResult
- type InventoryServer
- type PluginDescribeResult
- type Request
- type Response
- type SecretGetParams
- type SecretGetResult
- type Warning
Constants ¶
View Source
const ( RequestEnvVar = "LSSH_PROVIDER_REQUEST" ResultEnvVar = "LSSH_PROVIDER_RESULT" RuntimeBridgeAddrEnvVar = "LSSH_PROVIDER_BRIDGE_ADDR" )
View Source
const ( MethodPluginDescribe = "plugin.describe" MethodInventoryList = "inventory.list" MethodSecretGet = "secret.get" MethodHealthCheck = "health.check" MethodConnectorDescribe = "connector.describe" MethodConnectorPrepare = "connector.prepare" MethodConnectorShell = "connector.shell" MethodConnectorExec = "connector.exec" MethodConnectorDial = "connector.dial" // MethodTransportPrep is kept as a legacy alias while the connector API // moves from transport.* naming to connector.* naming. MethodTransportPrep = "transport.prepare" )
View Source
const Version = "v1"
Variables ¶
This section is empty.
Functions ¶
func ExpandPath ¶
func ExpandPaths ¶
func ResolveConfigValue ¶
func StringSlice ¶
func WriteError ¶
func WriteErrorResponse ¶
func WriteResponse ¶
func WriteResult ¶
func WriteResult(v interface{}) error
func WriteRuntimeResult ¶
func WriteRuntimeResult(v interface{}) error
Types ¶
type ConnectorCapability ¶
type ConnectorDescribeParams ¶
type ConnectorDescribeParams struct {
Provider string `json:"provider"`
Config map[string]interface{} `json:"config,omitempty"`
Target ConnectorTarget `json:"target"`
}
type ConnectorDescribeResult ¶
type ConnectorDescribeResult struct {
Capabilities map[string]ConnectorCapability `json:"capabilities,omitempty"`
}
type ConnectorExecResult ¶
type ConnectorExecResult struct {
ExitCode int `json:"exit_code"`
}
type ConnectorOperation ¶
type ConnectorPlan ¶
type ConnectorPrepareParams ¶
type ConnectorPrepareParams struct {
Provider string `json:"provider"`
Config map[string]interface{} `json:"config,omitempty"`
Target ConnectorTarget `json:"target"`
Operation ConnectorOperation `json:"operation"`
}
type ConnectorPrepareResult ¶
type ConnectorPrepareResult struct {
Supported bool `json:"supported"`
Plan ConnectorPlan `json:"plan,omitempty"`
}
type ConnectorRuntimeParams ¶
type ConnectorRuntimeParams struct {
Provider string `json:"provider"`
Config map[string]interface{} `json:"config,omitempty"`
Target ConnectorTarget `json:"target"`
Plan ConnectorPlan `json:"plan"`
LocalRCCommand string `json:"local_rc_command,omitempty"`
StartupMarker string `json:"startup_marker,omitempty"`
}
type ConnectorTarget ¶
type HealthCheckParams ¶
type HealthCheckResult ¶
type InventoryListParams ¶
type InventoryListResult ¶
type InventoryListResult struct {
Servers []InventoryServer `json:"servers,omitempty"`
}
type InventoryServer ¶
type PluginDescribeResult ¶
type PluginDescribeResult struct {
Name string `json:"name"`
Capabilities []string `json:"capabilities,omitempty"`
ConnectorNames []string `json:"connector_names,omitempty"`
Methods []string `json:"methods,omitempty"`
ReservedKeys []string `json:"reserved_keys,omitempty"`
ProtocolVersion string `json:"protocol_version,omitempty"`
PluginVersion string `json:"plugin_version,omitempty"`
}
type Request ¶
type Request struct {
Version string `json:"version"`
ID string `json:"id,omitempty"`
Method string `json:"method"`
Params interface{} `json:"params,omitempty"`
}
func ReadRequest ¶
type SecretGetParams ¶
type SecretGetResult ¶
Click to show internal directories.
Click to hide internal directories.