Documentation ¶
Index ¶
- func GenerateDecoders(mr *generator.ManagedResource, tg tpl.TemplateGetter) (string, error)
- func GenerateEncoders(mr *generator.ManagedResource, tg tpl.TemplateGetter) (string, error)
- func GenerateMergers(mr *generator.ManagedResource, tg tpl.TemplateGetter) (string, error)
- func IsBlockRequired(nb *configschema.NestedBlock) bool
- func IsBlockSlice(nb *configschema.NestedBlock) bool
- func NestedBlockFields(blocks map[string]*configschema.NestedBlock, packagePath, schemaPath string) []generator.Field
- func NewAttributeDecodeFnGenerator(terraformName string, ctyType cty.Type) generator.DecodeFnGenerator
- func NewAttributeEncodeFnGenerator(terraformName string, ctyType cty.Type) generator.EncodeFnGenerator
- func NewAttributeMergeFnGenerator(terraformName string, ctyType cty.Type) generator.MergeFnGenerator
- func NewBlockDecodeFnGenerator(terraformName string, block *configschema.NestedBlock) generator.DecodeFnGenerator
- func NewBlockEncodeFnGenerator(terraformName string, block *configschema.NestedBlock) generator.EncodeFnGenerator
- func NewBlockMergeFnGenerator(terraformName string, block *configschema.NestedBlock) generator.MergeFnGenerator
- func SchemaToManagedResource(name, packagePath string, s providers.Schema) *generator.ManagedResource
- func SpecOrStatusAttributeFields(attributes map[string]*configschema.Attribute, namer generator.ResourceNamer) ([]generator.Field, []generator.Field)
- func TypeToField(name string, attrType cty.Type, parentPath string) generator.Field
- type FieldBuilder
- func (fb *FieldBuilder) AttributeField(af generator.AttributeField) *FieldBuilder
- func (fb *FieldBuilder) Build() generator.Field
- func (fb *FieldBuilder) IsSlice(is bool) *FieldBuilder
- func (fb *FieldBuilder) ObjectField(typeName string, attrType cty.Type, schemaPath string) *FieldBuilder
- func (fb *FieldBuilder) StructField(typeName string, fields []generator.Field) *FieldBuilder
- func (fb *FieldBuilder) Unsupported() generator.Field
- type SpecOrStatusField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDecoders ¶
func GenerateDecoders(mr *generator.ManagedResource, tg tpl.TemplateGetter) (string, error)
func GenerateEncoders ¶
func GenerateEncoders(mr *generator.ManagedResource, tg tpl.TemplateGetter) (string, error)
func GenerateMergers ¶
func GenerateMergers(mr *generator.ManagedResource, tg tpl.TemplateGetter) (string, error)
func IsBlockRequired ¶
func IsBlockRequired(nb *configschema.NestedBlock) bool
func IsBlockSlice ¶
func IsBlockSlice(nb *configschema.NestedBlock) bool
func NestedBlockFields ¶
func NestedBlockFields(blocks map[string]*configschema.NestedBlock, packagePath, schemaPath string) []generator.Field
func NewAttributeDecodeFnGenerator ¶
func NewAttributeDecodeFnGenerator(terraformName string, ctyType cty.Type) generator.DecodeFnGenerator
func NewAttributeEncodeFnGenerator ¶
func NewAttributeEncodeFnGenerator(terraformName string, ctyType cty.Type) generator.EncodeFnGenerator
func NewAttributeMergeFnGenerator ¶
func NewAttributeMergeFnGenerator(terraformName string, ctyType cty.Type) generator.MergeFnGenerator
func NewBlockDecodeFnGenerator ¶
func NewBlockDecodeFnGenerator(terraformName string, block *configschema.NestedBlock) generator.DecodeFnGenerator
func NewBlockEncodeFnGenerator ¶
func NewBlockEncodeFnGenerator(terraformName string, block *configschema.NestedBlock) generator.EncodeFnGenerator
func NewBlockMergeFnGenerator ¶
func NewBlockMergeFnGenerator(terraformName string, block *configschema.NestedBlock) generator.MergeFnGenerator
func SchemaToManagedResource ¶
func SchemaToManagedResource(name, packagePath string, s providers.Schema) *generator.ManagedResource
func SpecOrStatusAttributeFields ¶
func SpecOrStatusAttributeFields(attributes map[string]*configschema.Attribute, namer generator.ResourceNamer) ([]generator.Field, []generator.Field)
SpecStatusAttributeFields iterates through the terraform configschema.Attribute map found under Block.Attributes, translating each attribute to a generator.Field and grouping them as spec or status based on their optional/required/computed properties.
Types ¶
type FieldBuilder ¶
type FieldBuilder struct {
// contains filtered or unexported fields
}
func NewFieldBuilder ¶
func NewFieldBuilder(name string, ctyType cty.Type) *FieldBuilder
func (*FieldBuilder) AttributeField ¶
func (fb *FieldBuilder) AttributeField(af generator.AttributeField) *FieldBuilder
func (*FieldBuilder) Build ¶
func (fb *FieldBuilder) Build() generator.Field
func (*FieldBuilder) IsSlice ¶
func (fb *FieldBuilder) IsSlice(is bool) *FieldBuilder
func (*FieldBuilder) ObjectField ¶
func (fb *FieldBuilder) ObjectField(typeName string, attrType cty.Type, schemaPath string) *FieldBuilder
func (*FieldBuilder) StructField ¶
func (fb *FieldBuilder) StructField(typeName string, fields []generator.Field) *FieldBuilder
func (*FieldBuilder) Unsupported ¶
func (fb *FieldBuilder) Unsupported() generator.Field
type SpecOrStatusField ¶
type SpecOrStatusField int
const ( ForProviderField SpecOrStatusField = iota AtProviderField )
func SpecOrStatus ¶
func SpecOrStatus(attr *configschema.Attribute) SpecOrStatusField
Click to show internal directories.
Click to hide internal directories.