vault

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCustomClient

func SetCustomClient(c VaultClient)

SetCustomClient is used if a custom client needs to be used. Currently only used for testing.

Types

type BankVaultClient

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

func (*BankVaultClient) AddSecrets added in v0.2.0

func (b *BankVaultClient) AddSecrets(secrets []VaultSecret) error

func (*BankVaultClient) RemoveSecrets added in v0.2.0

func (b *BankVaultClient) RemoveSecrets(secrets []VaultSecret) error

RemoveSecrets will remove all the keys bellow the given paths. It will list all secrets of in the path and delete them according to the deletion policy.

func (*BankVaultClient) SetDeletionPolicy added in v0.4.1

func (b *BankVaultClient) SetDeletionPolicy(deletionPolicy synv1alpha1.DeletionPolicy)

type VaultClient

type VaultClient interface {
	AddSecrets(secrets []VaultSecret) error
	// remove specific secret
	RemoveSecrets(secret []VaultSecret) error
	SetDeletionPolicy(synv1alpha1.DeletionPolicy)
}

func NewClient

func NewClient(deletionPolicy synv1alpha1.DeletionPolicy, log logr.Logger) (VaultClient, error)

NewClient returns the default VaultClient implementation, ready to be used. It automatically detects, if there was a Vault token provided or if it's running withing kubernetes.

type VaultSecret added in v0.2.0

type VaultSecret struct {
	Path  string
	Value string
}

TODO: similar map like the template files

Jump to

Keyboard shortcuts

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