config

package
v0.0.0-...-bffe402 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAll

func LoadAll(envFile string)

LoadAllConfigs set various configs

func LoadApp

func LoadApp()

LoadApp loads App configuration

func LoadDBCfg

func LoadDBCfg()

LoadDBCfg loads DB configuration

Types

type App

type App struct {
	Debug       bool
	Prefork     bool
	Host        string
	Port        int
	ProxyHeader string
	SecretKey   string
	LogLevel    string
}

func AppCfg

func AppCfg() *App

type DB

type DB struct {
	Host            string
	Port            int
	Name            string
	User            string
	Password        string
	MaxOpenConn     int
	MaxIdleConn     int
	MaxConnLifetime time.Duration
}

DB holds the DB configuration

func DBCfg

func DBCfg() *DB

DBCfg returns the default DB configuration

Jump to

Keyboard shortcuts

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