utils

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertKeys added in v0.5.0

func ConvertKeys(strategy esv1beta1.ExternalSecretConversionStrategy, in map[string][]byte) (map[string][]byte, error)

ConvertKeys converts a secret map into a valid key. Replaces any non-alphanumeric characters depending on convert strategy.

func ConvertToType added in v0.7.3

func ConvertToType[T any](obj interface{}) (T, error)

func Decode added in v0.5.8

func Decode(strategy esv1beta1.ExternalSecretDecodingStrategy, in []byte) ([]byte, error)

func DecodeMap added in v0.5.8

func DecodeMap(strategy esv1beta1.ExternalSecretDecodingStrategy, in map[string][]byte) (map[string][]byte, error)

DecodeValues decodes values from a secretMap.

func Deref added in v0.7.3

func Deref[V any](v *V) V

func ErrorContains added in v0.4.0

func ErrorContains(out error, want string) bool

func IsNil added in v0.2.2

func IsNil(i interface{}) bool

IsNil checks if an Interface is nil.

func MergeByteMap added in v0.2.2

func MergeByteMap(dst, src map[string][]byte) map[string][]byte

MergeByteMap merges map of byte slices.

func MergeStringMap added in v0.2.2

func MergeStringMap(dest, src map[string]string)

MergeStringMap performs a deep clone from src to dest.

func NetworkValidate added in v0.5.2

func NetworkValidate(endpoint string, timeout time.Duration) error

func ObjectHash added in v0.3.6

func ObjectHash(object interface{}) string

ObjectHash calculates md5 sum of the data contained in the secret.

func Ptr added in v0.7.3

func Ptr[T any](i T) *T

func RewriteMap added in v0.5.9

func RewriteMap(operations []esv1beta1.ExternalSecretRewrite, in map[string][]byte) (map[string][]byte, error)

func RewriteRegexp added in v0.5.9

func RewriteRegexp(operation esv1beta1.ExternalSecretRewriteRegexp, in map[string][]byte) (map[string][]byte, error)

RewriteRegexp rewrites a single Regexp Rewrite Operation.

func ValidateKeys added in v0.5.9

func ValidateKeys(in map[string][]byte) bool

func ValidateReferentSecretSelector added in v0.5.4

func ValidateReferentSecretSelector(store esv1beta1.GenericStore, ref esmeta.SecretKeySelector) error

ValidateReferentSecretSelector allows cluster scoped store without namespace this should replace above ValidateServiceAccountSelector once all providers support referent auth.

func ValidateReferentServiceAccountSelector added in v0.5.4

func ValidateReferentServiceAccountSelector(store esv1beta1.GenericStore, ref esmeta.ServiceAccountSelector) error

ValidateReferentServiceAccountSelector allows cluster scoped store without namespace this should replace above ValidateServiceAccountSelector once all providers support referent auth.

func ValidateSecretSelector added in v0.5.0

func ValidateSecretSelector(store esv1beta1.GenericStore, ref esmeta.SecretKeySelector) error

ValidateSecretSelector just checks if the namespace field is present/absent depending on the secret store type. We MUST NOT check the name or key property here. It MAY be defaulted by the provider.

func ValidateServiceAccountSelector added in v0.5.0

func ValidateServiceAccountSelector(store esv1beta1.GenericStore, ref esmeta.ServiceAccountSelector) error

ValidateServiceAccountSelector just checks if the namespace field is present/absent depending on the secret store type. We MUST NOT check the name or key property here. It MAY be defaulted by the provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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