Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct { Auth struct { ClientToken string `json:"client_token"` LeaseDuration int64 `json:"lease_duration"` Metadata struct{} `json:"metadata"` Policies []string `json:"policies"` Renewable bool `json:"renewable"` } `json:"auth"` }
AuthResponse - the Auth response
func (*AuthResponse) String ¶
func (a *AuthResponse) String() string
type AuthStrategy ¶
AuthStrategy -
type Client ¶
type Client struct { Addr *url.URL Auth AuthStrategy // contains filtered or unexported fields }
Client -
func (*Client) GetHTTPClient ¶ added in v1.2.1
GetHTTPClient returns a client configured w/X-Vault-Token header
func (*Client) RevokeToken ¶
func (c *Client) RevokeToken()
RevokeToken - revoke the current auth token - effectively logging out
type Strategy ¶ added in v1.6.0
type Strategy struct {
// contains filtered or unexported fields
}
Strategy - an auth strategy configured through the Vault API
func AppIDStrategy ¶ added in v1.6.0
func AppIDStrategy(fs vfs.Filesystem) *Strategy
AppIDStrategy - app-id auth backend
func AppRoleStrategy ¶ added in v1.6.0
func AppRoleStrategy(fs vfs.Filesystem) *Strategy
AppRoleStrategy - approle auth backend
func GitHubStrategy ¶ added in v1.6.0
func GitHubStrategy(fs vfs.Filesystem) *Strategy
GitHubStrategy - github auth backend
func UserPassStrategy ¶ added in v1.6.0
func UserPassStrategy(fs vfs.Filesystem) *Strategy
UserPassStrategy - userpass auth backend
func (*Strategy) GetHTTPClient ¶ added in v1.6.0
GetHTTPClient configures the HTTP client with a timeout
type TokenStrategy ¶ added in v1.6.0
type TokenStrategy struct {
Token string
}
TokenStrategy - a pass-through strategy for situations where we already have a Vault token.
func NewTokenStrategy ¶ added in v1.6.0
func NewTokenStrategy(fs vfs.Filesystem) *TokenStrategy
NewTokenStrategy - Try to create a new TokenStrategy. If we can't nil will be returned.
func (*TokenStrategy) GetToken ¶ added in v1.6.0
func (a *TokenStrategy) GetToken(addr *url.URL) (string, error)
GetToken - return the token
func (*TokenStrategy) Revokable ¶ added in v1.6.0
func (a *TokenStrategy) Revokable() bool
Revokable -