utils

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertKeys

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 Decode

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

func DecodeMap

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

DecodeValues decodes values from a secretMap.

func ErrorContains

func ErrorContains(out error, want string) bool

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an Interface is nil.

func MergeByteMap

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

MergeByteMap merges map of byte slices.

func MergeStringMap

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

MergeStringMap performs a deep clone from src to dest.

func NetworkValidate

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

func ObjectHash

func ObjectHash(object interface{}) string

ObjectHash calculates md5 sum of the data contained in the secret. nolint:gosec

func RewriteMap

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

func RewriteRegexp

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

RewriteRegexp rewrites a single Regexp Rewrite Operation.

func ValidateKeys

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

func ValidateReferentSecretSelector

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

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

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

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