Documentation ¶
Index ¶
- func CombineFieldErrors(fieldErrors field.ErrorList) error
- func CreateMapForKey[T any](objects []T, key string) (m map[string]T, err error)
- func DeepEqualWithException(a, b interface{}, exceptionKey string) bool
- func Filter[T any](items []T, fn func(item T) bool) []T
- func FindFirst[T any](items []T, filter func(item T) bool) (T, error)
- func GetAllDataFromSecret(ctx context.Context, client client.Client, name, namespace string) (data map[string][]byte, err error)
- func GetAllowedAdditionalArguments(isClone bool, dbType string) (map[string]bool, error)
- func GetAllowedAdditionalArgumentsForClone(dbType string) (map[string]bool, error)
- func GetAllowedAdditionalArgumentsForDatabase(dbType string) (map[string]bool, error)
- func IsFeatureEnabled(key string) bool
- func ToString(x interface{}) string
- func ValidateURL(u string) error
- func ValidateUUID(u string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineFieldErrors ¶ added in v0.0.6
func CreateMapForKey ¶ added in v0.0.7
Returns a map from a slice of objects of type 'T' Uses the key provided in the arguments Returns an error if the desired key is not a field in any object of the slice
func DeepEqualWithException ¶ added in v0.0.7
Returns if two structs/objects are equal with the exception of the field under the exceptionKey
func Filter ¶
A utility function to filter the items based on the conditions defined in the predicate 'fn'
func FindFirst ¶
A utility function to find the first match for the given filter function in the case of no match, returns an empty struct instance and an error
func GetAllDataFromSecret ¶
func GetAllDataFromSecret(ctx context.Context, client client.Client, name, namespace string) (data map[string][]byte, err error)
Returns all the data in the given secret and namespace combination returns an error if the secret is not found
func GetAllowedAdditionalArguments ¶ added in v0.0.8
Returns a tuple that consists of the following:
- A map where the keys are the allowed additional arguments for the database type, and the corresponding values indicates whether the key is an action argument (where true=yes and false=no). Currently, all additional arguments are action arguments but this might not always be the case, thus this distinction is made so actual action arguments are appended to the appropriate provisioning body property.
- An error if there is no allowed additional arguments for the corresponding type, in other words, if the dbType is not MSSQL, MongoDB, PostGres, or MYSQL. Else nil.
func GetAllowedAdditionalArgumentsForClone ¶ added in v0.0.8
func GetAllowedAdditionalArgumentsForDatabase ¶ added in v0.0.8
func IsFeatureEnabled ¶ added in v0.0.6
func ToString ¶
func ToString(x interface{}) string
A utility function to convert an interface to a string
func ValidateURL ¶ added in v0.0.6
func ValidateUUID ¶ added in v0.0.6
Types ¶
This section is empty.