Documentation ¶
Index ¶
- type APIClient
- func (c *APIClient) Authenticate() error
- func (c *APIClient) BaseURL() *url.URL
- func (c *APIClient) DownloadSecrets(request SecretsDownloadRequest) (*internal.SecretsDownloadResult, error)
- func (c *APIClient) GetSecret(request SecretRequest) (*internal.SecretResult, error)
- func (c *APIClient) GetSecrets(request SecretsRequest) (*internal.SecretsResult, error)
- func (c *APIClient) SetBaseURL(urlStr string) error
- type Headers
- type QueryParams
- type SecretRequest
- type SecretsDownloadRequest
- type SecretsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { DopplerToken string VerifyTLS bool UserAgent string // contains filtered or unexported fields }
APIClient for Doppler
func NewAPIClient ¶
NewAPIClient returns a new APIClient
func (*APIClient) Authenticate ¶
Authenticate provides a mechanism to check the validity of a token
func (*APIClient) DownloadSecrets ¶
func (c *APIClient) DownloadSecrets(request SecretsDownloadRequest) (*internal.SecretsDownloadResult, error)
DownloadSecrets allows the secrets for a config to be downloaded as a file
func (*APIClient) GetSecret ¶
func (c *APIClient) GetSecret(request SecretRequest) (*internal.SecretResult, error)
GetSecret fetches a single secret
func (*APIClient) GetSecrets ¶
func (c *APIClient) GetSecrets(request SecretsRequest) (*internal.SecretsResult, error)
GetSecrets fetches all secrets from a config Only provide an ETag if secrets are cached as SecretsResult.Secrets will be nil if 304 (not modified) returned
func (*APIClient) SetBaseURL ¶
SetBaseURL sets a custom base URL for API requests. Should *not* have a trailing slash.
type SecretRequest ¶
SecretRequest for fetching a single secret. Project and Config are required if APIClient is configured with a Personal token.
type SecretsDownloadRequest ¶
type SecretsDownloadRequest struct { Project string Config string Format string NameTransformer string IncludeDynamicSecrets bool DynamicSecretsTTL int64 ETag string }
SecretsDownloadRequest specifies the available parameters for downloading a configs secrets as a single file
type SecretsRequest ¶
type SecretsRequest struct { Project string Config string NameTransformer string IncludeDynamicSecrets bool DynamicSecretsTTL int64 ETag string // Specifying an etag implies that the caller has implemented response caching }
SecretsRequest specifies the available parameters for fetching secrets