Documentation
¶
Index ¶
- 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 ToString(x interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.