vault

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput    = errors.New("invalid input")
	ErrMalformedSecret = errors.New("malformed secret")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	ReadWithContext(ctx context.Context, path string) (*vault.Secret, error)
}

type Option

type Option func(*options)

func WithPrefix

func WithPrefix(prefix string) Option

type SecretStore

type SecretStore struct {
	Prefix      string
	VaultClient Client
	Logger      *log.Logger
}

func NewSecretStore

func NewSecretStore(client Client, logger *log.Logger, opts ...Option) *SecretStore

func (*SecretStore) GetSecret

func (s *SecretStore) GetSecret(ctx context.Context, lookup string) ([]byte, error)

Jump to

Keyboard shortcuts

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