schema

package
v0.0.0-...-6fa03d5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package schema exports functions to register given schema information into lookup table as well as to retrieve from lookup table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(key string, root ygot.GoStruct, stfn schemaTreeFunc, ufn unmarshalFunc) error

Set registers given key and GoStruct into the registration table. If key already exists, it doesn't register GoStruct and returns an error.

Types

type TestGoStruct

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

TestGoStruct stores a cached copy of the global schema tree that is local to a given test so as to prevent the possiblity of cross-test schema contamination.

func Get

func Get(key string) (*TestGoStruct, error)

Get returns reference to testGoStruct so that test can have access to underlying schema corresponding to given key.

func (*TestGoStruct) NewRoot

func (s *TestGoStruct) NewRoot() ygot.GoStruct

NewRoot creates a new instance of root ygot.GoStruct.

func (*TestGoStruct) Schema

func (s *TestGoStruct) Schema(k string) (*yang.Entry, error)

Schema returns the *yang.Entry corresponding to given key.

Directories

Path Synopsis
Package gostructs is a generated package which contains definitions of structs which represent a YANG schema.
Package gostructs is a generated package which contains definitions of structs which represent a YANG schema.
register
Package openconfig registers generated gostructs with "openconfig" key.
Package openconfig registers generated gostructs with "openconfig" key.

Jump to

Keyboard shortcuts

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