cueutils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(a, b cue.Value)

Diff prints a line-by-line diff between two Cue values.

func FromStrings

func FromStrings(ss ...string) cue.Value

FromStrings creates a cue.Value from string arguments.

func FromStruct

func FromStruct(name string, s interface{}) (cue.Value, error)

FromStruct creates a nested cue.Value from a Go struct. The new cue.Value will have a single field from name, which will contain the struct.

func Interfaces

func Interfaces(kvs map[string]interface{}) cue.Value

StringSlices creates a cue.Value from fields defined in a map[string]interface{}. Supported Cue builtin types are bool, number, and struct.

func LogError

func LogError(logger logr.Logger, err error)

LogError logs errors that may or may not contain a list of cue/errors.Error. If the error provided is not a cue/errors.Error, a plain error is logged.

func StringSlices

func StringSlices(kvs map[string][]string) cue.Value

StringSlices creates a cue.Value from fields defined in a map[string][]string.

func Strings

func Strings(kvs map[string]string) cue.Value

Strings creates a cue.Value from fields defined in a map[string]string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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