configuration

package
v0.0.0-...-1ed423c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package configuration provides environment-based configuration loading with support for YAML files and environment variable overrides.

Index

Constants

This section is empty.

Variables

View Source
var (
	Development = Environment("development")
	Testing     = Environment("testing")
	Staging     = Environment("staging")
	Production  = Environment("production")
)

Functions

func LoadConfiguration

func LoadConfiguration[T any](ctx context.Context, environment Environment, opt ...Option) (T, error)

Types

type Environment

type Environment string

func (Environment) IsDevelopment

func (e Environment) IsDevelopment() bool

func (Environment) IsProduction

func (e Environment) IsProduction() bool

func (Environment) IsValid

func (e Environment) IsValid() bool

type Option

type Option func(*options) *options

func WithEnvironmentPrefix

func WithEnvironmentPrefix(prefix string) Option

func WithPath

func WithPath(path string) Option

func WithSecrets

func WithSecrets(s secretstore.Service) Option

type WithValidation

type WithValidation interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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