importer

package
v0.0.64 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportConfigAdapter

type ImportConfigAdapter interface {
	ImportConfigAdapterElement
	GetDeletes() *sdcpb.PathSet
}

ImportConfigAdapter is used by the ImportConfig() of the Tree. It allows to import hierarchically organized config data into the tree with little overhead. implementation for JSON and XML do exist.

type ImportConfigAdapterElement added in v0.0.63

type ImportConfigAdapterElement interface {
	// GetElements returns the elements of a certain level.
	// This can be maps or arrays.
	// In case of arrays, the name is the key of the map that pointed to the List and
	// the content are the array values one after the other.
	// For maps, the key is the GetName() result and the GetElements() result is the referenced value
	GetElements() []ImportConfigAdapterElement
	// GetElement returns the value TreeImportable for a given field.
	// if the field is not present, nil is returned
	GetElement(key string) ImportConfigAdapterElement
	// GetKeyValue can be called on Leafs or LeafList elements to retrieve the underlaying value
	// When and were to expect a Leafs or LeafList is defined by the yang schema.
	// The String value is typically used for the keys.
	GetKeyValue() (string, error)
	// GetTVValue returns the TypedValue based value defined via the SchemaLeafType. Can also only be called on Leafs or LeafLists
	GetTVValue(slt *sdcpb.SchemaLeafType) (*sdcpb.TypedValue, error)
	// returns the name of the actual Level.
	GetName() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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