config

package
v0.0.0-...-e345738 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module ...

Functions

func GenLoggerModule

func GenLoggerModule(name string) fx.Option

GenLoggerModule ...

Types

type Config

type Config struct {
	Debug      bool   `json:"debug"`
	PprofPath  string `json:"pprof_path"`
	ServerPort string `json:"server_port"`
	PublicDir  string `json:"public_dir"`
	LogDir     string `json:"log_dir"`
	MainDB     string `json:"main_db"`
	Redis      struct {
		Address  string `json:"address"`
		Password string `json:"password"`
		DB       int    `json:"db"`
	} `json:"redis"`
	JWTSecret            string `json:"jwt_secret"`
	DBConnectionPoolSize int    `json:"db_connection_pool_size"`
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig set default config

func GetConfig

func GetConfig() *Config

GetConfig get global config

func LoadFromPath

func LoadFromPath(configPath string) (*Config, error)

LoadFromPath ...

Jump to

Keyboard shortcuts

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