vault

package module
v0.0.0-...-32531cf Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigRequired             = errors.New("config is required")
	ErrCredentialLocationRequired = errors.New("credential location is required")
	ErrClientRequired             = errors.New("client is required")
	ErrTokenLocationRequired      = errors.New("token location is required")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Client             *vault.Client
	TokenLocation      TokenLocation
	CredentialLocation vaultcredentials.CredentialLocation
}

Config contains configuration information.

type Store

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

Store is a Store implementation for HashiCorp Vault.

func NewStore

func NewStore(c *Config) (*Store, error)

NewStore creates a new Vault-backed store.

func (*Store) Get

func (v *Store) Get(ctx context.Context) (driver.Credentials, error)

Get implements the Store interface.

func (*Store) Refresh

func (v *Store) Refresh(ctx context.Context) (driver.Credentials, error)

Refresh implements the store interface.

type TokenLocation

type TokenLocation interface {
	GetToken(ctx context.Context, client *vault.Client) (string, error)
}

TokenLocation is an interface describing how to get a Vault token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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