config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr           string `env:"API_ADDR"`         // ":8000"
	DatabaseURL    string `env:"DATABASE_URL"`     // required
	LogLevel       string `env:"LOG_LEVEL"`        // "debug"|"info"|"warn"|"error"
	MigrateOnStart bool   `env:"MIGRATE_ON_START"` // MIGRATE_ON_START
	MigrationsDir  string `env:"MIGRATIONS_DIR"`   // "-" means use embedded
	Env            string `env:"ENV"`              // "development"|"staging"|"production"
}

func MustLoadFromEnv

func MustLoadFromEnv() Config

MustLoadFromEnv loads config or panics if required values are missing.

Jump to

Keyboard shortcuts

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