cue

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: EUPL-1.2 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateConfig

func GenerateConfig(schema string, opts ...GenerateOption) ([]byte, cue.Value, error)

Types

type Formatter

type Formatter func(cue.Value) ([]byte, error)

type FromJSON

type FromJSON []byte

func (FromJSON) Apply

func (o FromJSON) Apply(options *GenerateOptions)

type FromTOML

type FromTOML []byte

func (FromTOML) Apply

func (o FromTOML) Apply(options *GenerateOptions)

type FromYAML

type FromYAML []byte

func (FromYAML) Apply

func (o FromYAML) Apply(options *GenerateOptions)

type GenerateOption

type GenerateOption interface {
	Apply(*GenerateOptions)
}

func ToJSON

func ToJSON() GenerateOption

func ToTOML

func ToTOML() GenerateOption

func ToYAML

func ToYAML() GenerateOption

func WithGenerator

func WithGenerator(id string, generator Generator) GenerateOption

func WithValue

func WithValue(id string, value interface{}) GenerateOption

type GenerateOptions

type GenerateOptions struct {
	Context       *cue.Context
	Formatter     Formatter
	PreviousValue cue.Value
	Generators    map[string]Generator
	ExtraValues   map[string]interface{}
}

type Generator

type Generator func() interface{}

Jump to

Keyboard shortcuts

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