Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotConnected = errors.New("not connected")
ErrNotConnected returned when the client is not connected.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an SSH client.
func NewClient ¶
func NewClient(info *ClientInfo) *Client
NewClient creates the client with the hostPort and configuration.
type ClientInfo ¶
type ClientInfo struct {
Name string `yaml:"name" json:"name" jsonschema_description:"The name of the client"`
Group string `yaml:"group" json:"group" jsonschema_description:"The group the client belongs to"`
Host string `yaml:"host" json:"host" jsonschema_description:"The host of the client"`
Port string `yaml:"port" json:"port" jsonschema_description:"The port of the client"`
User string `yaml:"user" json:"user" jsonschema_description:"The user of the client (optional, defaults to current user)"`
Pass string `` /* 142-byte string literal not displayed */
OS OSInfo `yaml:"os" json:"os" jsonschema_description:"The operating system information"`
}
ClientInfo stores the generate client information.
func NewClientInfo ¶
func NewClientInfo(name string, connStr string) (*ClientInfo, error)
NewClientInfo returns client information from the connection string.
Click to show internal directories.
Click to hide internal directories.