vault

package
v1.102.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles communication with Vault

func NewClient

func NewClient(config *api.Config, token, namespace string) (Client, error)

NewClient instantiates a Client and sets the specified token

func NewClientWithAppRole added in v1.85.0

func NewClientWithAppRole(config *api.Config, roleID, secretID, namespace string) (Client, error)

NewClientWithAppRole instantiates a new client and obtains a token via the AppRole auth method

func (Client) GetKvSecret

func (v Client) GetKvSecret(path string) (map[string]string, error)

GetKvSecret reads secret from the KV engine. It Automatically transforms the logical path to the HTTP API Path for the corresponding KV Engine version

func (Client) GetSecret

func (v Client) GetSecret(path string) (*api.Secret, error)

GetSecret uses the given path to fetch a secret from vault

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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