utils

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package utils implements various gNMI path manipulation facilities.

Package utils implements various gNMI path manipulation facilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchWildcardChNameRegexp

func MatchWildcardChNameRegexp(query string) *regexp.Regexp

MatchWildcardChNameRegexp creates a Regular Expression from a wild-carded path

func MatchWildcardRegexp

func MatchWildcardRegexp(query string) *regexp.Regexp

MatchWildcardRegexp creates a Regular Expression from a wild-carded path

func ParseGNMIElements

func ParseGNMIElements(elms []string) (*pb.Path, error)

ParseGNMIElements builds up a gnmi path, from user-supplied text

func SplitPath

func SplitPath(path string) []string

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 SplitPaths

func SplitPaths(paths []string) [][]string

SplitPaths splits multiple gnmi paths

func StrPath

func StrPath(path *pb.Path) string

StrPath builds a human-readable form of a gnmi path. e.g. /a/b/c[e=f]

func StrPathElem

func StrPathElem(pathElem []*pb.PathElem) string

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.

Directories

Path Synopsis
Package values implements various gNMI value manipulation facilities.
Package values implements various gNMI value manipulation facilities.

Jump to

Keyboard shortcuts

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