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.
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
Click to show internal directories.
Click to hide internal directories.