Versions in this module Expand all Collapse all v1 v1.1.0 Jul 24, 2023 v1.0.0 Feb 8, 2021 Changes in this version + const CapabilityNetconfBase + const SSHDefaultNetconfPort + const SSHNetconfSubsystem + const TransportMessageSeparator + func SSHConfigPassword(username, password string) *ssh.ClientConfig + type Capability string + type Client struct + func NewClient(conn *ssh.Client) (*Client, error) + func NewClientPipe(sshClient *ssh.Client, sshSession *ssh.Session, r io.Reader, w io.WriteCloser) (*Client, error) + func (c *Client) Close() error + func (c *Client) GetConfig(typ string) ([]byte, error) + type RPCError struct + Info string + Message string + Path string + Severity string + Tag string + Type string + func (re *RPCError) Error() string + type RPCMessage struct + ID string + Methods []RPCMethod + func NewRPCMessage(methods []RPCMethod) *RPCMessage + func (m *RPCMessage) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type RPCMethod interface + MarshalRPCMethod func() string + func MethodGetConfig(source string) RPCMethod + func MethodUnlock(target string) RPCMethod + func RPCMethodLock(target string) RPCMethod + type RPCMethodRaw string + func (m RPCMethodRaw) MarshalRPCMethod() string + type RPCReply struct + Data string + Errors []RPCError + Ok bool + RawReply string + XMLName xml.Name + type Session struct + ErrOnWarnings bool + ID int + ServerCapabilities []Capability + Transport Transport + func NewSession(t Transport) (*Session, error) + func (s *Session) Close() error + func (s *Session) Exec(methods ...RPCMethod) (*RPCReply, error) + type Transport interface + Close func() error + ReceiveHello func() (*TransportHelloMessage, error) + Recieve func() ([]byte, error) + Send func(data []byte) error + SendHello func(*TransportHelloMessage) error + type TransportHelloMessage struct + Capabilities []Capability + SessionID int + XMLName xml.Name + type TransportReadWriteCloser struct + func NewTransportReadWriteCloser(r io.Reader, w io.WriteCloser) *TransportReadWriteCloser + type TransportSSH struct + SSHClient *ssh.Client + SSHSession *ssh.Session + func TransportSSHFromSSHClient(client *ssh.Client, session *ssh.Session) *TransportSSH + func (t *TransportSSH) Close() error + func (t *TransportSSH) ReceiveHello() (*TransportHelloMessage, error) + func (t *TransportSSH) Recieve() ([]byte, error) + func (t *TransportSSH) Send(data []byte) error + func (t *TransportSSH) SendHello(msg *TransportHelloMessage) error + func (t *TransportSSH) WaitForBytes(b []byte) ([]byte, error) + func (t *TransportSSH) WaitForFunc(fn TransportWaitFunc) ([]byte, error) + func (t *TransportSSH) WaitForString(s string) (string, error) + type TransportWaitFunc func(buf []byte) (int, error)