cue

package
v0.0.0-...-624b100 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldPath

func FieldPath(paths ...string) cue.Path

FieldPath return the cue path of the given paths

func GetParameter

func GetParameter()

Types

type CUE

type CUE string

type Parameter

type Parameter struct {
	Name     string      `json:"name"`
	Short    string      `json:"short,omitempty"`
	Required bool        `json:"required,omitempty"`
	Default  interface{} `json:"default,omitempty"`
	Usage    string      `json:"usage,omitempty"`
	Ignore   bool        `json:"ignore,omitempty"`
	Type     cue.Kind    `json:"type,omitempty"`
	Alias    string      `json:"alias,omitempty"`
	JSONType string      `json:"jsonType,omitempty"`
}

type Value

type Value struct {
	// contains filtered or unexported fields
}

Value is an object with cue.context and vendors

func NewValue

func NewValue(s string, tagTempl string) (*Value, error)

NewValue new a value

func ParseToTemplateValue

func ParseToTemplateValue(c []byte) (*Value, error)

ParseToTemplateValue parse the cue script to cue.Value. It must include a valid template.

func ParseToValue

func ParseToValue(c []byte) (*Value, error)

ParseToValue parse the cue script to cue.Value

func (*Value) CueValue

func (val *Value) CueValue() cue.Value

CueValue return cue.Value

func (*Value) Error

func (val *Value) Error() error

Error return value's error information.

func (*Value) LookupValue

func (val *Value) LookupValue(paths ...string) (*Value, error)

LookupValue reports the value at a path starting from val

Jump to

Keyboard shortcuts

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