doppler

package module
v0.0.3-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Formats = []Format{
	envFormat,
	envNoQuotesFormat,
	jsonFormat,
	dotNETJSONFormat,
	javaSpringPropertiesFormat,
	yamlFormat,
}

Formats is the list of formats available for download

View Source
var FormatsMap = map[string]Format{}

FormatsMap provides a mapping of formats in string form to their Format types

View Source
var NameTransformers = []NameTransformer{
	camelNameTransformer,
	upperCamelNameTransformer,
	lowerSnakeNameTransformer,
	tfVarNameTransformer,
	dotNETEnvNameTransformer,
}

NameTransformers is the list of environment variable compatible secret name transformers

View Source
var NameTransformersMap = map[string]NameTransformer{}

NameTransformersMap provides a mapping of name transformers in string form to their NameTransformer types

Functions

func ValidToken

func ValidToken(token string) error

ValidToken verifies that the token format is valid

func ValidateFormat

func ValidateFormat(format Format) error

ValidateFormat value

func ValidateNameTransformer

func ValidateNameTransformer(nameTransformer NameTransformer) error

ValidateNameTransformer value

Types

type APIClient

type APIClient struct {
	VerifyTLS bool
	UserAgent string
	// contains filtered or unexported fields
}

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) BaseURL

func (c *APIClient) BaseURL() *url.URL

BaseURL returns a copy of baseUrl

func (*APIClient) DopplerToken

func (c *APIClient) DopplerToken() string

DopplerToken returns the current token

func (*APIClient) DownloadSecrets

DownloadSecrets allows the secrets for a config to be downloaded as a file

func (*APIClient) GetSecret

GetSecret fetches a single secret

func (*APIClient) GetSecrets

GetSecrets fetches all secrets from a config

func (*APIClient) SetBaseURL

func (c *APIClient) SetBaseURL(urlStr string) error

SetBaseURL sets a custom base URL for API requests. Should *not* have a trailing slash.

func (*APIClient) SetDopplerToken

func (c *APIClient) SetDopplerToken(token string) error

SetDopplerToken to replace the existing token

type Format

type Format string

Format type

type Headers

type Headers map[string]string

Headers for API requests

type NameTransformer

type NameTransformer string

NameTransformer type

type QueryParams

type QueryParams map[string]string

QueryParams for API requests

type SecretRequest

type SecretRequest struct {
	Name    string
	Project string
	Config  string
}

SecretRequest for fetching a single secret. Project and Config are required if APIClient is configured with a Personal token.

type Secrets

type Secrets map[string]string

Secrets fis a collection of secrets from a config

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL