Documentation
¶
Index ¶
- func CombineFieldErrors(fieldErrors field.ErrorList) error
- 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 GetDataFromSecret(ctx context.Context, client client.Client, name, namespace, key string) (data string, err 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 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 GetDataFromSecret ¶
func GetDataFromSecret(ctx context.Context, client client.Client, name, namespace, key string) (data string, err error)
Returns the data for a key present in the given secret and namespace combination returns an error if either the secret or the data for the given key is not found
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.
Click to show internal directories.
Click to hide internal directories.