Documentation ¶
Overview ¶
Package servicetoken provides a client for the Doppler API's service token endpoints.
API-Docs: https://docs.doppler.com/reference/config-token-list
Example:
// List all service tokens tokens, _, err := servicetoken.List(context.Background(), &doppler.ServiceTokenListOptions{ Project: "your-project", Config: "your-config", }) if err != nil { log.Fatal(err) } fmt.Println(tokens)
Index ¶
- func Create(ctx context.Context, opts *doppler.ServiceTokenCreateOptions) (*doppler.ServiceToken, doppler.APIResponse, error)
- func Delete(ctx context.Context, opts *doppler.ServiceTokenDeleteOptions) (doppler.APIResponse, error)
- func List(ctx context.Context, opts *doppler.ServiceTokenListOptions) ([]*doppler.ServiceToken, doppler.APIResponse, error)
- type Client
- func (c Client) Create(ctx context.Context, opts *doppler.ServiceTokenCreateOptions) (*doppler.ServiceToken, doppler.APIResponse, error)
- func (c Client) Delete(ctx context.Context, opts *doppler.ServiceTokenDeleteOptions) (doppler.APIResponse, error)
- func (c Client) List(ctx context.Context, opts *doppler.ServiceTokenListOptions) ([]*doppler.ServiceToken, doppler.APIResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx context.Context, opts *doppler.ServiceTokenCreateOptions) (*doppler.ServiceToken, doppler.APIResponse, error)
Create creates a new service tokens using the default client.
Types ¶
type Client ¶
type Client struct { Backend doppler.Backend Key string }
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) Create ¶
func (c Client) Create(ctx context.Context, opts *doppler.ServiceTokenCreateOptions) (*doppler.ServiceToken, doppler.APIResponse, error)
Create creates a new service tokens.
Click to show internal directories.
Click to hide internal directories.