config

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Development = "development"
	Test        = "test"
	Production  = "production"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName                string
	AppEnv                 string
	HTTPAddr               string
	HTTPReadTimeout        time.Duration
	HTTPWriteTimeout       time.Duration
	HTTPIdleTimeout        time.Duration
	HTTPShutdownTimeout    time.Duration
	LogLevel               string
	Database               DatabaseConfig
	MigrationsDir          string
	MigrationsRunOnStartup bool
	CORSAllowedOrigins     []string
}

func Load

func Load() (Config, error)

func (Config) MigrationURLRequired

func (c Config) MigrationURLRequired() error

func (Config) Validate

func (c Config) Validate() error

type DatabaseConfig

type DatabaseConfig struct {
	Enabled       bool
	URL           string
	MaxConns      int32
	MinConns      int32
	HealthTimeout time.Duration
}

Jump to

Keyboard shortcuts

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