vaultclient

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 7 Imported by: 0

README

GoDoc

Vault client wrapper supporting App-ID authentication.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VaultClient

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

func NewClient

func NewClient(config *VaultConfig) (*VaultClient, error)

NewClient returns a VaultClient object or error

func (*VaultClient) AppIDAuth

func (c *VaultClient) AppIDAuth(appid string, useridpath string) error

AppIDAuth attempts to perform app-id authorization.

func (*VaultClient) GetBase64Value

func (c *VaultClient) GetBase64Value(path string) ([]byte, error)

GetBase64Value retrieves and decodes a value expected to be base64-encoded binary

func (*VaultClient) GetStringValue

func (c *VaultClient) GetStringValue(path string) (string, error)

GetStringValue retrieves a value expected to be a string

func (*VaultClient) GetValue

func (c *VaultClient) GetValue(path string) (interface{}, error)

GetValue retrieves value at path

func (*VaultClient) TokenAuth

func (c *VaultClient) TokenAuth(token string) error

TokenAuth sets the client token but doesn't check validity

func (*VaultClient) WriteValue

func (c *VaultClient) WriteValue(path string, data []byte) error

WriteValue writes value=data at path

type VaultConfig

type VaultConfig struct {
	Server string // protocol, hostname and port (https://vault.foo.com:8200)
}

Jump to

Keyboard shortcuts

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