yang

package
v0.0.0-...-c19ee7d Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: BSD-3-Clause, MPL-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeMatches

func MergeMatches(high, low [][]Match) [][]Match

Merge matches from two sources Where two matches are identically named, high priority matches are favoured over low priority matches

func ProcessMatches

func ProcessMatches(path []string, matches [][]Match) ([]string, error)

Types

type Authoriser

type Authoriser func(path []string) (bool, error)

type Match

type Match interface {
	Name() string
	Help() string
	IsArg() bool
}

type Yang

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

func NewTestYang

func NewTestYang(st schema.ModelSet) *Yang

func NewYang

func NewYang() *Yang

func (*Yang) Completion

func (y *Yang) Completion(path []string, auth Authoriser) (map[string]string, error)

func (*Yang) Expand

func (y *Yang) Expand(path []string, auth Authoriser) ([]string, error)

func (*Yang) ExpandMatches

func (y *Yang) ExpandMatches(path []string, auth Authoriser) [][]Match

func (*Yang) TmplGet

func (y *Yang) TmplGet(path []string) (*tmpl.OpTmpl, error)

func (*Yang) TmplGetAllowed

func (y *Yang) TmplGetAllowed(path []string) (string, error)

func (*Yang) TmplGetChildren

func (y *Yang) TmplGetChildren(path []string, auth Authoriser) ([]string, error)

func (*Yang) TmplValidateValues

func (y *Yang) TmplValidateValues(path []string) (bool, error)

Jump to

Keyboard shortcuts

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