Versions in this module Expand all Collapse all v1 v1.0.0 Oct 13, 2023 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) + type HelloMessage struct + Capabilities []string + SessionID int + XMLName xml.Name + 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 + MessageID string + Ok bool + RawReply string + XMLName xml.Name + type RawMethod string + func MethodEditConfig(database string, dataXml string) RawMethod + func MethodGet(filterType string, dataXml string) RawMethod + 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 DialJunos() (*Session, error) + func DialSSH(target string, config *ssh.ClientConfig) (*Session, error) + func DialSSHTimeout(target string, config *ssh.ClientConfig, timeout time.Duration) (*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 Transport interface + Close func() error + Receive func() ([]byte, error) + ReceiveHello func() (*HelloMessage, error) + Send func([]byte) error + SendHello func(*HelloMessage) error + SetVersion func(version string) + type TransportBasicIO struct + func (t *TransportBasicIO) Receive() ([]byte, error) + func (t *TransportBasicIO) ReceiveHello() (*HelloMessage, error) + func (t *TransportBasicIO) Send(data []byte) error + func (t *TransportBasicIO) SendHello(hello *HelloMessage) error + func (t *TransportBasicIO) SetVersion(version string) + func (t *TransportBasicIO) WaitForBytes(b []byte) ([]byte, error) + func (t *TransportBasicIO) WaitForFunc(f func([]byte) (int, error)) ([]byte, error) + func (t *TransportBasicIO) WaitForRegexp(re *regexp.Regexp) ([]byte, [][]byte, error) + func (t *TransportBasicIO) WaitForString(s string) (string, error) + func (t *TransportBasicIO) Writeln(b []byte) (int, error) + type TransportJunos struct + func (t *TransportJunos) Close() error + func (t *TransportJunos) Open() error + type TransportSSH struct + func (t *TransportSSH) Close() error + func (t *TransportSSH) Dial(target string, config *ssh.ClientConfig) error