model

package
v0.0.0-...-aa622fa Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModelData

func GetModelData(cap []*pb.ModelData) []*pb.ModelData

Types

type GoStructEnumData

type GoStructEnumData map[string]map[int64]ygot.EnumDefinition

GoStructEnumData is the data type to maintain GoStruct enum type.

type JSONUnmarshaler

type JSONUnmarshaler func([]byte, ygot.GoStruct, ...ytypes.UnmarshalOpt) error

JSONUnmarshaler is the signature of the Unmarshal() function in the GoStruct code generated by openconfig ygot library.

type Model

type Model struct {
	ModelData       []*pb.ModelData
	StructRootType  reflect.Type
	SchemaTreeRoot  *yang.Entry
	JsonUnmarshaler JSONUnmarshaler
	EnumData        GoStructEnumData
}

Model contains the model data and GoStruct information for the device to config.

func (*Model) NewConfigStruct

func (m *Model) NewConfigStruct(jsonConfig []byte, validate bool) (ygot.ValidatedGoStruct, error)

NewConfigStruct creates a ValidatedGoStruct of this model from jsonConfig. If jsonConfig is nil, creates an empty GoStruct.

func (*Model) NewRootValue

func (m *Model) NewRootValue() interface{}

func (*Model) SupportedModels

func (m *Model) SupportedModels() []string

SupportedModels returns a list of supported models.

Jump to

Keyboard shortcuts

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