share

package
v0.0.0-...-b469183 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package share provides a client for the Doppler API's share endpoints.

API-Docs: https://docs.doppler.com/reference/share-secret

Example:

	// Share a plain text secret.
	sharedSecret, _, err := share.PlainSecret(context.Background(), &doppler.SharePlainOptions{
    Secret: "my-secret",
	})
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(sharedSecret)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptedSecret

func EncryptedSecret(ctx context.Context, opts *doppler.ShareEncryptedOptions) (*doppler.ShareEncrypted, doppler.APIResponse, error)

EncryptedSecret generates a Doppler Share link by sending an encrypted secret using the default client.

Note: This endpoint requires you to take extra steps to ensure the security of your secret. Please follow the instructions in the documentation to ensure your secret is encrypted properly.

Docs: https://docs.doppler.com/reference/share-secret-encrypted

func PlainSecret

func PlainSecret(ctx context.Context, opts *doppler.SharePlainOptions) (*doppler.SharePlain, doppler.APIResponse, error)

PlainSecret generates a Doppler Share link by sending a plain text secret using the default client.

Types

type Client

type Client struct {
	Backend doppler.Backend
	Key     string
}

Client is the client used to invoke /v1/share/secrets/plain APIs.

func Default

func Default() *Client

Default returns a new client based on the SDK's default backend and API key.

func (Client) EncryptedSecret

func (c Client) EncryptedSecret(ctx context.Context, opts *doppler.ShareEncryptedOptions) (*doppler.ShareEncrypted, doppler.APIResponse, error)

EncryptedSecret generates a Doppler Share link by sending an encrypted secret.

Note: This endpoint requires you to take extra steps to ensure the security of your secret. Please follow the instructions in the documentation to ensure your secret is encrypted properly.

Docs: https://docs.doppler.com/reference/share-secret-encrypted

func (Client) PlainSecret

func (c Client) PlainSecret(ctx context.Context, opts *doppler.SharePlainOptions) (*doppler.SharePlain, doppler.APIResponse, error)

PlainSecret generates a Doppler Share link by sending a plain text secret.

Note:

Jump to

Keyboard shortcuts

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