cue

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	// Entrypoint refers to a directory containing CUE files.
	Entrypoint string

	// URL to a cue file
	URL string

	// Subpath is used when the schema is not in the root of the schema
	Subpath string

	// Value represents the CUE value to use as an input. If specified, it
	// supersedes the Entrypoint and URL options.
	Value *cue.Value

	// CueImports allows importing additional libraries.
	// Format: [path]:[import]. Example: '../grafana/common-library:github.com/grafana/grafana/packages/grafana-schema/src/common
	CueImports []string
}

type LibraryInclude

type LibraryInclude struct {
	FSPath     string // path of the library on the filesystem
	ImportPath string // path used in CUE files to import that library
}

type ParseResult

type ParseResult struct {
	Package   string
	Value     cue.Value
	Libraries []LibraryInclude
}

func Parse

func Parse(ctx context.Context, input Input) (ParseResult, error)

Parse the given input as a CUE value. Note: imports referring to modules hosted on GitHub will be resolved and downloaded on the fly.

Jump to

Keyboard shortcuts

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