sm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetSecretValue(
		ctx context.Context,
		params *secretsmanager.GetSecretValueInput,
		optFns ...func(*secretsmanager.Options),
	) (*secretsmanager.GetSecretValueOutput, error)

	PutSecretValue(
		ctx context.Context,
		params *secretsmanager.PutSecretValueInput,
		optFns ...func(*secretsmanager.Options),
	) (*secretsmanager.PutSecretValueOutput, error)
}

API is the subset of the Secrets Manager client used by this package.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the Secrets Manager API for dotenv-compatible operations.

func New

func New(api API) *Client

New creates a new Client.

func (*Client) Get

func (c *Client) Get(ctx context.Context, secretID string) (map[string]string, error)

Get fetches a secret by ID and returns it as key-value pairs.

func (*Client) Put

func (c *Client) Put(ctx context.Context, secretID string, kvs map[string]string) error

Put stores key-value pairs as a JSON secret.

Jump to

Keyboard shortcuts

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