conversion

package
v0.0.13-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolValueToPointer

func BoolValueToPointer(s basetypes.BoolValue) *bool

BoolValueToPointer converts basetypes.BoolValue to a pointer to bool. It returns nil if the value is null or unknown.

func Float64ValueToPointer

func Float64ValueToPointer(s basetypes.Float64Value) *float64

Float64ValueToPointer converts basetypes.Float64Value to a pointer to float64. It returns nil if the value is null or unknown.

func Int32ValueToPointer

func Int32ValueToPointer(s basetypes.Int32Value) *int32

Int32ValueToPointer converts basetypes.Int64Value to a pointer to int64. It returns nil if the value is null or unknown.

func Int64ValueToPointer

func Int64ValueToPointer(s basetypes.Int64Value) *int64

Int64ValueToPointer converts basetypes.Int64Value to a pointer to int64. It returns nil if the value is null or unknown.

func ParseEphemeralProviderData

func ParseEphemeralProviderData(ctx context.Context, providerData any, diags *diag.Diagnostics) (core.EphemeralProviderData, bool)

func ParseProviderData

func ParseProviderData(ctx context.Context, providerData any, diags *diag.Diagnostics) (core.ProviderData, bool)

func StringListToPointer

func StringListToPointer(list basetypes.ListValue) (*[]string, error)

StringListToPointer converts basetypes.ListValue to a pointer to a list of strings. It returns nil if the value is null or unknown.

func StringValueToPointer

func StringValueToPointer(s basetypes.StringValue) *string

StringValueToPointer converts basetypes.StringValue to a pointer to string. It returns nil if the value is null or unknown.

func ToJSONMapPartialUpdatePayload

func ToJSONMapPartialUpdatePayload(ctx context.Context, current, desired types.Map) (map[string]interface{}, error)

ToJSONMApPartialUpdatePayload returns a map[string]interface{} to be used in a PATCH request payload. It takes a current map as it is in the terraform state and a desired map as it is in the user configuratiom and builds a map which sets to null keys that should be removed, updates the values of existing keys and adds new keys This method is needed because in partial updates, e.g. if the key is not provided it is ignored and not removed

func ToOptStringMap

func ToOptStringMap(tfMap map[string]attr.Value) (*map[string]string, error)

func ToString

func ToString(ctx context.Context, v attr.Value) (string, error)

func ToStringInterfaceMap

func ToStringInterfaceMap(ctx context.Context, m basetypes.MapValue) (map[string]interface{}, error)

ToStringInterfaceMap converts a basetypes.MapValue of Strings to a map[string]interface{}.

func ToTerraformStringMap

func ToTerraformStringMap(ctx context.Context, m map[string]string) (basetypes.MapValue, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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