Documentation ¶
Overview ¶
Package meta is the AST(Abstract Syntax Tree) of parsed YANG. Data structures here closely follows the YANG RFC specification at the IETF. To build an AST from a YANG file, use the parser package.
Index ¶
- Constants
- func Compile(root *Module) error
- func IsAction(m Meta) bool
- func IsChoice(m Meta) bool
- func IsChoiceCase(m Meta) bool
- func IsContainer(m Meta) bool
- func IsDataDef(m Meta) bool
- func IsLeaf(m Meta) bool
- func IsList(m Meta) bool
- func IsNotification(m Meta) bool
- func SchemaPath(m Meta) string
- type AddDeviate
- func (m *AddDeviate) Config() bool
- func (m *AddDeviate) Default() []string
- func (m *AddDeviate) DefaultValue() interface{}
- func (m *AddDeviate) Extensions() []*Extension
- func (m *AddDeviate) HasDefault() bool
- func (m *AddDeviate) IsConfigSet() bool
- func (m *AddDeviate) IsMandatorySet() bool
- func (m *AddDeviate) IsMaxElementsSet() bool
- func (m *AddDeviate) IsMinElementsSet() bool
- func (m *AddDeviate) Mandatory() bool
- func (m *AddDeviate) MaxElements() int
- func (m *AddDeviate) MinElements() int
- func (m *AddDeviate) Musts() []*Must
- func (m *AddDeviate) Parent() Meta
- func (m *AddDeviate) Unique() [][]string
- func (m *AddDeviate) Units() string
- type Any
- func (m *Any) Config() bool
- func (y *Any) DefaultValue() interface{}
- func (m *Any) Description() string
- func (m *Any) Extensions() []*Extension
- func (y *Any) HasDefault() bool
- func (m *Any) Ident() string
- func (m *Any) IfFeatures() []*IfFeature
- func (m *Any) IsConfigSet() bool
- func (m *Any) IsMandatorySet() bool
- func (m *Any) Mandatory() bool
- func (m *Any) Musts() []*Must
- func (m *Any) Parent() Meta
- func (m *Any) Reference() string
- func (y *Any) Type() *Type
- func (y *Any) Units() string
- func (m *Any) When() *When
- type Augment
- func (m *Augment) Actions() map[string]*Rpc
- func (m *Augment) DataDefinition(ident string) Definition
- func (m *Augment) DataDefinitions() []Definition
- func (m *Augment) Definition(ident string) Definition
- func (m *Augment) Description() string
- func (m *Augment) Extensions() []*Extension
- func (m *Augment) Ident() string
- func (m *Augment) IfFeatures() []*IfFeature
- func (m *Augment) IsRecursive() bool
- func (m *Augment) Notifications() map[string]*Notification
- func (m *Augment) Parent() Meta
- func (m *Augment) Reference() string
- func (m *Augment) When() *When
- type BelongsTo
- type Bit
- type Builder
- func (b *Builder) Action(o interface{}, ident string) *Rpc
- func (b *Builder) ActionInput(o interface{}) *RpcInput
- func (b *Builder) ActionOutput(o interface{}) *RpcOutput
- func (b *Builder) AddDeviate(o interface{}) *AddDeviate
- func (b *Builder) AddExtension(o interface{}, keyword string, ext *Extension)
- func (b *Builder) Any(o interface{}, ident string) *Any
- func (b *Builder) Augment(o interface{}, path string) *Augment
- func (b *Builder) Base(o interface{}, base string)
- func (b *Builder) BelongsTo(o interface{}, moduleName string) *BelongsTo
- func (b *Builder) Bit(o interface{}, ident string) *Bit
- func (b *Builder) Case(o interface{}, ident string) *ChoiceCase
- func (b *Builder) Choice(o interface{}, ident string) *Choice
- func (b *Builder) Config(o interface{}, config bool)
- func (b *Builder) Contact(o interface{}, c string)
- func (b *Builder) Container(o interface{}, ident string) *Container
- func (b *Builder) Default(o interface{}, defaultVal string)
- func (b *Builder) Defaults(o interface{}, defaultVal []string)
- func (b *Builder) DeleteDeviate(o interface{}) *DeleteDeviate
- func (b *Builder) Description(o interface{}, desc string)
- func (b *Builder) Deviation(o interface{}, ident string) *Deviation
- func (b *Builder) Enum(o interface{}, label string) *Enum
- func (b *Builder) EnumValue(o interface{}, x int)
- func (b *Builder) ErrorAppTag(o interface{}, tag string)
- func (b *Builder) ErrorMessage(o interface{}, msg string)
- func (b *Builder) Extension(prefixAndIdent string, args []string) *Extension
- func (b *Builder) ExtensionDef(o interface{}, ident string) *ExtensionDef
- func (b *Builder) ExtensionDefArg(o interface{}, ident string) *ExtensionDefArg
- func (b *Builder) Feature(o interface{}, ident string) *Feature
- func (b *Builder) FractionDigits(o interface{}, x int)
- func (b *Builder) Grouping(o interface{}, ident string) *Grouping
- func (b *Builder) Identity(o interface{}, ident string) *Identity
- func (b *Builder) IfFeature(o interface{}, expression string) *IfFeature
- func (b *Builder) Import(o interface{}, moduleName string, loader Loader) *Import
- func (b *Builder) Include(o interface{}, subName string, loader Loader) *Include
- func (b *Builder) Key(o interface{}, keys string)
- func (b *Builder) Leaf(o interface{}, ident string) *Leaf
- func (b *Builder) LeafList(o interface{}, ident string) *LeafList
- func (b *Builder) LengthRange(o interface{}, arg string) *Range
- func (b *Builder) List(o interface{}, ident string) *List
- func (b *Builder) Mandatory(o interface{}, m bool)
- func (b *Builder) MaxElements(o interface{}, i int)
- func (b *Builder) MinElements(o interface{}, i int)
- func (b *Builder) Module(ident string, fs FeatureSet) *Module
- func (b *Builder) Must(o interface{}, expression string) *Must
- func (b *Builder) Namespace(o interface{}, ns string)
- func (b *Builder) NotSupported(o interface{})
- func (b *Builder) Notification(o interface{}, ident string) *Notification
- func (b *Builder) OrderedBy(o interface{}, order OrderedBy)
- func (b *Builder) Organization(o interface{}, org string)
- func (b *Builder) Path(o interface{}, p string)
- func (b *Builder) Pattern(o interface{}, pattern string) *Pattern
- func (b *Builder) Position(o interface{}, x int)
- func (b *Builder) Prefix(o interface{}, prefix string)
- func (b *Builder) Presence(o interface{}, desc string)
- func (b *Builder) Reference(o interface{}, r string)
- func (b *Builder) Refine(o interface{}, path string) *Refine
- func (b *Builder) ReplaceDeviate(o interface{}) *ReplaceDeviate
- func (b *Builder) RequireInstance(o interface{}, require bool)
- func (b *Builder) Revision(o interface{}, rev string) *Revision
- func (b *Builder) SetInverted(o interface{})
- func (b *Builder) SetRevisionDate(o interface{}, revisionDate string)
- func (b *Builder) Submodule(parent *Module, ident string, fs FeatureSet) *Module
- func (b *Builder) Type(o interface{}, ident string) *Type
- func (b *Builder) Typedef(o interface{}, ident string) *Typedef
- func (b *Builder) UnBounded(o interface{}, x bool)
- func (b *Builder) Unique(o interface{}, unique string)
- func (b *Builder) Units(o interface{}, units string)
- func (b *Builder) Uses(o interface{}, ident string) *Uses
- func (b *Builder) ValueRange(o interface{}, arg string) *Range
- func (b *Builder) When(o interface{}, expression string) *When
- func (b *Builder) YangVersion(o interface{}, ver string)
- func (b *Builder) YinElement(o interface{}, prop bool)
- type Choice
- func (y *Choice) CaseIdents() []string
- func (y *Choice) Cases() map[string]*ChoiceCase
- func (m *Choice) Config() bool
- func (m *Choice) Default() string
- func (m *Choice) DefaultValue() interface{}
- func (m *Choice) Description() string
- func (m *Choice) Extensions() []*Extension
- func (m *Choice) HasDefault() bool
- func (m *Choice) Ident() string
- func (m *Choice) IfFeatures() []*IfFeature
- func (m *Choice) IsConfigSet() bool
- func (m *Choice) IsMandatorySet() bool
- func (m *Choice) Mandatory() bool
- func (m *Choice) Parent() Meta
- func (m *Choice) Reference() string
- func (m *Choice) Status() Status
- func (m *Choice) When() *When
- type ChoiceCase
- func (m *ChoiceCase) DataDefinition(ident string) Definition
- func (m *ChoiceCase) DataDefinitions() []Definition
- func (m *ChoiceCase) Definition(ident string) Definition
- func (m *ChoiceCase) Description() string
- func (m *ChoiceCase) Extensions() []*Extension
- func (m *ChoiceCase) Ident() string
- func (m *ChoiceCase) IfFeatures() []*IfFeature
- func (m *ChoiceCase) IsRecursive() bool
- func (m *ChoiceCase) Parent() Meta
- func (m *ChoiceCase) Reference() string
- func (m *ChoiceCase) When() *When
- type Container
- func (m *Container) Actions() map[string]*Rpc
- func (m *Container) Config() bool
- func (m *Container) DataDefinition(ident string) Definition
- func (m *Container) DataDefinitions() []Definition
- func (m *Container) Definition(ident string) Definition
- func (m *Container) Description() string
- func (m *Container) Extensions() []*Extension
- func (m *Container) Groupings() map[string]*Grouping
- func (m *Container) Ident() string
- func (m *Container) IfFeatures() []*IfFeature
- func (m *Container) IsConfigSet() bool
- func (m *Container) IsMandatorySet() bool
- func (m *Container) IsRecursive() bool
- func (m *Container) Mandatory() bool
- func (m *Container) Musts() []*Must
- func (m *Container) Notifications() map[string]*Notification
- func (m *Container) Parent() Meta
- func (m *Container) Presence() string
- func (m *Container) Reference() string
- func (m *Container) Status() Status
- func (m *Container) Typedefs() map[string]*Typedef
- func (m *Container) When() *When
- type Definition
- type DeleteDeviate
- func (m *DeleteDeviate) Default() []string
- func (m *DeleteDeviate) DefaultValue() interface{}
- func (m *DeleteDeviate) Extensions() []*Extension
- func (m *DeleteDeviate) HasDefault() bool
- func (m *DeleteDeviate) Musts() []*Must
- func (m *DeleteDeviate) Parent() Meta
- func (m *DeleteDeviate) Unique() [][]string
- func (m *DeleteDeviate) Units() string
- type Describable
- type Deviation
- type Enum
- type Extension
- type ExtensionDef
- func (y *ExtensionDef) Arguments() []*ExtensionDefArg
- func (m *ExtensionDef) Description() string
- func (m *ExtensionDef) Extensions() []*Extension
- func (m *ExtensionDef) Ident() string
- func (m *ExtensionDef) Parent() Meta
- func (m *ExtensionDef) Reference() string
- func (m *ExtensionDef) Status() Status
- type ExtensionDefArg
- type Feature
- type FeatureSet
- type Grouping
- func (m *Grouping) Actions() map[string]*Rpc
- func (m *Grouping) DataDefinition(ident string) Definition
- func (m *Grouping) DataDefinitions() []Definition
- func (m *Grouping) Definition(ident string) Definition
- func (m *Grouping) Description() string
- func (m *Grouping) Extensions() []*Extension
- func (m *Grouping) Groupings() map[string]*Grouping
- func (m *Grouping) Ident() string
- func (m *Grouping) IsRecursive() bool
- func (m *Grouping) Notifications() map[string]*Notification
- func (m *Grouping) Parent() Meta
- func (m *Grouping) Reference() string
- func (m *Grouping) Typedefs() map[string]*Typedef
- type HasActions
- type HasAugments
- type HasCases
- type HasConfig
- type HasDataDefinitions
- type HasDefault
- type HasDefaultValue
- type HasDefaultValues
- type HasDefinitions
- type HasDetails
- type HasErrorMessage
- type HasExtensions
- type HasGroupings
- type HasIfFeatures
- type HasListDetails
- type HasMandatory
- type HasMinMax
- type HasMusts
- type HasNotifications
- type HasOrderedBy
- type HasPresence
- type HasStatus
- type HasType
- type HasTypedefs
- type HasUnbounded
- type HasUnique
- type HasUnits
- type HasWhen
- type Identifiable
- type Identity
- func (y *Identity) Base() []*Identity
- func (y *Identity) BaseIds() []string
- func (y *Identity) Derived() map[string]*Identity
- func (y *Identity) DerivedDirect() []*Identity
- func (m *Identity) Description() string
- func (m *Identity) Extensions() []*Extension
- func (m *Identity) Ident() string
- func (m *Identity) IfFeatures() []*IfFeature
- func (m *Identity) Parent() Meta
- func (m *Identity) Reference() string
- type IfFeature
- type Import
- type Include
- type Leaf
- func (m *Leaf) Config() bool
- func (m *Leaf) Default() string
- func (m *Leaf) DefaultValue() interface{}
- func (m *Leaf) Description() string
- func (m *Leaf) Extensions() []*Extension
- func (m *Leaf) HasDefault() bool
- func (m *Leaf) Ident() string
- func (m *Leaf) IfFeatures() []*IfFeature
- func (m *Leaf) IsConfigSet() bool
- func (m *Leaf) IsMandatorySet() bool
- func (m *Leaf) Mandatory() bool
- func (m *Leaf) Musts() []*Must
- func (m *Leaf) Parent() Meta
- func (m *Leaf) Reference() string
- func (m *Leaf) Type() *Type
- func (m *Leaf) Units() string
- func (m *Leaf) When() *When
- type LeafList
- func (m *LeafList) Config() bool
- func (m *LeafList) Default() []string
- func (m *LeafList) DefaultValue() interface{}
- func (m *LeafList) Description() string
- func (m *LeafList) Extensions() []*Extension
- func (m *LeafList) HasDefault() bool
- func (m *LeafList) Ident() string
- func (m *LeafList) IfFeatures() []*IfFeature
- func (m *LeafList) IsConfigSet() bool
- func (m *LeafList) IsMandatorySet() bool
- func (m *LeafList) IsMaxElementsSet() bool
- func (m *LeafList) IsMinElementsSet() bool
- func (m *LeafList) IsUnboundedSet() bool
- func (m *LeafList) Mandatory() bool
- func (m *LeafList) MaxElements() int
- func (m *LeafList) MinElements() int
- func (m *LeafList) Musts() []*Must
- func (m *LeafList) OrderedBy() OrderedBy
- func (m *LeafList) Parent() Meta
- func (m *LeafList) Reference() string
- func (m *LeafList) Type() *Type
- func (m *LeafList) Unbounded() bool
- func (m *LeafList) Units() string
- func (m *LeafList) When() *When
- type Leafable
- type List
- func (m *List) Actions() map[string]*Rpc
- func (m *List) Config() bool
- func (m *List) DataDefinition(ident string) Definition
- func (m *List) DataDefinitions() []Definition
- func (m *List) Definition(ident string) Definition
- func (m *List) Description() string
- func (m *List) Extensions() []*Extension
- func (m *List) Groupings() map[string]*Grouping
- func (m *List) Ident() string
- func (m *List) IfFeatures() []*IfFeature
- func (m *List) IsConfigSet() bool
- func (m *List) IsMandatorySet() bool
- func (m *List) IsMaxElementsSet() bool
- func (m *List) IsMinElementsSet() bool
- func (m *List) IsRecursive() bool
- func (m *List) IsUnboundedSet() bool
- func (y *List) KeyMeta() (keyMeta []Leafable)
- func (m *List) Mandatory() bool
- func (m *List) MaxElements() int
- func (m *List) MinElements() int
- func (m *List) Musts() []*Must
- func (m *List) Notifications() map[string]*Notification
- func (m *List) OrderedBy() OrderedBy
- func (m *List) Parent() Meta
- func (m *List) Reference() string
- func (m *List) Typedefs() map[string]*Typedef
- func (m *List) Unbounded() bool
- func (m *List) Unique() [][]string
- func (m *List) When() *When
- type Loader
- type Meta
- type MetaPath
- type Module
- func (m *Module) Actions() map[string]*Rpc
- func (m *Module) Augments() []*Augment
- func (y *Module) Contact() string
- func (m *Module) DataDefinition(ident string) Definition
- func (m *Module) DataDefinitions() []Definition
- func (m *Module) Definition(ident string) Definition
- func (m *Module) Description() string
- func (y *Module) Deviations() []*Deviation
- func (y *Module) ExtensionDefs() map[string]*ExtensionDef
- func (m *Module) Extensions() []*Extension
- func (y *Module) FeatureSet() FeatureSet
- func (y *Module) Features() map[string]*Feature
- func (m *Module) Groupings() map[string]*Grouping
- func (m *Module) Ident() string
- func (y *Module) Identities() map[string]*Identity
- func (y *Module) Imports() map[string]*Import
- func (y *Module) Includes() []*Include
- func (m *Module) IsRecursive() bool
- func (y *Module) ModuleByPrefix(prefix string) (*Module, error)
- func (y *Module) Namespace() string
- func (m *Module) Notifications() map[string]*Notification
- func (y *Module) Organization() string
- func (m *Module) Parent() Meta
- func (y *Module) Prefix() string
- func (m *Module) Reference() string
- func (y *Module) Revision() *Revision
- func (y *Module) RevisionHistory() []*Revision
- func (y *Module) Revisions() []*Revision
- func (m *Module) Typedefs() map[string]*Typedef
- func (y *Module) Version() string
- type Must
- type Notification
- func (m *Notification) DataDefinition(ident string) Definition
- func (m *Notification) DataDefinitions() []Definition
- func (m *Notification) Definition(ident string) Definition
- func (m *Notification) Description() string
- func (m *Notification) Extensions() []*Extension
- func (m *Notification) Groupings() map[string]*Grouping
- func (m *Notification) Ident() string
- func (m *Notification) IfFeatures() []*IfFeature
- func (m *Notification) IsRecursive() bool
- func (m *Notification) Parent() Meta
- func (m *Notification) Reference() string
- func (m *Notification) Typedefs() map[string]*Typedef
- type OrderedBy
- type Path
- type Pattern
- type Range
- type RangeEntry
- type RangeNumber
- type Refine
- func (m *Refine) Config() bool
- func (m *Refine) Default() string
- func (m *Refine) DefaultValue() interface{}
- func (m *Refine) Description() string
- func (m *Refine) Extensions() []*Extension
- func (m *Refine) HasDefault() bool
- func (m *Refine) Ident() string
- func (m *Refine) IfFeatures() []*IfFeature
- func (m *Refine) IsConfigSet() bool
- func (m *Refine) IsMandatorySet() bool
- func (m *Refine) IsMaxElementsSet() bool
- func (m *Refine) IsMinElementsSet() bool
- func (m *Refine) IsUnboundedSet() bool
- func (m *Refine) Mandatory() bool
- func (m *Refine) MaxElements() int
- func (m *Refine) MinElements() int
- func (m *Refine) Musts() []*Must
- func (m *Refine) Parent() Meta
- func (m *Refine) Presence() string
- func (m *Refine) Reference() string
- func (m *Refine) Unbounded() bool
- type ReplaceDeviate
- func (m *ReplaceDeviate) Config() bool
- func (m *ReplaceDeviate) Default() []string
- func (m *ReplaceDeviate) DefaultValue() interface{}
- func (m *ReplaceDeviate) Extensions() []*Extension
- func (m *ReplaceDeviate) HasDefault() bool
- func (m *ReplaceDeviate) IsConfigSet() bool
- func (m *ReplaceDeviate) IsMandatorySet() bool
- func (m *ReplaceDeviate) IsMaxElementsSet() bool
- func (m *ReplaceDeviate) IsMinElementsSet() bool
- func (m *ReplaceDeviate) Mandatory() bool
- func (m *ReplaceDeviate) MaxElements() int
- func (m *ReplaceDeviate) MinElements() int
- func (m *ReplaceDeviate) Parent() Meta
- func (m *ReplaceDeviate) Type() *Type
- func (m *ReplaceDeviate) Units() string
- type Revision
- type Rpc
- func (m *Rpc) Description() string
- func (m *Rpc) Extensions() []*Extension
- func (m *Rpc) Groupings() map[string]*Grouping
- func (m *Rpc) Ident() string
- func (m *Rpc) IfFeatures() []*IfFeature
- func (y *Rpc) Input() *RpcInput
- func (y *Rpc) Output() *RpcOutput
- func (m *Rpc) Parent() Meta
- func (m *Rpc) Reference() string
- func (m *Rpc) Typedefs() map[string]*Typedef
- type RpcInput
- func (m *RpcInput) DataDefinition(ident string) Definition
- func (m *RpcInput) DataDefinitions() []Definition
- func (m *RpcInput) Definition(ident string) Definition
- func (m *RpcInput) Description() string
- func (m *RpcInput) Extensions() []*Extension
- func (m *RpcInput) Groupings() map[string]*Grouping
- func (y *RpcInput) Ident() string
- func (m *RpcInput) IfFeatures() []*IfFeature
- func (m *RpcInput) IsRecursive() bool
- func (m *RpcInput) Musts() []*Must
- func (m *RpcInput) Parent() Meta
- func (m *RpcInput) Reference() string
- func (m *RpcInput) Typedefs() map[string]*Typedef
- type RpcOutput
- func (m *RpcOutput) DataDefinition(ident string) Definition
- func (m *RpcOutput) DataDefinitions() []Definition
- func (m *RpcOutput) Definition(ident string) Definition
- func (m *RpcOutput) Description() string
- func (m *RpcOutput) Extensions() []*Extension
- func (m *RpcOutput) Groupings() map[string]*Grouping
- func (y *RpcOutput) Ident() string
- func (m *RpcOutput) IfFeatures() []*IfFeature
- func (m *RpcOutput) IsRecursive() bool
- func (m *RpcOutput) Musts() []*Must
- func (m *RpcOutput) Parent() Meta
- func (m *RpcOutput) Reference() string
- func (m *RpcOutput) Typedefs() map[string]*Typedef
- type Status
- type Type
- func (y *Type) Base() *Identity
- func (y *Type) Bits() []*Bit
- func (m *Type) Description() string
- func (y *Type) Enum() val.EnumList
- func (y *Type) Enums() []*Enum
- func (m *Type) Extensions() []*Extension
- func (y *Type) Format() val.Format
- func (y *Type) FractionDigits() int
- func (m *Type) Ident() string
- func (y *Type) Length() []*Range
- func (y *Type) Path() string
- func (y *Type) Patterns() []*Pattern
- func (y *Type) Range() []*Range
- func (m *Type) Reference() string
- func (y *Type) RequireInstance() bool
- func (y *Type) Resolve() *Type
- func (y *Type) Union() []*Type
- func (y *Type) UnionFormats() []val.Format
- type Typedef
- func (m *Typedef) Default() string
- func (m *Typedef) DefaultValue() interface{}
- func (m *Typedef) Description() string
- func (m *Typedef) Extensions() []*Extension
- func (m *Typedef) HasDefault() bool
- func (m *Typedef) Ident() string
- func (m *Typedef) Parent() Meta
- func (m *Typedef) Reference() string
- func (m *Typedef) Type() *Type
- func (m *Typedef) Units() string
- type Uses
- func (m *Uses) Augments() []*Augment
- func (m *Uses) Description() string
- func (m *Uses) Extensions() []*Extension
- func (m *Uses) Ident() string
- func (m *Uses) IfFeatures() []*IfFeature
- func (m *Uses) Parent() Meta
- func (m *Uses) Reference() string
- func (y *Uses) Refinements() []*Refine
- func (m *Uses) When() *When
- type When
Constants ¶
const ( OrderedBySystem = iota OrderedByUser )
Variables ¶
This section is empty.
Functions ¶
func IsChoiceCase ¶
func IsContainer ¶
IsContainer return true if meta is *Module or *Container
func IsNotification ¶
IsNotification returns true if meta is *Notification
func SchemaPath ¶
SchemaPath as determined in the information model (e.g. YANG), not data model (e.g. RESTCONF).
Example:
module x { list foo { leaf bar { ... Path on Meta structure for leaf would be 'x/foo/bar'
Types ¶
type AddDeviate ¶
type AddDeviate struct {
// contains filtered or unexported fields
}
func (*AddDeviate) Config ¶
func (m *AddDeviate) Config() bool
func (*AddDeviate) Default ¶
func (m *AddDeviate) Default() []string
func (*AddDeviate) DefaultValue ¶
func (m *AddDeviate) DefaultValue() interface{}
func (*AddDeviate) Extensions ¶
func (m *AddDeviate) Extensions() []*Extension
func (*AddDeviate) HasDefault ¶
func (m *AddDeviate) HasDefault() bool
func (*AddDeviate) IsConfigSet ¶
func (m *AddDeviate) IsConfigSet() bool
func (*AddDeviate) IsMandatorySet ¶
func (m *AddDeviate) IsMandatorySet() bool
func (*AddDeviate) IsMaxElementsSet ¶
func (m *AddDeviate) IsMaxElementsSet() bool
func (*AddDeviate) IsMinElementsSet ¶
func (m *AddDeviate) IsMinElementsSet() bool
func (*AddDeviate) Mandatory ¶
func (m *AddDeviate) Mandatory() bool
func (*AddDeviate) MaxElements ¶
func (m *AddDeviate) MaxElements() int
MaxElements return 0 when unbounded
func (*AddDeviate) MinElements ¶
func (m *AddDeviate) MinElements() int
func (*AddDeviate) Musts ¶
func (m *AddDeviate) Musts() []*Must
func (*AddDeviate) Parent ¶
func (m *AddDeviate) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*AddDeviate) Unique ¶
func (m *AddDeviate) Unique() [][]string
Unique is list of fields (or compound fields) that must be unque in the list of items. If there is a key listed, that is implicitly unique and would not be listed here.
func (*AddDeviate) Units ¶
func (m *AddDeviate) Units() string
type Any ¶
type Any struct {
// contains filtered or unexported fields
}
func (*Any) DefaultValue ¶
func (y *Any) DefaultValue() interface{}
func (*Any) Extensions ¶
func (*Any) HasDefault ¶
func (*Any) IfFeatures ¶
func (*Any) IsConfigSet ¶
func (*Any) IsMandatorySet ¶
type Augment ¶
type Augment struct {
// contains filtered or unexported fields
}
func (*Augment) DataDefinition ¶
func (m *Augment) DataDefinition(ident string) Definition
func (*Augment) DataDefinitions ¶
func (m *Augment) DataDefinitions() []Definition
func (*Augment) Definition ¶
func (m *Augment) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*Augment) Extensions ¶
func (*Augment) IfFeatures ¶
func (*Augment) IsRecursive ¶
func (*Augment) Notifications ¶
func (m *Augment) Notifications() map[string]*Notification
type Bit ¶
type Bit struct { Position int // contains filtered or unexported fields }
func (*Bit) Extensions ¶
type Builder ¶
type Builder struct {
LastErr error
}
func (*Builder) ActionInput ¶
func (*Builder) ActionOutput ¶
func (*Builder) AddDeviate ¶
func (b *Builder) AddDeviate(o interface{}) *AddDeviate
func (*Builder) AddExtension ¶
func (*Builder) Case ¶
func (b *Builder) Case(o interface{}, ident string) *ChoiceCase
func (*Builder) DeleteDeviate ¶
func (b *Builder) DeleteDeviate(o interface{}) *DeleteDeviate
func (*Builder) Description ¶
func (*Builder) ErrorAppTag ¶
func (*Builder) ErrorMessage ¶
func (*Builder) ExtensionDef ¶
func (b *Builder) ExtensionDef(o interface{}, ident string) *ExtensionDef
func (*Builder) ExtensionDefArg ¶
func (b *Builder) ExtensionDefArg(o interface{}, ident string) *ExtensionDefArg
func (*Builder) FractionDigits ¶
func (*Builder) LengthRange ¶
func (*Builder) MaxElements ¶
func (*Builder) MinElements ¶
func (*Builder) NotSupported ¶
func (b *Builder) NotSupported(o interface{})
func (*Builder) Notification ¶
func (b *Builder) Notification(o interface{}, ident string) *Notification
func (*Builder) Organization ¶
func (*Builder) ReplaceDeviate ¶
func (b *Builder) ReplaceDeviate(o interface{}) *ReplaceDeviate
func (*Builder) RequireInstance ¶
func (*Builder) SetInverted ¶
func (b *Builder) SetInverted(o interface{})
func (*Builder) SetRevisionDate ¶
func (*Builder) Submodule ¶
func (b *Builder) Submodule(parent *Module, ident string, fs FeatureSet) *Module
func (*Builder) ValueRange ¶
func (*Builder) YangVersion ¶
func (*Builder) YinElement ¶
type Choice ¶
type Choice struct {
// contains filtered or unexported fields
}
func (*Choice) CaseIdents ¶
func (*Choice) Cases ¶
func (y *Choice) Cases() map[string]*ChoiceCase
func (*Choice) DefaultValue ¶
func (m *Choice) DefaultValue() interface{}
func (*Choice) Extensions ¶
func (*Choice) HasDefault ¶
func (*Choice) IfFeatures ¶
func (*Choice) IsConfigSet ¶
func (*Choice) IsMandatorySet ¶
type ChoiceCase ¶
type ChoiceCase struct {
// contains filtered or unexported fields
}
func (*ChoiceCase) DataDefinition ¶
func (m *ChoiceCase) DataDefinition(ident string) Definition
func (*ChoiceCase) DataDefinitions ¶
func (m *ChoiceCase) DataDefinitions() []Definition
func (*ChoiceCase) Definition ¶
func (m *ChoiceCase) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*ChoiceCase) Description ¶
func (m *ChoiceCase) Description() string
Description of ChoiceCase
func (*ChoiceCase) Extensions ¶
func (m *ChoiceCase) Extensions() []*Extension
func (*ChoiceCase) IfFeatures ¶
func (m *ChoiceCase) IfFeatures() []*IfFeature
func (*ChoiceCase) IsRecursive ¶
func (m *ChoiceCase) IsRecursive() bool
func (*ChoiceCase) Parent ¶
func (m *ChoiceCase) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*ChoiceCase) Reference ¶
func (m *ChoiceCase) Reference() string
func (*ChoiceCase) When ¶
func (m *ChoiceCase) When() *When
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func (*Container) DataDefinition ¶
func (m *Container) DataDefinition(ident string) Definition
func (*Container) DataDefinitions ¶
func (m *Container) DataDefinitions() []Definition
func (*Container) Definition ¶
func (m *Container) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*Container) Extensions ¶
func (*Container) IfFeatures ¶
func (*Container) IsConfigSet ¶
func (*Container) IsMandatorySet ¶
func (*Container) IsRecursive ¶
func (*Container) Notifications ¶
func (m *Container) Notifications() map[string]*Notification
func (*Container) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Container) Presence ¶
Presence describes what the existance of this container in the data model means. https://tools.ietf.org/html/rfc7950#section-7.5.1
type Definition ¶
type Definition interface { Meta Identifiable // contains filtered or unexported methods }
Definition data structure defining details. This includes data definitions like container and leaf, but also notifications and actions
func Find ¶
func Find(p Meta, path string) Definition
type DeleteDeviate ¶
type DeleteDeviate struct {
// contains filtered or unexported fields
}
func (*DeleteDeviate) Default ¶
func (m *DeleteDeviate) Default() []string
func (*DeleteDeviate) DefaultValue ¶
func (m *DeleteDeviate) DefaultValue() interface{}
func (*DeleteDeviate) Extensions ¶
func (m *DeleteDeviate) Extensions() []*Extension
func (*DeleteDeviate) HasDefault ¶
func (m *DeleteDeviate) HasDefault() bool
func (*DeleteDeviate) Musts ¶
func (m *DeleteDeviate) Musts() []*Must
func (*DeleteDeviate) Parent ¶
func (m *DeleteDeviate) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*DeleteDeviate) Unique ¶
func (m *DeleteDeviate) Unique() [][]string
Unique is list of fields (or compound fields) that must be unque in the list of items. If there is a key listed, that is implicitly unique and would not be listed here.
func (*DeleteDeviate) Units ¶
func (m *DeleteDeviate) Units() string
type Describable ¶
type Describable interface { // Description of meta item Description() string // Reference is a human-readable, cross-reference to some external source. Example: Item #89 of foo catalog" Reference() string // contains filtered or unexported methods }
Describable is anything that can have a description, oddly, most data definitions except 'case', 'input' or 'output'
type Deviation ¶
type Deviation struct { // NotSupported is true, then target node can be removed NotSupported bool // Add properties to target Add *AddDeviate // Replace properties from target Replace *ReplaceDeviate // Delete properties from target Delete *DeleteDeviate // contains filtered or unexported fields }
Deviation is a lot like refine but can be used without the "uses" statement and instead right on node tree. This is typically used for vendors attempting to implement a industry standard YANG model but have some changes
func (*Deviation) Extensions ¶
type Enum ¶
type Enum struct {
// contains filtered or unexported fields
}
func (*Enum) Extensions ¶
type Extension ¶
type Extension struct {
// contains filtered or unexported fields
}
Extension is a very powerful concept in YANG. It let's you extend YANG language to have defintions for whatever you wish it had. It's like a meta language inside the YANG (which is already a meta language). Can extensions have extensions? you bet. See YANG RFC on extensions for more information.
https://tools.ietf.org/html/rfc7950#section-6.3.1
YANG lets you extend everything, including simple statements like description. e.g.
container x { description "X" { my-ext:this-is-secondary-on-container-keyword-description; } }
This extension would be listed in the extensions for the *Container object but would have OnKeyword of "description" to distinguish it from extensions extension of container itself.
func FindExtension ¶
FindExtension simply finds an extension by name in a list of extensions
func (*Extension) Arguments ¶
Arguments are optional argumes to extension. The extension definition will define what arguments are allowed if any.
func (*Extension) Definition ¶
func (y *Extension) Definition() *ExtensionDef
Definition is define the schema for this extension instance
func (*Extension) Extensions ¶
func (*Extension) Keyword ¶
Keyword is set when there are extensions of things that do not have a data structure to store them and a likely just Go scalar values. Examples: description, reference, units, max-length etc.
type ExtensionDef ¶
type ExtensionDef struct {
// contains filtered or unexported fields
}
func (*ExtensionDef) Arguments ¶
func (y *ExtensionDef) Arguments() []*ExtensionDefArg
func (*ExtensionDef) Description ¶
func (m *ExtensionDef) Description() string
Description of ExtensionDef
func (*ExtensionDef) Extensions ¶
func (m *ExtensionDef) Extensions() []*Extension
func (*ExtensionDef) Ident ¶
func (m *ExtensionDef) Ident() string
Ident is identity of ExtensionDef
func (*ExtensionDef) Parent ¶
func (m *ExtensionDef) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*ExtensionDef) Reference ¶
func (m *ExtensionDef) Reference() string
func (*ExtensionDef) Status ¶
func (m *ExtensionDef) Status() Status
type ExtensionDefArg ¶
type ExtensionDefArg struct {
// contains filtered or unexported fields
}
func (*ExtensionDefArg) Description ¶
func (m *ExtensionDefArg) Description() string
Description of ExtensionDefArg
func (*ExtensionDefArg) Extensions ¶
func (m *ExtensionDefArg) Extensions() []*Extension
func (*ExtensionDefArg) Ident ¶
func (m *ExtensionDefArg) Ident() string
Ident is identity of ExtensionDefArg
func (*ExtensionDefArg) Parent ¶
func (m *ExtensionDefArg) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*ExtensionDefArg) Reference ¶
func (m *ExtensionDefArg) Reference() string
func (*ExtensionDefArg) YinElement ¶
func (y *ExtensionDefArg) YinElement() bool
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
func (*Feature) Extensions ¶
func (*Feature) IfFeatures ¶
type FeatureSet ¶
func AllFeaturesOn ¶
func AllFeaturesOn() FeatureSet
func FeaturesOff ¶
func FeaturesOff(features []string) FeatureSet
All other features will be on. Effectively a whitelist.
func FeaturesOn ¶
func FeaturesOn(features []string) FeatureSet
All other features will be off. Effectively a blacklist.
type Grouping ¶
type Grouping struct {
// contains filtered or unexported fields
}
*
RFC7950 Sec 7.12 The "grouping" Statement Identifiers appearing inside the grouping are resolved relative to the scope in which the grouping is defined, not where it is used. Prefix mappings, type names, grouping names, and extension usage are evaluated in the hierarchy where the "grouping" statement appears. For extensions, this means that extensions defined as direct children to a "grouping" statement are applied to the grouping itself.
func (*Grouping) DataDefinition ¶
func (m *Grouping) DataDefinition(ident string) Definition
func (*Grouping) DataDefinitions ¶
func (m *Grouping) DataDefinitions() []Definition
func (*Grouping) Definition ¶
func (m *Grouping) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*Grouping) Extensions ¶
func (*Grouping) IsRecursive ¶
func (*Grouping) Notifications ¶
func (m *Grouping) Notifications() map[string]*Notification
type HasActions ¶
type HasActions interface { HasDataDefinitions Actions() map[string]*Rpc // contains filtered or unexported methods }
type HasAugments ¶
type HasAugments interface { Augments() []*Augment // contains filtered or unexported methods }
type HasCases ¶
type HasCases interface { Definition // contains filtered or unexported methods }
type HasDataDefinitions ¶
type HasDataDefinitions interface { HasDefinitions DataDefinitions() []Definition // contains filtered or unexported methods }
HasDefinitions holds container, leaf, list, etc definitions which often (but not always) also hold notifications and actions
type HasDefault ¶
type HasDefault interface { HasDefault() bool DefaultValue() interface{} // contains filtered or unexported methods }
type HasDefaultValue ¶
type HasDefaultValue interface { HasDefault Default() string // contains filtered or unexported methods }
type HasDefaultValues ¶
type HasDefaultValues interface { HasDefault Default() []string // contains filtered or unexported methods }
type HasDefinitions ¶
type HasDefinitions interface { Definition // Definition returns DataDefinition, Action or Notification by name Definition(ident string) Definition // rare chance this is part of a recursive schema. If so, care should // be taken navigating the schema tree (information model). Navigating // the actual config/metrics (data model) should not be a problem IsRecursive() bool // contains filtered or unexported methods }
type HasDetails ¶
type HasDetails interface { Definition HasMandatory HasConfig }
type HasErrorMessage ¶
type HasExtensions ¶
type HasExtensions interface { // User customized YANG found in the body Extensions() []*Extension // contains filtered or unexported methods }
HasExtensions is support by almost every structure. See YANG language extensions for more information
type HasGroupings ¶
type HasGroupings interface { HasDataDefinitions Groupings() map[string]*Grouping // contains filtered or unexported methods }
type HasIfFeatures ¶
type HasIfFeatures interface { IfFeatures() []*IfFeature // contains filtered or unexported methods }
type HasListDetails ¶
type HasListDetails interface { Definition HasMinMax HasUnbounded HasOrderedBy }
type HasMandatory ¶
type HasMusts ¶
type HasMusts interface { Musts() []*Must // contains filtered or unexported methods }
type HasNotifications ¶
type HasNotifications interface { HasDataDefinitions Notifications() map[string]*Notification // contains filtered or unexported methods }
type HasOrderedBy ¶
type HasOrderedBy interface { OrderedBy() OrderedBy // contains filtered or unexported methods }
type HasPresence ¶
type HasTypedefs ¶
type HasUnbounded ¶
type HasUnits ¶
type HasUnits interface { Units() string // contains filtered or unexported methods }
type Identifiable ¶
type Identifiable interface { // Ident is short for identifier or name of item. Example: 'leaf foo {...' then 'foo' is ident Ident() string }
Identifiable are things that have a unique identifier allowing it to be found in a list.
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
func (*Identity) DerivedDirect ¶
func (*Identity) Extensions ¶
func (*Identity) IfFeatures ¶
type IfFeature ¶
type IfFeature struct {
// contains filtered or unexported fields
}
func (*IfFeature) Expression ¶
func (*IfFeature) Extensions ¶
type Import ¶
type Import struct {
// contains filtered or unexported fields
}
func (*Import) Extensions ¶
func (*Import) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Import) RevisionDate ¶
type Include ¶
type Include struct {
// contains filtered or unexported fields
}
func (*Include) Extensions ¶
func (*Include) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Include) RevisionDate ¶
type Leaf ¶
type Leaf struct {
// contains filtered or unexported fields
}
func (*Leaf) DefaultValue ¶
func (m *Leaf) DefaultValue() interface{}
func (*Leaf) Extensions ¶
func (*Leaf) HasDefault ¶
func (*Leaf) IfFeatures ¶
func (*Leaf) IsConfigSet ¶
func (*Leaf) IsMandatorySet ¶
type LeafList ¶
type LeafList struct {
// contains filtered or unexported fields
}
func (*LeafList) DefaultValue ¶
func (m *LeafList) DefaultValue() interface{}
func (*LeafList) Extensions ¶
func (*LeafList) HasDefault ¶
func (*LeafList) IfFeatures ¶
func (*LeafList) IsConfigSet ¶
func (*LeafList) IsMandatorySet ¶
func (*LeafList) IsMaxElementsSet ¶
func (*LeafList) IsMinElementsSet ¶
func (*LeafList) IsUnboundedSet ¶
func (*LeafList) MaxElements ¶
MaxElements return 0 when unbounded
func (*LeafList) MinElements ¶
type Leafable ¶
type Leafable interface { Definition HasDefault HasUnits HasType }
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) DataDefinition ¶
func (m *List) DataDefinition(ident string) Definition
func (*List) DataDefinitions ¶
func (m *List) DataDefinitions() []Definition
func (*List) Definition ¶
func (m *List) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*List) Extensions ¶
func (*List) IfFeatures ¶
func (*List) IsConfigSet ¶
func (*List) IsMandatorySet ¶
func (*List) IsMaxElementsSet ¶
func (*List) IsMinElementsSet ¶
func (*List) IsRecursive ¶
func (*List) IsUnboundedSet ¶
func (*List) MinElements ¶
func (*List) Notifications ¶
func (m *List) Notifications() map[string]*Notification
func (*List) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
type Loader ¶
type Loader func(parent *Module, name string, rev string, features FeatureSet, loader Loader) (*Module, error)
Loader abstracts yang modules are loaded from file parsers.
type Meta ¶
type Meta interface { HasExtensions // Parent in the YANG schema tree Parent() Meta }
///////////////// Interfaces //////////////// Definition represent nearly everythihng in YANG, more specifically, anything that can have an extention, which is nearly everything
type MetaPath ¶
type MetaPath struct {
// contains filtered or unexported fields
}
func (*MetaPath) Meta ¶
func (p *MetaPath) Meta() Definition
func (*MetaPath) MetaParent ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module is top-most container of the information model. It's name does not appear in data model.
func OriginalModule ¶
func OriginalModule(m Definition) *Module
Module a definition was defined in, not the module it ended up in. this is useful for resolving typedefs and uses
func RootModule ¶
RootModule finds root meta definition, which is the Module
func (*Module) DataDefinition ¶
func (m *Module) DataDefinition(ident string) Definition
func (*Module) DataDefinitions ¶
func (m *Module) DataDefinitions() []Definition
func (*Module) Definition ¶
func (m *Module) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*Module) Deviations ¶
func (*Module) ExtensionDefs ¶
func (y *Module) ExtensionDefs() map[string]*ExtensionDef
func (*Module) Extensions ¶
func (*Module) FeatureSet ¶
func (y *Module) FeatureSet() FeatureSet
func (*Module) Ident ¶
This is boilerplate functions generated from ./meta/gen/ package. Do not edit this file, instead edit ./gen/gen.in and run "cd gen && go generate" Ident is identity of Module
func (*Module) Identities ¶
func (*Module) IsRecursive ¶
func (*Module) Notifications ¶
func (m *Module) Notifications() map[string]*Notification
func (*Module) Organization ¶
func (*Module) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Module) RevisionHistory ¶
type Must ¶
type Must struct {
// contains filtered or unexported fields
}
func (*Must) ErrorAppTag ¶
func (*Must) ErrorMessage ¶
func (*Must) Expression ¶
func (*Must) Extensions ¶
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
func (*Notification) DataDefinition ¶
func (m *Notification) DataDefinition(ident string) Definition
func (*Notification) DataDefinitions ¶
func (m *Notification) DataDefinitions() []Definition
func (*Notification) Definition ¶
func (m *Notification) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*Notification) Description ¶
func (m *Notification) Description() string
Description of Notification
func (*Notification) Extensions ¶
func (m *Notification) Extensions() []*Extension
func (*Notification) Groupings ¶
func (m *Notification) Groupings() map[string]*Grouping
func (*Notification) Ident ¶
func (m *Notification) Ident() string
Ident is identity of Notification
func (*Notification) IfFeatures ¶
func (m *Notification) IfFeatures() []*IfFeature
func (*Notification) IsRecursive ¶
func (m *Notification) IsRecursive() bool
func (*Notification) Parent ¶
func (m *Notification) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Notification) Reference ¶
func (m *Notification) Reference() string
func (*Notification) Typedefs ¶
func (m *Notification) Typedefs() map[string]*Typedef
type Pattern ¶
type Pattern struct { Pattern string // contains filtered or unexported fields }
Pattern is used to confine string types to specific regular expression values
func (*Pattern) CheckValue ¶
func (*Pattern) ErrorAppTag ¶
func (*Pattern) ErrorMessage ¶
func (*Pattern) Extensions ¶
type Range ¶
type Range struct { Entries []*RangeEntry // contains filtered or unexported fields }
func (*Range) ErrorAppTag ¶
func (*Range) ErrorMessage ¶
func (*Range) Extensions ¶
type RangeEntry ¶
type RangeEntry struct { Min RangeNumber Max RangeNumber Exact RangeNumber }
func (*RangeEntry) CheckValue ¶
func (r *RangeEntry) CheckValue(v val.Value) error
func (*RangeEntry) String ¶
func (r *RangeEntry) String() string
type RangeNumber ¶
type RangeNumber struct {
// contains filtered or unexported fields
}
func (RangeNumber) Empty ¶
func (n RangeNumber) Empty() bool
func (RangeNumber) String ¶
func (n RangeNumber) String() string
type Refine ¶
type Refine struct {
// contains filtered or unexported fields
}
func (*Refine) DefaultValue ¶
func (m *Refine) DefaultValue() interface{}
func (*Refine) Extensions ¶
func (*Refine) HasDefault ¶
func (*Refine) IfFeatures ¶
func (*Refine) IsConfigSet ¶
func (*Refine) IsMandatorySet ¶
func (*Refine) IsMaxElementsSet ¶
func (*Refine) IsMinElementsSet ¶
func (*Refine) IsUnboundedSet ¶
func (*Refine) MinElements ¶
func (*Refine) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Refine) Presence ¶
Presence describes what the existance of this container in the data model means. https://tools.ietf.org/html/rfc7950#section-7.5.1
type ReplaceDeviate ¶
type ReplaceDeviate struct {
// contains filtered or unexported fields
}
func (*ReplaceDeviate) Config ¶
func (m *ReplaceDeviate) Config() bool
func (*ReplaceDeviate) Default ¶
func (m *ReplaceDeviate) Default() []string
func (*ReplaceDeviate) DefaultValue ¶
func (m *ReplaceDeviate) DefaultValue() interface{}
func (*ReplaceDeviate) Extensions ¶
func (m *ReplaceDeviate) Extensions() []*Extension
func (*ReplaceDeviate) HasDefault ¶
func (m *ReplaceDeviate) HasDefault() bool
func (*ReplaceDeviate) IsConfigSet ¶
func (m *ReplaceDeviate) IsConfigSet() bool
func (*ReplaceDeviate) IsMandatorySet ¶
func (m *ReplaceDeviate) IsMandatorySet() bool
func (*ReplaceDeviate) IsMaxElementsSet ¶
func (m *ReplaceDeviate) IsMaxElementsSet() bool
func (*ReplaceDeviate) IsMinElementsSet ¶
func (m *ReplaceDeviate) IsMinElementsSet() bool
func (*ReplaceDeviate) Mandatory ¶
func (m *ReplaceDeviate) Mandatory() bool
func (*ReplaceDeviate) MaxElements ¶
func (m *ReplaceDeviate) MaxElements() int
MaxElements return 0 when unbounded
func (*ReplaceDeviate) MinElements ¶
func (m *ReplaceDeviate) MinElements() int
func (*ReplaceDeviate) Parent ¶
func (m *ReplaceDeviate) Parent() Meta
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*ReplaceDeviate) Type ¶
func (m *ReplaceDeviate) Type() *Type
func (*ReplaceDeviate) Units ¶
func (m *ReplaceDeviate) Units() string
type Revision ¶
type Revision struct {
// contains filtered or unexported fields
}
Revision is like a version for a module. Format is YYYY-MM-DD and should match the name of the file on disk when multiple revisions of a file exisits.
func (*Revision) Extensions ¶
type Rpc ¶
type Rpc struct {
// contains filtered or unexported fields
}
func (*Rpc) Extensions ¶
func (*Rpc) IfFeatures ¶
type RpcInput ¶
type RpcInput struct {
// contains filtered or unexported fields
}
func (*RpcInput) DataDefinition ¶
func (m *RpcInput) DataDefinition(ident string) Definition
func (*RpcInput) DataDefinitions ¶
func (m *RpcInput) DataDefinitions() []Definition
func (*RpcInput) Definition ¶
func (m *RpcInput) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*RpcInput) Extensions ¶
func (*RpcInput) IfFeatures ¶
func (*RpcInput) IsRecursive ¶
type RpcOutput ¶
type RpcOutput struct {
// contains filtered or unexported fields
}
func (*RpcOutput) DataDefinition ¶
func (m *RpcOutput) DataDefinition(ident string) Definition
func (*RpcOutput) DataDefinitions ¶
func (m *RpcOutput) DataDefinitions() []Definition
func (*RpcOutput) Definition ¶
func (m *RpcOutput) Definition(ident string) Definition
Definition can be a data defintion, action or notification
func (*RpcOutput) Extensions ¶
func (*RpcOutput) IfFeatures ¶
func (*RpcOutput) IsRecursive ¶
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
func (*Type) Extensions ¶
func (*Type) FractionDigits ¶
func (*Type) RequireInstance ¶
func (*Type) Resolve ¶
Resolve is the effective datatype if this type points to a different dataType, which is the case for leafRefs. Otherwise this just returns itself
func (*Type) UnionFormats ¶
type Typedef ¶
type Typedef struct {
// contains filtered or unexported fields
}
func (*Typedef) DefaultValue ¶
func (m *Typedef) DefaultValue() interface{}
func (*Typedef) Extensions ¶
func (*Typedef) HasDefault ¶
type Uses ¶
type Uses struct {
// contains filtered or unexported fields
}
func (*Uses) Extensions ¶
func (*Uses) IfFeatures ¶
func (*Uses) Parent ¶
Parent is where this extension is define unless the extension is a secondary extension like a description and then this is the parent of that description
func (*Uses) Refinements ¶
type When ¶
type When struct {
// contains filtered or unexported fields
}