utilities

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package utils implements utilities for gnxi.

Package utils implements utilities for gnxi.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GNMIFullPath

func GNMIFullPath(prefix, path *gpb.Path) *gpb.Path

GNMIFullPath builds the full path from the prefix and path.

func GetFlag

func GetFlag(name string, defValue interface{}) interface{}

GetFlag - Get the flag defined in another package.

func GetMetadata

func GetMetadata(ctx context.Context) (map[string]string, bool)

GetMetadata checks for valid credentials in the context Metadata.

func IsSchemaPath

func IsSchemaPath(prefix, path *gpb.Path) bool

IsSchemaPath - returns the path is schema path.

func PrintProto

func PrintProto(m proto.Message)

PrintProto prints a Proto in a structured way.

func PrintStruct

func PrintStruct(value interface{}, excludedField ...string)

PrintStruct - print the type and value of the input structure with well-formed display.

func QueryAddr

func QueryAddr(ctx context.Context) (net.Addr, net.Addr, bool)

QueryAddr - Query Local and Remote Address from context

func QueryMetadata

func QueryMetadata(ctx context.Context, name string) (string, bool)

QueryMetadata checks for valid credentials in the context Metadata.

func SprintStructInline

func SprintStructInline(value interface{}, excludedField ...string) string

SprintStructInline - print the type and value of the input structure with well-formed display.

func ValidateGNMIFullPath

func ValidateGNMIFullPath(prefix, path *gpb.Path) error

ValidateGNMIFullPath - check the validation of the gNMI full path

func ValidateGNMIPath

func ValidateGNMIPath(path *gpb.Path) error

ValidateGNMIPath - checks the validation of the gNMI path.

Types

type QueryAddress

type QueryAddress struct {
	// contains filtered or unexported fields
}

func (QueryAddress) Network

func (a QueryAddress) Network() string

func (QueryAddress) String

func (a QueryAddress) String() string

Directories

Path Synopsis
Package credentials loads certificates and validates user credentials.
Package credentials loads certificates and validates user credentials.
Package entity provides a lightweight method for generating certificates.
Package entity provides a lightweight method for generating certificates.
Package xpath parses xpath string into gnmi Path struct.
Package xpath parses xpath string into gnmi Path struct.

Jump to

Keyboard shortcuts

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