vault

package
v0.0.0-...-9d0dce2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidArgumentError = errgo.New("invalid argument error")
	VaultError           = errgo.New("vault error")
)

Functions

This section is empty.

Types

type GithubLoginData

type GithubLoginData struct {
	GithubToken     string
	GithubTokenPath string
	Mount           string // defaults to "github"
}

type Vault

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

func NewVault

func NewVault(srvCfg VaultConfig, log *logging.Logger) (*Vault, error)

func (*Vault) Extract

func (s *Vault) Extract(secretPath, secretField string) (string, error)

extractSecret extracts a secret based on given variables Call a login method before calling this method.

func (*Vault) GithubLogin

func (s *Vault) GithubLogin(data GithubLoginData) error

GithubLogin performs a standard Github authentication and initializes the vaultClient with the resulting token.

type VaultConfig

type VaultConfig struct {
	VaultAddr   string
	VaultCACert string
	VaultCAPath string
}

Jump to

Keyboard shortcuts

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