⚡ update qq/gitee/github oauth2 login
This commit is contained in:
10
config/conf_casbin.go
Normal file
10
config/conf_casbin.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package config
|
||||
|
||||
type Casbin struct {
|
||||
// 权限模型文件路径
|
||||
ModelPath string `yaml:"model-path"`
|
||||
// 数据库前缀
|
||||
TablePrefix string `yaml:"table-prefix"`
|
||||
// 数据库表明
|
||||
TableName string `yaml:"table-name"`
|
||||
}
|
@@ -2,9 +2,9 @@ package config
|
||||
|
||||
// Logger 配置
|
||||
type Logger struct {
|
||||
Level string `yaml:"level"` // 日志级别
|
||||
Prefix string `yaml:"prefix"` // 日志前缀
|
||||
Director string `yaml:"director"` // 日志文件存放目录
|
||||
ShowLine bool `yaml:"show-line"` // 是否显示文件行号
|
||||
LogInConsole string `yaml:"log-in-console"` // 是否在控制台打印日志
|
||||
Level string `yaml:"level"` // 日志级别
|
||||
Prefix string `yaml:"prefix"` // 日志前缀
|
||||
Director string `yaml:"director"` // 日志文件存放目录
|
||||
ShowLine bool `yaml:"show-line"` // 是否显示文件行号
|
||||
LogName string `yaml:"log-name"` // 日志文件名
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ type System struct {
|
||||
Port string `yaml:"port"` //端口号
|
||||
Env string `yaml:"env"` //环境
|
||||
Web string `yaml:"web"` //web地址
|
||||
Ip string `yaml:"ip"` //ip地址
|
||||
}
|
||||
|
||||
func (s *System) Addr() string {
|
||||
|
@@ -11,4 +11,5 @@ type Config struct {
|
||||
Wechat Wechat `yaml:"wechat"`
|
||||
OAuth OAuth `yaml:"oauth"`
|
||||
Swagger Swagger `yaml:"swagger"`
|
||||
Casbin Casbin `yaml:"casbin"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user