config

package
v0.0.0-...-5781841 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCfg

func InitCfg(dir string, file string)

Types

type Cfg

type Cfg struct {
	ProjectName string
	ListenAddr  string
	MySql       DSN
	JwtKey      JwtKeyConf
	Redis       RedisConf
	Debug       bool
}

func GetCfg

func GetCfg() Cfg

返回值类型,无法被外部更改

type DSN

type DSN struct {
	Username string
	Password string
	Address  string
	Database string
}

type JwtKeyConf

type JwtKeyConf struct {
	ActJwtKey string
	RetJwtKey string
}

type RedisConf

type RedisConf struct {
	Address  string
	Password string
	Database int
}

Jump to

Keyboard shortcuts

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