Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCError ¶
type RPCError struct { Type string `xml:"error-type"` Tag string `xml:"error-tag"` Severity string `xml:"error-severity"` Path string `xml:"error-path"` Message string `xml:"error-message"` Info string `xml:",innerxml"` }
RPCError defines an error reply to a RPC request
type RPCMessage ¶
RPCMessage represents an RPC Message to be sent.
func NewRPCMessage ¶
func NewRPCMessage(methods []RPCMethod) *RPCMessage
NewRPCMessage generates a new RPC Message structure with the provided methods
func (*RPCMessage) MarshalXML ¶
func (m *RPCMessage) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML marshals the NETCONF XML data
type RPCMethod ¶
type RPCMethod interface {
MarshalMethod() string
}
RPCMethod defines the interface for creating an RPC method.
type RPCReply ¶
type RPCReply struct { XMLName xml.Name `xml:"rpc-reply"` Errors []RPCError `xml:"rpc-error,omitempty"` Data string `xml:",innerxml"` Ok bool `xml:",omitempty"` RawReply string `xml:"-"` }
RPCReply defines a reply to a RPC request
type RawMethod ¶
type RawMethod string
RawMethod defines how a raw text request will be responded to
func MethodGetConfig ¶
MethodGetConfig files a NETCONF get-config source request with the remote host
func MethodLock ¶
MethodLock files a NETCONF lock target request with the remote host
func MethodUnlock ¶
MethodUnlock files a NETCONF unlock target request with the remote host
func (RawMethod) MarshalMethod ¶
MarshalMethod converts the method's output into a string