vault

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend loads keys from Vault

func NewBackend

func NewBackend(client *api.Logical, path string) *Backend

NewBackend creates a configuration loader that loads from Vault all the keys from the given path and holds them in memory. Use this when using Vault KV secrets engine v1.

func NewBackendV2 added in v0.10.0

func NewBackendV2(client *api.Logical, path string) *Backend

NewBackendV2 creates a configuration loader that loads from Vault all the keys from the given path and holds them in memory. Use this when using Vault KV secrets engine v2.

func (*Backend) Get

func (b *Backend) Get(ctx context.Context, key string) ([]byte, error)

Get loads the given key from Vault.

func (*Backend) Name added in v0.6.0

func (b *Backend) Name() string

Name returns the name of the backend.

Jump to

Keyboard shortcuts

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