helper

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStringPointer added in v1.1.4

func ConvertStringPointer(s *string) types.String

func DifferenceBy added in v0.3.7

func DifferenceBy[T any](
	list1 []T,
	list2 []T,
	predicate func(T, T) bool,
) ([]T, []T)

Same as Difference but with a predicate function to compare elements.

func DocString added in v0.3.3

func DocString(inp string) string

useful for docs

func EmptySetDefault

func EmptySetDefault(elemType attr.Type) defaults.Set

func Int64SetToIntSlice added in v0.3.5

func Int64SetToIntSlice(set types.Set) []int

TF types to API data types

func Int64ToIntPointer added in v1.0.0

func Int64ToIntPointer(value int64) *int

func IntPointerToInt64Pointer added in v0.3.4

func IntPointerToInt64Pointer(value *int) *int64

func IntersectBy added in v0.3.7

func IntersectBy[T any](list1 []T, list2 []T, predicate func(T, T) bool) []T

Same as Intersect but with a predicate function to compare elements.

func NormalizeJSONString added in v1.0.0

func NormalizeJSONString(jsonString string) string

func SetIntToInt64OrNull added in v0.3.3

func SetIntToInt64OrNull(value int) types.Int64

API data types to TF types

func SliceIntToSliceTypesInt64 added in v1.0.0

func SliceIntToSliceTypesInt64(input []int) []types.Int64

func SliceStringToSliceInt64 added in v1.0.0

func SliceStringToSliceInt64(slice []string) []int64

func SliceStringToSliceTypesString added in v0.3.10

func SliceStringToSliceTypesString(input []string) []types.String

func SliceStringToTypesListInt64Value added in v1.0.0

func SliceStringToTypesListInt64Value(slice []string) (types.List, diag.Diagnostics)

func SliceStringToTypesListStringValue added in v1.0.0

func SliceStringToTypesListStringValue(slice []string) (types.List, diag.Diagnostics)

func SplitIDToInts added in v0.3.18

func SplitIDToInts(id string, resource_type string) (int, int, error)

func SplitIDToStrings added in v0.3.18

func SplitIDToStrings(id string, resource_type string) (string, string, error)

func StringSetToStringSlice added in v0.3.7

func StringSetToStringSlice(set types.Set) []string

func TernaryOperator added in v1.0.0

func TernaryOperator[T any](condition bool, trueVal T, falseVal T) T

returns trueVal, if condition == true, else falseVal

func TypesInt64ToInt64Pointer added in v0.3.11

func TypesInt64ToInt64Pointer(value types.Int64) *int64

func TypesListInt64SliceToInt64Slice added in v1.0.0

func TypesListInt64SliceToInt64Slice(list types.List) []int64

func TypesListStringToStringSlice added in v1.0.0

func TypesListStringToStringSlice(list types.List) []string

func TypesStringSliceToStringSlice added in v0.3.11

func TypesStringSliceToStringSlice(list []types.String) []string

func UnionBy added in v0.3.7

func UnionBy[T any](
	list1 []T,
	list2 []T,
	predicate func(T, T) bool,
) []T

Same as Union but with a predicate function to compare elements. Note that items need to be unique already in list1 and list2

Types

type DbtVersionValidator added in v1.1.4

type DbtVersionValidator struct{}

func (DbtVersionValidator) Description added in v1.1.4

func (v DbtVersionValidator) Description(ctx context.Context) string

func (DbtVersionValidator) MarkdownDescription added in v1.1.4

func (v DbtVersionValidator) MarkdownDescription(ctx context.Context) string

func (DbtVersionValidator) ValidateString added in v1.1.4

type SemanticLayerCredentialValidator added in v1.1.2

type SemanticLayerCredentialValidator struct {
	FieldName string //the name of the field to check
}

func (SemanticLayerCredentialValidator) Description added in v1.1.2

func (SemanticLayerCredentialValidator) MarkdownDescription added in v1.1.2

func (v SemanticLayerCredentialValidator) MarkdownDescription(ctx context.Context) string

func (SemanticLayerCredentialValidator) ValidateString added in v1.1.2

Jump to

Keyboard shortcuts

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