Documentation ¶
Index ¶
- type Container
- func (c *Container) AddContainerChild(cc *Container)
- func (c *Container) AddLeafRef(ll, rl *gnmi.Path)
- func (c *Container) GetChildren() []*Container
- func (c *Container) GetChildrenNames() []string
- func (c *Container) GetEntries() []*Entry
- func (c *Container) GetFullName() string
- func (c *Container) GetFullNameWithRoot() string
- func (c *Container) GetKeyNames() []string
- func (c *Container) GetKeyType(name string) string
- func (c *Container) GetLeafRefs() []*leafref.LeafRef
- func (c *Container) GetName() string
- func (c *Container) GetReadOnly() bool
- func (c *Container) GetResourceBoundary() bool
- func (c *Container) GetSlicedFullName() []string
- func (c *Container) SetHasState()
- func (c *Container) UpdateHasState2ParentContainers()
- type ContainerOption
- type Entry
- func (e *Entry) GetDefault() string
- func (e *Entry) GetEnum() []string
- func (e *Entry) GetEnumString() string
- func (e *Entry) GetKey() []string
- func (e *Entry) GetKeyBool() bool
- func (e *Entry) GetLength() []int
- func (e *Entry) GetListAttr() *yang.ListAttr
- func (e *Entry) GetMandatory() bool
- func (e *Entry) GetName() string
- func (e *Entry) GetNamespace() string
- func (e *Entry) GetNext() *Container
- func (e *Entry) GetPattern() []string
- func (e *Entry) GetPatternString() string
- func (e *Entry) GetPrev() *Container
- func (e *Entry) GetRange() []int
- func (e *Entry) GetReadOnly() bool
- func (e *Entry) GetType() string
- func (e *Entry) GetUnion() bool
- type EntryOption
- func WithDefault(s string) EntryOption
- func WithEnum(s []string) EntryOption
- func WithLength(s []int) EntryOption
- func WithMandatory(b bool) EntryOption
- func WithPattern(s []string) EntryOption
- func WithRange(s []int) EntryOption
- func WithReadOnly(s bool) EntryOption
- func WithType(s string) EntryOption
- func WithUnion(b bool) EntryOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Name string `json:"name,omitempty"` ReadOnly bool `json:"read-only,omitempty"` HasState bool `json:"state-child,omitempty"` Entries []*Entry `json:"entries,omitempty"` Children []*Container `json:"children,omitempty"` Prev *Container `json:"prev,omitempty"` ResourceBoundary bool `json:"resourceBoundry,omitempty"` LeafRefs []*leafref.LeafRef `json:"leafRefs,omitempty"` }
func NewContainer ¶
func NewContainer(n string, readOnly, resourceBoundary bool, prev *Container, opts ...ContainerOption) *Container
func (*Container) AddContainerChild ¶ added in v0.1.421
func (*Container) AddLeafRef ¶ added in v0.1.259
func (*Container) GetChildren ¶ added in v0.1.204
func (*Container) GetChildrenNames ¶ added in v0.1.425
func (*Container) GetEntries ¶ added in v0.1.201
func (*Container) GetFullName ¶
GetFullName replaces the dashes from the individual names to avoid clashes in names e.g, protocol bgp-evpn clashes with protocol bgp evpn
func (*Container) GetFullNameWithRoot ¶ added in v0.1.206
func (*Container) GetKeyNames ¶ added in v0.1.202
func (*Container) GetKeyType ¶ added in v0.1.176
func (*Container) GetLeafRefs ¶ added in v0.1.259
func (*Container) GetReadOnly ¶ added in v0.1.416
func (*Container) GetResourceBoundary ¶ added in v0.1.237
func (*Container) GetSlicedFullName ¶ added in v0.1.381
func (*Container) SetHasState ¶ added in v0.1.422
func (c *Container) SetHasState()
func (*Container) UpdateHasState2ParentContainers ¶ added in v0.1.423
func (c *Container) UpdateHasState2ParentContainers()
type ContainerOption ¶
type ContainerOption func(c *Container)
type Entry ¶
type Entry struct { Next *Container `json:"prev,omitempty"` Prev *Container `json:"next,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` ReadOnly bool `json:"read-only,omitempty"` Enum []string `json:"enum,omitempty"` EnumString string `json:"enumString,omitempty"` Range []int `json:"range,omitempty"` Length []int `json:"length,omitempty"` Pattern []string `json:"pattern,omitempty"` PatternString string `json:"patternString,omitempty"` Union bool `json:"union,omitempty"` Mandatory bool `json:"mandatory,omitempty"` Default string `json:"default,omitempty"` Key string `json:"key,omitempty"` KeyBool bool `json:"keyBool,omitempty"` NameSpace string `json:"namespace,omitempty"` ListAttr *yang.ListAttr `json:"listAttr,omitempty"` }
Entry structure keeps track of the elements in a struct/list
func NewEntry ¶
func NewEntry(n string, opts ...EntryOption) *Entry
func (*Entry) GetDefault ¶ added in v0.1.205
func (*Entry) GetEnumString ¶ added in v0.1.205
func (*Entry) GetKeyBool ¶ added in v0.1.203
func (*Entry) GetListAttr ¶ added in v0.1.287
func (*Entry) GetMandatory ¶ added in v0.1.205
func (*Entry) GetNamespace ¶ added in v0.1.205
func (*Entry) GetPattern ¶ added in v0.1.205
func (*Entry) GetPatternString ¶ added in v0.1.205
func (*Entry) GetReadOnly ¶ added in v0.1.414
type EntryOption ¶
type EntryOption func(c *Entry)
Option can be used to manipulate Options.
func WithDefault ¶
func WithDefault(s string) EntryOption
func WithEnum ¶
func WithEnum(s []string) EntryOption
func WithLength ¶
func WithLength(s []int) EntryOption
func WithMandatory ¶
func WithMandatory(b bool) EntryOption
func WithPattern ¶
func WithPattern(s []string) EntryOption
func WithRange ¶
func WithRange(s []int) EntryOption
func WithReadOnly ¶ added in v0.1.414
func WithReadOnly(s bool) EntryOption
func WithType ¶
func WithType(s string) EntryOption
func WithUnion ¶
func WithUnion(b bool) EntryOption
Click to show internal directories.
Click to hide internal directories.