Documentation
¶
Index ¶
- func DiffStringSet(ctx context.Context, a types.Set, b types.Set, diags *diag.Diagnostics) []types.String
- func ExpandListAs[T any](ctx context.Context, list types.List, diags *diag.Diagnostics) []T
- func ExpandSetAs[T any](ctx context.Context, set types.Set, diags *diag.Diagnostics) []T
- func FlattenHostGroupsToList(ctx context.Context, groups []*models.HostGroupsHostGroupV1) (types.List, diag.Diagnostics)
- func FlattenHostGroupsToSet(ctx context.Context, groups []*models.HostGroupsHostGroupV1) (types.Set, diag.Diagnostics)
- func FlattenStringValueList(ctx context.Context, values []string) (types.List, diag.Diagnostics)
- func FlattenStringValueSet(ctx context.Context, values []string) (types.Set, diag.Diagnostics)
- func FrameworkToInt32Pointer(v types.Int32) *int32
- func FrameworkToRFC3339Pointer(v timetypes.RFC3339) *string
- func FrameworkToStringPointer(v types.String) *string
- func Int32PointerToFramework(v *int32) types.Int32
- func MergeStringSet(ctx context.Context, a types.Set, b types.Set, diags *diag.Diagnostics) types.Set
- func RFC3339PointerToFramework(v *string) (timetypes.RFC3339, diag.Diagnostics)
- func RFC3339ValueToFramework[T ~string](v T) (timetypes.RFC3339, diag.Diagnostics)
- func StringPointerToFramework(v *string) types.String
- func StringValueToFramework[T ~string](v T) types.String
- func Unique[E comparable](s []E) []E
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffStringSet ¶ added in v0.0.55
func DiffStringSet( ctx context.Context, a types.Set, b types.Set, diags *diag.Diagnostics, ) []types.String
DiffStringSet returns items that exist in a but not in b (set difference: a - b).
func ExpandListAs ¶ added in v0.0.52
ExpandListAs converts a Terraform Framework types.List into a Go slice of the specified type. If the list is null or unknown, it returns an empty slice.
func ExpandSetAs ¶ added in v0.0.52
ExpandSetAs converts a Terraform Framework types.Set into a Go slice of the specified type. If the set is null or unknown, it returns an empty slice.
func FlattenHostGroupsToList ¶ added in v0.0.62
func FlattenHostGroupsToList( ctx context.Context, groups []*models.HostGroupsHostGroupV1, ) (types.List, diag.Diagnostics)
FlattenHostGroupsToList converts []*models.HostGroupsHostGroupV1 to a Terraform list of host group IDs. Returns null if there are no groups or all groups are nil/have nil IDs.
func FlattenHostGroupsToSet ¶ added in v0.0.62
func FlattenHostGroupsToSet( ctx context.Context, groups []*models.HostGroupsHostGroupV1, ) (types.Set, diag.Diagnostics)
FlattenHostGroupsToSet converts []*models.HostGroupsHostGroupV1 to a Terraform set of host group IDs. Returns null if there are no groups or all groups are nil/have nil IDs.
func FlattenStringValueList ¶ added in v0.0.62
FlattenStringValueList converts a slice of strings to a Terraform list of strings. Returns null if the slice is empty or nil.
func FlattenStringValueSet ¶ added in v0.0.62
FlattenStringValueSet converts a slice of strings to a Terraform set of strings. Returns null if the slice is empty or nil.
func FrameworkToInt32Pointer ¶ added in v0.0.62
FrameworkToInt32Pointer converts a Terraform framework types.Int32 to an int32 pointer. If the framework int32 is null or unknown, it returns nil.
func FrameworkToRFC3339Pointer ¶ added in v0.0.61
FrameworkToRFC3339Pointer converts a Terraform framework timetypes.RFC3339 to a string pointer. If the framework RFC3339 is null or unknown, it returns a pointer to an empty string.
func FrameworkToStringPointer ¶ added in v0.0.50
FrameworkToStringPointer converts a Terraform framework types.String to a string pointer. If the framework string is null or unknown, it returns a pointer to an empty string.
func Int32PointerToFramework ¶ added in v0.0.62
Int32PointerToFramework converts an int32 pointer to a Terraform framework types.Int32. A nil pointer returns a null types.Int32.
func MergeStringSet ¶ added in v0.0.55
func MergeStringSet( ctx context.Context, a types.Set, b types.Set, diags *diag.Diagnostics, ) types.Set
MergeStringSet combines two sets and returns a new set containing unique items from both.
func RFC3339PointerToFramework ¶ added in v0.0.61
func RFC3339PointerToFramework(v *string) (timetypes.RFC3339, diag.Diagnostics)
RFC3339PointerToFramework converts a string pointer to a Terraform framework timetypes.RFC3339. A nil pointer or empty string returns a null timetypes.RFC3339.
func RFC3339ValueToFramework ¶ added in v0.0.61
func RFC3339ValueToFramework[T ~string](v T) (timetypes.RFC3339, diag.Diagnostics)
RFC3339ValueToFramework converts a string to a Terraform framework timetypes.RFC3339. An empty string returns a null timetypes.RFC3339.
func StringPointerToFramework ¶
StringPointerToFramework converts a string pointer to a Terraform framework types.String. A nil pointer or empty string returns a null types.String.
func StringValueToFramework ¶
StringValueToFramework converts a string to a Terraform framework types.String. An empty string returns a null types.String.
func Unique ¶ added in v0.0.52
func Unique[E comparable](s []E) []E
Unique returns a new slice containing only the unique elements from the input slice. It works for any comparable type E and preserves the order of first occurrence.
Types ¶
This section is empty.