config

package
v0.0.0-...-e705344 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 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 `mapstructure:"ENV"`
	Host       string `mapstructure:"HOST"`
	Port       string `mapstructure:"PORT"`
	DBURL      string `mapstructure:"DB_URL"`
	APIVersion string `mapstructure:"API_VERSION"`
	Secret     string `mapstructure:"JWT_SECRET"`

	Timeout     time.Duration `mapstructure:"TIMEOUT"`
	MaxPageSize int           `mapstructure:"MAX_PAGE_SIZE"`
	PageSize    int           `mapstructure:"PAGE_SIZE"`

	DB DBConfig
}

func Load

func Load() (*Config, error)

type DBConfig

type DBConfig struct {
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxIdleTime time.Duration
}

Jump to

Keyboard shortcuts

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