update qq/gitee/github oauth2 login

This commit is contained in:
landaiqing
2024-08-24 16:31:40 +08:00
parent 014abca8f8
commit 9330935822
45 changed files with 1243 additions and 642 deletions

10
config/conf_casbin.go Normal file
View 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"`
}

View File

@@ -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"` // 日志文件名
}

View File

@@ -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 {

View File

@@ -11,4 +11,5 @@ type Config struct {
Wechat Wechat `yaml:"wechat"`
OAuth OAuth `yaml:"oauth"`
Swagger Swagger `yaml:"swagger"`
Casbin Casbin `yaml:"casbin"`
}