diff --git a/README.md b/README.md
index d511be6f9..3fde94cea 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,17 @@
[声明式API版](https://github.com/flipped-aurora/gin-vue-admin/tree/v2.4.x) |
[声明式API多语言(i18n)版](https://github.com/flipped-aurora/gin-vue-admin/tree/i18n-dev)
+## 赞助商
+Gin-Vue-Admin是一个全栈自动化代码的开源项目,其持续开发完全得益于这些令人敬畏的赞助的支持。如果你想加入他们,请考虑赞助Gin-Vue-Admin的开发。
+
+
Sponsor
+
+
+
+
+
+
+
# 项目文档
[在线文档](https://www.gin-vue-admin.com) : https://www.gin-vue-admin.com
@@ -314,7 +325,7 @@ swag init
- 前端文件参考: [web/src/view/superAdmin/api/api.vue](https://github.com/flipped-aurora/gin-vue-admin/blob/master/web/src/view/superAdmin/api/api.vue)
- 后台文件参考: [server/router/sys_api.go](https://github.com/flipped-aurora/gin-vue-admin/blob/master/server/router/sys_api.go)
- 多点登录限制:需要在`config.yaml`中把`system`中的`use-multipoint`修改为true(需要自行配置Redis和Config中的Redis参数,测试阶段,有bug请及时反馈)。
-- 分片长传:提供文件分片上传和大文件分片上传功能示例。
+- 分片上传:提供文件分片上传和大文件分片上传功能示例。
- 表单生成器:表单生成器借助 [@Variant Form](https://github.com/vform666/variant-form) 。
- 代码生成器:后台基础逻辑以及简单curd的代码生成器。
diff --git a/server/api/v1/system/sys_api.go b/server/api/v1/system/sys_api.go
index 129502955..5c3479f9c 100644
--- a/server/api/v1/system/sys_api.go
+++ b/server/api/v1/system/sys_api.go
@@ -211,3 +211,20 @@ func (s *SystemApiApi) DeleteApisByIds(c *gin.Context) {
}
response.OkWithMessage(global.Translate("general.deleteSuccess"), c)
}
+
+// FreshCasbin
+// @Tags SysApi
+// @Summary 刷新casbin缓存
+// @accept application/json
+// @Produce application/json
+// @Success 200 {object} response.Response{msg=string} "刷新成功"
+// @Router /api/freshCasbin [get]
+func (s *SystemApiApi) FreshCasbin(c *gin.Context) {
+ err := apiService.FreshCasbin()
+ if err != nil {
+ global.GVA_LOG.Error("刷新失败!", zap.Error(err))
+ response.FailWithMessage("刷新失败", c)
+ return
+ }
+ response.OkWithMessage("刷新成功", c)
+}
diff --git a/server/api/v1/system/sys_user.go b/server/api/v1/system/sys_user.go
index 3f6c71f52..eeeb782ea 100644
--- a/server/api/v1/system/sys_user.go
+++ b/server/api/v1/system/sys_user.go
@@ -94,7 +94,7 @@ func (b *BaseApi) TokenNext(c *gin.Context, user system.SysUser) {
response.OkWithDetailed(systemRes.LoginResponse{
User: user,
Token: token,
- ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
+ ExpiresAt: claims.RegisteredClaims.ExpiresAt.Unix() * 1000,
}, global.Translate("sys_user.loginSuccess"), c)
return
}
@@ -108,8 +108,8 @@ func (b *BaseApi) TokenNext(c *gin.Context, user system.SysUser) {
response.OkWithDetailed(systemRes.LoginResponse{
User: user,
Token: token,
- ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
- }, "sys_user.loginSuccess", c)
+ ExpiresAt: claims.RegisteredClaims.ExpiresAt.Unix() * 1000,
+ }, global.Translate("sys_user.loginSuccess"), c)
} else if err != nil {
global.GVA_LOG.Error(global.Translate("sys_user.loginStatusFail"), zap.Error(err))
response.FailWithMessage(global.Translate("sys_user.loginStatusFailErr"), c)
@@ -127,7 +127,7 @@ func (b *BaseApi) TokenNext(c *gin.Context, user system.SysUser) {
response.OkWithDetailed(systemRes.LoginResponse{
User: user,
Token: token,
- ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
+ ExpiresAt: claims.RegisteredClaims.ExpiresAt.Unix() * 1000,
}, global.Translate("sys_user.loginSuccess"), c)
}
}
@@ -268,7 +268,7 @@ func (b *BaseApi) SetUserAuthority(c *gin.Context) {
response.FailWithMessage(err.Error(), c)
} else {
c.Header("new-token", token)
- c.Header("new-expires-at", strconv.FormatInt(claims.ExpiresAt, 10))
+ c.Header("new-expires-at", strconv.FormatInt(claims.ExpiresAt.Unix(), 10))
response.OkWithMessage(global.Translate("general.modifySuccess"), c)
}
}
diff --git a/server/docs/docs.go b/server/docs/docs.go
index 509677c8c..b119fe18b 100644
--- a/server/docs/docs.go
+++ b/server/docs/docs.go
@@ -1,22 +1,14 @@
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-// This file was generated by swaggo/swag
+// Code generated by swaggo/swag. DO NOT EDIT.
package docs
-import (
- "bytes"
- "encoding/json"
- "strings"
+import "github.com/swaggo/swag"
- "github.com/alecthomas/template"
- "github.com/swaggo/swag"
-)
-
-var doc = `{
+const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
- "description": "{{.Description}}",
+ "description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
@@ -174,6 +166,40 @@ var doc = `{
}
}
},
+ "/api/freshCasbin": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "SysApi"
+ ],
+ "summary": "刷新casbin缓存",
+ "responses": {
+ "200": {
+ "description": "刷新成功",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/response.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
"/api/getAllApis": {
"post": {
"security": [
@@ -1475,7 +1501,7 @@ var doc = `{
"summary": "生成验证码",
"responses": {
"200": {
- "description": "生成验证码,返回包括随机数id,base64,验证码长度",
+ "description": "生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码",
"schema": {
"allOf": [
{
@@ -1997,161 +2023,6 @@ var doc = `{
}
}
},
- "/excel/downloadTemplate": {
- "get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "excel"
- ],
- "summary": "下载模板",
- "parameters": [
- {
- "type": "string",
- "description": "模板名称",
- "name": "fileName",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- }
- }
- },
- "/excel/exportExcel": {
- "post": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/octet-stream"
- ],
- "tags": [
- "excel"
- ],
- "summary": "导出Excel",
- "parameters": [
- {
- "description": "导出Excel文件信息",
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/example.ExcelInfo"
- }
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- }
- }
- },
- "/excel/importExcel": {
- "post": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "excel"
- ],
- "summary": "导入Excel文件",
- "parameters": [
- {
- "type": "file",
- "description": "导入Excel文件",
- "name": "file",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "导入Excel文件",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.Response"
- },
- {
- "type": "object",
- "properties": {
- "msg": {
- "type": "string"
- }
- }
- }
- ]
- }
- }
- }
- }
- },
- "/excel/loadExcel": {
- "get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "excel"
- ],
- "summary": "加载Excel数据",
- "responses": {
- "200": {
- "description": "加载Excel数据,返回包括列表,总数,页码,每页数量",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.Response"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/response.PageResult"
- },
- "msg": {
- "type": "string"
- }
- }
- }
- ]
- }
- }
- }
- }
- },
"/fileUploadAndDownload/breakpointContinue": {
"post": {
"security": [
@@ -4940,6 +4811,14 @@ var doc = `{
"key-long": {
"description": "验证码长度",
"type": "integer"
+ },
+ "open-captcha": {
+ "description": "防爆破验证码开启此数,0代表每次登录都需要验证码,其他数字代表错误密码此数,如3代表错误三次后出现验证码",
+ "type": "integer"
+ },
+ "open-captcha-timeout": {
+ "description": "防爆破验证码超时时间,单位:s(秒)",
+ "type": "integer"
}
}
},
@@ -4960,39 +4839,6 @@ var doc = `{
}
}
},
- "config.Email": {
- "type": "object",
- "properties": {
- "from": {
- "description": "收件人",
- "type": "string"
- },
- "host": {
- "description": "服务器地址",
- "type": "string"
- },
- "is-ssl": {
- "description": "是否SSL",
- "type": "boolean"
- },
- "nickname": {
- "description": "昵称",
- "type": "string"
- },
- "port": {
- "description": "端口",
- "type": "integer"
- },
- "secret": {
- "description": "密钥",
- "type": "string"
- },
- "to": {
- "description": "收件人:多个以英文逗号分隔",
- "type": "string"
- }
- }
- },
"config.Excel": {
"type": "object",
"properties": {
@@ -5055,7 +4901,7 @@ var doc = `{
}
}
},
- "config.Mysql": {
+ "config.Mssql": {
"type": "object",
"properties": {
"config": {
@@ -5066,6 +4912,11 @@ var doc = `{
"description": "数据库名",
"type": "string"
},
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5094,6 +4945,130 @@ var doc = `{
"description": ":端口",
"type": "string"
},
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
+ "username": {
+ "description": "数据库用户名",
+ "type": "string"
+ }
+ }
+ },
+ "config.Mysql": {
+ "type": "object",
+ "properties": {
+ "config": {
+ "description": "高级配置",
+ "type": "string"
+ },
+ "db-name": {
+ "description": "数据库名",
+ "type": "string"
+ },
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
+ "log-mode": {
+ "description": "是否开启Gorm全局日志",
+ "type": "string"
+ },
+ "log-zap": {
+ "description": "是否通过zap写入日志文件",
+ "type": "boolean"
+ },
+ "max-idle-conns": {
+ "description": "空闲中的最大连接数",
+ "type": "integer"
+ },
+ "max-open-conns": {
+ "description": "打开到数据库的最大连接数",
+ "type": "integer"
+ },
+ "password": {
+ "description": "数据库密码",
+ "type": "string"
+ },
+ "path": {
+ "description": "服务器地址:端口",
+ "type": "string"
+ },
+ "port": {
+ "description": ":端口",
+ "type": "string"
+ },
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
+ "username": {
+ "description": "数据库用户名",
+ "type": "string"
+ }
+ }
+ },
+ "config.Oracle": {
+ "type": "object",
+ "properties": {
+ "config": {
+ "description": "高级配置",
+ "type": "string"
+ },
+ "db-name": {
+ "description": "数据库名",
+ "type": "string"
+ },
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
+ "log-mode": {
+ "description": "是否开启Gorm全局日志",
+ "type": "string"
+ },
+ "log-zap": {
+ "description": "是否通过zap写入日志文件",
+ "type": "boolean"
+ },
+ "max-idle-conns": {
+ "description": "空闲中的最大连接数",
+ "type": "integer"
+ },
+ "max-open-conns": {
+ "description": "打开到数据库的最大连接数",
+ "type": "integer"
+ },
+ "password": {
+ "description": "数据库密码",
+ "type": "string"
+ },
+ "path": {
+ "description": "服务器地址:端口",
+ "type": "string"
+ },
+ "port": {
+ "description": ":端口",
+ "type": "string"
+ },
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5111,6 +5086,11 @@ var doc = `{
"description": "数据库名",
"type": "string"
},
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5139,6 +5119,14 @@ var doc = `{
"description": ":端口",
"type": "string"
},
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5203,7 +5191,11 @@ var doc = `{
},
"autocode": {
"description": "auto",
- "$ref": "#/definitions/config.Autocode"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.Autocode"
+ }
+ ]
},
"aws-s3": {
"$ref": "#/definitions/config.AwsS3"
@@ -5213,7 +5205,11 @@ var doc = `{
},
"cors": {
"description": "跨域配置",
- "$ref": "#/definitions/config.CORS"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.CORS"
+ }
+ ]
},
"db-list": {
"type": "array",
@@ -5222,7 +5218,7 @@ var doc = `{
}
},
"email": {
- "$ref": "#/definitions/config.Email"
+ "$ref": "#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email"
},
"excel": {
"$ref": "#/definitions/config.Excel"
@@ -5235,11 +5231,25 @@ var doc = `{
},
"local": {
"description": "oss",
- "$ref": "#/definitions/config.Local"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.Local"
+ }
+ ]
+ },
+ "mssql": {
+ "$ref": "#/definitions/config.Mssql"
},
"mysql": {
"description": "gorm",
- "$ref": "#/definitions/config.Mysql"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.Mysql"
+ }
+ ]
+ },
+ "oracle": {
+ "$ref": "#/definitions/config.Oracle"
},
"pgsql": {
"$ref": "#/definitions/config.Pgsql"
@@ -5281,6 +5291,11 @@ var doc = `{
"disable": {
"type": "boolean"
},
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5309,6 +5324,14 @@ var doc = `{
"description": ":端口",
"type": "string"
},
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
"type": {
"type": "string"
},
@@ -5343,6 +5366,9 @@ var doc = `{
"description": "Oss类型",
"type": "string"
},
+ "router-prefix": {
+ "type": "string"
+ },
"use-multipoint": {
"description": "多点登录拦截",
"type": "boolean"
@@ -5461,7 +5487,11 @@ var doc = `{
},
"sysUser": {
"description": "管理详情",
- "$ref": "#/definitions/system.SysUser"
+ "allOf": [
+ {
+ "$ref": "#/definitions/system.SysUser"
+ }
+ ]
},
"sysUserAuthorityID": {
"description": "管理角色ID",
@@ -5574,18 +5604,36 @@ var doc = `{
}
}
},
- "example.ExcelInfo": {
+ "github_com_flipped-aurora_gin-vue-admin_server_config.Email": {
"type": "object",
"properties": {
- "fileName": {
- "description": "文件名",
+ "from": {
+ "description": "收件人",
"type": "string"
},
- "infoList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/system.SysBaseMenu"
- }
+ "host": {
+ "description": "服务器地址",
+ "type": "string"
+ },
+ "is-ssl": {
+ "description": "是否SSL",
+ "type": "boolean"
+ },
+ "nickname": {
+ "description": "昵称",
+ "type": "string"
+ },
+ "port": {
+ "description": "端口",
+ "type": "integer"
+ },
+ "secret": {
+ "description": "密钥",
+ "type": "string"
+ },
+ "to": {
+ "description": "收件人:多个以英文逗号分隔",
+ "type": "string"
}
}
},
@@ -5752,28 +5800,40 @@ var doc = `{
"type": "object",
"properties": {
"authorityId": {
- "type": "integer"
+ "type": "string",
+ "example": "int 角色id"
},
"authorityIds": {
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "type": "string",
+ "example": "[]uint 角色id"
+ },
+ "email": {
+ "type": "string",
+ "example": "电子邮箱"
},
"enable": {
- "type": "integer"
+ "type": "string",
+ "example": "int 是否启用"
},
"headerImg": {
- "type": "string"
+ "type": "string",
+ "example": "头像链接"
},
"nickName": {
- "type": "string"
+ "type": "string",
+ "example": "昵称"
},
"passWord": {
- "type": "string"
+ "type": "string",
+ "example": "密码"
+ },
+ "phone": {
+ "type": "string",
+ "example": "电话号码"
},
"userName": {
- "type": "string"
+ "type": "string",
+ "example": "用户名"
}
}
},
@@ -5967,9 +6027,7 @@ var doc = `{
"response.PageResult": {
"type": "object",
"properties": {
- "list": {
- "type": "object"
- },
+ "list": {},
"page": {
"type": "integer"
},
@@ -5998,9 +6056,7 @@ var doc = `{
"code": {
"type": "integer"
},
- "data": {
- "type": "object"
- },
+ "data": {},
"msg": {
"type": "string"
}
@@ -6084,6 +6140,9 @@ var doc = `{
"captchaLength": {
"type": "integer"
},
+ "openCaptcha": {
+ "type": "boolean"
+ },
"picPath": {
"type": "string"
}
@@ -6135,6 +6194,10 @@ var doc = `{
"description": "是否自动移动文件",
"type": "boolean"
},
+ "businessDB": {
+ "description": "业务数据库",
+ "type": "string"
+ },
"description": {
"description": "Struct中文名称",
"type": "string"
@@ -6219,6 +6282,38 @@ var doc = `{
"require": {
"description": "是否必填",
"type": "boolean"
+ },
+ "sort": {
+ "description": "是否增加排序",
+ "type": "boolean"
+ }
+ }
+ },
+ "system.Meta": {
+ "type": "object",
+ "properties": {
+ "activeName": {
+ "type": "string"
+ },
+ "closeTab": {
+ "description": "自动关闭tab",
+ "type": "boolean"
+ },
+ "defaultMenu": {
+ "description": "是否是基础路由(开发中)",
+ "type": "boolean"
+ },
+ "icon": {
+ "description": "菜单图标",
+ "type": "string"
+ },
+ "keepAlive": {
+ "description": "是否缓存",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "菜单名",
+ "type": "string"
}
}
},
@@ -6346,10 +6441,6 @@ var doc = `{
"$ref": "#/definitions/system.SysBaseMenu"
}
},
- "closeTab": {
- "description": "自动关闭tab",
- "type": "boolean"
- },
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6358,32 +6449,28 @@ var doc = `{
"description": "创建时间",
"type": "string"
},
- "defaultMenu": {
- "description": "是否是基础路由(开发中)",
- "type": "boolean"
- },
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
- "icon": {
- "description": "菜单图标",
- "type": "string"
- },
"id": {
"description": "主键ID",
"type": "integer"
},
- "keepAlive": {
- "description": "是否缓存",
- "type": "boolean"
- },
"menuBtn": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysBaseMenuBtn"
}
},
+ "meta": {
+ "description": "附加属性",
+ "allOf": [
+ {
+ "$ref": "#/definitions/system.Meta"
+ }
+ ]
+ },
"name": {
"description": "路由name",
"type": "string"
@@ -6406,10 +6493,6 @@ var doc = `{
"description": "排序标记",
"type": "integer"
},
- "title": {
- "description": "菜单名",
- "type": "string"
- },
"updatedAt": {
"description": "更新时间",
"type": "string"
@@ -6571,10 +6654,6 @@ var doc = `{
"$ref": "#/definitions/system.SysMenu"
}
},
- "closeTab": {
- "description": "自动关闭tab",
- "type": "boolean"
- },
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6583,26 +6662,14 @@ var doc = `{
"description": "创建时间",
"type": "string"
},
- "defaultMenu": {
- "description": "是否是基础路由(开发中)",
- "type": "boolean"
- },
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
- "icon": {
- "description": "菜单图标",
- "type": "string"
- },
"id": {
"description": "主键ID",
"type": "integer"
},
- "keepAlive": {
- "description": "是否缓存",
- "type": "boolean"
- },
"menuBtn": {
"type": "array",
"items": {
@@ -6612,6 +6679,14 @@ var doc = `{
"menuId": {
"type": "string"
},
+ "meta": {
+ "description": "附加属性",
+ "allOf": [
+ {
+ "$ref": "#/definitions/system.Meta"
+ }
+ ]
+ },
"name": {
"description": "路由name",
"type": "string"
@@ -6634,10 +6709,6 @@ var doc = `{
"description": "排序标记",
"type": "integer"
},
- "title": {
- "description": "菜单名",
- "type": "string"
- },
"updatedAt": {
"description": "更新时间",
"type": "string"
@@ -6792,49 +6863,20 @@ var doc = `{
}
}`
-type swaggerInfo struct {
- Version string
- Host string
- BasePath string
- Schemes []string
- Title string
- Description string
-}
-
// SwaggerInfo holds exported Swagger Info so clients can modify it
-var SwaggerInfo = swaggerInfo{
- Version: "0.0.1",
- Host: "",
- BasePath: "/",
- Schemes: []string{},
- Title: "Swagger Example API",
- Description: "This is a sample Server pets",
-}
-
-type s struct{}
-
-func (s *s) ReadDoc() string {
- sInfo := SwaggerInfo
- sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
-
- t, err := template.New("swagger_info").Funcs(template.FuncMap{
- "marshal": func(v interface{}) string {
- a, _ := json.Marshal(v)
- return string(a)
- },
- }).Parse(doc)
- if err != nil {
- return doc
- }
-
- var tpl bytes.Buffer
- if err := t.Execute(&tpl, sInfo); err != nil {
- return doc
- }
-
- return tpl.String()
+var SwaggerInfo = &swag.Spec{
+ Version: "0.0.1",
+ Host: "",
+ BasePath: "",
+ Schemes: []string{},
+ Title: "Swagger Example API",
+ Description: "This is a sample Server pets",
+ InfoInstanceName: "swagger",
+ SwaggerTemplate: docTemplate,
+ LeftDelim: "{{",
+ RightDelim: "}}",
}
func init() {
- swag.Register(swag.Name, &s{})
+ swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
diff --git a/server/docs/swagger.json b/server/docs/swagger.json
index adaceb2ae..1cef449d2 100644
--- a/server/docs/swagger.json
+++ b/server/docs/swagger.json
@@ -6,7 +6,6 @@
"contact": {},
"version": "0.0.1"
},
- "basePath": "/",
"paths": {
"/api/createApi": {
"post": {
@@ -158,6 +157,40 @@
}
}
},
+ "/api/freshCasbin": {
+ "get": {
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "SysApi"
+ ],
+ "summary": "刷新casbin缓存",
+ "responses": {
+ "200": {
+ "description": "刷新成功",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/response.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "msg": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
"/api/getAllApis": {
"post": {
"security": [
@@ -1459,7 +1492,7 @@
"summary": "生成验证码",
"responses": {
"200": {
- "description": "生成验证码,返回包括随机数id,base64,验证码长度",
+ "description": "生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码",
"schema": {
"allOf": [
{
@@ -1981,161 +2014,6 @@
}
}
},
- "/excel/downloadTemplate": {
- "get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "excel"
- ],
- "summary": "下载模板",
- "parameters": [
- {
- "type": "string",
- "description": "模板名称",
- "name": "fileName",
- "in": "query",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- }
- }
- },
- "/excel/exportExcel": {
- "post": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/octet-stream"
- ],
- "tags": [
- "excel"
- ],
- "summary": "导出Excel",
- "parameters": [
- {
- "description": "导出Excel文件信息",
- "name": "data",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/example.ExcelInfo"
- }
- }
- ],
- "responses": {
- "200": {
- "description": ""
- }
- }
- }
- },
- "/excel/importExcel": {
- "post": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "excel"
- ],
- "summary": "导入Excel文件",
- "parameters": [
- {
- "type": "file",
- "description": "导入Excel文件",
- "name": "file",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "导入Excel文件",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.Response"
- },
- {
- "type": "object",
- "properties": {
- "msg": {
- "type": "string"
- }
- }
- }
- ]
- }
- }
- }
- }
- },
- "/excel/loadExcel": {
- "get": {
- "security": [
- {
- "ApiKeyAuth": []
- }
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "excel"
- ],
- "summary": "加载Excel数据",
- "responses": {
- "200": {
- "description": "加载Excel数据,返回包括列表,总数,页码,每页数量",
- "schema": {
- "allOf": [
- {
- "$ref": "#/definitions/response.Response"
- },
- {
- "type": "object",
- "properties": {
- "data": {
- "$ref": "#/definitions/response.PageResult"
- },
- "msg": {
- "type": "string"
- }
- }
- }
- ]
- }
- }
- }
- }
- },
"/fileUploadAndDownload/breakpointContinue": {
"post": {
"security": [
@@ -4924,6 +4802,14 @@
"key-long": {
"description": "验证码长度",
"type": "integer"
+ },
+ "open-captcha": {
+ "description": "防爆破验证码开启此数,0代表每次登录都需要验证码,其他数字代表错误密码此数,如3代表错误三次后出现验证码",
+ "type": "integer"
+ },
+ "open-captcha-timeout": {
+ "description": "防爆破验证码超时时间,单位:s(秒)",
+ "type": "integer"
}
}
},
@@ -4944,39 +4830,6 @@
}
}
},
- "config.Email": {
- "type": "object",
- "properties": {
- "from": {
- "description": "收件人",
- "type": "string"
- },
- "host": {
- "description": "服务器地址",
- "type": "string"
- },
- "is-ssl": {
- "description": "是否SSL",
- "type": "boolean"
- },
- "nickname": {
- "description": "昵称",
- "type": "string"
- },
- "port": {
- "description": "端口",
- "type": "integer"
- },
- "secret": {
- "description": "密钥",
- "type": "string"
- },
- "to": {
- "description": "收件人:多个以英文逗号分隔",
- "type": "string"
- }
- }
- },
"config.Excel": {
"type": "object",
"properties": {
@@ -5039,7 +4892,7 @@
}
}
},
- "config.Mysql": {
+ "config.Mssql": {
"type": "object",
"properties": {
"config": {
@@ -5050,6 +4903,11 @@
"description": "数据库名",
"type": "string"
},
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5078,6 +4936,130 @@
"description": ":端口",
"type": "string"
},
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
+ "username": {
+ "description": "数据库用户名",
+ "type": "string"
+ }
+ }
+ },
+ "config.Mysql": {
+ "type": "object",
+ "properties": {
+ "config": {
+ "description": "高级配置",
+ "type": "string"
+ },
+ "db-name": {
+ "description": "数据库名",
+ "type": "string"
+ },
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
+ "log-mode": {
+ "description": "是否开启Gorm全局日志",
+ "type": "string"
+ },
+ "log-zap": {
+ "description": "是否通过zap写入日志文件",
+ "type": "boolean"
+ },
+ "max-idle-conns": {
+ "description": "空闲中的最大连接数",
+ "type": "integer"
+ },
+ "max-open-conns": {
+ "description": "打开到数据库的最大连接数",
+ "type": "integer"
+ },
+ "password": {
+ "description": "数据库密码",
+ "type": "string"
+ },
+ "path": {
+ "description": "服务器地址:端口",
+ "type": "string"
+ },
+ "port": {
+ "description": ":端口",
+ "type": "string"
+ },
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
+ "username": {
+ "description": "数据库用户名",
+ "type": "string"
+ }
+ }
+ },
+ "config.Oracle": {
+ "type": "object",
+ "properties": {
+ "config": {
+ "description": "高级配置",
+ "type": "string"
+ },
+ "db-name": {
+ "description": "数据库名",
+ "type": "string"
+ },
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
+ "log-mode": {
+ "description": "是否开启Gorm全局日志",
+ "type": "string"
+ },
+ "log-zap": {
+ "description": "是否通过zap写入日志文件",
+ "type": "boolean"
+ },
+ "max-idle-conns": {
+ "description": "空闲中的最大连接数",
+ "type": "integer"
+ },
+ "max-open-conns": {
+ "description": "打开到数据库的最大连接数",
+ "type": "integer"
+ },
+ "password": {
+ "description": "数据库密码",
+ "type": "string"
+ },
+ "path": {
+ "description": "服务器地址:端口",
+ "type": "string"
+ },
+ "port": {
+ "description": ":端口",
+ "type": "string"
+ },
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5095,6 +5077,11 @@
"description": "数据库名",
"type": "string"
},
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5123,6 +5110,14 @@
"description": ":端口",
"type": "string"
},
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
"username": {
"description": "数据库用户名",
"type": "string"
@@ -5187,7 +5182,11 @@
},
"autocode": {
"description": "auto",
- "$ref": "#/definitions/config.Autocode"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.Autocode"
+ }
+ ]
},
"aws-s3": {
"$ref": "#/definitions/config.AwsS3"
@@ -5197,7 +5196,11 @@
},
"cors": {
"description": "跨域配置",
- "$ref": "#/definitions/config.CORS"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.CORS"
+ }
+ ]
},
"db-list": {
"type": "array",
@@ -5206,7 +5209,7 @@
}
},
"email": {
- "$ref": "#/definitions/config.Email"
+ "$ref": "#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email"
},
"excel": {
"$ref": "#/definitions/config.Excel"
@@ -5219,11 +5222,25 @@
},
"local": {
"description": "oss",
- "$ref": "#/definitions/config.Local"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.Local"
+ }
+ ]
+ },
+ "mssql": {
+ "$ref": "#/definitions/config.Mssql"
},
"mysql": {
"description": "gorm",
- "$ref": "#/definitions/config.Mysql"
+ "allOf": [
+ {
+ "$ref": "#/definitions/config.Mysql"
+ }
+ ]
+ },
+ "oracle": {
+ "$ref": "#/definitions/config.Oracle"
},
"pgsql": {
"$ref": "#/definitions/config.Pgsql"
@@ -5265,6 +5282,11 @@
"disable": {
"type": "boolean"
},
+ "engine": {
+ "description": "数据库引擎,默认InnoDB",
+ "type": "string",
+ "default": "InnoDB"
+ },
"log-mode": {
"description": "是否开启Gorm全局日志",
"type": "string"
@@ -5293,6 +5315,14 @@
"description": ":端口",
"type": "string"
},
+ "prefix": {
+ "description": "全局表前缀,单独定义TableName则不生效",
+ "type": "string"
+ },
+ "singular": {
+ "description": "是否开启全局禁用复数,true表示开启",
+ "type": "boolean"
+ },
"type": {
"type": "string"
},
@@ -5327,6 +5357,9 @@
"description": "Oss类型",
"type": "string"
},
+ "router-prefix": {
+ "type": "string"
+ },
"use-multipoint": {
"description": "多点登录拦截",
"type": "boolean"
@@ -5445,7 +5478,11 @@
},
"sysUser": {
"description": "管理详情",
- "$ref": "#/definitions/system.SysUser"
+ "allOf": [
+ {
+ "$ref": "#/definitions/system.SysUser"
+ }
+ ]
},
"sysUserAuthorityID": {
"description": "管理角色ID",
@@ -5558,18 +5595,36 @@
}
}
},
- "example.ExcelInfo": {
+ "github_com_flipped-aurora_gin-vue-admin_server_config.Email": {
"type": "object",
"properties": {
- "fileName": {
- "description": "文件名",
+ "from": {
+ "description": "收件人",
"type": "string"
},
- "infoList": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/system.SysBaseMenu"
- }
+ "host": {
+ "description": "服务器地址",
+ "type": "string"
+ },
+ "is-ssl": {
+ "description": "是否SSL",
+ "type": "boolean"
+ },
+ "nickname": {
+ "description": "昵称",
+ "type": "string"
+ },
+ "port": {
+ "description": "端口",
+ "type": "integer"
+ },
+ "secret": {
+ "description": "密钥",
+ "type": "string"
+ },
+ "to": {
+ "description": "收件人:多个以英文逗号分隔",
+ "type": "string"
}
}
},
@@ -5736,28 +5791,40 @@
"type": "object",
"properties": {
"authorityId": {
- "type": "integer"
+ "type": "string",
+ "example": "int 角色id"
},
"authorityIds": {
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "type": "string",
+ "example": "[]uint 角色id"
+ },
+ "email": {
+ "type": "string",
+ "example": "电子邮箱"
},
"enable": {
- "type": "integer"
+ "type": "string",
+ "example": "int 是否启用"
},
"headerImg": {
- "type": "string"
+ "type": "string",
+ "example": "头像链接"
},
"nickName": {
- "type": "string"
+ "type": "string",
+ "example": "昵称"
},
"passWord": {
- "type": "string"
+ "type": "string",
+ "example": "密码"
+ },
+ "phone": {
+ "type": "string",
+ "example": "电话号码"
},
"userName": {
- "type": "string"
+ "type": "string",
+ "example": "用户名"
}
}
},
@@ -5951,9 +6018,7 @@
"response.PageResult": {
"type": "object",
"properties": {
- "list": {
- "type": "object"
- },
+ "list": {},
"page": {
"type": "integer"
},
@@ -5982,9 +6047,7 @@
"code": {
"type": "integer"
},
- "data": {
- "type": "object"
- },
+ "data": {},
"msg": {
"type": "string"
}
@@ -6068,6 +6131,9 @@
"captchaLength": {
"type": "integer"
},
+ "openCaptcha": {
+ "type": "boolean"
+ },
"picPath": {
"type": "string"
}
@@ -6119,6 +6185,10 @@
"description": "是否自动移动文件",
"type": "boolean"
},
+ "businessDB": {
+ "description": "业务数据库",
+ "type": "string"
+ },
"description": {
"description": "Struct中文名称",
"type": "string"
@@ -6203,6 +6273,38 @@
"require": {
"description": "是否必填",
"type": "boolean"
+ },
+ "sort": {
+ "description": "是否增加排序",
+ "type": "boolean"
+ }
+ }
+ },
+ "system.Meta": {
+ "type": "object",
+ "properties": {
+ "activeName": {
+ "type": "string"
+ },
+ "closeTab": {
+ "description": "自动关闭tab",
+ "type": "boolean"
+ },
+ "defaultMenu": {
+ "description": "是否是基础路由(开发中)",
+ "type": "boolean"
+ },
+ "icon": {
+ "description": "菜单图标",
+ "type": "string"
+ },
+ "keepAlive": {
+ "description": "是否缓存",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "菜单名",
+ "type": "string"
}
}
},
@@ -6330,10 +6432,6 @@
"$ref": "#/definitions/system.SysBaseMenu"
}
},
- "closeTab": {
- "description": "自动关闭tab",
- "type": "boolean"
- },
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6342,32 +6440,28 @@
"description": "创建时间",
"type": "string"
},
- "defaultMenu": {
- "description": "是否是基础路由(开发中)",
- "type": "boolean"
- },
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
- "icon": {
- "description": "菜单图标",
- "type": "string"
- },
"id": {
"description": "主键ID",
"type": "integer"
},
- "keepAlive": {
- "description": "是否缓存",
- "type": "boolean"
- },
"menuBtn": {
"type": "array",
"items": {
"$ref": "#/definitions/system.SysBaseMenuBtn"
}
},
+ "meta": {
+ "description": "附加属性",
+ "allOf": [
+ {
+ "$ref": "#/definitions/system.Meta"
+ }
+ ]
+ },
"name": {
"description": "路由name",
"type": "string"
@@ -6390,10 +6484,6 @@
"description": "排序标记",
"type": "integer"
},
- "title": {
- "description": "菜单名",
- "type": "string"
- },
"updatedAt": {
"description": "更新时间",
"type": "string"
@@ -6555,10 +6645,6 @@
"$ref": "#/definitions/system.SysMenu"
}
},
- "closeTab": {
- "description": "自动关闭tab",
- "type": "boolean"
- },
"component": {
"description": "对应前端文件路径",
"type": "string"
@@ -6567,26 +6653,14 @@
"description": "创建时间",
"type": "string"
},
- "defaultMenu": {
- "description": "是否是基础路由(开发中)",
- "type": "boolean"
- },
"hidden": {
"description": "是否在列表隐藏",
"type": "boolean"
},
- "icon": {
- "description": "菜单图标",
- "type": "string"
- },
"id": {
"description": "主键ID",
"type": "integer"
},
- "keepAlive": {
- "description": "是否缓存",
- "type": "boolean"
- },
"menuBtn": {
"type": "array",
"items": {
@@ -6596,6 +6670,14 @@
"menuId": {
"type": "string"
},
+ "meta": {
+ "description": "附加属性",
+ "allOf": [
+ {
+ "$ref": "#/definitions/system.Meta"
+ }
+ ]
+ },
"name": {
"description": "路由name",
"type": "string"
@@ -6618,10 +6700,6 @@
"description": "排序标记",
"type": "integer"
},
- "title": {
- "description": "菜单名",
- "type": "string"
- },
"updatedAt": {
"description": "更新时间",
"type": "string"
diff --git a/server/docs/swagger.yaml b/server/docs/swagger.yaml
index 0079f7171..4f1a69765 100644
--- a/server/docs/swagger.yaml
+++ b/server/docs/swagger.yaml
@@ -1,4 +1,3 @@
-basePath: /
definitions:
config.AliyunOSS:
properties:
@@ -100,6 +99,12 @@ definitions:
key-long:
description: 验证码长度
type: integer
+ open-captcha:
+ description: 防爆破验证码开启此数,0代表每次登录都需要验证码,其他数字代表错误密码此数,如3代表错误三次后出现验证码
+ type: integer
+ open-captcha-timeout:
+ description: 防爆破验证码超时时间,单位:s(秒)
+ type: integer
type: object
config.Detail:
properties:
@@ -113,30 +118,6 @@ definitions:
description: 需要清理的表名
type: string
type: object
- config.Email:
- properties:
- from:
- description: 收件人
- type: string
- host:
- description: 服务器地址
- type: string
- is-ssl:
- description: 是否SSL
- type: boolean
- nickname:
- description: 昵称
- type: string
- port:
- description: 端口
- type: integer
- secret:
- description: 密钥
- type: string
- to:
- description: 收件人:多个以英文逗号分隔
- type: string
- type: object
config.Excel:
properties:
dir:
@@ -179,7 +160,7 @@ definitions:
description: 本地文件存储路径
type: string
type: object
- config.Mysql:
+ config.Mssql:
properties:
config:
description: 高级配置
@@ -187,6 +168,10 @@ definitions:
db-name:
description: 数据库名
type: string
+ engine:
+ default: InnoDB
+ description: 数据库引擎,默认InnoDB
+ type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
@@ -208,6 +193,98 @@ definitions:
port:
description: :端口
type: string
+ prefix:
+ description: 全局表前缀,单独定义TableName则不生效
+ type: string
+ singular:
+ description: 是否开启全局禁用复数,true表示开启
+ type: boolean
+ username:
+ description: 数据库用户名
+ type: string
+ type: object
+ config.Mysql:
+ properties:
+ config:
+ description: 高级配置
+ type: string
+ db-name:
+ description: 数据库名
+ type: string
+ engine:
+ default: InnoDB
+ description: 数据库引擎,默认InnoDB
+ type: string
+ log-mode:
+ description: 是否开启Gorm全局日志
+ type: string
+ log-zap:
+ description: 是否通过zap写入日志文件
+ type: boolean
+ max-idle-conns:
+ description: 空闲中的最大连接数
+ type: integer
+ max-open-conns:
+ description: 打开到数据库的最大连接数
+ type: integer
+ password:
+ description: 数据库密码
+ type: string
+ path:
+ description: 服务器地址:端口
+ type: string
+ port:
+ description: :端口
+ type: string
+ prefix:
+ description: 全局表前缀,单独定义TableName则不生效
+ type: string
+ singular:
+ description: 是否开启全局禁用复数,true表示开启
+ type: boolean
+ username:
+ description: 数据库用户名
+ type: string
+ type: object
+ config.Oracle:
+ properties:
+ config:
+ description: 高级配置
+ type: string
+ db-name:
+ description: 数据库名
+ type: string
+ engine:
+ default: InnoDB
+ description: 数据库引擎,默认InnoDB
+ type: string
+ log-mode:
+ description: 是否开启Gorm全局日志
+ type: string
+ log-zap:
+ description: 是否通过zap写入日志文件
+ type: boolean
+ max-idle-conns:
+ description: 空闲中的最大连接数
+ type: integer
+ max-open-conns:
+ description: 打开到数据库的最大连接数
+ type: integer
+ password:
+ description: 数据库密码
+ type: string
+ path:
+ description: 服务器地址:端口
+ type: string
+ port:
+ description: :端口
+ type: string
+ prefix:
+ description: 全局表前缀,单独定义TableName则不生效
+ type: string
+ singular:
+ description: 是否开启全局禁用复数,true表示开启
+ type: boolean
username:
description: 数据库用户名
type: string
@@ -220,6 +297,10 @@ definitions:
db-name:
description: 数据库名
type: string
+ engine:
+ default: InnoDB
+ description: 数据库引擎,默认InnoDB
+ type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
@@ -241,6 +322,12 @@ definitions:
port:
description: :端口
type: string
+ prefix:
+ description: 全局表前缀,单独定义TableName则不生效
+ type: string
+ singular:
+ description: 是否开启全局禁用复数,true表示开启
+ type: boolean
username:
description: 数据库用户名
type: string
@@ -286,21 +373,23 @@ definitions:
aliyun-oss:
$ref: '#/definitions/config.AliyunOSS'
autocode:
- $ref: '#/definitions/config.Autocode'
+ allOf:
+ - $ref: '#/definitions/config.Autocode'
description: auto
aws-s3:
$ref: '#/definitions/config.AwsS3'
captcha:
$ref: '#/definitions/config.Captcha'
cors:
- $ref: '#/definitions/config.CORS'
+ allOf:
+ - $ref: '#/definitions/config.CORS'
description: 跨域配置
db-list:
items:
$ref: '#/definitions/config.SpecializedDB'
type: array
email:
- $ref: '#/definitions/config.Email'
+ $ref: '#/definitions/github_com_flipped-aurora_gin-vue-admin_server_config.Email'
excel:
$ref: '#/definitions/config.Excel'
hua-wei-obs:
@@ -308,11 +397,17 @@ definitions:
jwt:
$ref: '#/definitions/config.JWT'
local:
- $ref: '#/definitions/config.Local'
+ allOf:
+ - $ref: '#/definitions/config.Local'
description: oss
+ mssql:
+ $ref: '#/definitions/config.Mssql'
mysql:
- $ref: '#/definitions/config.Mysql'
+ allOf:
+ - $ref: '#/definitions/config.Mysql'
description: gorm
+ oracle:
+ $ref: '#/definitions/config.Oracle'
pgsql:
$ref: '#/definitions/config.Pgsql'
qiniu:
@@ -340,6 +435,10 @@ definitions:
type: string
disable:
type: boolean
+ engine:
+ default: InnoDB
+ description: 数据库引擎,默认InnoDB
+ type: string
log-mode:
description: 是否开启Gorm全局日志
type: string
@@ -361,6 +460,12 @@ definitions:
port:
description: :端口
type: string
+ prefix:
+ description: 全局表前缀,单独定义TableName则不生效
+ type: string
+ singular:
+ description: 是否开启全局禁用复数,true表示开启
+ type: boolean
type:
type: string
username:
@@ -385,6 +490,8 @@ definitions:
oss-type:
description: Oss类型
type: string
+ router-prefix:
+ type: string
use-multipoint:
description: 多点登录拦截
type: boolean
@@ -468,7 +575,8 @@ definitions:
description: 主键ID
type: integer
sysUser:
- $ref: '#/definitions/system.SysUser'
+ allOf:
+ - $ref: '#/definitions/system.SysUser'
description: 管理详情
sysUserAuthorityID:
description: 管理角色ID
@@ -548,15 +656,29 @@ definitions:
description: 文件地址
type: string
type: object
- example.ExcelInfo:
+ github_com_flipped-aurora_gin-vue-admin_server_config.Email:
properties:
- fileName:
- description: 文件名
+ from:
+ description: 收件人
+ type: string
+ host:
+ description: 服务器地址
+ type: string
+ is-ssl:
+ description: 是否SSL
+ type: boolean
+ nickname:
+ description: 昵称
+ type: string
+ port:
+ description: 端口
+ type: integer
+ secret:
+ description: 密钥
+ type: string
+ to:
+ description: 收件人:多个以英文逗号分隔
type: string
- infoList:
- items:
- $ref: '#/definitions/system.SysBaseMenu'
- type: array
type: object
request.AddMenuAuthorityInfo:
properties:
@@ -671,20 +793,31 @@ definitions:
request.Register:
properties:
authorityId:
- type: integer
+ example: int 角色id
+ type: string
authorityIds:
- items:
- type: integer
- type: array
+ example: '[]uint 角色id'
+ type: string
+ email:
+ example: 电子邮箱
+ type: string
enable:
- type: integer
+ example: int 是否启用
+ type: string
headerImg:
+ example: 头像链接
type: string
nickName:
+ example: 昵称
type: string
passWord:
+ example: 密码
+ type: string
+ phone:
+ example: 电话号码
type: string
userName:
+ example: 用户名
type: string
type: object
request.RollBack:
@@ -817,8 +950,7 @@ definitions:
type: object
response.PageResult:
properties:
- list:
- type: object
+ list: {}
page:
type: integer
pageSize:
@@ -837,8 +969,7 @@ definitions:
properties:
code:
type: integer
- data:
- type: object
+ data: {}
msg:
type: string
type: object
@@ -892,6 +1023,8 @@ definitions:
type: string
captchaLength:
type: integer
+ openCaptcha:
+ type: boolean
picPath:
type: string
type: object
@@ -926,6 +1059,9 @@ definitions:
autoMoveFile:
description: 是否自动移动文件
type: boolean
+ businessDB:
+ description: 业务数据库
+ type: string
description:
description: Struct中文名称
type: string
@@ -988,6 +1124,29 @@ definitions:
require:
description: 是否必填
type: boolean
+ sort:
+ description: 是否增加排序
+ type: boolean
+ type: object
+ system.Meta:
+ properties:
+ activeName:
+ type: string
+ closeTab:
+ description: 自动关闭tab
+ type: boolean
+ defaultMenu:
+ description: 是否是基础路由(开发中)
+ type: boolean
+ icon:
+ description: 菜单图标
+ type: string
+ keepAlive:
+ description: 是否缓存
+ type: boolean
+ title:
+ description: 菜单名
+ type: string
type: object
system.SysApi:
properties:
@@ -1076,34 +1235,26 @@ definitions:
items:
$ref: '#/definitions/system.SysBaseMenu'
type: array
- closeTab:
- description: 自动关闭tab
- type: boolean
component:
description: 对应前端文件路径
type: string
createdAt:
description: 创建时间
type: string
- defaultMenu:
- description: 是否是基础路由(开发中)
- type: boolean
hidden:
description: 是否在列表隐藏
type: boolean
- icon:
- description: 菜单图标
- type: string
id:
description: 主键ID
type: integer
- keepAlive:
- description: 是否缓存
- type: boolean
menuBtn:
items:
$ref: '#/definitions/system.SysBaseMenuBtn'
type: array
+ meta:
+ allOf:
+ - $ref: '#/definitions/system.Meta'
+ description: 附加属性
name:
description: 路由name
type: string
@@ -1120,9 +1271,6 @@ definitions:
sort:
description: 排序标记
type: integer
- title:
- description: 菜单名
- type: string
updatedAt:
description: 更新时间
type: string
@@ -1237,36 +1385,28 @@ definitions:
items:
$ref: '#/definitions/system.SysMenu'
type: array
- closeTab:
- description: 自动关闭tab
- type: boolean
component:
description: 对应前端文件路径
type: string
createdAt:
description: 创建时间
type: string
- defaultMenu:
- description: 是否是基础路由(开发中)
- type: boolean
hidden:
description: 是否在列表隐藏
type: boolean
- icon:
- description: 菜单图标
- type: string
id:
description: 主键ID
type: integer
- keepAlive:
- description: 是否缓存
- type: boolean
menuBtn:
items:
$ref: '#/definitions/system.SysBaseMenuBtn'
type: array
menuId:
type: string
+ meta:
+ allOf:
+ - $ref: '#/definitions/system.Meta'
+ description: 附加属性
name:
description: 路由name
type: string
@@ -1283,9 +1423,6 @@ definitions:
sort:
description: 排序标记
type: integer
- title:
- description: 菜单名
- type: string
updatedAt:
description: 更新时间
type: string
@@ -1480,6 +1617,25 @@ paths:
summary: 删除选中Api
tags:
- SysApi
+ /api/freshCasbin:
+ get:
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: 刷新成功
+ schema:
+ allOf:
+ - $ref: '#/definitions/response.Response'
+ - properties:
+ msg:
+ type: string
+ type: object
+ summary: 刷新casbin缓存
+ tags:
+ - SysApi
/api/getAllApis:
post:
consumes:
@@ -2212,7 +2368,7 @@ paths:
- application/json
responses:
"200":
- description: 生成验证码,返回包括随机数id,base64,验证码长度
+ description: 生成验证码,返回包括随机数id,base64,验证码长度,是否开启验证码
schema:
allOf:
- $ref: '#/definitions/response.Response'
@@ -2515,95 +2671,6 @@ paths:
summary: 发送邮件
tags:
- System
- /excel/downloadTemplate:
- get:
- consumes:
- - multipart/form-data
- parameters:
- - description: 模板名称
- in: query
- name: fileName
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: ""
- security:
- - ApiKeyAuth: []
- summary: 下载模板
- tags:
- - excel
- /excel/exportExcel:
- post:
- consumes:
- - application/json
- parameters:
- - description: 导出Excel文件信息
- in: body
- name: data
- required: true
- schema:
- $ref: '#/definitions/example.ExcelInfo'
- produces:
- - application/octet-stream
- responses:
- "200":
- description: ""
- security:
- - ApiKeyAuth: []
- summary: 导出Excel
- tags:
- - excel
- /excel/importExcel:
- post:
- consumes:
- - multipart/form-data
- parameters:
- - description: 导入Excel文件
- in: formData
- name: file
- required: true
- type: file
- produces:
- - application/json
- responses:
- "200":
- description: 导入Excel文件
- schema:
- allOf:
- - $ref: '#/definitions/response.Response'
- - properties:
- msg:
- type: string
- type: object
- security:
- - ApiKeyAuth: []
- summary: 导入Excel文件
- tags:
- - excel
- /excel/loadExcel:
- get:
- produces:
- - application/json
- responses:
- "200":
- description: 加载Excel数据,返回包括列表,总数,页码,每页数量
- schema:
- allOf:
- - $ref: '#/definitions/response.Response'
- - properties:
- data:
- $ref: '#/definitions/response.PageResult'
- msg:
- type: string
- type: object
- security:
- - ApiKeyAuth: []
- summary: 加载Excel数据
- tags:
- - excel
/fileUploadAndDownload/breakpointContinue:
post:
consumes:
diff --git a/server/go.mod b/server/go.mod
index 3562ce54d..b5a28f113 100644
--- a/server/go.mod
+++ b/server/go.mod
@@ -3,17 +3,17 @@ module github.com/flipped-aurora/gin-vue-admin/server
go 1.18
require (
- github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible
github.com/aws/aws-sdk-go v1.44.24
- github.com/casbin/casbin/v2 v2.66.0
+ github.com/casbin/casbin/v2 v2.68.0
github.com/casbin/gorm-adapter/v3 v3.7.3
github.com/flipped-aurora/ws v1.0.2
github.com/fsnotify/fsnotify v1.5.1
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6
- github.com/gin-gonic/gin v1.7.7
+ github.com/gin-gonic/gin v1.9.0
github.com/go-redis/redis/v8 v8.11.5
github.com/go-sql-driver/mysql v1.6.0
+ github.com/gofrs/uuid v4.0.0+incompatible
github.com/golang-jwt/jwt/v4 v4.4.1
github.com/gookit/color v1.3.1
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.21.8+incompatible
@@ -26,20 +26,18 @@ require (
github.com/qiniu/api.v7/v7 v7.4.1
github.com/robfig/cron/v3 v3.0.1
github.com/sashabaranov/go-openai v1.5.7
- github.com/satori/go.uuid v1.2.0
github.com/shirou/gopsutil/v3 v3.22.5
github.com/songzhibin97/gkit v1.2.7
github.com/spf13/viper v1.7.0
- github.com/stretchr/testify v1.7.1
+ github.com/stretchr/testify v1.8.1
github.com/swaggo/gin-swagger v1.4.1
- github.com/swaggo/swag v1.7.9
+ github.com/swaggo/swag v1.16.1
github.com/tencentyun/cos-go-sdk-v5 v0.7.19
github.com/unrolled/secure v1.0.7
go.uber.org/zap v1.16.0
- golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4
- golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
- golang.org/x/text v0.3.7
- gopkg.in/ini.v1 v1.55.0 // indirect
+ golang.org/x/crypto v0.5.0
+ golang.org/x/sync v0.2.0
+ golang.org/x/text v0.9.0
gorm.io/driver/mysql v1.3.3
gorm.io/driver/postgres v1.3.4
gorm.io/driver/sqlserver v1.3.2
@@ -48,11 +46,13 @@ require (
)
require (
+ github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
- github.com/PuerkitoBio/purell v1.1.1 // indirect
- github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+ github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
+ github.com/bytedance/sonic v1.8.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
+ github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denisenkom/go-mssqldb v0.12.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
@@ -60,17 +60,17 @@ require (
github.com/glebarez/go-sqlite v1.16.0 // indirect
github.com/glebarez/sqlite v1.4.3 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
- github.com/go-openapi/jsonpointer v0.19.5 // indirect
- github.com/go-openapi/jsonreference v0.19.6 // indirect
- github.com/go-openapi/spec v0.20.4 // indirect
- github.com/go-openapi/swag v0.19.15 // indirect
- github.com/go-playground/locales v0.14.0 // indirect
- github.com/go-playground/universal-translator v0.18.0 // indirect
- github.com/go-playground/validator/v10 v10.10.0 // indirect
+ github.com/go-openapi/jsonpointer v0.19.6 // indirect
+ github.com/go-openapi/jsonreference v0.20.2 // indirect
+ github.com/go-openapi/spec v0.20.9 // indirect
+ github.com/go-openapi/swag v0.22.3 // indirect
+ github.com/go-playground/locales v0.14.1 // indirect
+ github.com/go-playground/universal-translator v0.18.1 // indirect
+ github.com/go-playground/validator/v10 v10.11.2 // indirect
+ github.com/goccy/go-json v0.10.0 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
- github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
@@ -88,17 +88,19 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.13.6 // indirect
+ github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/lestrrat-go/strftime v1.0.6 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
- github.com/mattn/go-isatty v0.0.14 // indirect
+ github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mitchellh/mapstructure v1.2.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mozillazg/go-httpheader v0.2.1 // indirect
github.com/pelletier/go-toml v1.6.0 // indirect
+ github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
@@ -109,29 +111,25 @@ require (
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
- github.com/ugorji/go/codec v1.2.6 // indirect
+ github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
+ github.com/ugorji/go/codec v1.2.9 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0 // indirect
+ golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
- golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
- golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
+ golang.org/x/net v0.10.0 // indirect
+ golang.org/x/sys v0.8.0 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
- golang.org/x/tools v0.1.7 // indirect
- google.golang.org/protobuf v1.27.1 // indirect
+ golang.org/x/tools v0.9.1 // indirect
+ google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
- gopkg.in/yaml.v3 v3.0.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/plugin/dbresolver v1.1.0 // indirect
modernc.org/libc v1.15.1 // indirect
modernc.org/mathutil v1.4.1 // indirect
modernc.org/memory v1.0.7 // indirect; indirec
modernc.org/sqlite v1.16.0 // indirect
)
-
-require (
- github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
- gopkg.in/yaml.v2 v2.4.0 // indirect
- gopkg.in/yaml.v3 v3.0.0 // indirect
-)
diff --git a/server/go.sum b/server/go.sum
index 30e5f6a60..22458db47 100644
--- a/server/go.sum
+++ b/server/go.sum
@@ -15,8 +15,9 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbL
github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0=
github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=
github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
+github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
+github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
@@ -25,16 +26,11 @@ github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6Xge
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
-github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible h1:cD1bK/FmYTpL+r5i9lQ9EU6ScAjA173EVsii7gAc6SQ=
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
@@ -49,14 +45,20 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
+github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
+github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA=
+github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/casbin/casbin/v2 v2.37.4/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
-github.com/casbin/casbin/v2 v2.51.0 h1:BC41imD9Z2coIJpELapy2h5kMT+lB4vFDTYpMhTsU4A=
-github.com/casbin/casbin/v2 v2.51.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
+github.com/casbin/casbin/v2 v2.68.0 h1:7L4kwNJJw/pzdSEhl4SkeHz+1JzYn8guO+Q422sxzLM=
+github.com/casbin/casbin/v2 v2.68.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/casbin/gorm-adapter/v3 v3.7.3 h1:tp3EL3vS31dF+GX0n3QwUytQlrFOPXtOKKZ7SZtLOA8=
github.com/casbin/gorm-adapter/v3 v3.7.3/go.mod h1:7mwHmC2phiw6N4gDWlzi+c4DUX7zaVmQC/hINsRgBDg=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
+github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
+github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
@@ -96,8 +98,9 @@ github.com/gin-contrib/gzip v0.0.3/go.mod h1:YxxswVZIqOvcHEQpsSn+QF5guQtO1dCfy0s
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
-github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs=
github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U=
+github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
+github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
github.com/glebarez/go-sqlite v1.16.0 h1:h28rHued+hGof3fNLksBcLwz/a71fiGZ/eIJHK0SsLI=
github.com/glebarez/go-sqlite v1.16.0/go.mod h1:i8/JtqoqzBAFkrUTxbQFkQ05odCOds3j7NlDaXjqiPY=
github.com/glebarez/sqlite v1.4.3 h1:ZABNo+2YIau8F8sZ7Qh/1h/ZnlSUMHFGD4zJKPval7A=
@@ -111,27 +114,32 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
+github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
+github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
-github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
+github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
+github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
+github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
+github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8=
+github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
-github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
+github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
+github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
-github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
-github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
+github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
+github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
-github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
-github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
+github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
+github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
-github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0=
-github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
+github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
+github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
@@ -144,6 +152,8 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
+github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA=
+github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -171,7 +181,6 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -304,13 +313,14 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
+github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
+github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
-github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
@@ -346,8 +356,9 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
+github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -391,8 +402,9 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4=
github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys=
+github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
+github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
-github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -419,9 +431,7 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
-github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
@@ -466,21 +476,26 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
github.com/swaggo/gin-swagger v1.4.1 h1:F2vJndw+Q+ZBOlsC6CaodqXJV3ZOf6hpg/4Y6MEx5BM=
github.com/swaggo/gin-swagger v1.4.1/go.mod h1:hmJ1vPn+XjUvnbzjCdUAxVqgraxELxk8x5zAsjCE5mg=
-github.com/swaggo/swag v1.7.9 h1:6vCG5mm43ebDzGlZPMGYrYI4zKFfOr5kicQX8qjeDwc=
github.com/swaggo/swag v1.7.9/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
+github.com/swaggo/swag v1.16.1 h1:fTNRhKstPKxcnoKsytm4sahr8FaYzUcT7i1/3nd/fBg=
+github.com/swaggo/swag v1.16.1/go.mod h1:9/LMvHycG3NFHfR6LwvikHv5iFvmPADQ359cKikGxto=
github.com/tencentyun/cos-go-sdk-v5 v0.7.19 h1:janAfTO4MglOrUFuKGTQJBuMc66+F7TgtEIt1wPsJ+k=
github.com/tencentyun/cos-go-sdk-v5 v0.7.19/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA=
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
@@ -488,11 +503,12 @@ github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYa
github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
+github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
-github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
-github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
-github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
+github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU=
+github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/unrolled/secure v1.0.7 h1:BcQHp3iKZyZCKj5gRqwQG+5urnGBF00wGgoPPwtheVQ=
github.com/unrolled/secure v1.0.7/go.mod h1:uGc1OcRF8gCVBA+ANksKmvM85Hka6SZtQIbrKc3sHS4=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
@@ -521,6 +537,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
+golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU=
+golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -535,8 +553,9 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
+golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -562,8 +581,8 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -583,11 +602,11 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -597,8 +616,9 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
+golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -628,15 +648,16 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -646,8 +667,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -678,14 +700,14 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
+golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@@ -709,9 +731,8 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
-google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -737,8 +758,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
-gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/mysql v1.0.3/go.mod h1:twGxftLBlFgNVNakL7F+P/x9oYqoymG3YYT8cAfI9oI=
gorm.io/driver/mysql v1.3.3 h1:jXG9ANrwBc4+bMvBcSl8zCfPBaVoPyBEBshA8dA93X8=
gorm.io/driver/mysql v1.3.3/go.mod h1:ChK6AHbHgDCFZyJp0F+BmVGb06PSIoh9uVYKAlRbb2U=
@@ -900,3 +921,4 @@ nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
diff --git a/server/initialize/router.go b/server/initialize/router.go
index 77aa85047..1ae3f08ea 100644
--- a/server/initialize/router.go
+++ b/server/initialize/router.go
@@ -57,7 +57,7 @@ func Routers() *gin.Engine {
PrivateGroup := Router.Group(global.GVA_CONFIG.System.RouterPrefix)
PrivateGroup.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
{
- systemRouter.InitApiRouter(PrivateGroup) // 注册功能api路由
+ systemRouter.InitApiRouter(PrivateGroup, PublicGroup) // 注册功能api路由
systemRouter.InitJwtRouter(PrivateGroup) // jwt相关路由
systemRouter.InitUserRouter(PrivateGroup) // 注册用户路由
systemRouter.InitMenuRouter(PrivateGroup) // 注册menu路由
diff --git a/server/middleware/jwt.go b/server/middleware/jwt.go
index 334443359..c67cc28b1 100644
--- a/server/middleware/jwt.go
+++ b/server/middleware/jwt.go
@@ -2,6 +2,7 @@ package middleware
import (
"errors"
+ "github.com/golang-jwt/jwt/v4"
"strconv"
"time"
@@ -54,13 +55,13 @@ func JWTAuth() gin.HandlerFunc {
// response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c)
// c.Abort()
//}
- if claims.ExpiresAt-time.Now().Unix() < claims.BufferTime {
+ if claims.ExpiresAt.Unix()-time.Now().Unix() < claims.BufferTime {
dr, _ := utils.ParseDuration(global.GVA_CONFIG.JWT.ExpiresTime)
- claims.ExpiresAt = time.Now().Add(dr).Unix()
+ claims.ExpiresAt = jwt.NewNumericDate(time.Now().Add(dr))
newToken, _ := j.CreateTokenByOldToken(token, *claims)
newClaims, _ := j.ParseToken(newToken)
c.Header("new-token", newToken)
- c.Header("new-expires-at", strconv.FormatInt(newClaims.ExpiresAt, 10))
+ c.Header("new-expires-at", strconv.FormatInt(newClaims.ExpiresAt.Unix(), 10))
if global.GVA_CONFIG.System.UseMultipoint {
RedisJwtToken, err := jwtService.GetRedisJWT(newClaims.Username)
if err != nil {
diff --git a/server/middleware/operation.go b/server/middleware/operation.go
index 6579610a3..495d68ed4 100644
--- a/server/middleware/operation.go
+++ b/server/middleware/operation.go
@@ -56,8 +56,8 @@ func OperationRecord() gin.HandlerFunc {
body, _ = json.Marshal(&m)
}
claims, _ := utils.GetClaims(c)
- if claims.ID != 0 {
- userId = int(claims.ID)
+ if claims.BaseClaims.ID != 0 {
+ userId = int(claims.BaseClaims.ID)
} else {
id, err := strconv.Atoi(c.Request.Header.Get("x-user-id"))
if err != nil {
@@ -75,7 +75,7 @@ func OperationRecord() gin.HandlerFunc {
}
// 上传文件时候 中间件日志进行裁断操作
- if strings.Contains(c.GetHeader("Content-Type"), "multipart/form-data") {
+ if strings.Contains(c.GetHeader("Content-Type"), "multipart/form-data") {
if len(record.Body) > 1024 {
// 截断
newBody := respPool.Get().([]byte)
@@ -100,14 +100,14 @@ func OperationRecord() gin.HandlerFunc {
record.Latency = latency
record.Resp = writer.body.String()
- if strings.Contains(c.Writer.Header().Get("Pragma"), "public") ||
- strings.Contains(c.Writer.Header().Get("Expires"), "0") ||
+ if strings.Contains(c.Writer.Header().Get("Pragma"), "public") ||
+ strings.Contains(c.Writer.Header().Get("Expires"), "0") ||
strings.Contains(c.Writer.Header().Get("Cache-Control"), "must-revalidate, post-check=0, pre-check=0") ||
- strings.Contains(c.Writer.Header().Get("Content-Type"), "application/force-download") ||
- strings.Contains(c.Writer.Header().Get("Content-Type"), "application/octet-stream") ||
- strings.Contains(c.Writer.Header().Get("Content-Type"), "application/vnd.ms-excel") ||
- strings.Contains(c.Writer.Header().Get("Content-Type"), "application/download") ||
- strings.Contains(c.Writer.Header().Get("Content-Disposition"), "attachment") ||
+ strings.Contains(c.Writer.Header().Get("Content-Type"), "application/force-download") ||
+ strings.Contains(c.Writer.Header().Get("Content-Type"), "application/octet-stream") ||
+ strings.Contains(c.Writer.Header().Get("Content-Type"), "application/vnd.ms-excel") ||
+ strings.Contains(c.Writer.Header().Get("Content-Type"), "application/download") ||
+ strings.Contains(c.Writer.Header().Get("Content-Disposition"), "attachment") ||
strings.Contains(c.Writer.Header().Get("Content-Transfer-Encoding"), "binary") {
if len(record.Resp) > 1024 {
// 截断
diff --git a/server/model/system/request/jwt.go b/server/model/system/request/jwt.go
index 5a7c78aab..f6f48f6c8 100644
--- a/server/model/system/request/jwt.go
+++ b/server/model/system/request/jwt.go
@@ -1,15 +1,15 @@
package request
import (
+ "github.com/gofrs/uuid"
jwt "github.com/golang-jwt/jwt/v4"
- uuid "github.com/satori/go.uuid"
)
// Custom claims structure
type CustomClaims struct {
BaseClaims
BufferTime int64
- jwt.StandardClaims
+ jwt.RegisteredClaims
}
type BaseClaims struct {
diff --git a/server/model/system/sys_user.go b/server/model/system/sys_user.go
index b704a8d9b..5c047d798 100644
--- a/server/model/system/sys_user.go
+++ b/server/model/system/sys_user.go
@@ -2,7 +2,7 @@ package system
import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
- "github.com/satori/go.uuid"
+ "github.com/gofrs/uuid"
)
type SysUser struct {
diff --git a/server/router/system/sys_api.go b/server/router/system/sys_api.go
index 4aa056253..53c20ac49 100644
--- a/server/router/system/sys_api.go
+++ b/server/router/system/sys_api.go
@@ -8,9 +8,11 @@ import (
type ApiRouter struct{}
-func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup) {
+func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup, RouterPub *gin.RouterGroup) {
apiRouter := Router.Group("api").Use(middleware.OperationRecord())
apiRouterWithoutRecord := Router.Group("api")
+
+ apiPublicRouterWithoutRecord := RouterPub.Group("api")
apiRouterApi := v1.ApiGroupApp.SystemApiGroup.SystemApiApi
{
apiRouter.POST("createApi", apiRouterApi.CreateApi) // 创建Api
@@ -23,4 +25,7 @@ func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup) {
apiRouterWithoutRecord.POST("getAllApis", apiRouterApi.GetAllApis) // 获取所有api
apiRouterWithoutRecord.POST("getApiList", apiRouterApi.GetApiList) // 获取Api列表
}
+ {
+ apiPublicRouterWithoutRecord.GET("freshCasbin", apiRouterApi.FreshCasbin) // 刷新casbin权限
+ }
}
diff --git a/server/service/system/sys_api.go b/server/service/system/sys_api.go
index 3e35d94a8..13f9765b9 100644
--- a/server/service/system/sys_api.go
+++ b/server/service/system/sys_api.go
@@ -43,12 +43,7 @@ func (apiService *ApiService) DeleteApi(api system.SysApi) (err error) {
if err != nil {
return err
}
- success := CasbinServiceApp.ClearCasbin(1, entity.Path, entity.Method)
- if !success {
- return errors.New(entity.Path + ":" + entity.Method + "casbin同步清理失败")
- }
- e := CasbinServiceApp.Casbin()
- err = e.InvalidateCache()
+ CasbinServiceApp.ClearCasbin(1, entity.Path, entity.Method)
if err != nil {
return err
}
@@ -105,7 +100,7 @@ func (apiService *ApiService) GetAPIInfoList(api system.SysApi, info request.Pag
} else {
OrderStr = order
}
- } else { // didn't matched any order key in `orderMap`
+ } else { // didn't match any order key in `orderMap`
err = fmt.Errorf("非法的排序字段: %v", order)
return apiList, total, err
}
@@ -179,16 +174,23 @@ func (apiService *ApiService) DeleteApisByIds(ids request.IdsReq) (err error) {
return err
} else {
for _, sysApi := range apis {
- success := CasbinServiceApp.ClearCasbin(1, sysApi.Path, sysApi.Method)
- if !success {
- return errors.New(sysApi.Path + ":" + sysApi.Method + "casbin同步清理失败")
- }
+ CasbinServiceApp.ClearCasbin(1, sysApi.Path, sysApi.Method)
}
- e := CasbinServiceApp.Casbin()
- err = e.InvalidateCache()
if err != nil {
return err
}
}
return err
}
+
+//@author: [piexlmax](https://github.com/piexlmax)
+//@function: DeleteApis
+//@description: 删除选中API
+//@param: apis []model.SysApi
+//@return: err error
+
+func (apiService *ApiService) FreshCasbin() (err error) {
+ e := CasbinServiceApp.Casbin()
+ err = e.LoadPolicy()
+ return err
+}
diff --git a/server/service/system/sys_casbin.go b/server/service/system/sys_casbin.go
index 83de20922..d2911f88b 100644
--- a/server/service/system/sys_casbin.go
+++ b/server/service/system/sys_casbin.go
@@ -2,6 +2,9 @@ package system
import (
"errors"
+ "strconv"
+ "sync"
+
"github.com/casbin/casbin/v2"
"github.com/casbin/casbin/v2/model"
gormadapter "github.com/casbin/gorm-adapter/v3"
@@ -9,8 +12,6 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
_ "github.com/go-sql-driver/mysql"
"go.uber.org/zap"
- "strconv"
- "sync"
)
//@author: [piexlmax](https://github.com/piexlmax)
@@ -35,10 +36,6 @@ func (casbinService *CasbinService) UpdateCasbin(AuthorityID uint, casbinInfos [
if !success {
return errors.New("存在相同api,添加失败,请联系管理员")
}
- err := e.InvalidateCache()
- if err != nil {
- return err
- }
return nil
}
@@ -54,7 +51,7 @@ func (casbinService *CasbinService) UpdateCasbinApi(oldPath string, newPath stri
"v2": newMethod,
}).Error
e := casbinService.Casbin()
- err = e.InvalidateCache()
+ err = e.LoadPolicy()
if err != nil {
return err
}
@@ -98,11 +95,11 @@ func (casbinService *CasbinService) ClearCasbin(v int, p ...string) bool {
//@return: *casbin.Enforcer
var (
- cachedEnforcer *casbin.CachedEnforcer
- once sync.Once
+ syncedCachedEnforcer *casbin.SyncedCachedEnforcer
+ once sync.Once
)
-func (casbinService *CasbinService) Casbin() *casbin.CachedEnforcer {
+func (casbinService *CasbinService) Casbin() *casbin.SyncedCachedEnforcer {
once.Do(func() {
a, err := gormadapter.NewAdapterByDB(global.GVA_DB)
if err != nil {
@@ -130,9 +127,9 @@ func (casbinService *CasbinService) Casbin() *casbin.CachedEnforcer {
zap.L().Error("字符串加载模型失败!", zap.Error(err))
return
}
- cachedEnforcer, _ = casbin.NewCachedEnforcer(m, a)
- cachedEnforcer.SetExpireTime(60 * 60)
- _ = cachedEnforcer.LoadPolicy()
+ syncedCachedEnforcer, _ = casbin.NewSyncedCachedEnforcer(m, a)
+ syncedCachedEnforcer.SetExpireTime(60 * 60)
+ _ = syncedCachedEnforcer.LoadPolicy()
})
- return cachedEnforcer
+ return syncedCachedEnforcer
}
diff --git a/server/service/system/sys_initdb_mysql.go b/server/service/system/sys_initdb_mysql.go
index 257acafc3..d163fc024 100644
--- a/server/service/system/sys_initdb_mysql.go
+++ b/server/service/system/sys_initdb_mysql.go
@@ -13,7 +13,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
- uuid "github.com/satori/go.uuid"
+ "github.com/gofrs/uuid"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
@@ -32,7 +32,7 @@ func (h MysqlInitHandler) WriteConfig(ctx context.Context) error {
}
global.GVA_CONFIG.System.DbType = "mysql"
global.GVA_CONFIG.Mysql = c
- global.GVA_CONFIG.JWT.SigningKey = uuid.NewV4().String()
+ global.GVA_CONFIG.JWT.SigningKey = uuid.Must(uuid.NewV4()).String()
cs := utils.StructToMap(global.GVA_CONFIG)
for k, v := range cs {
global.GVA_VP.Set(k, v)
diff --git a/server/service/system/sys_initdb_pgsql.go b/server/service/system/sys_initdb_pgsql.go
index ac09814c0..42407aba7 100644
--- a/server/service/system/sys_initdb_pgsql.go
+++ b/server/service/system/sys_initdb_pgsql.go
@@ -13,7 +13,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
- uuid "github.com/satori/go.uuid"
+ "github.com/gofrs/uuid"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
@@ -32,7 +32,7 @@ func (h PgsqlInitHandler) WriteConfig(ctx context.Context) error {
}
global.GVA_CONFIG.System.DbType = "pgsql"
global.GVA_CONFIG.Pgsql = c
- global.GVA_CONFIG.JWT.SigningKey = uuid.NewV4().String()
+ global.GVA_CONFIG.JWT.SigningKey = uuid.Must(uuid.NewV4()).String()
cs := utils.StructToMap(global.GVA_CONFIG)
for k, v := range cs {
global.GVA_VP.Set(k, v)
diff --git a/server/service/system/sys_user.go b/server/service/system/sys_user.go
index a051f0ab0..7b8779f31 100644
--- a/server/service/system/sys_user.go
+++ b/server/service/system/sys_user.go
@@ -9,7 +9,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
"github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/utils"
- uuid "github.com/satori/go.uuid"
+ "github.com/gofrs/uuid"
"gorm.io/gorm"
)
@@ -28,7 +28,7 @@ func (userService *UserService) Register(u system.SysUser) (userInter system.Sys
}
// 否则 附加uuid 密码hash加密 注册
u.Password = utils.BcryptHash(u.Password)
- u.UUID = uuid.NewV4()
+ u.UUID = uuid.Must(uuid.NewV4())
err = global.GVA_DB.Create(&u).Error
return u, err
}
diff --git a/server/source/system/casbin.go b/server/source/system/casbin.go
index c75e8f8f8..bcb744731 100644
--- a/server/source/system/casbin.go
+++ b/server/source/system/casbin.go
@@ -45,7 +45,6 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
return ctx, system.ErrMissingDBContext
}
entities := []adapter.CasbinRule{
- {Ptype: "p", V0: "888", V1: "/base/login", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/user/admin_register", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/api/createApi", V2: "POST"},
@@ -157,7 +156,6 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
{Ptype: "p", V0: "888", V1: "/chatGpt/getSK", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/chatGpt/deleteSK", V2: "DELETE"},
- {Ptype: "p", V0: "8881", V1: "/base/login", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/user/admin_register", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/api/createApi", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/api/getApiList", V2: "POST"},
@@ -197,7 +195,6 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
{Ptype: "p", V0: "8881", V1: "/customer/customerList", V2: "GET"},
{Ptype: "p", V0: "8881", V1: "/user/getUserInfo", V2: "GET"},
- {Ptype: "p", V0: "9528", V1: "/base/login", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/user/admin_register", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/api/createApi", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/api/getApiList", V2: "POST"},
diff --git a/server/source/system/user.go b/server/source/system/user.go
index da9669d92..383f3c43e 100644
--- a/server/source/system/user.go
+++ b/server/source/system/user.go
@@ -7,8 +7,8 @@ import (
sysModel "github.com/flipped-aurora/gin-vue-admin/server/model/system"
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
"github.com/flipped-aurora/gin-vue-admin/server/utils"
+ "github.com/gofrs/uuid"
"github.com/pkg/errors"
- uuid "github.com/satori/go.uuid"
"gorm.io/gorm"
)
@@ -51,7 +51,7 @@ func (i *initUser) InitializeData(ctx context.Context) (next context.Context, er
entities := []sysModel.SysUser{
{
- UUID: uuid.NewV4(),
+ UUID: uuid.Must(uuid.NewV4()),
Username: "admin",
Password: adminPassword,
NickName: "Mr.奇淼",
@@ -61,7 +61,7 @@ func (i *initUser) InitializeData(ctx context.Context) (next context.Context, er
Email: "333333333@qq.com",
},
{
- UUID: uuid.NewV4(),
+ UUID: uuid.Must(uuid.NewV4()),
Username: "a303176530",
Password: password,
NickName: "用户1",
diff --git a/server/utils/clamis.go b/server/utils/clamis.go
index e80515782..76f5509fc 100644
--- a/server/utils/clamis.go
+++ b/server/utils/clamis.go
@@ -4,7 +4,7 @@ import (
"github.com/flipped-aurora/gin-vue-admin/server/global"
systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
"github.com/gin-gonic/gin"
- uuid "github.com/satori/go.uuid"
+ "github.com/gofrs/uuid"
)
func GetClaims(c *gin.Context) (*systemReq.CustomClaims, error) {
@@ -23,11 +23,11 @@ func GetUserID(c *gin.Context) uint {
if cl, err := GetClaims(c); err != nil {
return 0
} else {
- return cl.ID
+ return cl.BaseClaims.ID
}
} else {
waitUse := claims.(*systemReq.CustomClaims)
- return waitUse.ID
+ return waitUse.BaseClaims.ID
}
}
diff --git a/server/utils/jwt.go b/server/utils/jwt.go
index 61d163f7d..c1298a870 100644
--- a/server/utils/jwt.go
+++ b/server/utils/jwt.go
@@ -33,10 +33,11 @@ func (j *JWT) CreateClaims(baseClaims request.BaseClaims) request.CustomClaims {
claims := request.CustomClaims{
BaseClaims: baseClaims,
BufferTime: int64(bf / time.Second), // 缓冲时间1天 缓冲时间内会获得新的token刷新令牌 此时一个用户会存在两个有效令牌 但是前端只留一个 另一个会丢失
- StandardClaims: jwt.StandardClaims{
- NotBefore: time.Now().Unix() - 1000, // 签名生效时间
- ExpiresAt: time.Now().Add(ep).Unix(), // 过期时间 7天 配置文件
- Issuer: global.GVA_CONFIG.JWT.Issuer, // 签名的发行者
+ RegisteredClaims: jwt.RegisteredClaims{
+ Audience: jwt.ClaimStrings{"GVA"}, // 受众
+ NotBefore: jwt.NewNumericDate(time.Now().Add(-1000)), // 签名生效时间
+ ExpiresAt: jwt.NewNumericDate(time.Now().Add(ep)), // 过期时间 7天 配置文件
+ Issuer: global.GVA_CONFIG.JWT.Issuer, // 签名的发行者
},
}
return claims
diff --git a/web/package.json b/web/package.json
index 2f06334f0..0ad2e3586 100644
--- a/web/package.json
+++ b/web/package.json
@@ -10,11 +10,11 @@
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit"
},
"dependencies": {
- "@element-plus/icons-vue": "^0.2.7",
+ "@element-plus/icons-vue": "^2.1.0",
"axios": "^0.27.2",
"core-js": "^3.6.5",
"echarts": "5.3.3",
- "element-plus": "2.2.30",
+ "element-plus": "^2.3.4",
"highlight.js": "^10.6.0",
"js-cookie": "^3.0.1",
"marked": "^4.1.0",
@@ -26,15 +26,15 @@
"quill": "^1.3.7",
"screenfull": "^6.0.2",
"spark-md5": "^3.0.2",
- "vue": "^3.2.39",
+ "vue": "^3.2.47",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.5"
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^6.0.1",
"@intlify/vue-i18n-loader": "^4.2.0",
- "@vitejs/plugin-legacy": "^2.0.0",
- "@vitejs/plugin-vue": "^3.0.1",
+ "@vitejs/plugin-legacy": "^4.0.2",
+ "@vitejs/plugin-vue": "^4.1.0",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-plugin-router": "^5.0.8",
@@ -51,7 +51,7 @@
"terser": "^5.4.0",
"unplugin-auto-import": "^0.14.2",
"unplugin-vue-components": "^0.23.0",
- "vite": "^3.0.1",
+ "vite": "^4.3.1",
"vite-plugin-banner": "^0.1.3",
"vite-plugin-importer": "^0.2.5"
}
diff --git a/web/src/api/api.js b/web/src/api/api.js
index 78554aca3..86dd258c3 100644
--- a/web/src/api/api.js
+++ b/web/src/api/api.js
@@ -130,3 +130,17 @@ export const deleteApisByIds = (data) => {
data
})
}
+
+// FreshCasbin
+// @Tags SysApi
+// @Summary 刷新casbin缓存
+// @accept application/json
+// @Produce application/json
+// @Success 200 {object} response.Response{msg=string} "刷新成功"
+// @Router /api/freshCasbin [get]
+export const freshCasbin = () => {
+ return service({
+ url: '/api/freshCasbin',
+ method: 'get'
+ })
+}
diff --git a/web/src/components/commandMenu/index.vue b/web/src/components/commandMenu/index.vue
new file mode 100644
index 000000000..b8f7fbb1b
--- /dev/null
+++ b/web/src/components/commandMenu/index.vue
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
{{ option.label }}
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/main.js b/web/src/main.js
index b663d0596..42056f193 100644
--- a/web/src/main.js
+++ b/web/src/main.js
@@ -1,3 +1,8 @@
+import 'element-plus/es/components/message/style/css'
+import 'element-plus/es/components/loading/style/css'
+import 'element-plus/es/components/notification/style/css'
+import 'element-plus/es/components/message-box/style/css'
+import './style/element_visiable.scss'
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
// import zhCn from 'element-plus/es/locale/lang/zh-cn'
@@ -14,11 +19,6 @@ import i18n from './i18n' // added by mohamed hassan to multilangauge
/* *
import { initDom } from './utils/positionToCode'
-import 'element-plus/es/components/message/style/css'
-import 'element-plus/es/components/loading/style/css'
-import 'element-plus/es/components/notification/style/css'
-import 'element-plus/es/components/message-box/style/css'
-import './style/element_visiable.scss'
initDom()
/**
diff --git a/web/src/pinia/modules/router.js b/web/src/pinia/modules/router.js
index 4f4cfdb1e..b8e226f94 100644
--- a/web/src/pinia/modules/router.js
+++ b/web/src/pinia/modules/router.js
@@ -4,16 +4,12 @@ import { asyncMenu } from '@/api/menu'
import { defineStore } from 'pinia'
import { ref } from 'vue'
-const routerListArr = []
const notLayoutRouterArr = []
const keepAliveRoutersArr = []
const nameMap = {}
const formatRouter = (routes, routeMap) => {
routes && routes.forEach(item => {
- if ((!item.children || item.children.every(ch => ch.hidden)) && item.name !== '404' && !item.hidden) {
- routerListArr.push({ label: item.meta.title, value: item.name })
- }
item.meta.btns = item.btns
item.meta.hidden = item.hidden
if (item.meta.defaultMenu === true) {
@@ -60,10 +56,9 @@ export const useRouterStore = defineStore('router', () => {
emitter.on('setKeepAlive', setKeepAliveRouters)
const asyncRouters = ref([])
- const routerList = ref(routerListArr)
const routeMap = ({})
// 从后台获取动态路由
- const SetAsyncRouter = async() => {
+ const SetAsyncRouter = async () => {
asyncRouterFlag.value++
const baseRouter = [{
path: '/layout',
@@ -94,13 +89,11 @@ export const useRouterStore = defineStore('router', () => {
asyncRouterHandle(baseRouter)
KeepAliveFilter(asyncRouter)
asyncRouters.value = baseRouter
- routerList.value = routerListArr
return true
}
return {
asyncRouters,
- routerList,
keepAliveRouters,
asyncRouterFlag,
SetAsyncRouter,
diff --git a/web/src/pinia/modules/user.js b/web/src/pinia/modules/user.js
index 805162408..f4dbd40c9 100644
--- a/web/src/pinia/modules/user.js
+++ b/web/src/pinia/modules/user.js
@@ -79,6 +79,13 @@ export const useUserStore = defineStore('user', () => {
})
await router.replace({ name: userInfo.value.authority.defaultRouter })
loadingInstance.value.close()
+
+ const isWin = ref(/windows/i.test(navigator.userAgent))
+ if (isWin.value) {
+ window.localStorage.setItem('osType', 'WIN')
+ } else {
+ window.localStorage.setItem('osType', 'MAC')
+ }
return true
}
} catch (e) {
diff --git a/web/src/view/layout/index.vue b/web/src/view/layout/index.vue
index 7cef318f3..08db04453 100644
--- a/web/src/view/layout/index.vue
+++ b/web/src/view/layout/index.vue
@@ -62,7 +62,17 @@
- {{ t('layout.personalInfo') }}
+
+
+
指令菜单
+
+ {{ first }}
+ +
+ K
+
+
+
+ >{{ t('layout.personalInfo') }}
{{ t('layout.logout') }}
@@ -96,6 +106,7 @@
+
@@ -114,6 +125,7 @@ import HistoryComponent from '@/view/layout/aside/historyComponent/history.vue'
import Search from '@/view/layout/search/search.vue'
import BottomInfo from '@/view/layout/bottomInfo/bottomInfo.vue'
import CustomPic from '@/components/customPic/index.vue'
+import CommandMenu from '@/components/commandMenu/index.vue'
import Setting from './setting/index.vue'
import { setUserAuthority } from '@/api/user'
import { emitter } from '@/utils/bus.js'
@@ -134,8 +146,26 @@ const isCollapse = ref(false)
const isSider = ref(true)
const isMobile = ref(false)
+const first = ref('')
+const dialogVisible = ref(false)
const initPage = () => {
- const screenWidth = document.body.clientWidth
+ // 判断当前用户的操作系统
+ if(window.localStorage.getItem('osType') === 'WIN') {
+ first.value = 'Ctrl'
+ } else {
+ first.value = '⌘'
+ }
+ // 当用户同时按下ctrl和k键的时候
+ const handleKeyDown = (e) => {
+ if (e.ctrlKey && e.key === 'k') {
+ // 阻止浏览器默认事件
+ e.preventDefault();
+ handleCommand()
+ }
+ }
+ window.addEventListener('keydown', handleKeyDown);
+
+ const screenWidth = document.body.clientWidth
if (screenWidth < 1000) {
isMobile.value = true
isSider.value = false
@@ -153,6 +183,11 @@ const initPage = () => {
initPage()
+const command = ref()
+const handleCommand = () => {
+ command.value.open()
+}
+
const loadingFlag = ref(false)
onMounted(() => {
// 挂载一些通用的事件
@@ -249,4 +284,20 @@ const changeShadow = () => {
diff --git a/web/src/view/layout/search/search.vue b/web/src/view/layout/search/search.vue
index 9817e237a..a9ea684e2 100644
--- a/web/src/view/layout/search/search.vue
+++ b/web/src/view/layout/search/search.vue
@@ -1,43 +1,20 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
@@ -50,39 +27,10 @@ export default {