client

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Err     error
	Message string
	Data    string
}

func (*APIError) Error

func (e *APIError) Error() string

type Change added in v0.9.14

type Change struct {
	Name         string  `json:"name"`
	OriginalName string  `json:"originalName"`
	Value        *string `json:"value"`
	ShouldDelete bool    `json:"shouldDelete,omitempty"`
}

type DopplerClient

type DopplerClient struct {
	DopplerToken string
	VerifyTLS    bool
	UserAgent    string
	// contains filtered or unexported fields
}

func NewDopplerClient

func NewDopplerClient(dopplerToken string) (*DopplerClient, error)

func (*DopplerClient) Authenticate

func (c *DopplerClient) Authenticate() error

func (*DopplerClient) BaseURL

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

func (*DopplerClient) GetSecret

func (c *DopplerClient) GetSecret(request SecretRequest) (*SecretResponse, error)

func (*DopplerClient) GetSecrets

func (c *DopplerClient) GetSecrets(request SecretsRequest) (*SecretsResponse, error)

GetSecrets should only have an ETag supplied if Secrets are cached as SecretsResponse.Secrets will be nil if 304 (not modified) returned.

func (*DopplerClient) SetBaseURL

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

func (*DopplerClient) UpdateSecrets

func (c *DopplerClient) UpdateSecrets(request UpdateSecretsRequest) error

type SecretRequest

type SecretRequest struct {
	Name    string
	Project string
	Config  string
}

type SecretResponse

type SecretResponse struct {
	Name  string
	Value string
}

type Secrets

type Secrets map[string]string

type SecretsRequest

type SecretsRequest struct {
	Project         string
	Config          string
	NameTransformer string
	Format          string
	ETag            string // Specifying an ETag implies that the caller has implemented response caching
}

type SecretsResponse

type SecretsResponse struct {
	Secrets  Secrets
	Body     []byte
	Modified bool
	ETag     string
}

type UpdateSecretsRequest

type UpdateSecretsRequest struct {
	Secrets        Secrets  `json:"secrets,omitempty"`
	ChangeRequests []Change `json:"change_requests,omitempty"`
	Project        string   `json:"project,omitempty"`
	Config         string   `json:"config,omitempty"`
}

Jump to

Keyboard shortcuts

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