low

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 9 Imported by: 25 modules, 16 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildModel

func BuildModel(node *yaml.Node, model interface{}) error

func BuildModelAsync

func BuildModelAsync(n *yaml.Node, model interface{}, lwg *sync.WaitGroup, errors *[]error)

func ExtractExtensions

func ExtractExtensions(root *yaml.Node) map[KeyReference[string]]ValueReference[any]

func ExtractMapFlat

func ExtractMapFlat[PT Buildable[N], N any](label string, root *yaml.Node, idx *index.SpecIndex) (map[KeyReference[string]]ValueReference[PT], *yaml.Node, *yaml.Node, error)

func ExtractMapFlatNoLookup

func ExtractMapFlatNoLookup[PT Buildable[N], N any](root *yaml.Node, idx *index.SpecIndex) (map[KeyReference[string]]ValueReference[PT], error)

func ExtractObjectRaw

func ExtractObjectRaw[T Buildable[N], N any](root *yaml.Node, idx *index.SpecIndex) (T, error)

func GetCircularReferenceResult

func GetCircularReferenceResult(node *yaml.Node, idx *index.SpecIndex) *index.CircularReferenceResult

func IsCircular

func IsCircular(node *yaml.Node, idx *index.SpecIndex) bool

func LocateRefNode

func LocateRefNode(root *yaml.Node, idx *index.SpecIndex) (*yaml.Node, error)

func SetField

func SetField(field reflect.Value, valueNode *yaml.Node, keyNode *yaml.Node) error

Types

type Buildable

type Buildable[T any] interface {
	Build(node *yaml.Node, idx *index.SpecIndex) error
	*T
}

type HasNode

type HasNode interface {
	GetNode() *yaml.Node
}

type KeyReference

type KeyReference[T any] struct {
	Value   T
	KeyNode *yaml.Node
}

func (KeyReference[T]) GenerateMapKey

func (n KeyReference[T]) GenerateMapKey() string

func (KeyReference[T]) IsEmpty

func (n KeyReference[T]) IsEmpty() bool

type NodeReference

type NodeReference[T any] struct {
	Value     T
	ValueNode *yaml.Node
	KeyNode   *yaml.Node
}

func ExtractExample

func ExtractExample(expNode, expLabel *yaml.Node) NodeReference[any]

func ExtractObject

func ExtractObject[T Buildable[N], N any](label string, root *yaml.Node, idx *index.SpecIndex) (NodeReference[T], error)

func (NodeReference[T]) GenerateMapKey

func (n NodeReference[T]) GenerateMapKey() string

func (NodeReference[T]) IsEmpty

func (n NodeReference[T]) IsEmpty() bool

func (NodeReference[T]) Mutate added in v0.0.8

func (n NodeReference[T]) Mutate(value T) NodeReference[T]

type ValueReference

type ValueReference[T any] struct {
	Value     T
	ValueNode *yaml.Node
}

func ExtractArray

func ExtractArray[T Buildable[N], N any](label string, root *yaml.Node, idx *index.SpecIndex) ([]ValueReference[T],
	*yaml.Node, *yaml.Node, error)

func FindItemInMap

func FindItemInMap[T any](item string, collection map[KeyReference[string]]ValueReference[T]) *ValueReference[T]

func (ValueReference[T]) GenerateMapKey

func (n ValueReference[T]) GenerateMapKey() string

func (ValueReference[T]) IsEmpty

func (n ValueReference[T]) IsEmpty() bool

func (ValueReference[T]) Mutate added in v0.0.8

func (n ValueReference[T]) Mutate(value T) ValueReference[T]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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