util

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](items []T, fn func(item T) bool) []T

A utility function to filter the items based on the conditions defined in the predicate 'fn'

func GetAllDataFromSecret added in v0.0.2

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 added in v0.0.2

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 ToString

func ToString(x interface{}) string

A utility function to convert an interface to a string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL