cue

package
v0.0.0-...-067284b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLineage

func NewLineage(sch cue.Value, name, pkgname string) (*ast.File, error)

NewLineage constructs a CUE ast.File with a new lineage declaration in it, using the provided cue.Value as the 0.0 schema.

The name parameter is used as the lineage name, and must be a non-empty string. pkgname is used as the returned file's package declaration. If pkgname is empty, the resulting file will have no package declaration.

func RewriteLegacyLineage

func RewriteLegacyLineage(inst cue.Value, path cue.Path) (*ast.File, error)

RewriteLegacyLineage takes a cue.Value and a cue.Path to a legacy Thema lineage declaration within that path, and rewrites the lineage to conform to the new form expected for declaring lineages.

It is required that the provided inst cue.Value point to the root of a package instance. If the entire package instance is the thema lineage, the provided path may be empty.

Lineage definitions implicitly unified across multiple files in the same package cannot be rewritten by this function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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