config

package
v0.0.0-...-f944d32 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Mode 运行模式
	Mode = flag.String("mode", constant.DebugMode, "运行模式")
	//IsDebug 是否是调试模式
	IsDebug = false

	//DataPath 数据目录
	DataPath = pwd + "/data"
	//ProjPath 项目目录
	ProjPath = DataPath + "/project"

	//GinLogFile Gin日志目录
	GinLogFile = logPath + "/api"
	//TimeFormat 日志时间格式
	TimeFormat = "2006/01/02 15:04:05"
)
View Source
var (

	//DB config
	DB *db
	//Github config
	Github *oauth
	//JWT config
	JWT *jwt
	//APP config
	APP *app
	//Email config
	Email *email
)

Functions

func Init

func Init() error

Init init config

Types

type Config

type Config struct {
	Github    oauth    `json:"github"`
	DB        db       `json:"db"`
	JWT       jwt      `json:"jwt"`
	APP       app      `json:"app"`
	Email     email    `json:"email"`
	FileTypes []string `json:"file_types"`
}

Config 应用运行配置

Jump to

Keyboard shortcuts

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