Documentation ¶
Index ¶
- Constants
- func ContainsStringInSlice(input []string, specific string) bool
- func ContainsStringSlices(first, second []string) bool
- func DereferenceOrZero[T any](v *T) T
- func IsEmptyValue(v reflect.Value) bool
- func IsEqStringMaps(first, second map[string]string) bool
- func IsEqStringSlices(first, second []string) bool
- func IsStringInSlice(input []string, specific string) bool
- func MapStringToAny(sMap map[string]string) map[string]any
- func MatchEqDefaultFormatter(object any) gomock.Matcher
- func MatchEqFormatter(object any, f formatterFunc) gomock.Matcher
- func MatchFuncDefaultFormatter(object any, matchFn matcherFunc) gomock.Matcher
- func MatchFuncFormatter(object any, matchFn matcherFunc, formatFn formatterFunc) gomock.Matcher
- func NewTestLogger() logging.Logger
- func WaitForResourceToBeDeleted(ctx context.Context, timeoutInMinutes time.Duration, fn IsResourceDeletedFunc, ...) error
- type ConfigurationOptions
- type IsResourceDeletedFunc
Constants ¶
const DepthQueryParam = int32(1)
DepthQueryParam is used in GET requests in Cloud API
Variables ¶
This section is empty.
Functions ¶
func ContainsStringInSlice ¶
ContainsStringInSlice will return true if the slice contains string
func ContainsStringSlices ¶
ContainsStringSlices will return true if the slices have the same length and the same elements, even if they are located at different indexes.
func DereferenceOrZero ¶ added in v1.0.9
func DereferenceOrZero[T any](v *T) T
DereferenceOrZero returns the value of a pointer or a zero value if the pointer is nil.
func IsEmptyValue ¶
IsEmptyValue checks if a value is empty or not. nolint
func IsEqStringMaps ¶
IsEqStringMaps will return true if the maps are equal
func IsEqStringSlices ¶
IsEqStringSlices will return true if the slices are equal (having the same length, and the same value at the same index)
func IsStringInSlice ¶
IsStringInSlice will return true if the slice contains the specific string
func MapStringToAny ¶ added in v1.0.9
MapStringToAny converts map[string]string to map[string]any
func MatchEqDefaultFormatter ¶ added in v1.0.11
MatchEqDefaultFormatter returns a gomock.Eq that uses the default formatterFunc for want and got values
func MatchEqFormatter ¶ added in v1.0.11
MatchEqFormatter returns a gomock.Eq that uses formatterFunc for want and got values
func MatchFuncDefaultFormatter ¶ added in v1.0.11
MatchFuncDefaultFormatter returns a gomock.Matcher that uses matcherFunc matching logic and the default formatter for want and got values
func MatchFuncFormatter ¶ added in v1.0.11
MatchFuncFormatter returns a gomock.Matcher that uses matcherFunc matching logic and formatterFunc for want and got values
func NewTestLogger ¶
NewTestLogger returns a logger used in unit tests.
func WaitForResourceToBeDeleted ¶ added in v1.0.9
func WaitForResourceToBeDeleted(ctx context.Context, timeoutInMinutes time.Duration, fn IsResourceDeletedFunc, ids ...string) error
WaitForResourceToBeDeleted - keeps retrying until resource is not found(404), or until ctx is cancelled
Types ¶
type ConfigurationOptions ¶
type ConfigurationOptions struct { CreationGracePeriod time.Duration Timeout time.Duration IsUniqueNamesEnabled bool // CtrlOpts are crossplane-specific controller options CtrlOpts controller.Options }
ConfigurationOptions are options used in setting the provider and the controllers of the provider.
func NewConfigurationOptions ¶
func NewConfigurationOptions(timeout, createGracePeriod time.Duration, uniqueNamesEnable bool, ctrlOpts controller.Options) *ConfigurationOptions
NewConfigurationOptions sets fields for ConfigurationOptions and return a new ConfigurationOptions
func (*ConfigurationOptions) GetCreationGracePeriod ¶
func (o *ConfigurationOptions) GetCreationGracePeriod() time.Duration
GetCreationGracePeriod returns the value for the CreationGracePeriod option
func (*ConfigurationOptions) GetIsUniqueNamesEnabled ¶
func (o *ConfigurationOptions) GetIsUniqueNamesEnabled() bool
GetIsUniqueNamesEnabled returns the value for the IsUniqueNamesEnabled option
func (*ConfigurationOptions) GetPollInterval ¶
func (o *ConfigurationOptions) GetPollInterval() time.Duration
GetPollInterval returns the value for the PollInterval option
func (*ConfigurationOptions) GetTimeout ¶
func (o *ConfigurationOptions) GetTimeout() time.Duration
GetTimeout returns the value for the Timeout option