types

package
v2.60.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const NetIPNil = "<nil>"

NetIPNil define the nil string return by (*net.IP).String()

Variables

This section is empty.

Functions

func CompareStringListsIgnoringOrder added in v2.39.0

func CompareStringListsIgnoringOrder(oldListStr, newListStr []string) bool

func ExpandBoolPtr

func ExpandBoolPtr(data any) *bool

func ExpandDuration

func ExpandDuration(data any) (*time.Duration, error)

func ExpandIPNet

func ExpandIPNet(raw string) (scw.IPNet, error)

func ExpandInt32Ptr

func ExpandInt32Ptr(data any) *int32

func ExpandMapPtrStringString

func ExpandMapPtrStringString(data any) *map[string]string

func ExpandMapStringString

func ExpandMapStringString(data any) map[string]string

func ExpandMapStringStringPtr

func ExpandMapStringStringPtr(data any) map[string]*string

func ExpandOrGenerateString

func ExpandOrGenerateString(data any, prefix string) string

func ExpandSize added in v2.40.0

func ExpandSize(data any) *scw.Size

func ExpandSliceIDs added in v2.39.0

func ExpandSliceIDs(rawIDs any) []string

func ExpandSliceIDsPtr

func ExpandSliceIDsPtr(rawIDs any) *[]string

func ExpandSliceStringPtr

func ExpandSliceStringPtr(data any) []*string

func ExpandStringPtr

func ExpandStringPtr(data any) *string

func ExpandStringWithDefault

func ExpandStringWithDefault(data any, defaultValue string) string

func ExpandStrings

func ExpandStrings(data any) []string

func ExpandStringsOrEmpty

func ExpandStringsOrEmpty(data any) []string

func ExpandStringsPtr

func ExpandStringsPtr(data any) *[]string

func ExpandTimePtr added in v2.39.0

func ExpandTimePtr(i any) *time.Time

ExpandTimePtr returns a time pointer for an RFC3339 time. It returns nil if time is not valid, you should use validateDate to validate field.

func ExpandUint32Ptr

func ExpandUint32Ptr(data any) *uint32

func ExpandUint64Ptr added in v2.52.0

func ExpandUint64Ptr(data any) *uint64

func ExpandUpdatedStringPtr

func ExpandUpdatedStringPtr(data any) *string

func ExpandUpdatedStringsPtr

func ExpandUpdatedStringsPtr(data any) *[]string

ExpandUpdatedStringsPtr expands a string slice but will default to an empty list. Should be used on schema update so emptying a list will update resource.

func FlattenBoolPtr

func FlattenBoolPtr(b *bool) any

func FlattenDuration

func FlattenDuration(duration *time.Duration) any

func FlattenIPNet

func FlattenIPNet(ipNet scw.IPNet) (string, error)

func FlattenIPPtr

func FlattenIPPtr(ip *net.IP) any

func FlattenInt32Ptr

func FlattenInt32Ptr(i *int32) any

func FlattenMap

func FlattenMap(m map[string]string) any

func FlattenMapStringStringPtr

func FlattenMapStringStringPtr(m map[string]*string) any

func FlattenSize

func FlattenSize(size *scw.Size) any

func FlattenSliceIDs

func FlattenSliceIDs(certificates []string, zone scw.Zone) any

func FlattenSliceString

func FlattenSliceString(s []string) any

func FlattenSliceStringPtr

func FlattenSliceStringPtr(s []*string) any

func FlattenStringPtr

func FlattenStringPtr(s *string) any

func FlattenTime

func FlattenTime(date *time.Time) any

func FlattenUint32Ptr

func FlattenUint32Ptr(i *uint32) any

func GetBool added in v2.39.0

func GetBool(d *schema.ResourceData, key string) any

func GetMapValue added in v2.42.0

func GetMapValue[T any](
	m map[string]any,
	key string,
) T

GetMapValue returns the value for a key from a map. returns zero value if key does not exist in map.

func NewRandomName

func NewRandomName(prefix string) string

NewRandomName returns a random name prefixed for terraform.

func SliceContainsString added in v2.39.0

func SliceContainsString(slice []string, str string) bool

func StringHashcode added in v2.39.0

func StringHashcode(s string) int

StringHashcode hashes a string to a unique hashcode.

crc32 returns a uint32, but for our use we need and non-negative integer. Here we cast to an integer and invert it if the result is negative.

Types

This section is empty.

Jump to

Keyboard shortcuts

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