vault

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Noprompt             bool
	Address              string
	Username             string
	Timeout              time.Duration
	Log                  log.Logger
	InitialTokenDuration time.Duration
}

type Vault added in v0.0.2

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

func New added in v0.0.2

func New(config *Config) (*Vault, error)

func (*Vault) AWScredentials added in v0.0.3

func (v *Vault) AWScredentials(account string, role string, sts bool) (*api.Secret, error)

func (*Vault) GetMounts added in v0.0.3

func (v *Vault) GetMounts(mountType string) ([]string, error)

GetMounts retrieves a list of mounts Will return a string array filtered with given type. Example 'aws'

func (*Vault) GetSecret added in v0.0.3

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

GetSecret takes a secret path and returns the secret(s) in a Vault object

func (*Vault) GetSecretKey added in v0.0.2

func (v *Vault) GetSecretKey(path string, key string) (string, error)

GetSecretKey takes a secret path and key and returns, if successful, the secret string present in that key.

func (*Vault) GetSecretKeys added in v0.0.2

func (v *Vault) GetSecretKeys(path string) (map[string]string, error)

GetSecretKeys takes a secret path and returns, if successful, a map of all the keys at that path.

func (*Vault) GetUser added in v0.0.2

func (v *Vault) GetUser() string

func (*Vault) IsNewLogin added in v0.0.3

func (v *Vault) IsNewLogin() bool

IsNewLogin will help high level funcs know if a login prompt was used

func (*Vault) ListSecrets added in v0.0.2

func (v *Vault) ListSecrets(path string) ([]string, error)

ListSecrets takes a secret path and returns, if successful, a list of all child paths under that path.

func (*Vault) Login added in v0.0.2

func (v *Vault) Login() error

Login will authenticate the user with Vault Will detect if user needs to re-login

Jump to

Keyboard shortcuts

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