Documentation ¶
Index ¶
- type Config
- type CustomError
- type CustomVaultError
- type Logger
- type Vault
- func (v *Vault) AWScredentials(account string, role string) (*api.Secret, error)
- func (v *Vault) GetAddress() (string, error)
- func (v *Vault) GetCurrentTokenTTL() (time.Duration, error)
- func (v *Vault) GetHealth() (*api.HealthResponse, error)
- func (v *Vault) GetMounts(mountType string) ([]string, error)
- func (v *Vault) GetSecret(path string) (*api.Secret, error)
- func (v *Vault) GetSecretKey(path string, key string) (string, error)
- func (v *Vault) GetSecretKeys(path string) (map[string]string, error)
- func (v *Vault) GetToken() (string, error)
- func (v *Vault) GetUser() string
- func (v *Vault) GetUsername() (string, error)
- func (v *Vault) IsNewLogin() bool
- func (v *Vault) ListSecrets(path string) ([]string, error)
- func (v *Vault) Login() error
- func (v *Vault) RenewLease(leaseID string, duration time.Duration) (time.Duration, error)
- func (v *Vault) Version() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomError ¶ added in v0.0.7
type CustomError interface { Error() string // contains filtered or unexported methods }
customError is custom error interface with one method that will block other functions from using this Error. This is not interchangeable with the standard error.
type CustomVaultError ¶ added in v0.0.7
CustomVaultError is the custom error type for this package
func (CustomVaultError) Error ¶ added in v0.0.7
func (verr CustomVaultError) Error() string
Error returns the error string
type Logger ¶ added in v0.0.2
type Logger interface { Debug(...interface{}) Warn(...interface{}) Fatal(...interface{}) }
type Vault ¶ added in v0.0.2
type Vault struct {
// contains filtered or unexported fields
}
func (*Vault) AWScredentials ¶ added in v0.0.3
func (*Vault) GetAddress ¶ added in v0.0.7
GetAddress returns the currently configured Vault address
func (*Vault) GetCurrentTokenTTL ¶ added in v0.0.5
GetCurrentTokenTTL gets the TTL of the current token
func (*Vault) GetHealth ¶ added in v0.1.3
func (v *Vault) GetHealth() (*api.HealthResponse, error)
GetHealth returns the Vault api health response
func (*Vault) GetMounts ¶ added in v0.0.3
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
GetSecret takes a secret path and returns the secret(s) in a Vault object
func (*Vault) GetSecretKey ¶ added in v0.0.2
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
GetSecretKeys takes a secret path and returns, if successful, a map of all the keys at that path.
func (*Vault) GetUsername ¶ added in v0.1.5
GetMeta returns the username metadata for the current token
func (*Vault) IsNewLogin ¶ added in v0.0.3
IsNewLogin will help high level funcs know if a login prompt was used
func (*Vault) ListSecrets ¶ added in v0.0.2
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
Login will authenticate the user with Vault Will detect if user needs to re-login
func (*Vault) RenewLease ¶ added in v0.0.6
Renew lease takes a Vault lease ID and renews it for the provided duration Returns the actual renew time (may be different than requested)