Documentation ¶
Index ¶
- func GenerateExamples(templatePath string, outputPath string, data []*TemplateData)
- func GenerateGitHubWorkflows(templatePath string, outputPath string, data []*TemplateData)
- func GenerateMakefiles(templatePath string, outputPath string, data []*TemplateData)
- func GenerateProvider(templatePath string, outputPath string, data []*TemplateData)
- func GenerateResources(templatePath string, outputPath string, data []*TemplateData)
- func GenerateReuseFiles(templatePath string, outputPath string, openapi []fetcher.UpstreamSource)
- func GenerateTemplates(templatePath string, outputPath string, data []*TemplateData)
- func GenerateTerratestTests(templatePath string, outputPath string, data []*TemplateData)
- func GenerateTests(templatePath string, outputPath string, data []*TemplateData)
- func ParseCRDv1Files(basePath string) []*apiextensionsv1.CustomResourceDefinition
- func ParseOpenAPIv2Files(basePath string) []v2high.Swagger
- func ParseTemplates(filenames ...string) *template.Template
- type AdditionalImports
- type Property
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateExamples ¶
func GenerateExamples(templatePath string, outputPath string, data []*TemplateData)
func GenerateGitHubWorkflows ¶
func GenerateGitHubWorkflows(templatePath string, outputPath string, data []*TemplateData)
func GenerateMakefiles ¶
func GenerateMakefiles(templatePath string, outputPath string, data []*TemplateData)
func GenerateProvider ¶
func GenerateProvider(templatePath string, outputPath string, data []*TemplateData)
func GenerateResources ¶
func GenerateResources(templatePath string, outputPath string, data []*TemplateData)
func GenerateReuseFiles ¶
func GenerateReuseFiles(templatePath string, outputPath string, openapi []fetcher.UpstreamSource)
func GenerateTemplates ¶
func GenerateTemplates(templatePath string, outputPath string, data []*TemplateData)
func GenerateTerratestTests ¶
func GenerateTerratestTests(templatePath string, outputPath string, data []*TemplateData)
func GenerateTests ¶
func GenerateTests(templatePath string, outputPath string, data []*TemplateData)
func ParseCRDv1Files ¶
func ParseCRDv1Files(basePath string) []*apiextensionsv1.CustomResourceDefinition
func ParseOpenAPIv2Files ¶
func ParseTemplates ¶
Types ¶
type AdditionalImports ¶
type Property ¶
type Property struct { BT string Name string GoName string GoType string TerraformAttributeName string TerraformAttributeType string TerraformElementType string TerraformCustomType string TerraformValueType string Description string Required bool Optional bool Computed bool Properties []*Property ValidatorsType string ValidatorsPackage string Validators []string }
type TemplateData ¶
type TemplateData struct { BT string Package string // ResourceFile is the file name of the resource ResourceFile string // ResourceTestFile is the file name of the test for the resource ResourceTestFile string // ResourceWorkflowFile is the file name of the GitHub Actions workflow for the resource ResourceWorkflowFile string // ManifestFile is the file name of the data source DataSourceFile string // DataSourceTestFile is the file name of the test for the data source DataSourceTestFile string // DataSourceWorkflowFile is the file name of the GitHub Actions workflow for the data source DataSourceWorkflowFile string // ManifestFile is the file name of the manifest data source ManifestFile string // ManifestTestFile is the file name of the test for the manifest data source ManifestTestFile string // ManifestWorkflowFile is the file name of the GitHub Actions workflow for the manifest data source ManifestWorkflowFile string // Group is API group of a Kubernetes resource Group string // Version is the API version of a Kubernetes resource Version string // Kind is the API kind of a Kubernetes resource Kind string // PluralKind is the plural form of the API kind PluralKind string // Description is the human-readable description of a Kubernetes resource Description string // Namespaced is true if a Kubernetes resource is namespaced or false otherwise Namespaced bool // ResourceTypeStruct is the CamelCase version of the name used by resources for the Terraform type ResourceTypeStruct string // ResourceDataStruct is the CamelCase version of the name used by resources for the data struct ResourceDataStruct string // ResourceTypeStruct is the CamelCase version of the name used by tests for a resource ResourceTypeTest string // DataSourceTypeStruct is the CamelCase version of the name used by data sources for the Terraform type DataSourceTypeStruct string // DataSourceDataStruct is the CamelCase version of the name used by data sources for the data struct DataSourceDataStruct string // DataSourceTypeTest is the CamelCase version of the name used by tests for a data source DataSourceTypeTest string // ManifestTypeStruct is the CamelCase version of the name used by manifest data sources for the Terraform type ManifestTypeStruct string // ManifestDataStruct is the CamelCase version of the name used by manifest data sources for data struct ManifestDataStruct string // ManifestTypeTest is the CamelCase version of the name used by tests for a manifest data source ManifestTypeTest string TerraformModelType string // ResourceTypeName is the snake_case version of the name as used by Terraform without the provider prefix ResourceTypeName string // FullResourceTypeName is the snake_case version of the name as used by Terraform with the provider prefix FullResourceTypeName string // DataSourceTypeName is the snake_case version of the name as used by Terraform without the provider prefix DataSourceTypeName string // FullDataSourceTypeName is the snake_case version of the name as used by Terraform with the provider prefix FullDataSourceTypeName string // ManifestTypeName is the snake_case version of the name as used by Terraform without the provider prefix ManifestTypeName string // FullManifestTypeName is the snake_case version of the name as used by Terraform with the provider prefix FullManifestTypeName string Properties []*Property AdditionalImports AdditionalImports }
func ConvertCRDv1 ¶
func ConvertCRDv1(crds []*apiextensionsv1.CustomResourceDefinition) []*TemplateData
func ConvertOpenAPIv2 ¶
func ConvertOpenAPIv2(schemas []v2high.Swagger) []*TemplateData
Source Files ¶
- converter.go
- crdv1_converter.go
- crdv1_parser.go
- crdv1_type_translator.go
- crdv1_validator_extractor.go
- custom_types.go
- custom_validation.go
- generate_examples.go
- generate_github_workflows.go
- generate_makefiles.go
- generate_provider.go
- generate_resources.go
- generate_reuse.go
- generate_templates.go
- generate_terratests.go
- generate_tests.go
- generator_utils.go
- ignored_attributes.go
- openapi_namespacer.go
- openapi_plural.go
- openapiv2_converter.go
- openapiv2_filter.go
- openapiv2_parser.go
- openapiv2_type_translator.go
- openapiv2_validator_extractor.go
- type_translator.go
- validator_extractor.go
Click to show internal directories.
Click to hide internal directories.