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 ¶
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 ¶
type Strategy struct {
// contains filtered or unexported fields
}
Strategy - an auth strategy configured through the Vault API
func AppIDStrategy ¶
func AppIDStrategy(fs vfs.Filesystem) *Strategy
AppIDStrategy - app-id auth backend
func AppRoleStrategy ¶
func AppRoleStrategy(fs vfs.Filesystem) *Strategy
AppRoleStrategy - approle auth backend
func GitHubStrategy ¶
func GitHubStrategy(fs vfs.Filesystem) *Strategy
GitHubStrategy - github auth backend
func UserPassStrategy ¶
func UserPassStrategy(fs vfs.Filesystem) *Strategy
UserPassStrategy - userpass auth backend
func (*Strategy) GetHTTPClient ¶
GetHTTPClient configures the HTTP client with a timeout
type TokenStrategy ¶
type TokenStrategy struct {
Token string
}
TokenStrategy - a pass-through strategy for situations where we already have a Vault token.
func NewTokenStrategy ¶
func NewTokenStrategy(fs vfs.Filesystem) *TokenStrategy
NewTokenStrategy - Try to create a new TokenStrategy. If we can't nil will be returned.