Documentation ¶
Index ¶
- Constants
- func CountValue(val cue.Value) int
- func DepthValue(val cue.Value) int
- func DiffValue(orig, next cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func FormatCueError(err error) string
- func FormatOutput(val cue.Value, format string) (string, error)
- func GetLabel(val cue.Value) cue.Selector
- func InjectAttrsValue(val cue.Value, attr string, kv map[string]string) (cue.Value, error)
- func InsertValue(ins, val cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func LoadCueInputs(entrypoints []string, ctx *cue.Context, cfg *load.Config) (cue.Value, error)
- func MaskValue(mask, val cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func PatchValue(patch, val cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func PickValue(pick, from cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func ProcessOutputs(results []GlobResult, opts *flags.RootPflagpole) (err error)
- func ReplaceValue(repl, val cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func TransformValue(trans, orig cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func UpsertValue(up, val cue.Value, opts *flags.RootPflagpole) (cue.Value, error)
- func ValidateValue(schema, val cue.Value, opts *flags.RootPflagpole) (bool, error)
- func Walk(v cue.Value, before func(cue.Value) bool, after func(cue.Value), ...)
- type BinaryOpValueFunc
- type CountResult
- type Cuest
- type DepthResult
- type GlobResult
- func AccumOutputs(results []GlobResult, accum string) ([]GlobResult, error)
- func BinaryOpGlobs(lhs string, rhs []string, opts *flags.RootPflagpole, fn BinaryOpValueFunc) ([]GlobResult, error)
- func DiffGlobs(orig string, next string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func InsertGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func MaskGlobs(mask string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func PatchGlobs(patch string, orig string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func PickGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func ReplaceGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func TransformGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func UnaryOpGlobs(globs []string, opts *flags.RootPflagpole, fn UnaryOpValueFunc) ([]GlobResult, error)
- func UpsertGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- func ValidateGlobs(schema string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
- type Input
- func LoadGlobs(globs []string) ([]Input, error)
- func LoadInput(i *Input, ctx *cue.Context, cfg *load.Config) (*Input, error)
- func ParseInput(arg string) (*Input, error)
- func ReadArg(arg string, ctx *cue.Context, cfg *load.Config) (*Input, error)
- func ReadGlobs(globs []string, ctx *cue.Context, cfg *load.Config) ([]*Input, error)
- type StatsResult
- type UnaryOpValueFunc
Constants ¶
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 CountValue ¶ added in v0.3.1
func DepthValue ¶ added in v0.3.1
func FormatCueError ¶
func InjectAttrsValue ¶ added in v0.4.0
func InsertValue ¶ added in v0.3.1
func LoadCueInputs ¶ added in v0.3.0
Loads the entrypoints using the context provided returns the value from the load after validating it
func PatchValue ¶ added in v0.3.1
func PickValue ¶ added in v0.3.0
PickValue uses 'pick' to pick a subvalue from 'from' by checking if values unify
func ProcessOutputs ¶ added in v0.2.0
func ProcessOutputs(results []GlobResult, opts *flags.RootPflagpole) (err error)
func ReplaceValue ¶ added in v0.3.1
func TransformValue ¶
func UpsertValue ¶ added in v0.3.1
func ValidateValue ¶
Types ¶
type BinaryOpValueFunc ¶ added in v0.3.1
type CountResult ¶
func CountGlobs ¶ added in v0.3.1
func CountGlobs(globs []string, opts *flags.RootPflagpole) ([]CountResult, error)
type Cuest ¶
type Cuest struct {
// contains filtered or unexported fields
}
func NewCuest ¶
Creates a new Cuest object and preloads the structural ops. The ops should be their lowercase name and all are loaded. If 'op' is nil or empty, preloading is skipped.
You can provide your own cue.Context or a new one will be created Keep in mind CUE still requires values to come from the same context.
type DepthResult ¶
func DepthGlobs ¶ added in v0.3.1
func DepthGlobs(globs []string, opts *flags.RootPflagpole) ([]DepthResult, error)
type GlobResult ¶
func AccumOutputs ¶ added in v0.2.0
func AccumOutputs(results []GlobResult, accum string) ([]GlobResult, error)
func BinaryOpGlobs ¶ added in v0.3.1
func BinaryOpGlobs(lhs string, rhs []string, opts *flags.RootPflagpole, fn BinaryOpValueFunc) ([]GlobResult, error)
func DiffGlobs ¶ added in v0.3.1
func DiffGlobs(orig string, next string, opts *flags.RootPflagpole) ([]GlobResult, error)
func InsertGlobs ¶ added in v0.3.1
func InsertGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
func MaskGlobs ¶ added in v0.3.1
func MaskGlobs(mask string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
MaskGlobs will mask a subobject from globs on disk
func PatchGlobs ¶ added in v0.3.1
func PatchGlobs(patch string, orig string, opts *flags.RootPflagpole) ([]GlobResult, error)
func PickGlobs ¶ added in v0.3.1
func PickGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
PickGlobs will pick a subobject from globs on disk
func ReplaceGlobs ¶ added in v0.3.1
func ReplaceGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
func TransformGlobs ¶
func TransformGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
func UnaryOpGlobs ¶ added in v0.3.1
func UnaryOpGlobs(globs []string, opts *flags.RootPflagpole, fn UnaryOpValueFunc) ([]GlobResult, error)
func UpsertGlobs ¶ added in v0.3.1
func UpsertGlobs(code string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
func ValidateGlobs ¶
func ValidateGlobs(schema string, globs []string, opts *flags.RootPflagpole) ([]GlobResult, error)
type Input ¶
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 ParseInput ¶ added in v0.3.0
Parses arg into an Input. arg can be a value, filename, glob, or - for stdin can be <arg>@<expr> to subselect from the root value can be <entyrpoint>,<endtrypoint>[@<expr>] to support CUE like args