doppler

package module
v0.0.4-dev Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func NewAPIClient(dopplerToken string) (*APIClient, error)

NewAPIClient returns a new APIClient

func (*APIClient) Authenticate

func (c *APIClient) Authenticate() error

Authenticate provides a mechanism to check the validity of a token

func (*APIClient) BaseURL

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

BaseURL returns a copy of baseUrl

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

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

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

type Headers

type Headers map[string]string

Headers for API requests

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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