Documentation ¶
Index ¶
- Constants
- func CheckFileExists(filePath string) bool
- func ConfigCompose(config ...string) string
- func CreateTransport() *http.Transport
- func DecodeInterfaceToStruct(input, output interface{}) error
- func DecodeStructToMap(input interface{}) (map[string]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 IsCamelCaseEqualToSnakeCase(a, b string) bool
- func IsSnakeEqualToCamelCase(a, b string) bool
- func IsStateFailed(state string) bool
- func IsValidUUID(uuid string) bool
- func IsValueInSliceOfMap[T comparable](sliceOfMaps []interface{}, key string, value T) bool
- func MergeMaps(maps ...map[string]any) map[string]any
- func NameMatches(name, value string, partialMatch bool) bool
- func PointerEmptyToNil() mapstructure.DecodeHookFuncType
- func ReadPublicKey(pathOrKey string) (string, error)
- 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 ConfigCompose ¶ added in v6.4.19
ConfigCompose can be called to concatenate multiple strings to build test configurations
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 DecodeStructToMap ¶ added in v6.4.11
DecodeStructToMap SDK struct to map[string]interface{}
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 IsCamelCaseEqualToSnakeCase ¶ added in v6.4.11
func IsSnakeEqualToCamelCase ¶ added in v6.4.5
func IsStateFailed ¶ added in v6.5.0
IsStateFailed checks if the provided state represents a failed state.
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 MergeMaps ¶ added in v6.4.13
MergeMaps merges a slice of map[string]any entries into one map. Note: Maps should be disjoint, otherwise overlapping keys will be overwritten.
func NameMatches ¶ added in v6.4.19
NameMatches checks if the name matches the value, with partialMatch set to true, it will check if the value is a substring of the name
func PointerEmptyToNil ¶ added in v6.4.5
func PointerEmptyToNil() mapstructure.DecodeHookFuncType
func ReadPublicKey ¶ added in v6.4.11
ReadPublicKey Reads public key from file or directly provided and returns key string if valid
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