Documentation ¶
Index ¶
- Constants
- func CreateHTTPClient(config types.SecretConfig) (pkg.Caller, error)
- type Client
- func (c Client) GetSecrets(subPath string, keys ...string) (map[string]string, error)
- func (c Client) GetTokenLookupResponseData() (*TokenLookupResponse, error)
- func (c Client) RefreshToken(ctx context.Context, tokenExpiredCallback pkg.TokenExpiredCallback) error
- func (c Client) StoreSecrets(subPath string, secrets map[string]string) error
- type ErrCaRootCert
- type ErrHTTPResponse
- type TokenLookupMetadata
- type TokenLookupResponse
Constants ¶
View Source
const ( // NamespaceHeader specifies the header name to use when including Namespace information in a request. NamespaceHeader = "X-Vault-Namespace" AuthTypeHeader = "X-Vault-Token" )
Variables ¶
This section is empty.
Functions ¶
func CreateHTTPClient ¶ added in v0.0.28
func CreateHTTPClient(config types.SecretConfig) (pkg.Caller, error)
CreateHTTPClient creates and configures an HTTP client which can be used to communicate with the underlying secret-store based on the SecretConfig. Returns ErrCaRootCert is there is an error with the certificate.
Types ¶
type Client ¶ added in v0.0.7
type Client struct { HttpConfig types.SecretConfig HttpCaller pkg.Caller // contains filtered or unexported fields }
Client defines the behavior for interacting with the Vault REST secret key/value store via HTTP(S).
func NewClient ¶ added in v0.0.28
func NewClient(config types.SecretConfig, caller pkg.Caller, lc logger.LoggingClient) Client
func (Client) GetSecrets ¶ added in v0.0.7
GetSecrets retrieves the secrets at the provided sub-path that matches the specified keys.
func (Client) GetTokenLookupResponseData ¶ added in v0.0.28
func (c Client) GetTokenLookupResponseData() (*TokenLookupResponse, error)
func (Client) RefreshToken ¶ added in v0.0.28
type ErrCaRootCert ¶
type ErrCaRootCert struct {
// contains filtered or unexported fields
}
ErrCaRootCert error when the provided CA Root certificate is invalid.
func (ErrCaRootCert) Error ¶
func (e ErrCaRootCert) Error() string
type ErrHTTPResponse ¶ added in v0.0.28
func (ErrHTTPResponse) Error ¶ added in v0.0.28
func (err ErrHTTPResponse) Error() string
type TokenLookupMetadata ¶ added in v0.0.15
type TokenLookupResponse ¶ added in v0.0.15
type TokenLookupResponse struct {
Data TokenLookupMetadata
}
Click to show internal directories.
Click to hide internal directories.