Versions in this module Expand all Collapse all v0 v0.1.1 Feb 18, 2018 Changes in this version + var DefaultCapabilities = []string + func SSHConfigPassword(user string, pass string) *ssh.ClientConfig + func SSHConfigPubKeyAgent(user string) (*ssh.ClientConfig, error) + func SSHConfigPubKeyFile(user string, file string, passphrase string) (*ssh.ClientConfig, error) + func SetLog(l Logger) + type HelloMessage struct + Capabilities []string + SessionID int + XMLName xml.Name + type LogLevel int + const LogDebug + const LogError + const LogInfo + const LogWarn + type Logger interface + Debugf func(string, ...interface{}) + Errorf func(string, ...interface{}) + Fatalf func(string, ...interface{}) + Infof func(string, ...interface{}) + Panicf func(string, ...interface{}) + Warnf func(string, ...interface{}) + type NoopLog struct + func (l NoopLog) Debugf(format string, v ...interface{}) + func (l NoopLog) Errorf(format string, v ...interface{}) + func (l NoopLog) Fatalf(format string, v ...interface{}) + func (l NoopLog) Infof(format string, v ...interface{}) + func (l NoopLog) Panicf(format string, v ...interface{}) + func (l NoopLog) Warnf(format string, v ...interface{}) + type RPCError struct + Info string + Message string + Path string + Severity string + Tag string + Type string + func (re *RPCError) Error() string + type RPCMessage struct + MessageID string + Methods []RPCMethod + func NewRPCMessage(methods []RPCMethod) *RPCMessage + func (m *RPCMessage) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type RPCMethod interface + MarshalMethod func() string + type RPCReply struct + Data string + Errors []RPCError + Ok bool + RawReply string + XMLName xml.Name + type RawMethod string + func MethodGetConfig(source string) RawMethod + func MethodLock(target string) RawMethod + func MethodUnlock(target string) RawMethod + func (r RawMethod) MarshalMethod() string + type ReadWriteCloser struct + func NewReadWriteCloser(r io.Reader, w io.WriteCloser) *ReadWriteCloser + type Session struct + ErrOnWarning bool + ServerCapabilities []string + SessionID int + Transport Transport + func DialSSH(target string, config *ssh.ClientConfig) (*Session, error) + func DialSSHTimeout(target string, config *ssh.ClientConfig, timeout time.Duration) (*Session, error) + func DialTelnet(target string, username string, password string, vendor VendorIOProc) (*Session, error) + func NewSSHSession(conn net.Conn, config *ssh.ClientConfig) (*Session, error) + func NewSession(t Transport) *Session + func (s *Session) Close() error + func (s *Session) Exec(methods ...RPCMethod) (*RPCReply, error) + type StdLog struct + func NewStdLog(l *stdlog.Logger, level LogLevel) *StdLog + func (l *StdLog) Debugf(format string, v ...interface{}) + func (l *StdLog) Errorf(format string, v ...interface{}) + func (l *StdLog) Fatalf(format string, v ...interface{}) + func (l *StdLog) Infof(format string, v ...interface{}) + func (l *StdLog) Panicf(format string, v ...interface{}) + func (l *StdLog) Warnf(format string, v ...interface{}) + type Transport interface + Close func() error + Receive func() ([]byte, error) + ReceiveHello func() (*HelloMessage, error) + Send func([]byte) error + SendHello func(*HelloMessage) error + type TransportSSH struct + func (t *TransportSSH) Close() error + func (t *TransportSSH) Dial(target string, config *ssh.ClientConfig) error + func (t *TransportSSH) Receive() ([]byte, error) + func (t *TransportSSH) ReceiveHello() (*HelloMessage, error) + func (t *TransportSSH) Send(data []byte) error + func (t *TransportSSH) SendHello(hello *HelloMessage) error + func (t *TransportSSH) WaitForBytes(b []byte) ([]byte, error) + func (t *TransportSSH) WaitForFunc(f func([]byte) (int, error)) ([]byte, error) + func (t *TransportSSH) WaitForRegexp(re *regexp.Regexp) ([]byte, [][]byte, error) + func (t *TransportSSH) WaitForString(s string) (string, error) + func (t *TransportSSH) Writeln(b []byte) (int, error) + type TransportTelnet struct + func (t *TransportTelnet) Dial(target string, username string, password string, vendor VendorIOProc) error + func (t *TransportTelnet) Receive() ([]byte, error) + func (t *TransportTelnet) ReceiveHello() (*HelloMessage, error) + func (t *TransportTelnet) Send(data []byte) error + func (t *TransportTelnet) SendHello(hello *HelloMessage) error + func (t *TransportTelnet) WaitForBytes(b []byte) ([]byte, error) + func (t *TransportTelnet) WaitForFunc(f func([]byte) (int, error)) ([]byte, error) + func (t *TransportTelnet) WaitForRegexp(re *regexp.Regexp) ([]byte, [][]byte, error) + func (t *TransportTelnet) WaitForString(s string) (string, error) + func (t *TransportTelnet) Writeln(b []byte) (int, error) + type VendorIOProc interface + Login func(*TransportTelnet, string, string) error + StartNetconf func(*TransportTelnet) error