cuetils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool added in v0.4.0

func Bool(name string, value cue.Value) (bool, error)

func Extract added in v0.4.0

func Extract[V any](value cue.Value, key string, extract Extractor[V]) (V, bool, error)

func Int added in v0.4.0

func Int(name string, value cue.Value) (int64, error)

func ReadYAMLFileWithSpec

func ReadYAMLFileWithSpec(spec, filename string) (cue.Value, error)

func String added in v0.4.0

func String(name string, value cue.Value) (string, error)

Types

type Extractor added in v0.4.0

type Extractor[V any] func(string, cue.Value) (V, error)

func Either added in v0.4.0

func Either[V any](extracts []Extractor[V]) Extractor[V]

func List added in v0.4.0

func List[V any](extract Extractor[V]) Extractor[[]V]

func ListOrDict added in v0.4.0

func ListOrDict[V any](extract Extractor[V]) Extractor[[]V]

func Map added in v0.4.0

func Map[V any](extract Extractor[V]) Extractor[map[string]V]

func OneOrMore added in v0.4.0

func OneOrMore[V any](extract Extractor[V]) Extractor[[]V]

func ParseString added in v0.4.0

func ParseString[V any](extract func(string) (V, error)) Extractor[V]

Jump to

Keyboard shortcuts

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