vault

package
v0.0.0-...-9060713 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAddr define the default Vault URL
	DefaultAddr = "http://127.0.0.1:8200"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the Client for the REST API of Vault

func NewClient

func NewClient(vaultAddr string, username string, password string) (*Client, error)

NewClient creates a client to manage Vault entities

func (*Client) List

func (client *Client) List(key string) (map[string]interface{}, error)

List retrieve some secrets

func (*Client) Login

func (client *Client) Login() error

Login performs authentication with the Vault server

func (*Client) Read

func (client *Client) Read(key string) (map[string]interface{}, error)

Read retrieve a secret

func (*Client) Write

func (client *Client) Write(key string, secret pkgalan.Secret) error

Write create a new secret

Jump to

Keyboard shortcuts

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