cuekind

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppGenerator added in v0.23.0

func AppGenerator(projectRepo, codegenPath string, groupKinds bool) *codejen.JennyList[codegen.Kind]

func BackendPluginGenerator

func BackendPluginGenerator(projectRepo, generatedAPIPath string, groupKinds bool) *codejen.JennyList[codegen.Kind]

BackendPluginGenerator returns a Generator which will produce boilerplate backend plugin code

func CRDGenerator

func CRDGenerator(outputEncoder jennies.CRDOutputEncoder, outputExtension string) *codejen.JennyList[codegen.Kind]

CRDGenerator returns a Generator which will create a CRD file

func ManifestGenerator added in v0.20.0

func ManifestGenerator(encoder jennies.ManifestOutputEncoder, extension string, appName string) *codejen.JennyList[codegen.Kind]

func ManifestGoGenerator added in v0.20.0

func ManifestGoGenerator(pkg string, appName string) *codejen.JennyList[codegen.Kind]

func ModelsGenerator

func ModelsGenerator(versioned bool, groupKinds bool) *codejen.JennyList[codegen.Kind]

ModelsGenerator returns a Generator which will produce Go and CUE files for API contract models. Deprecated: model generation will be removed in a future release, in favor of only API resources

func OperatorGenerator

func OperatorGenerator(projectRepo, codegenPath string, groupKinds bool) *codejen.JennyList[codegen.Kind]

OperatorGenerator returns a Generator which will build out watcher boilerplate for each resource, and a main func to run an operator for the watchers.

func PostResourceGenerationGenerator added in v0.16.0

func PostResourceGenerationGenerator(projectRepo, goGenPath string, groupKinds bool) *codejen.JennyList[codegen.Kind]

func ResourceGenerator

func ResourceGenerator(groupKinds bool) *codejen.JennyList[codegen.Kind]

ResourceGenerator returns a collection of jennies which generate backend resource code from kinds. The `versioned` parameter governs whether to generate all versions where codegen.backend == true, or just generate code for the current version. If `groupKinds` is true, kinds within the same group will exist in the same package. When combined with `versioned`, each version package will contain all kinds in the group which have a schema for that version.

func ToOverlay

func ToOverlay(prefix string, vfs fs.FS, overlay map[string]load.Source) error

func TypeScriptModelsGenerator

func TypeScriptModelsGenerator(versioned bool) *codejen.JennyList[codegen.Kind]

TypeScriptModelsGenerator returns a Generator which generates TypeScript model code. Deprecated: model generation will be removed in a future release, in favor of only API resources

func TypeScriptResourceGenerator added in v0.15.0

func TypeScriptResourceGenerator() *codejen.JennyList[codegen.Kind]

TypeScriptResourceGenerator returns a Generator which generates TypeScript resource code.

Types

type Parser

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

func NewParser

func NewParser() (*Parser, error)

func (*Parser) Parse

func (p *Parser) Parse(files fs.FS, selectors ...string) ([]codegen.Kind, error)

Parse parses all CUE files in `files`, and reads all top-level selectors (or only `selectors` if provided) as kinds as defined by [def.cue]. It then returns a list of kinds parsed.

Jump to

Keyboard shortcuts

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