Documentation
¶
Index ¶
- func GetBlock(dbType upcloud.ManagedDatabaseServiceType) schema.Block
- func GetKey(props map[string]upcloud.ManagedDatabaseServiceProperty, field string) string
- func GetProperties(dbType upcloud.ManagedDatabaseServiceType) map[string]upcloud.ManagedDatabaseServiceProperty
- func GetType(prop upcloud.ManagedDatabaseServiceProperty) string
- func ListToValueMap(ctx context.Context, list types.List) (map[string]tftypes.Value, error)
- func NativeToValue(ctx context.Context, v any, prop upcloud.ManagedDatabaseServiceProperty) (attr.Value, diag.Diagnostics)
- func PlanToManagedDatabaseProperties(ctx context.Context, list types.List, ...) (map[upcloud.ManagedDatabasePropertyKey]interface{}, error)
- func PropToAttributeType(prop upcloud.ManagedDatabaseServiceProperty) attr.Type
- func PropsToAttributeTypes(props map[string]upcloud.ManagedDatabaseServiceProperty) map[string]attr.Type
- func SchemaKey(key string) string
- func ValueToAttrValue(ctx context.Context, value tftypes.Value, ...) (attr.Value, diag.Diagnostics)
- func ValueToNative(v tftypes.Value, prop upcloud.ManagedDatabaseServiceProperty) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKey ¶
func GetKey(props map[string]upcloud.ManagedDatabaseServiceProperty, field string) string
GetKey converts key used in schema to key used in the API and properties info. E.g., "pressure_enabled" -> "pressure.enabled"
func GetProperties ¶
func GetProperties(dbType upcloud.ManagedDatabaseServiceType) map[string]upcloud.ManagedDatabaseServiceProperty
func GetType ¶
func GetType(prop upcloud.ManagedDatabaseServiceProperty) string
GetType parses property type from the raw value, which might be either a string or a list of strings. If the type is a list of strings, first non-null value is returned.
func ListToValueMap ¶
func NativeToValue ¶
func NativeToValue(ctx context.Context, v any, prop upcloud.ManagedDatabaseServiceProperty) (attr.Value, diag.Diagnostics)
func PropToAttributeType ¶
func PropToAttributeType(prop upcloud.ManagedDatabaseServiceProperty) attr.Type
func PropsToAttributeTypes ¶
func SchemaKey ¶
SchemaKey converts key used in API to format supported in TF state. E.g., "pressure.enabled" -> "pressure_enabled"
func ValueToAttrValue ¶
func ValueToAttrValue(ctx context.Context, value tftypes.Value, prop upcloud.ManagedDatabaseServiceProperty) (attr.Value, diag.Diagnostics)
func ValueToNative ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.