Documentation ¶
Overview ¶
Package pathtranslate exports api to transform given string slice into different forms in a schema aware manner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathTranslator ¶
type PathTranslator struct {
// contains filtered or unexported fields
}
PathTranslator stores the rules required to rewrite a given path as gNMI PathElem.
func NewPathTranslator ¶
func NewPathTranslator(schemaTree []*yang.Entry) (*PathTranslator, error)
NewPathTranslator instantiates a PathTranslator with the given slice of schemas. It returns an error if any of the keyed list schemas have the similar full path.
func (*PathTranslator) PathElem ¶
func (r *PathTranslator) PathElem(p []string) ([]*gnmipb.PathElem, error)
PathElem receives a path as string slice and generates slice of gNMI PathElem based on stored rewrite rules. It returns an error if there are less elements following the element's name in the path than the number of keys of the list.
Click to show internal directories.
Click to hide internal directories.