providers

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AWSSecretsManagerResourceExistsException *smtypes.ResourceExistsException
	AWSSecretsManagerInvalidRequestException *smtypes.InvalidRequestException
)

Functions

This section is empty.

Types

type AWSClient

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

AWSClient is a client for interacting with AWS Secrets Manager.

func NewAWSClient

func NewAWSClient(client SecretsManagerClient, logger *slog.Logger) *AWSClient

NewAWSClient creates a new AWSClient.

func NewDefaultAWSClient

func NewDefaultAWSClient(logger *slog.Logger) (*AWSClient, error)

NewAWSClient creates a new AWSClient with the default configuration.

func (*AWSClient) Get

func (c *AWSClient) Get(key string) (string, error)

Get retrieves a secret from AWS Secrets Manager.

func (*AWSClient) Set

func (c *AWSClient) Set(key, value string) (string, error)

Set sets a secret in AWS Secrets Manager.

type EnvClient

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

func NewEnvClient

func NewEnvClient(logger *slog.Logger) (*EnvClient, error)

func (*EnvClient) Get

func (c *EnvClient) Get(key string) (string, error)

func (*EnvClient) Set

func (c *EnvClient) Set(key, value string) (string, error)

type LocalClient

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

func NewLocalClient

func NewLocalClient(logger *slog.Logger) (*LocalClient, error)

func (*LocalClient) Get

func (c *LocalClient) Get(key string) (string, error)

func (*LocalClient) Set

func (c *LocalClient) Set(key, value string) (string, error)

type SecretsManagerClient

type SecretsManagerClient interface {
	CreateSecret(ctx context.Context, params *secretsmanager.CreateSecretInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.CreateSecretOutput, error)
	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)
}

SecretsManagerClient is an interface for the AWS Secrets Manager client.

Jump to

Keyboard shortcuts

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