Documentation
¶
Index ¶
- Constants
- Variables
- func GetRequest(client *APIClient, path string, headers Headers, params QueryParams) (*APIResponse, *APIClientError)
- func NewAPIClient(dopplerToken string) (*APIClient, *APIClientError)
- func PerformRequest(client *APIClient, req *http.Request) (*APIResponse, *APIClientError)
- func ValidToken(token string) error
- func ValidateFormat(format Format) error
- func ValidateNameTransformer(nameTransformer NameTransformer) error
- type APIClient
- func (c *APIClient) Authenticate() *APIClientError
- func (c *APIClient) BaseURL() *url.URL
- func (c *APIClient) DopplerToken() string
- func (c *APIClient) GetSecret(request SecretRequest) (*SecretResult, *APIClientError)
- func (c *APIClient) GetSecrets(request SecretsRequest) (*SecretsResult, *APIClientError)
- func (c *APIClient) SetBaseURL(urlStr string) error
- func (c *APIClient) SetDopplerToken(token string) error
- type APIClientError
- type APIErrorResponse
- type APIResponse
- type Format
- type Headers
- type NameTransformer
- type QueryParams
- type SecretRequest
- type SecretResponseBody
- type SecretResult
- type Secrets
- type SecretsData
- type SecretsRequest
- type SecretsResult
Constants ¶
View Source
const ( EnvFormat Format = "env" EnvNoQuotesFormat Format = "env-no-quote" JSONFormat Format = "json" DotNETJSONFormat Format = "dotnet-json" JavaSpringPropertiesFormat Format = "java-spring-properties" YAMLFormat Format = "yaml" CamelNameTransformer NameTransformer = "camel" UpperCamelNameTransformer NameTransformer = "upper-camel" LowerSnakeNameTransformer NameTransformer = "lower-snake" TFVarNameTransformer NameTransformer = "tf-var" DotNETEnvNameTransformer NameTransformer = "dotnet-env" )
Variables ¶
View Source
var Formats = []Format{ EnvFormat, EnvNoQuotesFormat, JSONFormat, DotNETJSONFormat, JavaSpringPropertiesFormat, YAMLFormat, }
View Source
var NameTransformers = []NameTransformer{ CamelNameTransformer, UpperCamelNameTransformer, LowerSnakeNameTransformer, TFVarNameTransformer, DotNETEnvNameTransformer, }
Functions ¶
func GetRequest ¶
func GetRequest(client *APIClient, path string, headers Headers, params QueryParams) (*APIResponse, *APIClientError)
func NewAPIClient ¶
func NewAPIClient(dopplerToken string) (*APIClient, *APIClientError)
func PerformRequest ¶
func PerformRequest(client *APIClient, req *http.Request) (*APIResponse, *APIClientError)
func ValidToken ¶
func ValidateFormat ¶
func ValidateNameTransformer ¶
func ValidateNameTransformer(nameTransformer NameTransformer) error
Types ¶
type APIClient ¶
func (*APIClient) Authenticate ¶
func (c *APIClient) Authenticate() *APIClientError
func (*APIClient) DopplerToken ¶
func (*APIClient) GetSecret ¶
func (c *APIClient) GetSecret(request SecretRequest) (*SecretResult, *APIClientError)
func (*APIClient) GetSecrets ¶
func (c *APIClient) GetSecrets(request SecretsRequest) (*SecretsResult, *APIClientError)
func (*APIClient) SetBaseURL ¶
func (*APIClient) SetDopplerToken ¶
type APIClientError ¶
func (*APIClientError) Error ¶
func (e *APIClientError) Error() string
type APIErrorResponse ¶
type APIResponse ¶
type NameTransformer ¶
type NameTransformer string
type QueryParams ¶
type SecretRequest ¶
func (*SecretRequest) BuildQueryParams ¶
func (r *SecretRequest) BuildQueryParams(name string) QueryParams
type SecretResponseBody ¶
type SecretResult ¶
type Secrets ¶
func SortSecrets ¶
SortSecrets alphabetically for deterministic order.
type SecretsData ¶
type SecretsRequest ¶
type SecretsRequest struct {
Project string
Config string
NameTransformer NameTransformer
Format Format
IncludeDynamicSecrets bool
DynamicSecretsTTL int32
LastETag string
}
func (*SecretsRequest) BuildHeaders ¶
func (r *SecretsRequest) BuildHeaders() Headers
func (*SecretsRequest) BuildQueryParams ¶
func (r *SecretsRequest) BuildQueryParams() (QueryParams, error)
type SecretsResult ¶
Click to show internal directories.
Click to hide internal directories.