container

package
v0.1.392 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

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"`
	Entries         []*Entry           `json:"entries,omitempty"`
	Prev            *Container         `json:"prev,omitempty"`
	ResourceBoundry bool               `json:"resourceBoundry,omitempty"`
	LeafRefs        []*leafref.LeafRef `json:"leafRefs,omitempty"`
}

func NewContainer

func NewContainer(n string, resourceBoundry bool, prev *Container, opts ...ContainerOption) *Container

func (*Container) AddLeafRef added in v0.1.259

func (c *Container) AddLeafRef(ll, rl *gnmi.Path)

func (*Container) GetChildren added in v0.1.204

func (c *Container) GetChildren() []string

func (*Container) GetEntries added in v0.1.201

func (c *Container) GetEntries() []*Entry

func (*Container) GetFullName

func (c *Container) GetFullName() string

func (*Container) GetFullNameWithRoot added in v0.1.206

func (c *Container) GetFullNameWithRoot() string

func (*Container) GetKeyNames added in v0.1.202

func (c *Container) GetKeyNames() []string

func (*Container) GetKeyType added in v0.1.176

func (c *Container) GetKeyType(name string) string

func (*Container) GetLeafRefs added in v0.1.259

func (c *Container) GetLeafRefs() []*leafref.LeafRef

func (*Container) GetName added in v0.1.201

func (c *Container) GetName() string

func (*Container) GetResourceBoundary added in v0.1.237

func (c *Container) GetResourceBoundary() bool

func (*Container) GetSlicedFullName added in v0.1.381

func (c *Container) GetSlicedFullName() []string

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"`
	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 (e *Entry) GetDefault() string

func (*Entry) GetEnum added in v0.1.205

func (e *Entry) GetEnum() []string

func (*Entry) GetEnumString added in v0.1.205

func (e *Entry) GetEnumString() string

func (*Entry) GetKey

func (e *Entry) GetKey() []string

func (*Entry) GetKeyBool added in v0.1.203

func (e *Entry) GetKeyBool() bool

func (*Entry) GetLength added in v0.1.205

func (e *Entry) GetLength() []int

func (*Entry) GetListAttr added in v0.1.287

func (e *Entry) GetListAttr() *yang.ListAttr

func (*Entry) GetMandatory added in v0.1.205

func (e *Entry) GetMandatory() bool

func (*Entry) GetName

func (e *Entry) GetName() string

func (*Entry) GetNamespace added in v0.1.205

func (e *Entry) GetNamespace() string

func (*Entry) GetNext added in v0.1.205

func (e *Entry) GetNext() *Container

func (*Entry) GetPattern added in v0.1.205

func (e *Entry) GetPattern() []string

func (*Entry) GetPatternString added in v0.1.205

func (e *Entry) GetPatternString() string

func (*Entry) GetPrev added in v0.1.205

func (e *Entry) GetPrev() *Container

func (*Entry) GetRange added in v0.1.205

func (e *Entry) GetRange() []int

func (*Entry) GetType

func (e *Entry) GetType() string

func (*Entry) GetUnion added in v0.1.205

func (e *Entry) GetUnion() bool

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 WithType

func WithType(s string) EntryOption

func WithUnion

func WithUnion(b bool) EntryOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL