codegen

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emitter

type Emitter struct {
	CfResource   *cfschema.Resource
	IsDataSource bool
	Ui           cli.Ui
	Writer       io.Writer
}

func (Emitter) EmitRootPropertiesSchema

func (e Emitter) EmitRootPropertiesSchema(attributeNameMap map[string]string) (Features, error)

EmitRootPropertiesSchema generates the Terraform Plugin SDK code for a CloudFormation root schema and emits the generated code to the emitter's Writer. Code features are returned. The root schema is the map of root property names to Attributes.

type Features

type Features struct {
	HasIDRootProperty       bool // Has a root property named "id".
	HasRequiredRootProperty bool // At least one root property is required.
	HasUpdatableProperty    bool // At least one property can be updated.
	HasValidator            bool // At least one validator.
	UsesFrameworkTypes      bool // Uses a type from the terraform-plugin-framework/types package.
	UsesInternalValidate    bool // Uses a type or function from the internal/validate package.
	UsesRegexpInValidation  bool // Uses a type from the Go standard regexp package for attribute validation.

	FrameworkPlanModifierPackages []string // Package names for any terraform-plugin-framework plan modifiers. May contain duplicates.
	FrameworkValidatorsPackages   []string // Package names for any terraform-plugin-framework-validators validators. May contain duplicates.
}

Features of the emitted code.

func (Features) LogicalOr added in v0.44.0

func (f Features) LogicalOr(features Features) Features

Jump to

Keyboard shortcuts

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