servicetoken

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 3 Imported by: 1

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

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.

func Delete

func Delete(ctx context.Context, opts *doppler.ServiceTokenDeleteOptions) (doppler.APIResponse, error)

Delete deletes a service tokens using the default client.

func List

func List(ctx context.Context, opts *doppler.ServiceTokenListOptions) ([]*doppler.ServiceToken, doppler.APIResponse, error)

List returns a list of config secrets 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.

func (Client) Delete

func (c Client) Delete(ctx context.Context, opts *doppler.ServiceTokenDeleteOptions) (doppler.APIResponse, error)

Delete deletes a service tokens.

func (Client) List

func (c Client) List(ctx context.Context, opts *doppler.ServiceTokenListOptions) ([]*doppler.ServiceToken, doppler.APIResponse, error)

List returns a list of service tokens.

Jump to

Keyboard shortcuts

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