vaultclient

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.1.0"

VERSION is the library version

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	Keys []string
}

List represents the structured data returned by the list command

type Vault

type Vault struct {
	Client *api.Client
	// contains filtered or unexported fields
}

Vault represents the Vault configuration

func New

func New(init bool) (v Vault, err error)

New returns a new config

func (*Vault) Init

func (v *Vault) Init() (err error)

Init initilizes the vault client

func (Vault) ListSecret

func (v Vault) ListSecret(path string) (*api.Secret, error)

ListSecret lists secrets at a given path

func (Vault) ListSecretJSON

func (v Vault) ListSecretJSON(path string) ([]byte, error)

ListSecretJSON returns a secret endcoded in json

func (Vault) ListSecretStruct

func (v Vault) ListSecretStruct(path string) (List, error)

ListSecretStruct returns a list secret as a List object

func (Vault) ReadSecret

func (v Vault) ReadSecret(path string) (*api.Secret, error)

ReadSecret returns a secret

func (Vault) ReadSecretJSON

func (v Vault) ReadSecretJSON(path string) ([]byte, error)

ReadSecretJSON returns a secret endcoded in json

func (Vault) WriteSecret added in v0.2.0

func (v Vault) WriteSecret(payload []byte, path string) error

WriteSecret writes a payload to the v1 secret engine at a given path and returns an error

Jump to

Keyboard shortcuts

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