cue

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OutputNotFoundErr    = errors.New("output not found in cue")
	OutputNilErr         = errors.New("output must not be nil")
	OutputNotSettableErr = errors.New("output must be settable")
)
View Source
var ErrTooManyRedirects = errors.New("too many redirects")

Functions

func CueDoAndReturn

func CueDoAndReturn(template string, parameters []Parameter, outputName string, output interface{}) error

CueDoAndReturn will execute cue code and set execution result to output. output must not be nil and must be settable.

Types

type Auth added in v0.4.0

type Auth struct {
	Token string `json:"token"`
}

type CueParams added in v0.4.0

type CueParams struct {
	Object    *unstructured.Unstructured `json:"object"`
	OldObject *unstructured.Unstructured `json:"oldObject"`
	// otherObject:xxx, http:xxx
	ExtraParams map[string]any `json:"extraParams"`
}

func BuildCueParamsViaOverridePolicy added in v0.4.0

func BuildCueParamsViaOverridePolicy(c dynamiclister.DynamicResourceLister, curObject *unstructured.Unstructured, tmpl *policyv1alpha1.OverrideRuleTemplate) (*CueParams, error)

func BuildCueParamsViaValidatePolicy added in v0.4.0

func BuildCueParamsViaValidatePolicy(c dynamiclister.DynamicResourceLister, curObject *unstructured.Unstructured, tmpl *policyv1alpha1.ValidateRuleTemplate) (*CueParams, error)

type Parameter

type Parameter struct {
	Name   string
	Object interface{}
}

Jump to

Keyboard shortcuts

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