Documentation
¶
Index ¶
- Variables
- func ValidToken(token string) error
- func ValidateFormat(format Format) error
- func ValidateNameTransformer(nameTransformer NameTransformer) error
- type APIClient
- func (c *APIClient) Authenticate() *internal.APIClientError
- func (c *APIClient) BaseURL() *url.URL
- func (c *APIClient) DopplerToken() string
- func (c *APIClient) DownloadSecrets(request SecretsDownloadRequest) (*internal.SecretsDownloadResult, *internal.APIClientError)
- func (c *APIClient) GetSecret(request SecretRequest) (*internal.SecretResult, *internal.APIClientError)
- func (c *APIClient) GetSecrets(request SecretsRequest) (*internal.SecretsResult, *internal.APIClientError)
- func (c *APIClient) SetBaseURL(urlStr string) error
- func (c *APIClient) SetDopplerToken(token string) error
- type Format
- type Headers
- type NameTransformer
- type QueryParams
- type SecretRequest
- type Secrets
- type SecretsDownloadRequest
- type SecretsRequest
Constants ¶
This section is empty.
Variables ¶
var Formats = []Format{
envFormat,
envNoQuotesFormat,
jsonFormat,
dotNETJSONFormat,
javaSpringPropertiesFormat,
yamlFormat,
}
Formats is the list of formats available for download
var FormatsMap = map[string]Format{}
FormatsMap provides a mapping of formats in string form to their Format types
var NameTransformers = []NameTransformer{
camelNameTransformer,
upperCamelNameTransformer,
lowerSnakeNameTransformer,
tfVarNameTransformer,
dotNETEnvNameTransformer,
}
NameTransformers is the list of environment variable compatible secret name transformers
var NameTransformersMap = map[string]NameTransformer{}
NameTransformersMap provides a mapping of name transformers in string form to their NameTransformer types
Functions ¶
func ValidToken ¶
ValidToken verifies that the token format is valid
func ValidateNameTransformer ¶
func ValidateNameTransformer(nameTransformer NameTransformer) error
ValidateNameTransformer value
Types ¶
type APIClient ¶
APIClient for Doppler
func NewAPIClient ¶
func NewAPIClient(dopplerToken string) (*APIClient, *internal.APIClientError)
NewAPIClient returns a new APIClient
func (*APIClient) Authenticate ¶
func (c *APIClient) Authenticate() *internal.APIClientError
Authenticate provides a mechanism to check the validity of a token before attempting to fetch secrets
func (*APIClient) DopplerToken ¶
DopplerToken returns the current token
func (*APIClient) DownloadSecrets ¶
func (c *APIClient) DownloadSecrets(request SecretsDownloadRequest) (*internal.SecretsDownloadResult, *internal.APIClientError)
DownloadSecrets allows the secrets for a config to be downloaded as a file
func (*APIClient) GetSecret ¶
func (c *APIClient) GetSecret(request SecretRequest) (*internal.SecretResult, *internal.APIClientError)
GetSecret fetches a single secret
func (*APIClient) GetSecrets ¶
func (c *APIClient) GetSecrets(request SecretsRequest) (*internal.SecretsResult, *internal.APIClientError)
GetSecrets fetches all secrets from a config
func (*APIClient) SetBaseURL ¶
SetBaseURL sets a custom base URL for API requests. Should *not* have a trailing slash.
func (*APIClient) SetDopplerToken ¶
SetDopplerToken to replace the existing token
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 Format
NameTransformer NameTransformer
IncludeDynamicSecrets bool
DynamicSecretsTTL int32
LastETag 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 NameTransformer
IncludeDynamicSecrets bool
DynamicSecretsTTL int32
LastETag string
}
SecretsRequest specifies the available parameters for fetching secrets