Documentation
¶
Overview ¶
Package secret provides a client for the Doppler API's secret endpoints.
API-Docs: https://docs.doppler.com/reference/config-secret-list
Example:
// Download secrets in docker format.
secrets, _, err := secret.Download(context.Background(), &doppler.SecretDownloadOptions{
Project: "your-project",
Config: "your-config",
Format: stringPointer("docker"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(secrets)
Index ¶
- func Download(ctx context.Context, opts *doppler.SecretDownloadOptions) (string, doppler.APIResponse, error)
- func Get(ctx context.Context, opts *doppler.SecretGetOptions) (doppler.Secret, doppler.APIResponse, error)
- func List(ctx context.Context, opts *doppler.SecretListOptions) (map[string]*doppler.SecretValue, doppler.APIResponse, error)
- func Update(ctx context.Context, opts *doppler.SecretUpdateOptions) (map[string]string, doppler.APIResponse, error)
- type Client
- func (c Client) Download(ctx context.Context, opts *doppler.SecretDownloadOptions) (string, doppler.APIResponse, error)
- func (c Client) Get(ctx context.Context, opts *doppler.SecretGetOptions) (doppler.Secret, doppler.APIResponse, error)
- func (c Client) List(ctx context.Context, opts *doppler.SecretListOptions) (map[string]*doppler.SecretValue, doppler.APIResponse, error)
- func (c Client) Update(ctx context.Context, opts *doppler.SecretUpdateOptions) (map[string]string, doppler.APIResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶
func Download(ctx context.Context, opts *doppler.SecretDownloadOptions) (string, doppler.APIResponse, error)
Download downloads a config secret using the default client.
func Get ¶
func Get(ctx context.Context, opts *doppler.SecretGetOptions) (doppler.Secret, doppler.APIResponse, error)
Get returns a config secret and its respective info using the default client.
func List ¶
func List(ctx context.Context, opts *doppler.SecretListOptions) (map[string]*doppler.SecretValue, doppler.APIResponse, error)
List returns a list of config secrets using the default client.
Types ¶
type Client ¶
Client is the client used to invoke /v3/configs/config/secrets APIs.
func Default ¶
func Default() *Client
Default returns a new client based on the SDK's default backend and API key.
func (Client) Download ¶
func (c Client) Download(ctx context.Context, opts *doppler.SecretDownloadOptions) (string, doppler.APIResponse, error)
Download downloads a config secret.
func (Client) Get ¶
func (c Client) Get(ctx context.Context, opts *doppler.SecretGetOptions) (doppler.Secret, doppler.APIResponse, error)
Get returns a config secret and its respective info.
func (Client) List ¶
func (c Client) List(ctx context.Context, opts *doppler.SecretListOptions) (map[string]*doppler.SecretValue, doppler.APIResponse, error)
List returns a list of config secrets.
Click to show internal directories.
Click to hide internal directories.