config

package
v0.0.0-...-49fbcf6 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name           string `env:"APP_NAME"`
	Production     bool   `env:"PRODUCTION"`
	GrpcServerPort string `env:"GRPC_SERVER_PORT"`
	Db             DB
}

func MustLoadConfig

func MustLoadConfig(env ...string) *AppConfig

type DB

type DB struct {
	Net      string `env:"DB_NET"`
	Driver   string `env:"DB_DRIVER"`
	Name     string `env:"DB_NAME"`
	User     string `env:"DB_USER"`
	Password string `env:"DB_PASSWORD"`
	Host     string `env:"DB_HOST"`
	MaxConn  int    `env:"DB_MAXCONN"`
	Port     string `env:"DB_PORT"`
	Timeout  int    `env:"DB_TIMEOUT"`
}

Jump to

Keyboard shortcuts

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