package
0.29.22
Repository: https://github.com/openconfig/ygot.git
Documentation: pkg.go.dev

# Packages

Package validate is used for testing with the default OpenConfig generated structs.

# Functions

DeleteNode zeroes the value of the node specified by the supplied path from the specified root, whose schema must also be supplied.
GetNode retrieves the node specified by the supplied path from the specified root, whose schema must also be supplied.
GetOrCreateNode function retrieves the node specified by the supplied path from the root which must have the schema supplied.
IsCaseSelected reports whether a case with the given schema has been selected in the given value struct.
SetNode sets the value of the node specified by the supplied path from the specified root, whose schema must also be supplied.
StringToType converts given string to given type which can be one of the following; - int, int8, int16, int32, int64 - uint, uint8, uint16, uint32, uint64 - string - GoEnum type Function can be extended to support other types as well.
Unmarshal recursively unmarshals JSON data tree in value into the given parent, using the given schema.
UnmarshalNotifications unmarshals a slice of Notifications on the root GoStruct specified by "schema".
UnmarshalSetRequest applies a SetRequest on the root GoStruct specified by "schema".
Validate recursively validates the value of the given data tree struct against the given schema.
ValidateBinaryRestrictions checks that the given binary string matches the schema's length restrictions (if any).
ValidateDecimalRestrictions checks that the given decimal matches the schema's range restrictions (if any).
ValidateIntRestrictions checks that the given signed int matches the schema's range restrictions (if any).
ValidateLeafRefData traverses the entire tree with root value and the given corresponding schema.
ValidateStringRestrictions checks that the given string matches the string schema's length and pattern restrictions (if any).
ValidateUintRestrictions checks that the given unsigned int matches the schema's range restrictions (if any).

# Constants

GNMIEncoding indicates that provided value is gNMI TypedValue.
JSONEncoding indicates that provided value is JSON encoded.

# Structs

BestEffortUnmarshal is an unmarshal option that accumulates errors while unmarshalling, and continues the unmarshaling process.
ComplianceErrors contains the compliance errors encountered from an Unmarshal operation.
CustomValidationOptions controls the custom validate function to be invoked on the root.
GetHandleWildcards specifies that a match within GetNode should be allowed to use wildekarts.
GetPartialKeyMatch specifies that a match within GetNode should be allowed to partially match keys for list entries.
GetTolerateNil specifies that a match within GetNode should not return an error if a nil object is hit during path traversal with remaining path elements, and should instead simply return an empty set of nodes.
IgnoreExtraFields is an unmarshal option that controls the behaviour of the Unmarshal function when additional fields are found in the input JSON.
InitMissingElements signals SetNode to initialize the node's ancestors and to ensure that keys are added into keyed lists(maps) if they are missing, before updating the node.
LeafrefOptions controls the behaviour of validation functions for leaf-ref data types.
PreferShadowPath signals to prefer using the "shadow-path" tags instead of the "path" tags when both are present while processing a GoStruct field.
Schema specifies the common types that are part of a generated ygot schema, such that it can be referenced and handled in calling application code.
TolerateJSONInconsistencies signals SetNode to tolerate inconsistencies for val as if it were converted from JSON.
TreeNode wraps an individual entry within a YANG data tree to return to a caller.

# Interfaces

DelNodeOpt defines an interface that can be used to supply arguments to functions using DeleteNode.
GetNodeOpt defines an interface that can be used to supply arguments to functions using GetNode.
GetOrCreateNodeOpt defines an interface that can be used to supply arguments to functions using GetOrCreateNode.
SetNodeOpt defines an interface that can be used to supply arguments to functions using SetNode.
UnmarshalOpt is an interface used for any option to be supplied to the Unmarshal function.

# Type aliases

Binary is a derived type which is used to represent the YANG binary type.
Encoding specifies how the value provided to UnmarshalGeneric function is encoded.
UnmarshalFunc defines a common signature for an RFC7951 to ygot.GoStruct unmarshalling function.
YANGEmpty is a derived type which is used to represent the YANG empty type.