vault

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvAuthTokenPath       = "VAULT_AUTH_TOKEN" //nolint:gosec // false-positive
	EnvAuthAppRoleRoleID   = "VAULT_AUTH_APPROLE_ROLE_ID"
	EnvAuthAppRoleSecretID = "VAULT_AUTH_APPROLE_SECRET_ID" //nolint:gosec // false-positive
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Addr is Vault HTTP API endpoint.
	Addr url.URL `env:"ADDR,required"`

	Auth api.AuthConfig `envPrefix:"AUTH_"`

	// MountPath is KV v2 mount path.
	MountPath string `env:"MOUNT_PATH" envDefault:"secret"`
}

Config defines Vault provider settings.

func (*Config) Validate

func (c *Config) Validate() error

type Provider

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

Provider reads secrets from HashiCorp Vault KV v2.

func NewProvider

func NewProvider(ctx context.Context, cfg Config) (*Provider, error)

func (*Provider) Definition

func (p *Provider) Definition() contracts.ProviderDefinition

func (*Provider) GetSecretPayload

func (p *Provider) GetSecretPayload(ctx context.Context, path string) ([]byte, error)

func (*Provider) ListSecrets

func (p *Provider) ListSecrets(ctx context.Context) (map[string]contracts.Secret, error)

type SecretPath

type SecretPath struct {
	Path string
	Key  string
}

Directories

Path Synopsis
Package api is a generated GoMock package.
Package api is a generated GoMock package.

Jump to

Keyboard shortcuts

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