structural

package
v0.6.3-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: BSD-3-Clause Imports: 15 Imported by: 4

Documentation

Index

Constants

View Source
const (
	LIST_ERR listProc = iota // unknown arg
	LIST_AND                 // all apply
	LIST_OR                  // any apply
	LIST_PER                 // pairwise
)

Variables

This section is empty.

Functions

func DiffValue added in v0.6.2

func DiffValue(orig, next cue.Value, opts *Options) (cue.Value, error)

func FormatCueError added in v0.6.2

func FormatCueError(err error) string

func GetLabel added in v0.6.2

func GetLabel(val cue.Value) cue.Selector

func InsertValue added in v0.6.2

func InsertValue(ins, val cue.Value, opts *Options) (cue.Value, error)

func LoadCueInputs added in v0.6.2

func LoadCueInputs(entrypoints []string, ctx *cue.Context, cfg *load.Config) (cue.Value, error)

Loads the entrypoints using the context provided returns the value from the load after validating it

func MaskValue added in v0.6.2

func MaskValue(mask, val cue.Value, opts *Options) (cue.Value, error)

func PatchValue added in v0.6.2

func PatchValue(patch, val cue.Value, opts *Options) (cue.Value, error)

func PickValue added in v0.6.2

func PickValue(pick, from cue.Value, opts *Options) (cue.Value, error)

PickValue uses 'pick' to pick a subvalue from 'from' by checking if values unify

func ReplaceValue added in v0.6.2

func ReplaceValue(repl, val cue.Value, opts *Options) (cue.Value, error)

func RequireValue added in v0.6.2

func RequireValue(require, from cue.Value, opts *Options) error

RequireValue uses 'require' to require a subvalue from 'from' by checking if values unify

func UpsertValue added in v0.6.2

func UpsertValue(up, val cue.Value, opts *Options) (cue.Value, error)

func Walk added in v0.6.2

func Walk(v cue.Value, before func(cue.Value) bool, after func(cue.Value), options ...cue.Option)

Walk is an alternative to cue.Value.Walk which handles more field types You can customize this with your own options

Types

type Input added in v0.6.2

type Input struct {
	Original    string
	Entrypoints []string
	Filename    string
	Filetype    string // yaml, json, cue... toml?
	Expression  string // cue expression to select within document
	Content     []byte
	Value       cue.Value
}

func LoadGlobs added in v0.6.2

func LoadGlobs(globs []string) ([]Input, error)

type Options added in v0.6.2

type Options struct {
	AllTypeErrors  bool
	NodeTypeErrors bool
}

Jump to

Keyboard shortcuts

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