Documentation ¶
Index ¶
- Constants
- type Bootstrapper
- func (bs *Bootstrapper) Bootstrap() error
- func (bs *Bootstrapper) WriteIndexGo() error
- func (bs *Bootstrapper) WriteMainGo() error
- func (bs *Bootstrapper) WriteProviderDoc() error
- func (bs *Bootstrapper) WriteProviderIndex() error
- func (bs *Bootstrapper) WriteProviderInitGo() error
- func (bs *Bootstrapper) WriteProviderTypes() error
- type Config
- type PackageImport
- type PackageTranslator
- func (pt *PackageTranslator) EnsureOutputLocation() error
- func (pt *PackageTranslator) PackageImport() PackageImport
- func (pt *PackageTranslator) WriteCompareFile(mr *generator.ManagedResource) error
- func (pt *PackageTranslator) WriteConfigureFile() error
- func (pt *PackageTranslator) WriteDecodeFile(mr *generator.ManagedResource) error
- func (pt *PackageTranslator) WriteDocFile() error
- func (pt *PackageTranslator) WriteEncoderFile(mr *generator.ManagedResource) error
- func (pt *PackageTranslator) WriteIndexFile() error
- func (pt *PackageTranslator) WriteTypeDefFile(mr *generator.ManagedResource) error
- type SchemaTranslator
- type SchemaTranslatorConfiguration
- type StringTransformer
- type TerraformResourceNamer
Constants ¶
View Source
const ( PROVIDER_MAINGO_PATH = "provider/cmd/provider/main.go.tpl" PROVIDER_INDEX_PATH = "provider/generated/index.go.tpl" PROVIDERCONFIG_INIT_PATH = "provider/generated/index_provider.go.tpl" RESOURCE_IMPLEMENTATIONS_PATH = "provider/generated/index_resources.go.tpl" PROVIDERCONFIG_DOC_PATH = "provider/generated/provider/v1alpha1/doc.go.tpl" PROVIDERCONFIG_TYPES_PATH = "provider/generated/provider/v1alpha1/types.go.tpl" PROVIDERCONFIG_INDEX_PATH = "provider/generated/provider/v1alpha1/index.go.tpl" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrapper ¶
type Bootstrapper struct {
// contains filtered or unexported fields
}
func NewBootstrapper ¶
func NewBootstrapper(cfg Config, tg template.TemplateGetter, schema providers.GetSchemaResponse) *Bootstrapper
func (*Bootstrapper) Bootstrap ¶
func (bs *Bootstrapper) Bootstrap() error
func (*Bootstrapper) WriteIndexGo ¶
func (bs *Bootstrapper) WriteIndexGo() error
func (*Bootstrapper) WriteMainGo ¶
func (bs *Bootstrapper) WriteMainGo() error
func (*Bootstrapper) WriteProviderDoc ¶
func (bs *Bootstrapper) WriteProviderDoc() error
func (*Bootstrapper) WriteProviderIndex ¶
func (bs *Bootstrapper) WriteProviderIndex() error
func (*Bootstrapper) WriteProviderInitGo ¶
func (bs *Bootstrapper) WriteProviderInitGo() error
func (*Bootstrapper) WriteProviderTypes ¶
func (bs *Bootstrapper) WriteProviderTypes() error
type Config ¶
type Config struct { ProviderVersion string `json:"provider-version"` Name string `json:"name"` BasePath string `json:"base-path"` RootPackage string `json:"root-package"` PackagePath string `json:"package-path"` BaseCRDVersion string `json:"base-crd-version"` ProviderConfigVersion string `json:"provider-config-version"` APIGroup string `json:"api-group"` ExcludeResources []string `json:"exclude-resources"` ExcludeResourceMap map[string]bool }
func ConfigFromFile ¶
func (Config) IsExcluded ¶
type PackageImport ¶
type PackageTranslator ¶
type PackageTranslator struct {
// contains filtered or unexported fields
}
func NewPackageTranslator ¶
func NewPackageTranslator(s providers.Schema, namer TerraformResourceNamer, basePath, overlayBasePath string, cfg Config, tg template.TemplateGetter) *PackageTranslator
func (*PackageTranslator) EnsureOutputLocation ¶
func (pt *PackageTranslator) EnsureOutputLocation() error
func (*PackageTranslator) PackageImport ¶
func (pt *PackageTranslator) PackageImport() PackageImport
func (*PackageTranslator) WriteCompareFile ¶
func (pt *PackageTranslator) WriteCompareFile(mr *generator.ManagedResource) error
func (*PackageTranslator) WriteConfigureFile ¶
func (pt *PackageTranslator) WriteConfigureFile() error
func (*PackageTranslator) WriteDecodeFile ¶
func (pt *PackageTranslator) WriteDecodeFile(mr *generator.ManagedResource) error
func (*PackageTranslator) WriteDocFile ¶
func (pt *PackageTranslator) WriteDocFile() error
func (*PackageTranslator) WriteEncoderFile ¶
func (pt *PackageTranslator) WriteEncoderFile(mr *generator.ManagedResource) error
func (*PackageTranslator) WriteIndexFile ¶
func (pt *PackageTranslator) WriteIndexFile() error
func (*PackageTranslator) WriteTypeDefFile ¶
func (pt *PackageTranslator) WriteTypeDefFile(mr *generator.ManagedResource) error
type SchemaTranslator ¶
type SchemaTranslator struct {
// contains filtered or unexported fields
}
func NewSchemaTranslator ¶
func NewSchemaTranslator(cfg Config, basePath, overlayBasePath string, schema providers.GetSchemaResponse, tg template.TemplateGetter) *SchemaTranslator
func (*SchemaTranslator) WriteGeneratedRuntime ¶
func (st *SchemaTranslator) WriteGeneratedRuntime() error
func (*SchemaTranslator) WriteGeneratedTypes ¶
func (st *SchemaTranslator) WriteGeneratedTypes() error
type StringTransformer ¶
func NewTerraformFieldRenamer ¶
func NewTerraformFieldRenamer() StringTransformer
type TerraformResourceNamer ¶
type TerraformResourceNamer interface { PackageName() string ManagedResourceName() string APIVersion() string APIGroup() string KubernetesVersion() string TypeNameGroupKind() string TypeNameGroupVersionKind() string TerraformResourceName() string }
func NewTerraformResourceNamer ¶
func NewTerraformResourceNamer(providerName, tfResourceName, apiVersion string) TerraformResourceNamer
Click to show internal directories.
Click to hide internal directories.