configs

package
v0.0.0-...-de8c022 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	Env         constant.Environment
	Host        string        `env:"HOST,default=localhost"`
	Port        int           `env:"PORT,default=8081"`
	IdleTimeout time.Duration `env:"IDLE_TIMEOUT"`
}

type Config

type Config struct {
	Env constant.Environment
	Api *ApiConfig
	DB  *DBConfig
}

func NewConfig

func NewConfig(ctx context.Context) (*Config, error)

type DBConfig

type DBConfig struct {
	DBFile string `env:"DB_FILE"`
}

Jump to

Keyboard shortcuts

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