cfg

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigs added in v0.2.3

func LoadConfigs(cfg any, options ...Option) error

func MapAndRedact

func MapAndRedact(config any) map[string]any

MapAndRedact converts Config struct to a map and redacts unsafe fields. Fields tagged safe:"true" are always included as-is. Unsafe fields are omitted when empty (empty string, nil pointer/interface) and shown as "redacted" when set. Safe struct fields recurse so their own field-level safe tags are respected.

Types

type AWSSecretsManagerClient added in v0.2.3

type AWSSecretsManagerClient interface {
	GetSecretValue(ctx context.Context, input *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error)
}

type AWSSecretsManagerOption added in v0.2.3

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

func (*AWSSecretsManagerOption) Apply added in v0.2.3

func (o *AWSSecretsManagerOption) Apply(cfg any) error

type EnvOption added in v0.2.3

type EnvOption struct{}

func (*EnvOption) Apply added in v0.2.3

func (o *EnvOption) Apply(cfg any) error

type FileOption added in v0.2.3

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

func (*FileOption) Apply added in v0.2.3

func (o *FileOption) Apply(cfg any) error

type Option added in v0.2.3

type Option interface {
	Apply(any) error
}

func NewAWSSecretsManagerOption added in v0.2.3

func NewAWSSecretsManagerOption(client AWSSecretsManagerClient, secretNames ...string) Option

func NewEnvOption added in v0.2.3

func NewEnvOption() Option

func NewFileOption added in v0.2.3

func NewFileOption(paths ...string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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