Documentation
¶
Index ¶
- func FilterMap[K comparable, V comparable](m map[K]V, keep func(K, V) bool) map[K]V
- func FindOwnerKind(owners []metav1.OwnerReference, kind string) string
- func GetServiceAccountAndVerifyWorkloadIdentity(ctx context.Context, k8sclient client.Client, saName, saNamespace string) (string, error)
- func Int32Ptr(i int32) *int32
- func Int64Ptr(i int64) *int64
- func Jitter(base time.Duration, ratio float64) time.Duration
- func Keys[K comparable, v any](m map[K]v) []K
- func MergeMaps[M ~map[K]V, K comparable, V any](src ...M) M
- func ReverseMap[K comparable, V comparable](m map[K]V) map[V]K
- func ToPtr[T any](t T) *T
- func Upsert(ctx context.Context, c client.Client, res client.Object) error
- type UserError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterMap ¶ added in v0.2.5
func FilterMap[K comparable, V comparable](m map[K]V, keep func(K, V) bool) map[K]V
FilterMap filters a map, only keeping the key-value pairs that pass the keep function
func FindOwnerKind ¶
func FindOwnerKind(owners []metav1.OwnerReference, kind string) string
func GetServiceAccountAndVerifyWorkloadIdentity ¶ added in v0.2.5
func Keys ¶ added in v0.2.2
func Keys[K comparable, v any](m map[K]v) []K
Keys returns the keys in a map
func MergeMaps ¶ added in v0.0.2
func MergeMaps[M ~map[K]V, K comparable, V any](src ...M) M
func ReverseMap ¶ added in v0.2.2
func ReverseMap[K comparable, V comparable](m map[K]V) map[V]K
ReverseMap creates a map with the values in the map pointing to the keys, effectively reversing it
Types ¶
type UserError ¶ added in v0.2.5
func NewUserError ¶ added in v0.2.5
Click to show internal directories.
Click to hide internal directories.