Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetIsBinaryKey ¶
Types ¶
type AppRoleAuth ¶
AppRoleAuth implements the the AppRole authentication method. See: https://www.vaultproject.io/docs/auth/approle.html
func (*AppRoleAuth) IsRenewable ¶
func (a *AppRoleAuth) IsRenewable() bool
func (*AppRoleAuth) Name ¶
func (a *AppRoleAuth) Name() string
type AuthMethod ¶
type AuthMethod interface { // Login creates a new authentication token. Login(*Client) (*api.Secret, error) // Name returns the name of the authentication method. Name() string // Check if token is renewable IsRenewable() bool }
AuthMethod specifies an authentication method for the Hashicorp Vault API.
type Client ¶
func (*Client) CreateOrUpdate ¶
type DevServer ¶
type DevServer struct {
// contains filtered or unexported fields
}
func NewDevServer ¶
func (*DevServer) ExecCommand ¶
type TokenHandler ¶
type TokenHandler struct {
// contains filtered or unexported fields
}
TokenHandler automatically deals with the renewal of tokens used for authentication with the Vault API. It uses the AuthMethod to generate new tokens if required (e.g. if the current token is not renewable anymore).
func NewTokenHandler ¶
func NewTokenHandler(c *Client, m AuthMethod) *TokenHandler
NewTokenHandler creates a new TokenHandler.
func (*TokenHandler) Close ¶
func (h *TokenHandler) Close()
Close the token handler and stop the background renewal process.
func (*TokenHandler) WaitForToken ¶
func (h *TokenHandler) WaitForToken(timeout time.Duration) error
WaitForToken blocks until a renewed token or the initial token has been received. It returns an error if no token is received before the timeout is reached.