vault

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 5 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
}

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) ListPath

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

ListPath 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.

Jump to

Keyboard shortcuts

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