config

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 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 Loader

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

func NewLoader

func NewLoader(opts *LoaderOpts) *Loader

NewLoader creates a new configuration loader

func (*Loader) Load

func (c *Loader) Load(cfg any) error

Load loads configuration for the application. It will use the following order of precedence:

  1. Environment variables
  2. Docker secrets (using _FILE suffix)
  3. application.yaml or application.yml file
  4. .env file
  5. Default values from struct tags

type LoaderOpts

type LoaderOpts struct {
	ConfigFilePath string
}

Jump to

Keyboard shortcuts

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