secrets

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context)

Attempt to clean up secret context if it exists

func Decode

func Decode(ctx context.Context, val string) (string, bool, error)

Decode decodes a potential value into a secret

func DecodeAsFile

func DecodeAsFile(ctx context.Context, val string) (string, error)

DecodeAsFile is decode with a check that the final value is a file that exists

func NewContext

func NewContext(ctx context.Context, c *rest.Config, namespace string) context.Context

func NewKubernetesSecretDecrypter

func NewKubernetesSecretDecrypter(ctx context.Context, isFile bool, params string) (secrets.Decrypter, error)

func ParseKubernetesSecretParams

func ParseKubernetesSecretParams(params string) (string, string, error)

func ShouldDecryptToValidate

func ShouldDecryptToValidate(val string) bool

ShouldDecryptToValidate should we decrypt that value before sending to Halyard for validation? For now we decrypt everything so the operator has to be authorized to.

Types

type KubernetesDecrypter

type KubernetesDecrypter struct {
	// contains filtered or unexported fields
}

func (*KubernetesDecrypter) Decrypt

func (k *KubernetesDecrypter) Decrypt() (string, error)

func (*KubernetesDecrypter) IsFile

func (s *KubernetesDecrypter) IsFile() bool

type SecretContext

type SecretContext struct {
	Cache      map[string]string
	FileCache  map[string]string
	RestConfig *rest.Config
	Namespace  string
}

func FromContext

func FromContext(ctx context.Context) (*SecretContext, bool)

func FromContextWithError

func FromContextWithError(ctx context.Context) (*SecretContext, error)

func (*SecretContext) Cleanup

func (s *SecretContext) Cleanup()

Cleanup deletes any temporary file that was used Errors are ignored

Jump to

Keyboard shortcuts

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