Documentation ¶
Index ¶
- type Option
- type Resource
- func (r *Resource) AddChild(res *Resource)
- func (r *Resource) AddExternalLeafRef(ll, rl *gnmi.Path)
- func (r *Resource) AddLocalLeafRef(ll, rl *gnmi.Path)
- func (r *Resource) GetAbsoluteGnmiPathFromSource() *gnmi.Path
- func (r *Resource) GetAbsoluteName() string
- func (r *Resource) GetAbsolutePath() *gnmi.Path
- func (r *Resource) GetActualGnmiFullPathWithKeys() *gnmi.Path
- func (r *Resource) GetChildResources() []string
- func (r *Resource) GetChildren() []*Resource
- func (r *Resource) GetExcludeRelativeXPath() []string
- func (r *Resource) GetExternalLeafRef() []*parser.LeafRefGnmi
- func (r *Resource) GetLocalLeafRef() []*parser.LeafRefGnmi
- func (r *Resource) GetModule() string
- func (r *Resource) GetParent() *Resource
- func (r *Resource) GetParentPath() *gnmi.Path
- func (r *Resource) GetParentResource() string
- func (r *Resource) GetResourceNameWithPrefix(prefix string) string
- func (r *Resource) GetResourcePath() *gnmi.Path
- func (r *Resource) GetRootContainerEntry() *container.Entry
- func (r *Resource) ResourceLastElement() string
- func (r *Resource) SetRootContainerEntry(e *container.Entry)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(g *Resource)
Option can be used to manipulate Options.
func WithExclude ¶
func WithModule ¶ added in v0.1.129
type Resource ¶
type Resource struct { Parent *Resource // resource parent Children []*Resource // the children of the resource Module string // Yang Module name of the resource //parser *parser.Parser // calls a library for parsing JSON/YANG elements Path *gnmi.Path // relative path from the resource; the absolute path is assembled using the resurce hierarchy with Parent Excludes []*gnmi.Path // relative from the the resource //FileName string // the filename the resource is using to render out the config //ResFile *os.File // the file reference for writing the resource file RootContainerEntry *container.Entry // this is the root element which is used to reference the hierarchical resource information RootContainer *container.Container // root container of the resource //LastContainerPtr *container.Container // pointer to the last container we process ContainerList []*container.Container // List of all containers within the resource ContainerLevel int // the current container Level when processing the yang entries using ygen ContainerLevelKeys map[int][]*container.Container // the current container Level key list LocalLeafRefs []*parser.LeafRefGnmi ExternalLeafRefs []*parser.LeafRefGnmi }
func NewResource ¶
func (*Resource) AddExternalLeafRef ¶
func (*Resource) AddLocalLeafRef ¶
func (*Resource) GetAbsoluteGnmiPathFromSource ¶ added in v0.1.400
GetAbsoluteGnmiPathFromSource used for leafref validation in ygen
func (*Resource) GetAbsoluteName ¶
func (*Resource) GetAbsolutePath ¶ added in v0.1.400
func (*Resource) GetActualGnmiFullPathWithKeys ¶ added in v0.1.169
GetActualGnmiFullPathWithKeys goes to the root and trickless back to get the full path with the keys used in ndd-builder
func (*Resource) GetChildResources ¶ added in v0.1.376
func (*Resource) GetChildren ¶ added in v0.1.372
func (*Resource) GetExcludeRelativeXPath ¶
func (*Resource) GetExternalLeafRef ¶
func (r *Resource) GetExternalLeafRef() []*parser.LeafRefGnmi
func (*Resource) GetLocalLeafRef ¶
func (r *Resource) GetLocalLeafRef() []*parser.LeafRefGnmi
func (*Resource) GetParentPath ¶ added in v0.1.372
func (*Resource) GetParentResource ¶ added in v0.1.376
func (*Resource) GetResourceNameWithPrefix ¶
GetResourceNameWithPrefix -> nddbuilder
func (*Resource) GetResourcePath ¶ added in v0.1.89
func (*Resource) GetRootContainerEntry ¶
func (*Resource) ResourceLastElement ¶
func (*Resource) SetRootContainerEntry ¶
Click to show internal directories.
Click to hide internal directories.