Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface { ReadFile(path string) (string, error) RunCommand(command string) (string, error) // shows the driver details, not sure if we should be showing OS name GetDetails() (SystemDetails, error) }
Driver : specification of functions to be defined by every Driver
func ToDriver ¶
func ToDriver(conn config.Connection) Driver
type Local ¶
type Local struct { EnvVars []string // contains filtered or unexported fields }
Local : Driver for handling local executions
func (*Local) GetDetails ¶
func (d *Local) GetDetails() (SystemDetails, error)
type SSH ¶
type SSH struct { // User e.g root User string // Host name/ip e.g 171.23.122.1 Host string // port default is 22 Port int // Path to private key file KeyFile string // Pass key for key file KeyPass string // Password based login Password string // Check known hosts (only disable for tests CheckKnownHosts bool // set environmental vars for server e.g []string{"DEBUG=1", "FAKE=echo"} EnvVars []string SessionClient *goph.Client // contains filtered or unexported fields }
SSH : Driver for handling ssh executions
func (*SSH) GetDetails ¶
func (d *SSH) GetDetails() (SystemDetails, error)
type SSHConnectError ¶
type SSHConnectError struct {
// contains filtered or unexported fields
}
func (*SSHConnectError) Error ¶
func (e *SSHConnectError) Error() string
type SSHRunError ¶
type SSHRunError struct {
// contains filtered or unexported fields
}
func (*SSHRunError) Error ¶
func (e *SSHRunError) Error() string
type SystemDetails ¶
type SystemDetails struct { IsWindows bool IsLinux bool IsDarwin bool IsWeb bool Name string Extra string }
SystemInfo gives more insight into system details
type Web ¶
type Web struct { // URL e.g https://google.com URL string // Method POST/GET Method Request // Payload in case of a POST Payload string // contains filtered or unexported fields }
Web : Driver for handling web executions
func (*Web) GetDetails ¶
func (d *Web) GetDetails() (SystemDetails, error)
Click to show internal directories.
Click to hide internal directories.