Versions in this module Expand all Collapse all v0 v0.4.0 Feb 21, 2025 Changes in this version + const AttrImport + const BaseTypesImport + const ContextImport + const DiagImport + const FmtImport + const MathBigImport + const PlanModifierImport + const StringsImport + const TfTypesImport + const TypesImport + const ValidatorImport + var BoolFromTemplate string + var BoolToTemplate string + var BoolTypeEqualTemplate string + var BoolTypeStringTemplate string + var BoolTypeTypableTemplate string + var BoolTypeTypeTemplate string + var BoolTypeValueFromBoolTemplate string + var BoolTypeValueFromTerraformTemplate string + var BoolTypeValueTypeTemplate string + var BoolValueEqualTemplate string + var BoolValueTypeTemplate string + var BoolValueValuableTemplate string + var BoolValueValueTemplate string + var Float64FromTemplate string + var Float64ToTemplate string + var Float64TypeEqualTemplate string + var Float64TypeStringTemplate string + var Float64TypeTypableTemplate string + var Float64TypeTypeTemplate string + var Float64TypeValueFromFloat64Template string + var Float64TypeValueFromTerraformTemplate string + var Float64TypeValueTypeTemplate string + var Float64ValueEqualTemplate string + var Float64ValueTypeTemplate string + var Float64ValueValuableTemplate string + var Float64ValueValueTemplate string + var Int32FromTemplate string + var Int32ToTemplate string + var Int32TypeEqualTemplate string + var Int32TypeStringTemplate string + var Int32TypeTypableTemplate string + var Int32TypeTypeTemplate string + var Int32TypeValueFromInt32Template string + var Int32TypeValueFromTerraformTemplate string + var Int32TypeValueTypeTemplate string + var Int32ValueEqualTemplate string + var Int32ValueTypeTemplate string + var Int32ValueValuableTemplate string + var Int32ValueValueTemplate string + var Int64FromTemplate string + var Int64ToTemplate string + var Int64TypeEqualTemplate string + var Int64TypeStringTemplate string + var Int64TypeTypableTemplate string + var Int64TypeTypeTemplate string + var Int64TypeValueFromInt64Template string + var Int64TypeValueFromTerraformTemplate string + var Int64TypeValueTypeTemplate string + var Int64ValueEqualTemplate string + var Int64ValueTypeTemplate string + var Int64ValueValuableTemplate string + var Int64ValueValueTemplate string + var ListFromTemplate string + var ListToTemplate string + var ListTypeEqualTemplate string + var ListTypeStringTemplate string + var ListTypeTypableTemplate string + var ListTypeTypeTemplate string + var ListTypeValueFromListTemplate string + var ListTypeValueFromTerraformTemplate string + var ListTypeValueTypeTemplate string + var ListValueEqualTemplate string + var ListValueTypeTemplate string + var ListValueValuableTemplate string + var ListValueValueTemplate string + var MapFromTemplate string + var MapToTemplate string + var MapTypeEqualTemplate string + var MapTypeStringTemplate string + var MapTypeTypableTemplate string + var MapTypeTypeTemplate string + var MapTypeValueFromMapTemplate string + var MapTypeValueFromTerraformTemplate string + var MapTypeValueTypeTemplate string + var MapValueEqualTemplate string + var MapValueTypeTemplate string + var MapValueValuableTemplate string + var MapValueValueTemplate string + var NestedObjectFromTemplate string + var NestedObjectToTemplate string + var NestedObjectTypeEqualTemplate string + var NestedObjectTypeStringTemplate string + var NestedObjectTypeTypableTemplate string + var NestedObjectTypeTypeTemplate string + var NestedObjectTypeValueFromObjectTemplate string + var NestedObjectTypeValueFromTerraformTemplate string + var NestedObjectTypeValueMustTemplate string + var NestedObjectTypeValueNullTemplate string + var NestedObjectTypeValueTemplate string + var NestedObjectTypeValueTypeTemplate string + var NestedObjectTypeValueUnknownTemplate string + var NestedObjectValueAttributeTypesTemplate string + var NestedObjectValueEqualTemplate string + var NestedObjectValueIsNullTemplate string + var NestedObjectValueIsUnknownTemplate string + var NestedObjectValueStringTemplate string + var NestedObjectValueToObjectValueTemplate string + var NestedObjectValueToTerraformValueTemplate string + var NestedObjectValueTypeTemplate string + var NestedObjectValueValuableTemplate string + var NestedObjectValueValueTemplate string + var NumberFromTemplate string + var NumberToTemplate string + var NumberTypeEqualTemplate string + var NumberTypeStringTemplate string + var NumberTypeTypableTemplate string + var NumberTypeTypeTemplate string + var NumberTypeValueFromNumberTemplate string + var NumberTypeValueFromTerraformTemplate string + var NumberTypeValueTypeTemplate string + var NumberValueEqualTemplate string + var NumberValueTypeTemplate string + var NumberValueValuableTemplate string + var NumberValueValueTemplate string + var ObjectFromTemplate string + var ObjectToTemplate string + var ObjectTypeEqualTemplate string + var ObjectTypeStringTemplate string + var ObjectTypeTypableTemplate string + var ObjectTypeTypeTemplate string + var ObjectTypeValueFromObjectTemplate string + var ObjectTypeValueFromTerraformTemplate string + var ObjectTypeValueTypeTemplate string + var ObjectValueAttributeTypesTemplate string + var ObjectValueEqualTemplate string + var ObjectValueTypeTemplate string + var ObjectValueValuableTemplate string + var ObjectValueValueTemplate string + var SchemaGoTemplate string + var SetFromTemplate string + var SetToTemplate string + var SetTypeEqualTemplate string + var SetTypeStringTemplate string + var SetTypeTypableTemplate string + var SetTypeTypeTemplate string + var SetTypeValueFromSetTemplate string + var SetTypeValueFromTerraformTemplate string + var SetTypeValueTypeTemplate string + var SetValueEqualTemplate string + var SetValueTypeTemplate string + var SetValueValuableTemplate string + var SetValueValueTemplate string + var StringFromTemplate string + var StringToTemplate string + var StringTypeEqualTemplate string + var StringTypeStringTemplate string + var StringTypeTypableTemplate string + var StringTypeTypeTemplate string + var StringTypeValueFromStringTemplate string + var StringTypeValueFromTerraformTemplate string + var StringTypeValueTypeTemplate string + var StringValueEqualTemplate string + var StringValueTypeTemplate string + var StringValueValuableTemplate string + var StringValueValueTemplate string + func AttrTypesString(attrTypes specschema.ObjectAttributeTypes) (string, error) + func ElementTypeGoType(elementType specschema.ElementType) (string, error) + func ElementTypeString(elementType specschema.ElementType) (string, error) + func GetAttrTypes(attrTypes specschema.ObjectAttributeTypes) string + func GetAttrTypesFromFuncs(a specschema.ObjectAttributeTypes) (map[string]string, error) + func GetAttrTypesToFuncs(a specschema.ObjectAttributeTypes) (map[string]AttrTypesToFuncs, error) + func GetElementFromFunc(e specschema.ElementType) (string, error) + func GetElementType(e specschema.ElementType) string + func GetElementValueType(e specschema.ElementType) string + type AssocExtType struct + func NewAssocExtType(assocExtType *schema.AssociatedExternalType) *AssocExtType + func (a *AssocExtType) Equal(other *AssocExtType) bool + func (a *AssocExtType) Imports() *Imports + func (a *AssocExtType) ToCamelCase() string + func (a *AssocExtType) ToPascalCase() string + func (a *AssocExtType) Type() string + func (a *AssocExtType) TypeReference() string + type AttrType interface + AttrType func(FrameworkIdentifier) (string, error) + type AttrTypesToFuncs struct + AttrValue string + ToFunc string + type AttrValue interface + AttrValue func(FrameworkIdentifier) string + type Attributes interface + GetAttributes func() GeneratorAttributes + type Attrs interface + AttrTypes func() specschema.ObjectAttributeTypes + type Blocks interface + GetBlocks func() GeneratorBlocks + type CollectionFields struct + ElementType string + GoType string + TypeValueFrom string + type CollectionType interface + CollectionType func() (map[string]string, error) + type CustomBoolType struct + Name FrameworkIdentifier + func NewCustomBoolType(name string) CustomBoolType + func (c CustomBoolType) Render() ([]byte, error) + type CustomBoolValue struct + Name FrameworkIdentifier + func NewCustomBoolValue(name string) CustomBoolValue + func (c CustomBoolValue) Render() ([]byte, error) + type CustomFloat64Type struct + Name FrameworkIdentifier + func NewCustomFloat64Type(name string) CustomFloat64Type + func (c CustomFloat64Type) Render() ([]byte, error) + type CustomFloat64Value struct + Name FrameworkIdentifier + func NewCustomFloat64Value(name string) CustomFloat64Value + func (c CustomFloat64Value) Render() ([]byte, error) + type CustomInt32Type struct + Name FrameworkIdentifier + func NewCustomInt32Type(name string) CustomInt32Type + func (c CustomInt32Type) Render() ([]byte, error) + type CustomInt32Value struct + Name FrameworkIdentifier + func NewCustomInt32Value(name string) CustomInt32Value + func (c CustomInt32Value) Render() ([]byte, error) + type CustomInt64Type struct + Name FrameworkIdentifier + func NewCustomInt64Type(name string) CustomInt64Type + func (c CustomInt64Type) Render() ([]byte, error) + type CustomInt64Value struct + Name FrameworkIdentifier + func NewCustomInt64Value(name string) CustomInt64Value + func (c CustomInt64Value) Render() ([]byte, error) + type CustomListType struct + Name FrameworkIdentifier + func NewCustomListType(name string) CustomListType + func (c CustomListType) Render() ([]byte, error) + type CustomListValue struct + ElementType string + Name FrameworkIdentifier + func NewCustomListValue(name, elemType string) CustomListValue + func (c CustomListValue) Render() ([]byte, error) + type CustomMapType struct + Name FrameworkIdentifier + func NewCustomMapType(name string) CustomMapType + func (c CustomMapType) Render() ([]byte, error) + type CustomMapValue struct + ElementType string + Name FrameworkIdentifier + func NewCustomMapValue(name, elemType string) CustomMapValue + func (c CustomMapValue) Render() ([]byte, error) + type CustomNestedObjectType struct + AttrValues map[FrameworkIdentifier]string + Name FrameworkIdentifier + func NewCustomNestedObjectType(name string, attrValues map[string]string) CustomNestedObjectType + func (c CustomNestedObjectType) Render() ([]byte, error) + type CustomNestedObjectValue struct + AttrTypes map[FrameworkIdentifier]string + AttrValues map[FrameworkIdentifier]string + AttributeTypes map[FrameworkIdentifier]string + CollectionTypes map[FrameworkIdentifier]map[string]string + Name FrameworkIdentifier + func NewCustomNestedObjectValue(name string, attributeTypes, attrTypes, attrValues map[string]string, ...) CustomNestedObjectValue + func (c CustomNestedObjectValue) Render() ([]byte, error) + type CustomNumberType struct + Name FrameworkIdentifier + func NewCustomNumberType(name string) CustomNumberType + func (c CustomNumberType) Render() ([]byte, error) + type CustomNumberValue struct + Name FrameworkIdentifier + func NewCustomNumberValue(name string) CustomNumberValue + func (c CustomNumberValue) Render() ([]byte, error) + type CustomObjectType struct + Name FrameworkIdentifier + func NewCustomObjectType(name string) CustomObjectType + func (c CustomObjectType) Render() ([]byte, error) + type CustomObjectValue struct + AttrTypes string + Name FrameworkIdentifier + func NewCustomObjectValue(name, attrTypes string) CustomObjectValue + func (c CustomObjectValue) Render() ([]byte, error) + type CustomSetType struct + Name FrameworkIdentifier + func NewCustomSetType(name string) CustomSetType + func (c CustomSetType) Render() ([]byte, error) + type CustomSetValue struct + ElementType string + Name FrameworkIdentifier + func NewCustomSetValue(name, elemType string) CustomSetValue + func (c CustomSetValue) Render() ([]byte, error) + type CustomStringType struct + Name FrameworkIdentifier + func NewCustomStringType(name string) CustomStringType + func (c CustomStringType) Render() ([]byte, error) + type CustomStringValue struct + Name FrameworkIdentifier + func NewCustomStringValue(name string) CustomStringValue + func (c CustomStringValue) Render() ([]byte, error) + type CustomTypeAndValue interface + CustomTypeAndValue func(name string) ([]byte, error) + type Elements interface + ElemType func() specschema.ElementType + type FrameworkIdentifier string + func (identifier FrameworkIdentifier) ToCamelCase() string + func (identifier FrameworkIdentifier) ToPascalCase() string + func (identifier FrameworkIdentifier) ToPrefixCamelCase(prefix string) string + func (identifier FrameworkIdentifier) ToPrefixPascalCase(prefix string) string + func (identifier FrameworkIdentifier) ToString() string + func (identifier FrameworkIdentifier) Valid() bool + type From interface + From func() (ToFromConversion, error) + type GeneratorAttribute interface + Equal func(GeneratorAttribute) bool + GeneratorSchemaType func() Type + Imports func() *Imports + ModelField func(FrameworkIdentifier) (model.Field, error) + Schema func(FrameworkIdentifier) (string, error) + type GeneratorAttributes map[string]GeneratorAttribute + func (g GeneratorAttributes) AttrTypes() (map[string]string, error) + func (g GeneratorAttributes) AttrValues() (map[string]string, error) + func (g GeneratorAttributes) AttributeTypes() (map[string]string, error) + func (g GeneratorAttributes) CollectionTypes() (map[string]map[string]string, error) + func (g GeneratorAttributes) Equal(other GeneratorAttributes) bool + func (g GeneratorAttributes) FromFuncs() (map[string]ToFromConversion, error) + func (g GeneratorAttributes) Imports() *Imports + func (g GeneratorAttributes) Schema() (string, error) + func (g GeneratorAttributes) SortedKeys() []string + func (g GeneratorAttributes) ToFuncs() (map[string]ToFromConversion, error) + type GeneratorBlock interface + Equal func(GeneratorBlock) bool + GeneratorSchemaType func() Type + Imports func() *Imports + ModelField func(FrameworkIdentifier) (model.Field, error) + Schema func(FrameworkIdentifier) (string, error) + type GeneratorBlocks map[string]GeneratorBlock + func (g GeneratorBlocks) AttrTypes() (map[string]string, error) + func (g GeneratorBlocks) AttrValues() (map[string]string, error) + func (g GeneratorBlocks) BlockTypes() (map[string]string, error) + func (g GeneratorBlocks) Equal(other GeneratorBlocks) bool + func (g GeneratorBlocks) FromFuncs() map[string]string + func (g GeneratorBlocks) Imports() *Imports + func (g GeneratorBlocks) Schema() (string, error) + func (g GeneratorBlocks) SortedKeys() []string + func (g GeneratorBlocks) ToFuncs() map[string]string + type GeneratorSchema struct + Attributes GeneratorAttributes + Blocks GeneratorBlocks + DeprecationMessage *string + Description *string + MarkdownDescription *string + func (g GeneratorSchema) CustomTypeValueBytes() ([]byte, error) + func (g GeneratorSchema) Imports() (string, error) + func (g GeneratorSchema) Models(name string) ([]model.Model, error) + func (g GeneratorSchema) Schema(name, packageName, generatorType string) ([]byte, error) + func (g GeneratorSchema) ToFromFunctions(ctx context.Context, logger *slog.Logger) ([]byte, error) + type GeneratorSchemas struct + func NewGeneratorSchemas(schemas map[string]GeneratorSchema) GeneratorSchemas + func (g GeneratorSchemas) CustomTypeValue() (map[string][]byte, error) + func (g GeneratorSchemas) Models() (map[string][]byte, error) + func (g GeneratorSchemas) Schemas(packageName, generatorType string) (map[string][]byte, error) + func (g GeneratorSchemas) ToFromFunctions(ctx context.Context, logger *slog.Logger) (map[string][]byte, error) + type Imports struct + func AssociatedExternalTypeImports() *Imports + func AttrImports() *Imports + func NewImports() *Imports + func (i *Imports) Add(c ...code.Import) + func (i *Imports) All() []code.Import + func (i *Imports) Append(imps ...*Imports) + type ObjectField struct + FromFunc string + GoType string + ToFunc string + Type string + func ObjectFieldFrom(o specschema.ObjectAttributeType) (ObjectField, error) + func ObjectFieldTo(o specschema.ObjectAttributeType) (ObjectField, error) + type To interface + To func() (ToFromConversion, error) + type ToFrom interface + ToFromFunctions func(name string) ([]byte, error) + type ToFromBool struct + AssocExtType *AssocExtType + Name FrameworkIdentifier + func NewToFromBool(name string, assocExtType *AssocExtType) ToFromBool + func (o ToFromBool) Render() ([]byte, error) + type ToFromConversion struct + AssocExtType *AssocExtType + CollectionType CollectionFields + Default string + ObjectType map[FrameworkIdentifier]ObjectField + type ToFromFloat64 struct + AssocExtType *AssocExtType + Name FrameworkIdentifier + func NewToFromFloat64(name string, assocExtType *AssocExtType) ToFromFloat64 + func (o ToFromFloat64) Render() ([]byte, error) + type ToFromInt32 struct + AssocExtType *AssocExtType + Name FrameworkIdentifier + func NewToFromInt32(name string, assocExtType *AssocExtType) ToFromInt32 + func (o ToFromInt32) Render() ([]byte, error) + type ToFromInt64 struct + AssocExtType *AssocExtType + Name FrameworkIdentifier + func NewToFromInt64(name string, assocExtType *AssocExtType) ToFromInt64 + func (o ToFromInt64) Render() ([]byte, error) + type ToFromList struct + AssocExtType *AssocExtType + ElementFrom string + ElementTypeType string + ElementTypeValue string + Name FrameworkIdentifier + func NewToFromList(name string, assocExtType *AssocExtType, ...) ToFromList + func (o ToFromList) Render() ([]byte, error) + type ToFromMap struct + AssocExtType *AssocExtType + ElementFrom string + ElementTypeType string + ElementTypeValue string + Name FrameworkIdentifier + func NewToFromMap(name string, assocExtType *AssocExtType, ...) ToFromMap + func (o ToFromMap) Render() ([]byte, error) + type ToFromNestedObject struct + AssocExtType *AssocExtType + FromFuncs map[FrameworkIdentifier]ToFromConversion + Name FrameworkIdentifier + ToFuncs map[FrameworkIdentifier]ToFromConversion + func NewToFromNestedObject(name string, assocExtType *AssocExtType, ...) ToFromNestedObject + func (o ToFromNestedObject) Render() ([]byte, error) + type ToFromNumber struct + AssocExtType *AssocExtType + Name FrameworkIdentifier + func NewToFromNumber(name string, assocExtType *AssocExtType) ToFromNumber + func (o ToFromNumber) Render() ([]byte, error) + type ToFromObject struct + AssocExtType *AssocExtType + AttrTypesFromFuncs map[FrameworkIdentifier]string + AttrTypesToFuncs map[FrameworkIdentifier]AttrTypesToFuncs + Name FrameworkIdentifier + func NewToFromObject(name string, assocExtType *AssocExtType, ...) ToFromObject + func (o ToFromObject) Render() ([]byte, error) + type ToFromSet struct + AssocExtType *AssocExtType + ElementFrom string + ElementTypeType string + ElementTypeValue string + Name FrameworkIdentifier + func NewToFromSet(name string, assocExtType *AssocExtType, ...) ToFromSet + func (o ToFromSet) Render() ([]byte, error) + type ToFromString struct + AssocExtType *AssocExtType + Name FrameworkIdentifier + func NewToFromString(name string, assocExtType *AssocExtType) ToFromString + func (o ToFromString) Render() ([]byte, error) + type Type int64 + const GeneratorBoolAttribute + const GeneratorFloat64Attribute + const GeneratorInt32Attribute + const GeneratorInt64Attribute + const GeneratorListAttribute + const GeneratorListNestedAttribute + const GeneratorListNestedBlock + const GeneratorMapAttribute + const GeneratorMapNestedAttribute + const GeneratorNumberAttribute + const GeneratorObjectAttribute + const GeneratorSetAttribute + const GeneratorSetNestedAttribute + const GeneratorSetNestedBlock + const GeneratorSingleNestedAttribute + const GeneratorSingleNestedBlock + const GeneratorStringAttribute + const InvalidGeneratorSchemaType + type UnimplementedError struct + func NewUnimplementedError(err error, path ...string) *UnimplementedError + func (e *UnimplementedError) Error() string + func (e *UnimplementedError) NestedUnimplementedError(parentPath string) *UnimplementedError + func (e *UnimplementedError) Path() string