Documentation ¶
Overview ¶
Package ncerr provides NETCONF error types and constructors.
Source: RFC6241 section 4.3, Appendix A
Index ¶
- type Error
- func AccessDenied(opts ...Option) *Error
- func BadAttribute(attributeName, elementName string, opts ...Option) *Error
- func BadElement(elementName string, opts ...Option) *Error
- func DataExists(opts ...Option) *Error
- func DataMissing(opts ...Option) *Error
- func InUse(opts ...Option) *Error
- func InvalidValue(opts ...Option) *Error
- func LockDenied(sessionID string, opts ...Option) *Error
- func MalformedMessage(opts ...Option) *Error
- func MissingAttribute(attributeName, elementName string, opts ...Option) *Error
- func MissingElement(elementName string, opts ...Option) *Error
- func OperationFailed(opts ...Option) *Error
- func OperationNotSupported(opts ...Option) *Error
- func ResourceDenied(opts ...Option) *Error
- func RollbackFailed(opts ...Option) *Error
- func TooBig(opts ...Option) *Error
- func UnknownAttribute(attributeName, elementName string, opts ...Option) *Error
- func UnknownElement(elementName string, opts ...Option) *Error
- func UnknownNamespace(elementName, namespace string, opts ...Option) *Error
- type Option
- type Severity
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { XMLName xml.Name `xml:"urn:ietf:params:xml:ns:netconf:base:1.0 rpc-error" json:"-"` Type Type `xml:"error-type" json:"error-type"` Tag string `xml:"error-tag" json:"error-tag"` Severity Severity `xml:"error-severity" json:"error-severity"` AppTag string `xml:"error-app-tag,omitempty" json:"error-app-tag,omitempty"` Path string `xml:"error-path,omitempty" json:"error-path,omitempty"` Message string `xml:"error-message,omitempty" json:"error-message,omitempty"` Info *rfc6241errorInfo `xml:"error-info,omitempty" json:"error-info,omitempty"` }
Error represents a NETCONF error.
XMLName must be set prior to calls to xml.Marshal. For example, to frame the error as an <rpc-error>:
e := &Error{} e.XMLName = xml.Name{Space: "urn:ietf:params:xml:ns:netconf:base:1.0", Local:"rpc-error"} out, _ := xml.Marshal(e)
func AccessDenied ¶
func BadAttribute ¶
func BadElement ¶
func DataExists ¶
func DataMissing ¶
func InvalidValue ¶
func LockDenied ¶
func MalformedMessage ¶
func MissingAttribute ¶
func MissingElement ¶
func OperationFailed ¶
func OperationNotSupported ¶
func ResourceDenied ¶
func RollbackFailed ¶
func UnknownAttribute ¶
func UnknownElement ¶
func UnknownNamespace ¶
type Option ¶
type Option func(*Error)
Option is an Error option function
func WithMessage ¶
func WithMessageF ¶
type Severity ¶
type Severity int
Severity represents the NETCONF error-severity enumerate
func (Severity) MarshalText ¶
func (*Severity) UnmarshalText ¶
type Type ¶
type Type int
Type represents the NETCONF error-type enumerate
func (Type) MarshalText ¶
func (*Type) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.