🎉 Initial commit
This commit is contained in:
10
config/conf_logger.go
Normal file
10
config/conf_logger.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package config
|
||||
|
||||
// Logger 配置
|
||||
type Logger struct {
|
||||
Level string `yaml:"level"` // 日志级别
|
||||
Prefix string `yaml:"prefix"` // 日志前缀
|
||||
Director string `yaml:"director"` // 日志文件存放目录
|
||||
ShowLine string `yaml:"showLine"` // 是否显示文件行号
|
||||
LogInConsole string `yaml:"logInConsole"` // 是否在控制台打印日志
|
||||
}
|
11
config/conf_mysql.go
Normal file
11
config/conf_mysql.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package config
|
||||
|
||||
// MySQL 配置
|
||||
type MySQL struct {
|
||||
Host string `yaml:"host"` //主机地址
|
||||
Port string `yaml:"port"` //端口号
|
||||
DB string `yaml:"db"` //数据库名
|
||||
User string `yaml:"user"` //用户名
|
||||
Password string `yaml:"password"` //密码
|
||||
LogLevel string `yaml:"log-level"` // 日志级别 debug: 输出全部SQL语句; release: 只输出错误信息
|
||||
}
|
8
config/conf_system.go
Normal file
8
config/conf_system.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package config
|
||||
|
||||
// System 系统配置
|
||||
type System struct {
|
||||
Host string `yaml:"host"` //主机地址
|
||||
Port string `yaml:"port"` //端口号
|
||||
Env string `yaml:"env"` //环境
|
||||
}
|
7
config/config.go
Normal file
7
config/config.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package config
|
||||
|
||||
type Config struct {
|
||||
MySQL MySQL `yaml:"mysql"`
|
||||
Logger Logger `yaml:"logger"`
|
||||
System System `yaml:"system"`
|
||||
}
|
Reference in New Issue
Block a user