Documentation
¶
Index ¶
Constants ¶
View Source
const StorageType = "vaultkv"
StorageType is the name of this storage type, used in health check reports and configuration.
Variables ¶
This section is empty.
Functions ¶
func NewVaultKVStorage ¶
NewVaultKVStorage creates a new Vault backend using the kv version 1 secret engine: https://www.vaultproject.io/docs/secrets/kv It currently only supports token authentication which should be provided by the token param. If config.Address is empty, the VAULT_ADDR environment should be set. If config.Token is empty, the VAULT_TOKEN environment should be is set.
Types ¶
type Config ¶
type Config struct {
// Token to authenticate to the Vault cluster.
Token string `koanf:"token"`
// Address of the Vault cluster
Address string `koanf:"address"`
// PathPrefix can be used to overwrite the default 'kv' path.
PathPrefix string `koanf:"pathprefix"`
// Timeout specifies the Vault client timeout.
Timeout time.Duration
}
Config contains the config options to configure the vaultKVStorage backend
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with the PathPrefix containing the default value.
Click to show internal directories.
Click to hide internal directories.