ssh

package
v22.11.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Localhost = "localhost"
View Source
const Loopback = "127.0.0.1"
View Source
const SSHPort = 22

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonConfig

type CommonConfig struct {
	Hostname               string        `json:"hostname"`
	IPAddress              string        `json:"ip_address"`
	Port                   int           `json:"port"`
	User                   string        `json:"user"`
	PrivateKey             string        `json:"private_key"`
	LocalPort              int           `json:"-"`
	LocalHost              string        `json:"local_host"`
	GatewayConfig          sshapi.Config `json:"primary_gateway_config,omitempty"`
	SecondaryGatewayConfig sshapi.Config `json:"secondary_gateway_config,omitempty"`
}

func NewConfig

func NewConfig(hostname string, ipAddress string, port int, user string, privateKey string, localPort int, localHost string, gatewayConfig sshapi.Config, secondaryGatewayConfig sshapi.Config) *CommonConfig

func NewConfigFrom

func NewConfigFrom(ac sshapi.Config) (*CommonConfig, fail.Error)

func (CommonConfig) GetGatewayConfig

func (sconf CommonConfig) GetGatewayConfig(num uint) (sshapi.Config, fail.Error)

func (CommonConfig) GetHostname

func (sconf CommonConfig) GetHostname() (string, fail.Error)

func (CommonConfig) GetIPAddress

func (sconf CommonConfig) GetIPAddress() (string, fail.Error)

func (CommonConfig) GetLocalHost

func (sconf CommonConfig) GetLocalHost() (string, fail.Error)

func (CommonConfig) GetLocalPort

func (sconf CommonConfig) GetLocalPort() (uint, fail.Error)

func (CommonConfig) GetPort

func (sconf CommonConfig) GetPort() (uint, fail.Error)

func (CommonConfig) GetPrimaryGatewayConfig

func (sconf CommonConfig) GetPrimaryGatewayConfig() (sshapi.Config, fail.Error)

func (CommonConfig) GetPrivateKey

func (sconf CommonConfig) GetPrivateKey() (string, fail.Error)

func (CommonConfig) GetSecondaryGatewayConfig

func (sconf CommonConfig) GetSecondaryGatewayConfig() (sshapi.Config, fail.Error)

func (CommonConfig) GetUser

func (sconf CommonConfig) GetUser() (string, fail.Error)

func (CommonConfig) HasGateways

func (sconf CommonConfig) HasGateways() (bool, fail.Error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL