Documentation
¶
Overview ¶
Package config provides a client for the Doppler API's configs endpoints.
API-Docs: https://docs.doppler.com/reference/config-object
Example:
// Fetch a list of configs for a project.
configs, _, err := config.List(context.Background(), &doppler.ConfigListOptions{
Project: "my-project",
})
if err != nil {
log.Fatal(err)
}
// Print the configs
for _, config := range configs {
fmt.Printf("Config: %s", config.Name)
}
Index ¶
- func Clone(ctx context.Context, opts *doppler.ConfigCloneOptions) (*doppler.Config, doppler.APIResponse, error)
- func Create(ctx context.Context, opts *doppler.ConfigCreateOptions) (*doppler.Config, doppler.APIResponse, error)
- func Delete(ctx context.Context, opts *doppler.ConfigDeleteOptions) (doppler.APIResponse, error)
- func Get(ctx context.Context, opts *doppler.ConfigGetOptions) (*doppler.Config, doppler.APIResponse, error)
- func List(ctx context.Context, opts *doppler.ConfigListOptions) ([]*doppler.Config, doppler.APIResponse, error)
- func Lock(ctx context.Context, opts *doppler.ConfigLockOptions) (*doppler.Config, doppler.APIResponse, error)
- func Unlock(ctx context.Context, opts *doppler.ConfigUnlockOptions) (*doppler.Config, doppler.APIResponse, error)
- func Update(ctx context.Context, config *doppler.ConfigUpdateOptions) (*doppler.Config, doppler.APIResponse, error)
- type Client
- func (c Client) Clone(ctx context.Context, opts *doppler.ConfigCloneOptions) (*doppler.Config, doppler.APIResponse, error)
- func (c Client) Create(ctx context.Context, opts *doppler.ConfigCreateOptions) (*doppler.Config, doppler.APIResponse, error)
- func (c Client) Delete(ctx context.Context, opts *doppler.ConfigDeleteOptions) (doppler.APIResponse, error)
- func (c Client) Get(ctx context.Context, opts *doppler.ConfigGetOptions) (*doppler.Config, doppler.APIResponse, error)
- func (c Client) List(ctx context.Context, opts *doppler.ConfigListOptions) ([]*doppler.Config, doppler.APIResponse, error)
- func (c Client) Lock(ctx context.Context, opts *doppler.ConfigLockOptions) (*doppler.Config, doppler.APIResponse, error)
- func (c Client) Unlock(ctx context.Context, opts *doppler.ConfigUnlockOptions) (*doppler.Config, doppler.APIResponse, error)
- func (c Client) Update(ctx context.Context, config *doppler.ConfigUpdateOptions) (*doppler.Config, doppler.APIResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone(ctx context.Context, opts *doppler.ConfigCloneOptions) (*doppler.Config, doppler.APIResponse, error)
Clone clones a config using the default client.
func Create ¶
func Create(ctx context.Context, opts *doppler.ConfigCreateOptions) (*doppler.Config, doppler.APIResponse, error)
Create creates a new config using the default client.
func Delete ¶
func Delete(ctx context.Context, opts *doppler.ConfigDeleteOptions) (doppler.APIResponse, error)
Delete deletes an existing config using the default client.
func Get ¶
func Get(ctx context.Context, opts *doppler.ConfigGetOptions) (*doppler.Config, doppler.APIResponse, error)
Get returns a config and its respective info using the default client.
func List ¶
func List(ctx context.Context, opts *doppler.ConfigListOptions) ([]*doppler.Config, doppler.APIResponse, error)
List returns a list of configs using the default client.
func Lock ¶
func Lock(ctx context.Context, opts *doppler.ConfigLockOptions) (*doppler.Config, doppler.APIResponse, error)
Lock locks a config using the default client.
Types ¶
type Client ¶
Client is the client used to invoke /v3/configs APIs.
func Default ¶
func Default() *Client
Default returns a new client based on the SDK's default backend and API key.
func (Client) Clone ¶
func (c Client) Clone(ctx context.Context, opts *doppler.ConfigCloneOptions) (*doppler.Config, doppler.APIResponse, error)
Clone clones a config.
func (Client) Create ¶
func (c Client) Create(ctx context.Context, opts *doppler.ConfigCreateOptions) (*doppler.Config, doppler.APIResponse, error)
Create creates a new config.
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, opts *doppler.ConfigDeleteOptions) (doppler.APIResponse, error)
Delete deletes an existing config.
func (Client) Get ¶
func (c Client) Get(ctx context.Context, opts *doppler.ConfigGetOptions) (*doppler.Config, doppler.APIResponse, error)
Get returns a config and its respective info.
func (Client) List ¶
func (c Client) List(ctx context.Context, opts *doppler.ConfigListOptions) ([]*doppler.Config, doppler.APIResponse, error)
List returns a list of configs.
func (Client) Lock ¶
func (c Client) Lock(ctx context.Context, opts *doppler.ConfigLockOptions) (*doppler.Config, doppler.APIResponse, error)
Lock locks a config.