types

package
v0.0.0-...-1826ff0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListConnections

func ListConnections(config *Configuration,
	includeDescription bool) map[string]*Connection

lists all connections of config into a path->connection mapping

Types

type Command

type Command struct {
	Command1 string `xml:"command1"`
	Command2 string `xml:"command2"`
	Command3 string `xml:"command3"`
	Command4 string `xml:"command4"`
	Command5 string `xml:"command5"`
}

type Configuration

type Configuration struct {
	XMLName xml.Name  `xml:"configuration"`
	Root    Container `xml:"root"`

	Version      string `xml:"version,attr"`
	SavePassword bool   `xml:"savepassword,attr"`
}

func (*Configuration) AllConnections

func (c *Configuration) AllConnections() map[string]*Connection

type Connection

type Connection struct {
	Expanded bool    `xml:"-"`
	Info     Info    `xml:"connection_info"`
	Login    Login   `xml:"login"`
	Timeout  Timeout `xml:"timeout"`
	Commands Command `xml:"command"`
	Options  Options `xml:"options"`
	// contains filtered or unexported fields
}

func (*Connection) Path

func (n *Connection) Path() string

type Container

type Container struct {
	Expanded    bool         `xml:"expanded,attr"`
	Containers  []Container  `xml:"container"`
	Connections []Connection `xml:"connection"`
	// contains filtered or unexported fields
}

func (*Container) Path

func (n *Container) Path() string

type Info

type Info struct {
	Name        string `xml:"name"`
	Protocol    string `xml:"protocol"`
	Host        string `xml:"host"`
	Port        uint16 `xml:"port"`
	Session     string `xml:"session"`
	Commandline string `xml:"commandline"`
	Description string `xml:"description"`
}

type Login

type Login struct {
	User     string `xml:"login"`
	Password string `xml:"password"`
	Prompt   string `xml:"prompt"`
}

type Node

type Node interface {
	Path() string
}

type Options

type Options struct {
	LoginMacro bool `xml:"loginmacro"`
	// Note that the original PCM sends commands no matter what this flag is set to
	PostCommands bool   `xml:"postcommands"`
	EndlineChar  int    `xml:"endlinechar"`
	SSHPublicKey string `xml:"ssh_public_key,omitempty"`
}

type Terminal

type Terminal interface {
	GetSize() (width, height int, err error)
	Stdin() io.Reader
	Stdout() io.Writer
	Stderr() io.Writer
	ExitRequests() <-chan bool
	Signals() <-chan os.Signal
	MakeRaw()
	RestoreRaw()
}

type Timeout

type Timeout struct {
	ConnectionTimeout int `xml:"connectiontimeout"`
	LoginTimeout      int `xml:"logintimeout"`
	PasswordTimeout   int `xml:"passwordtimeout"`
	CommandTimeout    int `xml:"commandtimeout"`
}

Timeouts are in milliseconds

Jump to

Keyboard shortcuts

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