vault

package
v1.135.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

KeyVal V2 secrets implementation for Hashicorp Vault

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(opts *NewManagerOpts) (*Manager, error)

NewManager creates a new credentials manager that uses Hashicorp Vault as backend Configured to write secrets in the KVv2 engine referenced by the provided mount path. SecretPrefix is used to namespace secrets in the KVv2 engine during write operations.

func (*Manager) DeleteCredentials

func (m *Manager) DeleteCredentials(ctx context.Context, secretID string) error

func (*Manager) ReadCredentials

func (m *Manager) ReadCredentials(ctx context.Context, secretID string, creds any) error

func (*Manager) SaveCredentials

func (m *Manager) SaveCredentials(ctx context.Context, orgID string, creds any, opts ...credentials.SaveOption) (string, error)

type NewManagerOpts

type NewManagerOpts struct {
	AuthToken, Address, MountPath, SecretPrefix string
	Logger                                      log.Logger
	Role                                        credentials.Role
}

type Role

type Role int64
const (
	Reader Role = iota
	Writer
)

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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