vault

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

type Vault struct {
	Client  *api.Client
	Secrets map[string]interface{}
}

Vault represents a vault struct used for reading and writing secrets.

func NewClient

func NewClient() (*Vault, error)

NewClient returns a new vault client wrapper. VAULT_ADDR and VAULT_TOKEN are required VAULT_SKIP_VERIFY is considered, if defined reads the proxy configuration via HTTP_PROXY and HTTPS_PROXY.

func (*Vault) DisableKV2Engine added in v0.0.2

func (v *Vault) DisableKV2Engine(rootPath string) error

DisableKV2Engine disables the kv2 engine at a specified path.

func (*Vault) EnableKV2Engine added in v0.0.2

func (v *Vault) EnableKV2Engine(rootPath string) error

EnableKV2Engine enables the kv2 engine at a specified path.

func (*Vault) ListRecursive added in v0.0.2

func (v *Vault) ListRecursive(rootPath, subPath string) error

ListRecursive returns secrets to a path recursive.

func (*Vault) ListSecrets added in v0.0.2

func (v *Vault) ListSecrets(rootPath, subPath string) ([]string, error)

ListSecrets returns all keys from vault kv secret path.

func (*Vault) ReadSecrets

func (v *Vault) ReadSecrets(rootPath, subPath string) (map[string]interface{}, error)

ReadSecrets returns a map with all secrets from a kv engine path.

func (*Vault) WriteSecrets added in v0.0.2

func (v *Vault) WriteSecrets(rootPath, subPath string, secrets map[string]interface{}) error

WriteSecrets writes kv secrets to a specified path.

Jump to

Keyboard shortcuts

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