Version: v0.5.0 Latest Latest

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0




This section is empty.


This section is empty.


func Register

func Register(importPath string, p *Package)


type Bottomer added in v0.5.0

type Bottomer interface {
	Bottom() *adt.Bottom

type Builtin

type Builtin struct {
	Name   string
	Pkg    adt.Feature
	Params []Param
	Result adt.Kind
	Func   func(c *CallCtxt)
	Const  string

A Builtin is a Builtin function or constant.

A function may return and a constant may be any of the following types:

error (translates to bottom)
nil   (translates to null)

For any of the above, including interface{} and these types recursively:

type CallCtxt

type CallCtxt struct {
	Err interface{}
	Ret interface{}
	// contains filtered or unexported fields

CallCtxt is passed to builtin implementations that need to use a cue.Value. This is an internal type. Its interface may change.

func (*CallCtxt) BigFloat

func (c *CallCtxt) BigFloat(i int) *big.Float

func (*CallCtxt) BigInt

func (c *CallCtxt) BigInt(i int) *big.Int

func (*CallCtxt) Bool

func (c *CallCtxt) Bool(i int) bool

func (*CallCtxt) Byte

func (c *CallCtxt) Byte(i int) uint8

func (*CallCtxt) Bytes

func (c *CallCtxt) Bytes(i int) []byte

func (*CallCtxt) CueList added in v0.5.0

func (c *CallCtxt) CueList(i int) List

func (*CallCtxt) Decimal

func (c *CallCtxt) Decimal(i int) *apd.Decimal

func (*CallCtxt) DecimalList

func (c *CallCtxt) DecimalList(i int) (a []*apd.Decimal)

func (*CallCtxt) Do

func (c *CallCtxt) Do() bool

Do returns whether the call should be done.

func (*CallCtxt) Float64

func (c *CallCtxt) Float64(i int) float64

func (*CallCtxt) Int

func (c *CallCtxt) Int(i int) int

func (*CallCtxt) Int16

func (c *CallCtxt) Int16(i int) int16

func (*CallCtxt) Int32

func (c *CallCtxt) Int32(i int) int32

func (*CallCtxt) Int64

func (c *CallCtxt) Int64(i int) int64

func (*CallCtxt) Int8

func (c *CallCtxt) Int8(i int) int8

func (*CallCtxt) Iter

func (c *CallCtxt) Iter(i int) (a cue.Iterator)

func (*CallCtxt) List

func (c *CallCtxt) List(i int) (a []cue.Value)

func (*CallCtxt) Name

func (c *CallCtxt) Name() string

func (*CallCtxt) Pos

func (c *CallCtxt) Pos() token.Pos

func (*CallCtxt) Reader

func (c *CallCtxt) Reader(i int) io.Reader

func (*CallCtxt) Rune

func (c *CallCtxt) Rune(i int) rune

func (*CallCtxt) String

func (c *CallCtxt) String(i int) string

func (*CallCtxt) StringList

func (c *CallCtxt) StringList(i int) (a []string)

func (*CallCtxt) Struct

func (c *CallCtxt) Struct(i int) Struct

func (*CallCtxt) Uint

func (c *CallCtxt) Uint(i int) uint

func (*CallCtxt) Uint16

func (c *CallCtxt) Uint16(i int) uint16

func (*CallCtxt) Uint32

func (c *CallCtxt) Uint32(i int) uint32

func (*CallCtxt) Uint64

func (c *CallCtxt) Uint64(i int) uint64

func (*CallCtxt) Uint8

func (c *CallCtxt) Uint8(i int) uint8

func (*CallCtxt) Value

func (c *CallCtxt) Value(i int) cue.Value

type List added in v0.5.0

type List struct {
	// contains filtered or unexported fields

List represents a CUE list, which can be open or closed.

func (*List) Elems added in v0.5.0

func (l *List) Elems() []*adt.Vertex

Elems returns the elements of a list.

func (*List) IsOpen added in v0.5.0

func (l *List) IsOpen() bool

IsOpen reports whether a list is open ended.

type Package

type Package struct {
	Native []*Builtin
	CUE    string

func (*Package) MustCompile

func (p *Package) MustCompile(ctx *adt.OpContext, importPath string) *adt.Vertex

type Param

type Param struct {
	Kind  adt.Kind
	Value adt.Value // input constraint (may be nil)

type Struct added in v0.5.0

type Struct struct {
	// contains filtered or unexported fields

Struct represents a CUE struct, which can be open or closed.

func (*Struct) Arcs added in v0.5.0

func (s *Struct) Arcs() []*adt.Vertex

Arcs returns all arcs of s.

func (*Struct) IsOpen added in v0.5.0

func (s *Struct) IsOpen() bool

IsOpen reports whether s allows more fields than are currently defined.

func (*Struct) Len added in v0.5.0

func (s *Struct) Len() int

Len reports the number of regular string fields of s.

type ValidationError added in v0.5.0

type ValidationError struct {
	B *adt.Bottom

A ValidationError indicates an error that is only valid if a builtin is used as a validator.

func (ValidationError) Error added in v0.5.0

func (v ValidationError) Error() string


Path Synopsis

Jump to

Keyboard shortcuts

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