Documentation
¶
Index ¶
- func AppendElemInPath(path *config.Path, name, key string) *config.Path
- func CleanConfig2String(cfg map[string]interface{}) (map[string]interface{}, *string, error)
- func CreatePathElem(e *yang.Entry) *config.PathElem
- func DeepCopy(in interface{}) (interface{}, error)
- func GetTypeKind(e *yang.Entry) string
- func GetTypeName(e *yang.Entry) string
- func GnmiPath2ConfigPath(inPath *gnmi.Path) *config.Path
- func GnmiPathToName(path *config.Path) string
- func GnmiPathToXPath(path *config.Path, keys bool) *string
- func ProcessLeafRef(e *yang.Entry, resfullPath string, activeResPath *config.Path) (*config.Path, *config.Path, bool)
- func RemoveFirstEntry(s string) string
- func RemoveHierarchicalKeys(d []byte, hids []string) ([]byte, error)
- func TransformPathAsRelative2Resource(localPath, activeResPath *config.Path) *config.Path
- func TransformPathToLeafRefPath(path *config.Path) *config.Path
- func XpathToGnmiPath(p string, offset int) (path *config.Path)
- type Option
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendElemInPath ¶
AppendElemInPath adds a pathElem to the config gnmi path
func CleanConfig2String ¶
CleanConfig2String returns a clean config and a string clean means removing the prefixes in the json elements
func CreatePathElem ¶
CreatePathElem returns a config path element from a yang Entry
func DeepCopy ¶
func DeepCopy(in interface{}) (interface{}, error)
Make a deep copy from in into out object.
func GetTypeKind ¶
GetTypeKind return a string of the kind of the yang entry
func GetTypeName ¶
GetypeName return a string of the type of the yang entry
func GnmiPath2ConfigPath ¶
GnmiPath2ConfigPath converts the gnmi path to config path
func GnmiPathToName ¶
GnmiPathToName converts a config gnmi path to a name where each element of the path is seperated by a "-"
func GnmiPathToXPath ¶
GnmiPathToXPath converts a config gnmi path with or withour keys to a string pointer
func ProcessLeafRef ¶
func ProcessLeafRef(e *yang.Entry, resfullPath string, activeResPath *config.Path) (*config.Path, *config.Path, bool)
ProcessLeafRef processes the leafref and returns if a leafref localPath, remotePath and if the leafRef is local or external to the resource used for yang parser
func RemoveFirstEntry ¶
RemoveFirstEntry removes the first entry of the xpath, so it trims the first element of the /
func RemoveHierarchicalKeys ¶
RemoveHierarchicalKeys removes the hierarchical keys from the data
func TransformPathAsRelative2Resource ¶
TransformPathAsRelative2Resource returns a relative path
func TransformPathToLeafRefPath ¶
TransformPathToLeafRefPath returns a config gnmi path tailored for leafrefs For a leafRef path the last entry of the name should be a key in the previous element
Types ¶
type Option ¶
type Option func(p *Parser)
Option can be used to manipulate Options.
func WithLogger ¶
WithLogger specifies how the Parser should log messages.