Documentation ¶
Index ¶
Constants ¶
const (
// GenStatement is printed on every generated file.
GenStatement = "// Code generated by upjet. DO NOT EDIT."
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CRDGenerator ¶
type CRDGenerator struct { LocalDirectoryPath string Group string ProviderShortName string LicenseHeaderPath string Generated *tjtypes.Generated // contains filtered or unexported fields }
CRDGenerator takes certain information referencing Terraform resource definition and writes kubebuilder CRD file.
func NewCRDGenerator ¶
func NewCRDGenerator(pkg *types.Package, rootDir, providerShortName, group, version string) *CRDGenerator
NewCRDGenerator returns a new CRDGenerator.
type ControllerGenerator ¶
type ControllerGenerator struct { Group string ControllerGroupDir string ModulePath string LicenseHeaderPath string }
ControllerGenerator generates controller setup functions.
func NewControllerGenerator ¶
func NewControllerGenerator(rootDir, modulePath, group string) *ControllerGenerator
NewControllerGenerator returns a new ControllerGenerator.
type ConversionNodeGenerator ¶ added in v1.4.0
type ConversionNodeGenerator struct {
// contains filtered or unexported fields
}
ConversionNodeGenerator generates conversion methods implementing the conversion.Convertible interface on the CRD structs.
func NewConversionNodeGenerator ¶ added in v1.4.0
func NewConversionNodeGenerator(pcModulePath, rootDir, group, generatedFileName, fileTemplate string, p generationPredicate) *ConversionNodeGenerator
NewConversionNodeGenerator returns a new ConversionNodeGenerator.
type ProviderGenerator ¶
type ProviderGenerator struct { ProviderPath string LocalDirectoryPath string LicenseHeaderPath string ModulePath string }
ProviderGenerator generates controller setup file.
func NewProviderGenerator ¶
func NewProviderGenerator(rootDir, modulePath string) *ProviderGenerator
NewProviderGenerator returns a new ProviderGenerator.
type RegisterGenerator ¶
type RegisterGenerator struct { LocalDirectoryPath string ModulePath string LicenseHeaderPath string }
RegisterGenerator generates scheme registration file.
func NewRegisterGenerator ¶
func NewRegisterGenerator(rootDir, modulePath string) *RegisterGenerator
NewRegisterGenerator returns a new RegisterGenerator.
func (*RegisterGenerator) Generate ¶
func (rg *RegisterGenerator) Generate(versionPkgList []string) error
Generate writes the register file with the content produced using given list of version packages.
type TerraformedGenerator ¶
type TerraformedGenerator struct { LocalDirectoryPath string LicenseHeaderPath string // contains filtered or unexported fields }
TerraformedGenerator generates conversion methods implementing Terraformed interface on CRD structs.
func NewTerraformedGenerator ¶
func NewTerraformedGenerator(pkg *types.Package, rootDir, group, version string) *TerraformedGenerator
NewTerraformedGenerator returns a new TerraformedGenerator.
func (*TerraformedGenerator) Generate ¶
func (tg *TerraformedGenerator) Generate(cfgs []*terraformedInput, apiVersion string) error
Generate writes generated Terraformed interface functions
type VersionGenerator ¶
type VersionGenerator struct { Group string Version string DirectoryPath string LicenseHeaderPath string // contains filtered or unexported fields }
VersionGenerator generates files for a version of a specific group.
func NewVersionGenerator ¶
func NewVersionGenerator(rootDir, modulePath, group, version string) *VersionGenerator
NewVersionGenerator returns a new VersionGenerator.
func (*VersionGenerator) Generate ¶
func (vg *VersionGenerator) Generate() error
Generate writes doc and group version info files to the disk.
func (*VersionGenerator) InsertPreviousObjects ¶ added in v1.4.0
func (vg *VersionGenerator) InsertPreviousObjects(versions map[string]map[string]*config.Resource) error
InsertPreviousObjects inserts into this VersionGenerator's package scope all the type definitions from the previous versions of the managed resource APIs found in the Go package.
func (*VersionGenerator) Package ¶
func (vg *VersionGenerator) Package() *types.Package
Package returns the package of the version that will be generated.