Documentation ¶
Index ¶
- type APIType
- type Array
- func (t *Array) GetTFPlanModifierPackageName() string
- func (t *Array) GetTFPlanModifierType() string
- func (t *Array) JSONClientModelToTFFunc() string
- func (t *Array) JSONClientModelType() string
- func (t *Array) TFModelToJSONClientFunc() string
- func (t *Array) TFModelType() string
- func (t *Array) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *Array) TFSchemaAttributeType() string
- type Bool
- func (t *Bool) GetTFPlanModifierPackageName() string
- func (t *Bool) GetTFPlanModifierType() string
- func (t *Bool) JSONClientModelToTFFunc() string
- func (t *Bool) JSONClientModelType() string
- func (t *Bool) TFModelToJSONClientFunc() string
- func (t *Bool) TFModelType() string
- func (t *Bool) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *Bool) TFSchemaAttributeType() string
- type Float
- func (t *Float) GetTFPlanModifierPackageName() string
- func (t *Float) GetTFPlanModifierType() string
- func (t *Float) JSONClientModelToTFFunc() string
- func (t *Float) JSONClientModelType() string
- func (t *Float) TFModelToJSONClientFunc() string
- func (t *Float) TFModelType() string
- func (t *Float) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *Float) TFSchemaAttributeType() string
- type Int
- func (t *Int) GetTFPlanModifierPackageName() string
- func (t *Int) GetTFPlanModifierType() string
- func (t *Int) JSONClientModelToTFFunc() string
- func (t *Int) JSONClientModelType() string
- func (t *Int) TFModelToJSONClientFunc() string
- func (t *Int) TFModelType() string
- func (t *Int) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *Int) TFSchemaAttributeType() string
- type Map
- func (t *Map) GetTFPlanModifierPackageName() string
- func (t *Map) GetTFPlanModifierType() string
- func (t *Map) JSONClientModelToTFFunc() string
- func (t *Map) JSONClientModelType() string
- func (t *Map) TFModelToJSONClientFunc() string
- func (t *Map) TFModelType() string
- func (t *Map) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *Map) TFSchemaAttributeType() string
- type Object
- func (t *Object) GetTFPlanModifierPackageName() string
- func (t *Object) GetTFPlanModifierType() string
- func (t *Object) JSONClientModelToTFFunc() string
- func (t *Object) JSONClientModelType() string
- func (t *Object) TFModelToJSONClientFunc() string
- func (t *Object) TFModelType() string
- func (t *Object) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *Object) TFSchemaAttributeType() string
- type String
- func (t *String) GetTFPlanModifierPackageName() string
- func (t *String) GetTFPlanModifierType() string
- func (t *String) JSONClientModelToTFFunc() string
- func (t *String) JSONClientModelType() string
- func (t *String) TFModelToJSONClientFunc() string
- func (t *String) TFModelType() string
- func (t *String) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *String) TFSchemaAttributeType() string
- type StringEnum
- func (t *StringEnum) GetTFPlanModifierPackageName() string
- func (t *StringEnum) GetTFPlanModifierType() string
- func (t *StringEnum) JSONClientModelToTFFunc() string
- func (t *StringEnum) JSONClientModelType() string
- func (t *StringEnum) TFModelToJSONClientFunc() string
- func (t *StringEnum) TFModelType() string
- func (t *StringEnum) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *StringEnum) TFSchemaAttributeType() string
- type UUID
- func (t *UUID) GetTFPlanModifierPackageName() string
- func (t *UUID) GetTFPlanModifierType() string
- func (t *UUID) JSONClientModelToTFFunc() string
- func (t *UUID) JSONClientModelType() string
- func (t *UUID) TFModelToJSONClientFunc() string
- func (t *UUID) TFModelType() string
- func (t *UUID) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *UUID) TFSchemaAttributeType() string
- type UserstoreResourceID
- func (t *UserstoreResourceID) GetTFPlanModifierPackageName() string
- func (t *UserstoreResourceID) GetTFPlanModifierType() string
- func (t *UserstoreResourceID) JSONClientModelToTFFunc() string
- func (t *UserstoreResourceID) JSONClientModelType() string
- func (t *UserstoreResourceID) TFModelToJSONClientFunc() string
- func (t *UserstoreResourceID) TFModelType() string
- func (t *UserstoreResourceID) TFSchemaAttributeText(extraFields map[string]string) string
- func (t *UserstoreResourceID) TFSchemaAttributeType() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIType ¶
type APIType interface { // TFModelType returns the name of the corresponding type in the // terraform-provider-userclouds/types package, used for in-memory storage TFModelType() string // TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this // object in the Terraform schema. TFSchemaAttributeType() string // TFSchemaAttributeText generates the declaration for an attribute storing // this type in a Terraform schema TFSchemaAttributeText(extraFields map[string]string) string // JSONClientModelType returns the name of the type for use with // userclouds/jsonclient (most likely simple Go native types) JSONClientModelType() string // TFModelToJSONClientFunc should return the text of a function with // signature "func (val *TFModelType) (*JSONClientModelType, error)" TFModelToJSONClientFunc() string // TFModelToJSONClientFunc should return the text of a function with // signature "func (val *JSONClientModelType) (TFModelType, error)" JSONClientModelToTFFunc() string // GetTFPlanModifierType returns the name of the // terraform-plugin-framework/resource/schema/planmodifier type for this API // type (e.g. String, Int64, etc.) GetTFPlanModifierType() string // GetTFPlanModifierPackageName returns the name of the package // (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the // plan modifiers for this type GetTFPlanModifierPackageName() string }
APIType represents a type for use with the UserClouds API. It contains methods to simplify mapping between various Terraform types and Go types.
type Array ¶
Array represents an array of a single type.
func (*Array) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*Array) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*Array) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*Array) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*Array) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*Array) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*Array) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*Array) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type Bool ¶
Bool represents a boolean value.
func (*Bool) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*Bool) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*Bool) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*Bool) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*Bool) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*Bool) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*Bool) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*Bool) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type Float ¶
Float represents a float value.
func (*Float) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*Float) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*Float) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*Float) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*Float) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*Float) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*Float) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*Float) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type Int ¶
Int represents an integer value.
func (*Int) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*Int) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*Int) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*Int) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*Int) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*Int) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*Int) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*Int) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type Map ¶
Map represents a map from string to ValueType.
func (*Map) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*Map) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*Map) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*Map) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*Map) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*Map) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*Map) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*Map) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type Object ¶
type Object struct { Schema *openapi3.Schema // We store the object properties in structs generated by schemas.go. We // need to reference those structs in the code generated here TFModelStructName string TFSchemaAttrTypeMapName string TFSchemaAttributesMapName string JSONClientModelStructName string // We also generate functions in schemas.go that iterate over the object // properties in order to convert between model types TFModelToJSONClientFuncName string JSONClientModelToTFFuncName string }
Object represents an object with known property types.
func (*Object) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*Object) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*Object) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*Object) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*Object) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*Object) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*Object) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*Object) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type String ¶
String represents a string value.
func (*String) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*String) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*String) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*String) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*String) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*String) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*String) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*String) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type StringEnum ¶
StringEnum represents an enum of strings.
func (*StringEnum) GetTFPlanModifierPackageName ¶ added in v0.1.4
func (t *StringEnum) GetTFPlanModifierPackageName() string
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*StringEnum) GetTFPlanModifierType ¶ added in v0.1.4
func (t *StringEnum) GetTFPlanModifierType() string
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*StringEnum) JSONClientModelToTFFunc ¶
func (t *StringEnum) JSONClientModelToTFFunc() string
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*StringEnum) JSONClientModelType ¶
func (t *StringEnum) JSONClientModelType() string
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*StringEnum) TFModelToJSONClientFunc ¶
func (t *StringEnum) TFModelToJSONClientFunc() string
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*StringEnum) TFModelType ¶
func (t *StringEnum) TFModelType() string
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*StringEnum) TFSchemaAttributeText ¶
func (t *StringEnum) TFSchemaAttributeText(extraFields map[string]string) string
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*StringEnum) TFSchemaAttributeType ¶
func (t *StringEnum) TFSchemaAttributeType() string
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type UUID ¶
UUID represents a UUID string.
func (*UUID) GetTFPlanModifierPackageName ¶ added in v0.1.4
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*UUID) GetTFPlanModifierType ¶ added in v0.1.4
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*UUID) JSONClientModelToTFFunc ¶
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*UUID) JSONClientModelType ¶
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*UUID) TFModelToJSONClientFunc ¶
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*UUID) TFModelType ¶
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*UUID) TFSchemaAttributeText ¶
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*UUID) TFSchemaAttributeType ¶
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.
type UserstoreResourceID ¶
type UserstoreResourceID struct { Schema *openapi3.Schema // JSONClientModelStructName is the name of the codegen'ed struct that stores a // userstore.ResourceID value for use in sending/receiving API requests/responses JSONClientModelStructName string }
UserstoreResourceID represents a "userstore.ResourceID" struct. This struct has an ID field and a Name field, where only one field is required, so that customers making API requests can use either the UUID or the Name to refer to a resource. However, in Terraform, we want to drop the Name field, since the Name field is not guaranteed to be stable. If we include Name in Terraform state, then e.g. if someone were to change a column name, they would get diffs everywhere that references that column, even though those other resources did not change.
func (*UserstoreResourceID) GetTFPlanModifierPackageName ¶ added in v0.1.4
func (t *UserstoreResourceID) GetTFPlanModifierPackageName() string
GetTFPlanModifierPackageName returns the name of the package (terraform-plugin-framework/resource/schema/RETURNVALUE) containing the plan modifiers for this type
func (*UserstoreResourceID) GetTFPlanModifierType ¶ added in v0.1.4
func (t *UserstoreResourceID) GetTFPlanModifierType() string
GetTFPlanModifierType returns the name of the terraform-plugin-framework/resource/schema/planmodifier type for this API type (e.g. String, Int64, etc.)
func (*UserstoreResourceID) JSONClientModelToTFFunc ¶
func (t *UserstoreResourceID) JSONClientModelToTFFunc() string
JSONClientModelToTFFunc returns the text of a function for converting a jsonclient model struct to a Terraform model struct.
func (*UserstoreResourceID) JSONClientModelType ¶
func (t *UserstoreResourceID) JSONClientModelType() string
JSONClientModelType returns the type that should be used to represent this type in a jsonclient request/response struct.
func (*UserstoreResourceID) TFModelToJSONClientFunc ¶
func (t *UserstoreResourceID) TFModelToJSONClientFunc() string
TFModelToJSONClientFunc returns the text of a function for converting a Terraform model struct to a jsonclient model struct.
func (*UserstoreResourceID) TFModelType ¶
func (t *UserstoreResourceID) TFModelType() string
TFModelType returns the type that should be used to represent this type in a Terraform model.
func (*UserstoreResourceID) TFSchemaAttributeText ¶
func (t *UserstoreResourceID) TFSchemaAttributeText(extraFields map[string]string) string
TFSchemaAttributeText returns the text of the code for instantiating this type as a Terraform schema attribute.
func (*UserstoreResourceID) TFSchemaAttributeType ¶
func (t *UserstoreResourceID) TFSchemaAttributeType() string
TFSchemaAttributeType returns an attr.Type, which is a struct representing the type of this object in the Terraform schema.