vault

package
v6.2.13 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

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

func NewVaultKVStorage(config Config) (spi.Storage, error)

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.

Jump to

Keyboard shortcuts

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