proxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHProxy

type SSHProxy struct {
	// SSH configs.
	User string `yaml:"user"`
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Key  string `yaml:"key"`
	// Config filepath.
	Filename string `yaml:"-"`
	// Name of SSHProxy config.
	Name string `yaml:"-"`
	// A bool to determine if the connection is ok.
	Connection bool `yaml:"-"`
	// Extra args.
	ExtraArgs string `yaml:"-"`
}

SSHProxy is a type which contains configs for an ssh connection.

func Default

func Default() *SSHProxy

Default test.

func New

func New(user, host string, port int, key string) *SSHProxy

New - Create a new SSHProxy object with given values.

func NewGlobal added in v1.0.0

func NewGlobal() *SSHProxy

NewGlobal - Create a new SSHProxy object that will be used as a global config.

func (*SSHProxy) Args

func (s *SSHProxy) Args() []string

Args - Return the full SSH command as a string slice of args.

func (*SSHProxy) Connect

func (s *SSHProxy) Connect() error

Connect to host.

func (*SSHProxy) Info

func (s *SSHProxy) Info() string

Info - Return info for an SSHProxy object.

func (*SSHProxy) PopulateFromProxy added in v1.0.0

func (s *SSHProxy) PopulateFromProxy(global *SSHProxy)

PopulateFromProxy - Fill in values from a global proxy object.

func (*SSHProxy) PrintStatus

func (s *SSHProxy) PrintStatus() string

PrintStatus - Return connection status for an SSHProxy object.

func (*SSHProxy) String

func (s *SSHProxy) String() string

String representation of an SSHProxy object.

func (*SSHProxy) TestConnection

func (s *SSHProxy) TestConnection()

TestConnection - Test SSHProxy connection.

func (*SSHProxy) Validate

func (s *SSHProxy) Validate() error

Validate SSHProxy fields.

Jump to

Keyboard shortcuts

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