utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package utils provides utils for Terraform Provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUUID

func GenerateUUID[T tfValuesForUUID](values ...T) types.String

GenerateUUID generates a unique UUID. The value can be a string or a slice of strings. This is used to generate a unique ID for a resource.

func SortMapStringByKeys added in v0.3.0

func SortMapStringByKeys[T any](m map[string]T) map[string]T

SortMapStringByKeys sorts a map[string]string by keys.

func StringValueOrNull

func StringValueOrNull(value string) basetypes.StringValue

StringValueOrNull return a null StringValue if value is "" or return StringValue(value) if not.

func TakeBoolPointer

func TakeBoolPointer(value bool) *bool

TakeBoolPointer accepts a boolean and returns a pointer to this value.

func TakeInt64Pointer

func TakeInt64Pointer(x int64) *int64

TakeInt64Pointer accepts an int64 and returns a pointer to this value.

func TakeIntPointer

func TakeIntPointer(x int) *int

TakeIntPointer accepts an int and returns a pointer to this value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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