secret

package
v0.0.8-prerelease-2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder() *builder

func CreateOrUpdate

func CreateOrUpdate(getUpdateCreator GetUpdateCreator, secret corev1.Secret) error

CreateOrUpdate creates the Secret if it doesn't exist, other wise it updates it

func ReadByteData

func ReadByteData(getter Getter, objectKey client.ObjectKey) (map[string][]byte, error)

ReadByteData reads the Data field of the secret with the given objectKey

func ReadKey

func ReadKey(getter Getter, key string, objectKey client.ObjectKey) (string, error)

func ReadStringData

func ReadStringData(getter Getter, key client.ObjectKey) (map[string]string, error)

ReadStringData reads the StringData field of the secret with the given objectKey

func UpdateField

func UpdateField(getUpdater GetUpdater, objectKey client.ObjectKey, key, value string) error

UpdateField updates a single field in the secret with the provided objectKey

Types

type Creator

type Creator interface {
	CreateSecret(secret corev1.Secret) error
}

type Deleter

type Deleter interface {
	DeleteSecret(objectKey client.ObjectKey) error
}

type GetUpdateCreateDeleter

type GetUpdateCreateDeleter interface {
	Getter
	Updater
	Creator
	Deleter
}

type GetUpdateCreator

type GetUpdateCreator interface {
	Getter
	Updater
	Creator
}

type GetUpdater

type GetUpdater interface {
	Getter
	Updater
}

type Getter

type Getter interface {
	GetSecret(objectKey client.ObjectKey) (corev1.Secret, error)
}

type Updater

type Updater interface {
	UpdateSecret(secret corev1.Secret) error
}

Jump to

Keyboard shortcuts

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