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") )
View Source
var Validate = validator.New(validator.WithRequiredStructEnabled())
Functions ¶
func LoadConfiguration ¶
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 WithSecrets ¶
func WithSecrets(s secretstore.Service) Option
type WithValidation ¶
type WithValidation interface {
Validate() error
}
Click to show internal directories.
Click to hide internal directories.