cue

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(p *Package, options ...GenerateOption) error

Generate will generate code files into the output folder

Types

type GenerateOption

type GenerateOption func(*generator) error

GenerateOption is a function that configures a generator.

func WithLayout added in v0.0.2

func WithLayout(layout bool) GenerateOption

WithLayout will set the layout option

type Package

type Package struct {
	// contains filtered or unexported fields
}

Package is a package written by CUE.

func ParsePackage

func ParsePackage(root string, options ...ParseOption) (*Package, error)

ParsePackage parses the package.

func (*Package) Manifest

func (pkg *Package) Manifest() *rmsV1.Manifest

Manifest returns the resource management specification of the package.

type ParseOption

type ParseOption func(*parser) error

ParseOption is a function that configures a parser.

type Plan

type Plan struct {
	// contains filtered or unexported fields
}

func GeneratePlan

func GeneratePlan(p *Package, options ...GenerateOption) (*Plan, error)

GeneratePlan will generate a plan for generating code files into the output folder

func (*Plan) Pretty

func (plan *Plan) Pretty() error

Pretty prints the plan to stdout

func (*Plan) Save

func (plan *Plan) Save() error

Save saves the plan to the output folder

Jump to

Keyboard shortcuts

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