config

package
v0.0.0-...-b665e70 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 5 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 {
	Env              string `yaml:"env" env-required:"true"`
	DBUrl            string `env:"DATABASE_URL" env-required:"true"`
	HTTPServerConfig `yaml:"http_server"`
}

func Load

func Load() (*Config, error)

func MustLoad

func MustLoad() *Config

type HTTPServerConfig

type HTTPServerConfig struct {
	Address     string        `yaml:"address" env-required:"true"`
	Timeout     time.Duration `yaml:"timeout" env-default:"5s"`
	IdleTimeout time.Duration `yaml:"idle_timeout" env-default:"60s"`
	JwtSecret   string        `yaml:"jwt_secret" env-required:"true"`
}

Jump to

Keyboard shortcuts

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