ygotutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package ygotutils implements utility functions for users of github.com/openconfig/ygot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNode

func GetNode(schema *yang.Entry, rootStruct ygot.GoStruct, path *gpb.Path) (interface{}, spb.Status)

GetNode returns the node in the data tree at the indicated path, relative to the supplied root struct. If the root struct is the tree root, the path may be absolute. It returns an error if the path is not found in the tree, or an element along the path is nil.

func IsTypeMap

func IsTypeMap(t reflect.Type) bool

IsTypeMap reports whether v is a map type.

func IsTypeSlicePtr

func IsTypeSlicePtr(t reflect.Type) bool

IsTypeSlicePtr reports whether v is a slice ptr type.

func IsTypeStructPtr

func IsTypeStructPtr(t reflect.Type) bool

IsTypeStructPtr reports whether v is a struct ptr type.

func IsValueMap

func IsValueMap(v reflect.Value) bool

IsValueMap reports whether v is a map type.

func IsValueStruct

func IsValueStruct(v reflect.Value) bool

IsValueStruct reports whether v is a struct type.

func IsValueStructPtr

func IsValueStructPtr(v reflect.Value) bool

IsValueStructPtr reports whether v is a struct ptr type.

func NewNode

func NewNode(rootType reflect.Type, path *gpb.Path) (interface{}, spb.Status)

NewNode returns a new, empty struct element of the type indicated by the given path in the data tree. Note that the actual data tree is not required since this is a new, empty node. The path is simply used to traverse the schema tree - any key values in the path are ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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