Documentation ¶
Overview ¶
Package utils implements various gNMI path manipulation facilities.
Package utils implements various gNMI path manipulation facilities.
Index ¶
- func MatchWildcardChNameRegexp(query string) *regexp.Regexp
- func MatchWildcardRegexp(query string) *regexp.Regexp
- func ParseGNMIElements(elms []string) (*pb.Path, error)
- func SplitPath(path string) []string
- func SplitPaths(paths []string) [][]string
- func StrPath(path *pb.Path) string
- func StrPathElem(pathElem []*pb.PathElem) string
- func StrVal(val *pb.TypedValue) string
- func ToConfigName(deviceID devicetype.ID, version devicetype.Version) string
- func ToModelName(name devicetype.Type, version devicetype.Version) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchWildcardChNameRegexp ¶
MatchWildcardChNameRegexp creates a Regular Expression from a wild-carded path
func MatchWildcardRegexp ¶
MatchWildcardRegexp creates a Regular Expression from a wild-carded path
func ParseGNMIElements ¶
ParseGNMIElements builds up a gnmi path, from user-supplied text
func SplitPath ¶
SplitPath splits a gnmi path according to the spec. See https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-path-conventions.md No validation is done. Behavior is undefined if path is an invalid gnmi path. TODO: Do validation?
func StrPathElem ¶
StrPathElem builds a human-readable form of a list of path elements. e.g. /a/b/c[e=f]
func StrVal ¶
func StrVal(val *pb.TypedValue) string
StrVal will return a string representing the supplied value
func ToConfigName ¶
func ToConfigName(deviceID devicetype.ID, version devicetype.Version) string
ToConfigName simply joins together device ID and version in a consistent way
func ToModelName ¶
func ToModelName(name devicetype.Type, version devicetype.Version) string
ToModelName simply joins together model name and version in a consistent way
Types ¶
This section is empty.