credentialsource

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialSource

type CredentialSource interface {
	Fetch(ctx context.Context) (string, error)
	Type() string
}

CredentialSource fetches a credential value from an external system.

func NewAWSSecretsManagerSource

func NewAWSSecretsManagerSource(secretID, region string) (CredentialSource, error)

NewAWSSecretsManagerSource creates a CredentialSource backed by AWS Secrets Manager.

func NewEnvSource

func NewEnvSource(varName string) CredentialSource

NewEnvSource creates a CredentialSource that reads from an environment variable.

func NewStaticSource

func NewStaticSource(value string) CredentialSource

NewStaticSource creates a CredentialSource that returns a fixed value.

type SecretsManagerClient

type SecretsManagerClient interface {
	GetSecretValue(ctx context.Context, secretID string) (string, error)
}

SecretsManagerClient abstracts the AWS Secrets Manager API for testing.

Jump to

Keyboard shortcuts

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