Documentation ¶
Index ¶
- Constants
- func CheckFileExists(filePath string) bool
- func CreateTransport() *http.Transport
- func DecodeInterfaceToStruct(input, output interface{}) error
- func DiffEmptyIps(_, old, new string, _ *schema.ResourceData) bool
- func DiffSlice(slice1 []string, slice2 []string) []string
- func DiffSliceOneWay(a, b []string) []string
- func DiffToLower(_, old, new string, _ *schema.ResourceData) bool
- func DiffWithoutNewLines(_, old, new string, _ *schema.ResourceData) bool
- func GenerateEmail() string
- func GenerateImmutableError(resource, field string) error
- func GenerateSetError(resource, field string, err error) error
- func IsSnakeEqualToCamelCase(a, b string) bool
- func IsValidUUID(uuid string) bool
- func IsValueInSliceOfMap[T comparable](sliceOfMaps []interface{}, key string, value T) bool
- func PointerEmptyToNil() mapstructure.DecodeHookFuncType
- func RemoveNewLines(s string) string
- func SetPropWithNilCheck(m map[string]interface{}, prop string, v interface{})
- func TestImageNotNull(resource, attribute string) resource.TestCheckFunc
- func TestNotEmptySlice(resource, attribute string) resource.TestCheckFunc
- func TestValueInSlice(resource, attribute, value string) resource.TestCheckFunc
- func WaitForResourceToBeDeleted(ctx context.Context, d *schema.ResourceData, fn IsResourceDeletedFunc) error
- func WaitForResourceToBeReady(ctx context.Context, d *schema.ResourceData, fn ResourceReadyFunc) error
- func WriteToFile(name, value string) error
- type ApiResponseInfo
- type IsResourceDeletedFunc
- type ResourceReadyFunc
Constants ¶
const DefaultTimeout = 60 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func CheckFileExists ¶ added in v6.3.2
func CreateTransport ¶
CreateTransport - creates customizable transport for http clients
func DecodeInterfaceToStruct ¶ added in v6.4.5
func DecodeInterfaceToStruct(input, output interface{}) error
DecodeInterfaceToStruct can decode from interface{}, or from []interface will turn "" into nil values takes snake_case fields and decodes them into camelcase fields of struct used to decode values from TypeList and TypeSet of schema(`d`) directly into sdk structs
func DiffEmptyIps ¶ added in v6.3.6
func DiffEmptyIps(_, old, new string, _ *schema.ResourceData) bool
DiffEmptyIps suppress difference when empty value for array is overwritten by API and assigned an actual IP address
func DiffSliceOneWay ¶
DiffSliceOneWay returns the elements in `a` that aren't in `b`.
func DiffToLower ¶ added in v6.3.2
func DiffToLower(_, old, new string, _ *schema.ResourceData) bool
DiffToLower terraform suppress differences between lower and upper
func DiffWithoutNewLines ¶ added in v6.3.2
func DiffWithoutNewLines(_, old, new string, _ *schema.ResourceData) bool
DiffWithoutNewLines terraform suppress differences between newlines
func GenerateEmail ¶
func GenerateEmail() string
func GenerateImmutableError ¶ added in v6.3.6
func GenerateSetError ¶
func IsSnakeEqualToCamelCase ¶ added in v6.4.5
func IsValidUUID ¶ added in v6.3.0
func IsValueInSliceOfMap ¶ added in v6.4.5
func IsValueInSliceOfMap[T comparable](sliceOfMaps []interface{}, key string, value T) bool
checks if value['1'] of key[`id`] is present inside a slice of maps[string]interface{}
func PointerEmptyToNil ¶ added in v6.4.5
func PointerEmptyToNil() mapstructure.DecodeHookFuncType
func RemoveNewLines ¶ added in v6.3.2
func SetPropWithNilCheck ¶
func TestImageNotNull ¶ added in v6.3.0
func TestImageNotNull(resource, attribute string) resource.TestCheckFunc
func TestNotEmptySlice ¶ added in v6.3.0
func TestNotEmptySlice(resource, attribute string) resource.TestCheckFunc
func TestValueInSlice ¶
func TestValueInSlice(resource, attribute, value string) resource.TestCheckFunc
func WaitForResourceToBeDeleted ¶ added in v6.3.4
func WaitForResourceToBeDeleted(ctx context.Context, d *schema.ResourceData, fn IsResourceDeletedFunc) error
WaitForResourceToBeDeleted - keeps retrying until resource is not found(404), or until ctx is cancelled
func WaitForResourceToBeReady ¶ added in v6.3.4
func WaitForResourceToBeReady(ctx context.Context, d *schema.ResourceData, fn ResourceReadyFunc) error
WaitForResourceToBeReady - keeps retrying until resource is ready(true is returned), or until err is thrown, or ctx is cancelled
func WriteToFile ¶ added in v6.3.3
WriteToFile - creates the file and writes 'value' to it.
Types ¶
type ApiResponseInfo ¶ added in v6.3.4
type ApiResponseInfo interface { HttpNotFound() bool LogInfo() }
ApiResponseInfo - interface over different ApiResponse types from sdks
type IsResourceDeletedFunc ¶ added in v6.3.4
IsResourceDeletedFunc polls api to see if resource exists based on id
type ResourceReadyFunc ¶ added in v6.3.4
ResourceReadyFunc polls api to see if resource exists based on id