Documentation ¶
Index ¶
- Variables
- func CueSyntax(val cue.Value, opts []cue.Option) ast.Node
- func PrintCueError(err error)
- func PrintCueValue(val cue.Value) (string, error)
- func RunDefFromArgs(args []string) error
- func RunEvalFromArgs(args []string) error
- func RunExportFromArgs(args []string) error
- func RunFmtFromArgs(args []string) error
- func RunImportFromArgs(args []string) error
- func RunTrimFromArgs(args []string) error
- func RunVetFromArgs(args []string) error
- func ValueToSyntaxString(val cue.Value) (string, error)
- type CueRuntime
- type CueSyntaxOptions
- type TestOpFunc
- type TestSuite
- func (TS *TestSuite) DoTestOp(name string, args cue.Value) (cue.Value, error)
- func (TS *TestSuite) RunCase(path string) (err error)
- func (TS *TestSuite) RunCases(paths []string) (err error)
- func (TS *TestSuite) RunGroup(cases, group string, V cue.Value) (err error)
- func (TS *TestSuite) RunTestCase(cases, group, test string, V cue.Value) (err error)
- func (TS *TestSuite) SetupCue() (err error)
- func (TS *TestSuite) SetupEntrypoints() (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_TESTDATA_DIRS = []string{"testdata"}
View Source
var ( DefaultSyntaxOpts = CueSyntaxOptions{ Attributes: true, Concrete: false, Definitions: true, Docs: true, Hidden: true, Optional: true, } )
Functions ¶
func PrintCueError ¶ added in v0.5.4
func PrintCueError(err error)
func RunDefFromArgs ¶
func RunEvalFromArgs ¶
func RunExportFromArgs ¶
func RunFmtFromArgs ¶
func RunImportFromArgs ¶
func RunTrimFromArgs ¶
func RunVetFromArgs ¶
Types ¶
type CueRuntime ¶
type CueRuntime struct { Entrypoints []string Workspace string FS billy.Filesystem CueRuntime *cue.Runtime CueConfig *load.Config BuildInstances []*build.Instance CueErrors []error FieldOpts []cue.Option CueInstance *cue.Instance CueValue cue.Value Value interface{} }
func CueRuntimeFromEntrypoints ¶ added in v0.5.4
func CueRuntimeFromEntrypoints(entrypoints []string) (crt *CueRuntime, err error)
CueRuntimeFromArgs builds up a CueRuntime
by processing the args passed in
func CueRuntimeFromEntrypointsAndFlags ¶ added in v0.5.4
func CueRuntimeFromEntrypointsAndFlags(entrypoints []string) (crt *CueRuntime, err error)
CueRuntimeFromArgsAndFlags builds up a CueRuntime
by processing the args passed in AND the current flag values
func (*CueRuntime) ConvertToValue ¶ added in v0.5.4
func (CRT *CueRuntime) ConvertToValue(in interface{}) (cue.Value, error)
func (*CueRuntime) Load ¶
func (CRT *CueRuntime) Load() (err error)
func (*CueRuntime) ParseCueExpr ¶ added in v0.5.4
func (CRT *CueRuntime) ParseCueExpr(expr string) (cue.Value, error)
func (*CueRuntime) PrintCueErrors ¶ added in v0.5.4
func (CR *CueRuntime) PrintCueErrors()
func (*CueRuntime) PrintValue ¶
func (CRT *CueRuntime) PrintValue() error
type CueSyntaxOptions ¶ added in v0.5.4
type CueSyntaxOptions struct { Attributes bool Concrete bool Definitions bool Docs bool Hidden bool Optional bool }
func (CueSyntaxOptions) MakeOpts ¶ added in v0.5.4
func (CSO CueSyntaxOptions) MakeOpts() []cue.Option
type TestOpFunc ¶ added in v0.5.4
type TestSuite ¶ added in v0.5.4
type TestSuite struct { suite.Suite Op TestOpFunc CRT *CueRuntime TestdataDirs []string Entrypoints []string }
func NewTestSuite ¶ added in v0.5.4
func NewTestSuite(testdirs []string, op TestOpFunc) *TestSuite
func (*TestSuite) RunTestCase ¶ added in v0.5.4
func (*TestSuite) SetupEntrypoints ¶ added in v0.5.4
Click to show internal directories.
Click to hide internal directories.