From 3d14d07a9fb1d06ba93b95852c0545f934918d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Wed, 15 May 2024 11:49:59 +0800 Subject: [PATCH 01/21] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97=E8=AF=B7=E6=B1=82=E5=A4=B4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=92=8C=E6=B8=85=E7=A9=BA=E6=97=A5=E5=BF=97=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/operation_log_controller.go | 8 ++++++++ logic/operation_log_logic.go | 15 ++++++++++++++- model/request/operation_log_req.go | 1 + routes/operation_log_routes.go | 1 + service/isql/operation_log_isql.go | 13 +++++++++++-- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/controller/operation_log_controller.go b/controller/operation_log_controller.go index 8856043..652f03b 100644 --- a/controller/operation_log_controller.go +++ b/controller/operation_log_controller.go @@ -24,3 +24,11 @@ func (m *OperationLogController) Delete(c *gin.Context) { return logic.OperationLog.Delete(c, req) }) } + +// Clean 清空记录 +func (m *OperationLogController) Clean(c *gin.Context) { + req := new(request.OperationLogListReq) + Run(c, req, func() (interface{}, interface{}) { + return logic.OperationLog.Clean(c, req) + }) +} diff --git a/logic/operation_log_logic.go b/logic/operation_log_logic.go index bac22ce..678f947 100644 --- a/logic/operation_log_logic.go +++ b/logic/operation_log_logic.go @@ -21,7 +21,7 @@ func (l OperationLogLogic) List(c *gin.Context, req interface{}) (data interface return nil, ReqAssertErr } _ = c - + fmt.Println(r) // 获取数据列表 logs, err := isql.OperationLog.List(r) if err != nil { @@ -72,3 +72,16 @@ func (l OperationLogLogic) Delete(c *gin.Context, req interface{}) (data interfa } return nil, nil } + +func (l OperationLogLogic) Clean(c *gin.Context, req interface{}) (data interface{}, rspError interface{}) { + r, ok := req.(*request.OperationLogListReq) + if !ok { + return nil, ReqAssertErr + } + _ = c + err := isql.OperationLog.Clean() + if err != nil { + return err, nil + } + return "操作日志情况完成", nil +} diff --git a/model/request/operation_log_req.go b/model/request/operation_log_req.go index ebf23d1..3487010 100644 --- a/model/request/operation_log_req.go +++ b/model/request/operation_log_req.go @@ -5,6 +5,7 @@ type OperationLogListReq struct { Username string `json:"username" form:"username"` Ip string `json:"ip" form:"ip"` Path string `json:"path" form:"path"` + Method string `json:"method" form:"method"` Status int `json:"status" form:"status"` PageNum int `json:"pageNum" form:"pageNum"` PageSize int `json:"pageSize" form:"pageSize"` diff --git a/routes/operation_log_routes.go b/routes/operation_log_routes.go index 372e543..266f89a 100644 --- a/routes/operation_log_routes.go +++ b/routes/operation_log_routes.go @@ -17,6 +17,7 @@ func InitOperationLogRoutes(r *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddle { operation_log.GET("/operation/list", controller.OperationLog.List) operation_log.POST("/operation/delete", controller.OperationLog.Delete) + operation_log.DELETE("/operation/clean", controller.OperationLog.Clean) } return r } diff --git a/service/isql/operation_log_isql.go b/service/isql/operation_log_isql.go index f1aff85..739b206 100644 --- a/service/isql/operation_log_isql.go +++ b/service/isql/operation_log_isql.go @@ -16,8 +16,8 @@ import ( type OperationLogService struct{} -//var Logs []model.OperationLog //全局变量多个线程需要加锁,所以每个线程自己维护一个 -//处理OperationLogChan将日志记录到数据库 +// var Logs []model.OperationLog //全局变量多个线程需要加锁,所以每个线程自己维护一个 +// 处理OperationLogChan将日志记录到数据库 func (s OperationLogService) SaveOperationLogChannel(olc <-chan *model.OperationLog) { // 只会在线程开启的时候执行一次 Logs := make([]model.OperationLog, 0) @@ -62,6 +62,10 @@ func (s OperationLogService) List(req *request.OperationLogListReq) ([]*model.Op if path != "" { db = db.Where("path LIKE ?", fmt.Sprintf("%%%s%%", path)) } + method := strings.TrimSpace(req.Method) + if method != "" { + db = db.Where("method LIKE ?", fmt.Sprintf("%%%s%%", method)) + } status := req.Status if status != 0 { db = db.Where("status = ?", status) @@ -95,3 +99,8 @@ func (s OperationLogService) Exist(filter map[string]interface{}) bool { func (s OperationLogService) Delete(operationLogIds []uint) error { return common.DB.Where("id IN (?)", operationLogIds).Unscoped().Delete(&model.OperationLog{}).Error } + +// Clean 清空日志 +func (s OperationLogService) Clean() error { + return common.DB.Exec("TRUNCATE TABLE operation_logs").Error +} From 86f19c9961f9eb11c5b50def02d26b8830e9114c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Wed, 15 May 2024 11:53:27 +0800 Subject: [PATCH 02/21] =?UTF-8?q?fix:=20r=20=E5=8F=98=E9=87=8F=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/operation_log_logic.go | 1 + 1 file changed, 1 insertion(+) diff --git a/logic/operation_log_logic.go b/logic/operation_log_logic.go index 678f947..7be5b60 100644 --- a/logic/operation_log_logic.go +++ b/logic/operation_log_logic.go @@ -79,6 +79,7 @@ func (l OperationLogLogic) Clean(c *gin.Context, req interface{}) (data interfac return nil, ReqAssertErr } _ = c + fmt.Println(r) err := isql.OperationLog.Clean() if err != nil { return err, nil From 14a43fb9f35f0cf97aa3595ab42ff314610a10e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Wed, 15 May 2024 14:25:58 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=9D=E5=A7=8B=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/common/init_mysql_data.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/common/init_mysql_data.go b/public/common/init_mysql_data.go index 01754c5..cb59bcd 100644 --- a/public/common/init_mysql_data.go +++ b/public/common/init_mysql_data.go @@ -649,6 +649,13 @@ func InitData() { Remark: "批量删除操作日志", Creator: "系统", }, + { + Method: "DELETE", + Path: "/log/operation/clean", + Category: "log", + Remark: "清空操作日志", + Creator: "系统", + }, } // 5. 将角色绑定给菜单 From 750cae613784506e9715cfde9494ae0b4cb1acd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Wed, 15 May 2024 22:20:49 +0800 Subject: [PATCH 04/21] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4r=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E6=9C=AA=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logic/operation_log_logic.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logic/operation_log_logic.go b/logic/operation_log_logic.go index 7be5b60..b59da37 100644 --- a/logic/operation_log_logic.go +++ b/logic/operation_log_logic.go @@ -74,12 +74,11 @@ func (l OperationLogLogic) Delete(c *gin.Context, req interface{}) (data interfa } func (l OperationLogLogic) Clean(c *gin.Context, req interface{}) (data interface{}, rspError interface{}) { - r, ok := req.(*request.OperationLogListReq) + _, ok := req.(*request.OperationLogListReq) if !ok { return nil, ReqAssertErr } _ = c - fmt.Println(r) err := isql.OperationLog.Clean() if err != nil { return err, nil From 3f7e0a829c77c92c02998b7108a219d05a41a745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Fri, 17 May 2024 17:56:30 +0800 Subject: [PATCH 05/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0swag=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E5=92=8C=E7=94=A8=E6=88=B7=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/a_controller.go | 8 + controller/base_controller.go | 41 +++- docs/docs.go | 365 +++++++++++++++++++++++++++++++++ docs/swagger.json | 341 ++++++++++++++++++++++++++++++ docs/swagger.yaml | 225 ++++++++++++++++++++ go.mod | 44 ++-- go.sum | 117 ++++++++--- main.go | 11 + model/response/responsebody.go | 15 ++ routes/a_routes.go | 10 +- routes/base_routes.go | 38 +++- 11 files changed, 1169 insertions(+), 46 deletions(-) create mode 100644 docs/docs.go create mode 100644 docs/swagger.json create mode 100644 docs/swagger.yaml create mode 100644 model/response/responsebody.go diff --git a/controller/a_controller.go b/controller/a_controller.go index 6a576cb..4c39cbb 100644 --- a/controller/a_controller.go +++ b/controller/a_controller.go @@ -65,7 +65,15 @@ func Run(c *gin.Context, req interface{}, fn func() (interface{}, interface{})) tools.Success(c, data) } +// Demo +// @Summary 健康检测 +// @Tags 用户管理 +// @Produce json +// @Description 健康检测 +// @Success 200 {object} response.ResponseBody +// @router /base/ping [get] func Demo(c *gin.Context) { + // 健康检测 CodeDebug() c.JSON(http.StatusOK, tools.H{"code": 200, "msg": "ok", "data": "pong"}) } diff --git a/controller/base_controller.go b/controller/base_controller.go index 09f23b8..e5c9ca7 100644 --- a/controller/base_controller.go +++ b/controller/base_controller.go @@ -10,6 +10,14 @@ import ( type BaseController struct{} // SendCode 给用户邮箱发送验证码 +// @Summary 发送验证码 +// @Description 向指定邮箱发送验证码 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.BaseSendCodeReq true "发送验证码请求数据" +// @Success 200 {object} response.ResponseBody +// @Router /base/sendcode [post] func (m *BaseController) SendCode(c *gin.Context) { req := new(request.BaseSendCodeReq) Run(c, req, func() (interface{}, interface{}) { @@ -18,6 +26,14 @@ func (m *BaseController) SendCode(c *gin.Context) { } // ChangePwd 用户通过邮箱修改密码 +// @Summary 用户通过邮箱修改密码 +// @Description 使用邮箱验证码修改密码 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.BaseChangePwdReq true "发送验证码请求数据" +// @Success 200 {object} response.ResponseBody +// @Router /base/changePwd [post] func (m *BaseController) ChangePwd(c *gin.Context) { req := new(request.BaseChangePwdReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +42,13 @@ func (m *BaseController) ChangePwd(c *gin.Context) { } // Dashboard 系统首页展示数据 +// @Summary 获取仪表盘数据 +// @Description 获取系统仪表盘概览数据 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /base/dashboard [get] func (m *BaseController) Dashboard(c *gin.Context) { req := new(request.BaseDashboardReq) Run(c, req, func() (interface{}, interface{}) { @@ -33,7 +56,15 @@ func (m *BaseController) Dashboard(c *gin.Context) { }) } -// EncryptPasswd 生成加密密码 +// EncryptPasswd 密码加密 +// @Summary 密码加密 +// @Description 将明文密码加密 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param passwd query string true "需要加密的明文密码" +// @Success 200 {object} response.ResponseBody +// @Router /base/encryptpwd [get] func (m *BaseController) EncryptPasswd(c *gin.Context) { req := new(request.EncryptPasswdReq) Run(c, req, func() (interface{}, interface{}) { @@ -42,6 +73,14 @@ func (m *BaseController) EncryptPasswd(c *gin.Context) { } // DecryptPasswd 密码解密为明文 +// @Summary 密码解密 +// @Description 将加密后的密码解密为明文 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param passwd query string true "需要解密的加密密码" +// @Success 200 {object} response.ResponseBody +// @Router /base/decryptpwd [get] func (m *BaseController) DecryptPasswd(c *gin.Context) { req := new(request.DecryptPasswdReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go new file mode 100644 index 0000000..b7405e6 --- /dev/null +++ b/docs/docs.go @@ -0,0 +1,365 @@ +// Package docs Code generated by swaggo/swag. DO NOT EDIT +package docs + +import "github.com/swaggo/swag" + +const docTemplate = `{ + "schemes": {{ marshal .Schemes }}, + "swagger": "2.0", + "info": { + "description": "{{escape .Description}}", + "title": "{{.Title}}", + "termsOfService": "https://github.com/eryajf/go-ldap-admin", + "contact": { + "name": "项目作者:二丫讲梵 、 swagger作者:南宫乘风", + "url": "https://github.com/eryajf/go-ldap-admin", + "email": "https://github.com/eryajf/go-ldap-admin" + }, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/base/changePwd": { + "post": { + "description": "使用邮箱验证码修改密码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "用户通过邮箱修改密码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseChangePwdReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/dashboard": { + "get": { + "description": "获取系统仪表盘概览数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "获取仪表盘数据", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/decryptpwd": { + "get": { + "description": "将加密后的密码解密为明文", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "密码解密", + "parameters": [ + { + "type": "string", + "description": "需要解密的加密密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/encryptpwd": { + "get": { + "description": "将明文密码加密", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "密码加密", + "parameters": [ + { + "type": "string", + "description": "需要加密的明文密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/login": { + "post": { + "description": "用户登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "登录接口 (异常,缺少私钥)", + "parameters": [ + { + "description": "用户登录信息账号和密码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RegisterAndLoginReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/logout": { + "post": { + "description": "用户退出登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "退出登录", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/ping": { + "get": { + "description": "健康检测", + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "健康检测", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/refreshToken": { + "post": { + "description": "使用旧的 Token 获取新的 Token", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "刷新 Token", + "parameters": [ + { + "type": "string", + "description": "Bearer 旧的 Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/sendcode": { + "post": { + "description": "向指定邮箱发送验证码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "发送验证码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseSendCodeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + } + }, + "definitions": { + "request.BaseChangePwdReq": { + "type": "object", + "required": [ + "code", + "mail" + ], + "properties": { + "code": { + "type": "string" + }, + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, + "request.BaseSendCodeReq": { + "type": "object", + "required": [ + "mail" + ], + "properties": { + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, + "request.RegisterAndLoginReq": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "response.ResponseBody": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "msg": { + "type": "string" + } + } + } + } +}` + +// SwaggerInfo holds exported Swagger Info so clients can modify it +var SwaggerInfo = &swag.Spec{ + Version: "1.0", + Host: "127.0.0.1:8888", + BasePath: "/api", + Schemes: []string{}, + Title: "Go Ldap Admin", + Description: "基于Go+Vue实现的openLDAP后台管理项目", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", +} + +func init() { + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) +} diff --git a/docs/swagger.json b/docs/swagger.json new file mode 100644 index 0000000..6de4d54 --- /dev/null +++ b/docs/swagger.json @@ -0,0 +1,341 @@ +{ + "swagger": "2.0", + "info": { + "description": "基于Go+Vue实现的openLDAP后台管理项目", + "title": "Go Ldap Admin", + "termsOfService": "https://github.com/eryajf/go-ldap-admin", + "contact": { + "name": "项目作者:二丫讲梵 、 swagger作者:南宫乘风", + "url": "https://github.com/eryajf/go-ldap-admin", + "email": "https://github.com/eryajf/go-ldap-admin" + }, + "version": "1.0" + }, + "host": "127.0.0.1:8888", + "basePath": "/api", + "paths": { + "/base/changePwd": { + "post": { + "description": "使用邮箱验证码修改密码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "用户通过邮箱修改密码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseChangePwdReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/dashboard": { + "get": { + "description": "获取系统仪表盘概览数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "获取仪表盘数据", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/decryptpwd": { + "get": { + "description": "将加密后的密码解密为明文", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "密码解密", + "parameters": [ + { + "type": "string", + "description": "需要解密的加密密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/encryptpwd": { + "get": { + "description": "将明文密码加密", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "密码加密", + "parameters": [ + { + "type": "string", + "description": "需要加密的明文密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/login": { + "post": { + "description": "用户登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "登录接口 (异常,缺少私钥)", + "parameters": [ + { + "description": "用户登录信息账号和密码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RegisterAndLoginReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/logout": { + "post": { + "description": "用户退出登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "退出登录", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/ping": { + "get": { + "description": "健康检测", + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "健康检测", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/refreshToken": { + "post": { + "description": "使用旧的 Token 获取新的 Token", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "刷新 Token", + "parameters": [ + { + "type": "string", + "description": "Bearer 旧的 Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/sendcode": { + "post": { + "description": "向指定邮箱发送验证码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "发送验证码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseSendCodeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + } + }, + "definitions": { + "request.BaseChangePwdReq": { + "type": "object", + "required": [ + "code", + "mail" + ], + "properties": { + "code": { + "type": "string" + }, + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, + "request.BaseSendCodeReq": { + "type": "object", + "required": [ + "mail" + ], + "properties": { + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, + "request.RegisterAndLoginReq": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "response.ResponseBody": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "data": {}, + "msg": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml new file mode 100644 index 0000000..47a4426 --- /dev/null +++ b/docs/swagger.yaml @@ -0,0 +1,225 @@ +basePath: /api +definitions: + request.BaseChangePwdReq: + properties: + code: + type: string + mail: + maxLength: 100 + minLength: 0 + type: string + required: + - code + - mail + type: object + request.BaseSendCodeReq: + properties: + mail: + maxLength: 100 + minLength: 0 + type: string + required: + - mail + type: object + request.RegisterAndLoginReq: + properties: + password: + type: string + username: + type: string + required: + - password + - username + type: object + response.ResponseBody: + properties: + code: + type: integer + data: {} + msg: + type: string + type: object +host: 127.0.0.1:8888 +info: + contact: + email: https://github.com/eryajf/go-ldap-admin + name: 项目作者:二丫讲梵 、 swagger作者:南宫乘风 + url: https://github.com/eryajf/go-ldap-admin + description: 基于Go+Vue实现的openLDAP后台管理项目 + termsOfService: https://github.com/eryajf/go-ldap-admin + title: Go Ldap Admin + version: "1.0" +paths: + /base/changePwd: + post: + consumes: + - application/json + description: 使用邮箱验证码修改密码 + parameters: + - description: 发送验证码请求数据 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.BaseChangePwdReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 用户通过邮箱修改密码 + tags: + - 用户管理 + /base/dashboard: + get: + consumes: + - application/json + description: 获取系统仪表盘概览数据 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 获取仪表盘数据 + tags: + - 用户管理 + /base/decryptpwd: + get: + consumes: + - application/json + description: 将加密后的密码解密为明文 + parameters: + - description: 需要解密的加密密码 + in: query + name: passwd + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 密码解密 + tags: + - 用户管理 + /base/encryptpwd: + get: + consumes: + - application/json + description: 将明文密码加密 + parameters: + - description: 需要加密的明文密码 + in: query + name: passwd + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 密码加密 + tags: + - 用户管理 + /base/login: + post: + consumes: + - application/json + description: 用户登录 + parameters: + - description: 用户登录信息账号和密码 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.RegisterAndLoginReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 登录接口 (异常,缺少私钥) + tags: + - 用户管理 + /base/logout: + post: + consumes: + - application/json + description: 用户退出登录 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 退出登录 + tags: + - 用户管理 + /base/ping: + get: + description: 健康检测 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 健康检测 + tags: + - 用户管理 + /base/refreshToken: + post: + consumes: + - application/json + description: 使用旧的 Token 获取新的 Token + parameters: + - description: Bearer 旧的 Token + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 刷新 Token + tags: + - 用户管理 + /base/sendcode: + post: + consumes: + - application/json + description: 向指定邮箱发送验证码 + parameters: + - description: 发送验证码请求数据 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.BaseSendCodeReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + summary: 发送验证码 + tags: + - 用户管理 +swagger: "2.0" diff --git a/go.mod b/go.mod index 91563c1..6cb3058 100644 --- a/go.mod +++ b/go.mod @@ -7,21 +7,23 @@ require ( github.com/casbin/casbin/v2 v2.22.0 github.com/casbin/gorm-adapter/v3 v3.1.0 github.com/fsnotify/fsnotify v1.5.4 - github.com/gin-gonic/gin v1.6.3 + github.com/gin-gonic/gin v1.9.0 github.com/glebarez/sqlite v1.7.0 github.com/go-ldap/ldap/v3 v3.4.2 - github.com/go-playground/locales v0.14.0 - github.com/go-playground/universal-translator v0.18.0 - github.com/go-playground/validator/v10 v10.10.0 + github.com/go-playground/locales v0.14.1 + github.com/go-playground/universal-translator v0.18.1 + github.com/go-playground/validator/v10 v10.11.2 github.com/juju/ratelimit v1.0.1 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/robfig/cron/v3 v3.0.0 github.com/spf13/viper v1.11.0 + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.2 github.com/thoas/go-funk v0.7.0 github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 go.uber.org/zap v1.19.1 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df - gopkg.in/natefinch/lumberjack.v2 v2.0.0 gorm.io/driver/mysql v1.4.7 gorm.io/gorm v1.24.5 ) @@ -30,27 +32,44 @@ require ( github.com/chyroc/lark v0.0.96 github.com/tidwall/gjson v1.13.0 github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 + gopkg.in/natefinch/lumberjack.v2 v2.2.1 gorm.io/datatypes v1.1.0 ) require ( - github.com/BurntSushi/toml v1.1.0 // 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/bytedance/sonic v1.8.0 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/glebarez/go-sqlite v1.20.3 // 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/goccy/go-json v0.10.0 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/lib/pq v1.10.4 // indirect + github.com/mailru/easyjson v0.7.6 // indirect github.com/microsoft/go-mssqldb v0.17.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb // indirect + golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/tools v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.22.2 // indirect modernc.org/mathutil v1.5.0 // indirect @@ -66,7 +85,6 @@ require ( github.com/go-asn1-ber/asn1-ber v1.5.1 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.13.0 // indirect @@ -91,13 +109,13 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/ugorji/go/codec v1.2.3 // indirect + github.com/ugorji/go/codec v1.2.9 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 74a9d9f..036fc27 100644 --- a/go.sum +++ b/go.sum @@ -43,25 +43,35 @@ github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzU github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= -github.com/BurntSushi/toml v1.1.0/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= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= 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/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/appleboy/gin-jwt/v2 v2.6.4 h1:4YlMh3AjCFnuIRiL27b7TXns7nLx8tU/TiSgh40RRUI= github.com/appleboy/gin-jwt/v2 v2.6.4/go.mod h1:CZpq1cRw+kqi0+yD2CwVw7VGXrrx4AqBdeZnwxVmoAs= github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4= github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +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.21.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/casbin/v2 v2.22.0 h1:1duZ3Fr383ou/6KqRljYNQBw1WWfnXTwofzJ7UBLITc= github.com/casbin/casbin/v2 v2.22.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/gorm-adapter/v3 v3.1.0 h1:qYjsP40gIjQwS6/yk7x1IkHA4qWWhpB399DrYQtJbu0= github.com/casbin/gorm-adapter/v3 v3.1.0/go.mod h1:kaMBsBHluoYwudSbVnism8LhJeVyuuqIb5nWYS/1IBU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +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/chyroc/go-ptr v1.6.0 h1:4GwCNrNfk4806eQKbHO2A/N/YOLW6jHIrBPWKfMe6F0= github.com/chyroc/go-ptr v1.6.0/go.mod h1:FKNjNg3sCLx7VhQGwuml6sITX1mvhKS0Je9uN9tt65Q= github.com/chyroc/lark v0.0.96 h1:3G977xmpktiIoposLjAEO8VOfrIfqWtzBhX9/Z/JSHc= @@ -97,10 +107,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= 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 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +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.20.3 h1:89BkqGOXR9oRmG58ZrzgoY/Fhy5x0M+/WV48U5zVrZ4= github.com/glebarez/go-sqlite v1.20.3/go.mod h1:u3N6D/wftiAzIOJtZl6BmedqxmmkDfH3q+ihjqxC9u0= github.com/glebarez/sqlite v1.7.0 h1:A7Xj/KN2Lvie4Z4rrgQHY8MsbebX3NyWsL3n2i82MVI= @@ -116,22 +128,36 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-ldap/ldap/v3 v3.4.2 h1:zFZKcXKLqZpFMrMQGHeHWKXbDTdNCmhGY9AK41zPh+8= github.com/go-ldap/ldap/v3 v3.4.2/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +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/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +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/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.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -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-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +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 v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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= @@ -171,8 +197,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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= @@ -286,6 +310,8 @@ github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -294,6 +320,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -320,6 +348,10 @@ github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -346,12 +378,13 @@ github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3P github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mozillazg/go-pinyin v0.19.0 h1:p+J8/kjJ558KPvVGYLvqBhxf8jbZA2exSLCs2uUVN8c= github.com/mozillazg/go-pinyin v0.19.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0 h1:P7Bq0SaI8nsexyay5UAyDo+ICWy5MQPgEZ5+l8JQTKo= -github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +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-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -396,6 +429,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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= @@ -404,10 +438,17 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 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 v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= +github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= +github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= +github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= +github.com/swaggo/swag v1.16.2 h1:28Pp+8DkQoV+HLzLx8RGJZXNGKbFqnuvSbAAtoxiY04= +github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg03f+E= github.com/thoas/go-funk v0.7.0 h1:GmirKrs6j6zJbhJIficOsz2aAI7700KsU/5YrdHRM1Y= github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= @@ -419,11 +460,12 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +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.3/go.mod h1:5l8GZ8hZvmL4uMdy+mhCO1LjswGRYco9Q3HfuisB21A= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.3 h1:/mVYEV+Jo3IZKeA5gBngN0AvNnQltEDkR+eQikkWQu0= -github.com/ugorji/go/codec v1.2.3/go.mod h1:5FxzDJIgeiWJZslYHPj+LS1dq1ZBQVelZFnjsFGI/Uc= +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/wenerme/go-req v0.0.0-20210907160348-d822e81276bb h1:4/6Qqg+E8z98SCi21dFnhL6goSWOYMunJkMc+YanrEw= github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb/go.mod h1:aQUkMiMp1qZkuSsdu2Vy2ZQK33cPNVmyWFzXatfP+Y4= github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 h1:wRIOQxBR5XbUZVMKziAjCnlnDhdAjVjBmLsUSn/j/+M= @@ -433,9 +475,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/zhaoyunxing92/dingtalk/v2 v2.0.7-0.20220601083444-173c10c3f835 h1:T6/rI54b4nVpQlIDv0iB0hTff4hzlXe63QcBcZ3u73s= -github.com/zhaoyunxing92/dingtalk/v2 v2.0.7-0.20220601083444-173c10c3f835/go.mod h1:MSvHUbYR94ffuWbJKFb8yHYyHg3qC/kQ3Hqpr6lK5ko= github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 h1:Ur2sZLt+zwZeYw3aNi/YhsreTnXqIeM7YrmaSH3obmA= github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5/go.mod h1:MSvHUbYR94ffuWbJKFb8yHYyHg3qC/kQ3Hqpr6lK5ko= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -463,6 +504,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.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -478,11 +521,13 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b h1:huxqepDufQpLLIRXiVkTvnxrzJlpwmIWAObmcCcUFr0= golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b/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= @@ -517,6 +562,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -551,8 +598,13 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 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= @@ -573,6 +625,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -615,6 +668,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -624,12 +678,16 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.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= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -637,8 +695,10 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.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= @@ -696,6 +756,9 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= 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= @@ -791,13 +854,13 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= 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= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -806,14 +869,15 @@ gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkp gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -854,5 +918,6 @@ modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/sqlite v1.20.3 h1:SqGJMMxjj1PHusLxdYxeQSodg7Jxn9WWkaAQjKrntZs= modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/main.go b/main.go index 0784e6e..d34d3de 100644 --- a/main.go +++ b/main.go @@ -17,6 +17,17 @@ import ( "github.com/eryajf/go-ldap-admin/service/isql" ) +// @title Go Ldap Admin +// @version 1.0 +// @description 基于Go+Vue实现的openLDAP后台管理项目 +// @termsOfService https://github.com/eryajf/go-ldap-admin + +// @contact.name 项目作者:二丫讲梵 、 swagger作者:南宫乘风 +// @contact.url https://github.com/eryajf/go-ldap-admin +// @contact.email https://github.com/eryajf/go-ldap-admin + +// @host 127.0.0.1:8888 +// @BasePath /api func main() { // 加载配置文件到全局配置结构体 diff --git a/model/response/responsebody.go b/model/response/responsebody.go new file mode 100644 index 0000000..055fde9 --- /dev/null +++ b/model/response/responsebody.go @@ -0,0 +1,15 @@ +package response + +/** + * @Author: 南宫乘风 + * @Description: + * @File: responsebody.go + * @Email: 1794748404@qq.com + * @Date: 2024-05-17 16:24 + */ + +type ResponseBody struct { + Code int `json:"code"` + Msg string `json:"msg"` + Data interface{} `json:"data"` +} diff --git a/routes/a_routes.go b/routes/a_routes.go index b40b012..f81f605 100644 --- a/routes/a_routes.go +++ b/routes/a_routes.go @@ -6,11 +6,13 @@ import ( "time" "github.com/eryajf/go-ldap-admin/config" + _ "github.com/eryajf/go-ldap-admin/docs" "github.com/eryajf/go-ldap-admin/middleware" "github.com/eryajf/go-ldap-admin/public/common" "github.com/eryajf/go-ldap-admin/public/static" - "github.com/gin-gonic/gin" + swaggerFiles "github.com/swaggo/files" + ginSwagger "github.com/swaggo/gin-swagger" ) // 初始化 @@ -53,10 +55,10 @@ func InitRoutes() *gin.Engine { common.Log.Panicf("初始化JWT中间件失败:%v", err) panic(fmt.Sprintf("初始化JWT中间件失败:%v", err)) } - - // 路由分组 + // swag + r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) apiGroup := r.Group("/" + config.Conf.System.UrlPathPrefix) - + // swag // 注册路由 InitBaseRoutes(apiGroup, authMiddleware) // 注册基础路由, 不需要jwt认证中间件,不需要casbin中间件 InitUserRoutes(apiGroup, authMiddleware) // 注册用户路由, jwt认证中间件,casbin鉴权中间件 diff --git a/routes/base_routes.go b/routes/base_routes.go index bfbad28..e9f6cef 100644 --- a/routes/base_routes.go +++ b/routes/base_routes.go @@ -1,12 +1,46 @@ package routes import ( - "github.com/eryajf/go-ldap-admin/controller" - jwt "github.com/appleboy/gin-jwt/v2" + "github.com/eryajf/go-ldap-admin/controller" "github.com/gin-gonic/gin" ) +// LoginHandler +// @Summary 登录接口 (异常,缺少私钥) +// @Description 用户登录 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.RegisterAndLoginReq true "用户登录信息账号和密码" +// @Success 200 {object} response.ResponseBody +// @Router /base/login [post] +func LoginHandler() {} + +// LogoutHandler +// @Summary 退出登录 +// @Description 用户退出登录 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /base/logout [post] +func LogoutHandler() { +} + +// RefreshHandler +// @Summary 刷新 Token +// @Description 使用旧的 Token 获取新的 Token +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param Authorization header string true "Bearer 旧的 Token" +// @Success 200 {object} response.ResponseBody +// @Router /base/refreshToken [post] +func RefreshHandler() { + +} + // 注册基础路由 func InitBaseRoutes(r *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) gin.IRoutes { base := r.Group("/base") From 6dbe2908de29367efcb2c10f3483ee7bc9f617d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Fri, 17 May 2024 18:56:16 +0800 Subject: [PATCH 06/21] =?UTF-8?q?fix:=E7=89=88=E6=9C=AC=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E4=B8=80=E8=87=B4=EF=BC=8C=E5=A2=9E=E5=8A=A0swag=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 47 ++++++++--------------- go.sum | 119 +++++++++++++-------------------------------------------- 2 files changed, 43 insertions(+), 123 deletions(-) diff --git a/go.mod b/go.mod index 6cb3058..5949792 100644 --- a/go.mod +++ b/go.mod @@ -3,27 +3,28 @@ module github.com/eryajf/go-ldap-admin go 1.18 require ( + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.2 github.com/appleboy/gin-jwt/v2 v2.6.4 github.com/casbin/casbin/v2 v2.22.0 github.com/casbin/gorm-adapter/v3 v3.1.0 github.com/fsnotify/fsnotify v1.5.4 - github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin v1.6.3 github.com/glebarez/sqlite v1.7.0 github.com/go-ldap/ldap/v3 v3.4.2 - github.com/go-playground/locales v0.14.1 - github.com/go-playground/universal-translator v0.18.1 - github.com/go-playground/validator/v10 v10.11.2 + github.com/go-playground/locales v0.14.0 + github.com/go-playground/universal-translator v0.18.0 + github.com/go-playground/validator/v10 v10.10.0 github.com/juju/ratelimit v1.0.1 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/robfig/cron/v3 v3.0.0 github.com/spf13/viper v1.11.0 - github.com/swaggo/files v1.0.1 - github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.2 github.com/thoas/go-funk v0.7.0 github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 go.uber.org/zap v1.19.1 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df + gopkg.in/natefinch/lumberjack.v2 v2.0.0 gorm.io/driver/mysql v1.4.7 gorm.io/gorm v1.24.5 ) @@ -32,44 +33,27 @@ require ( github.com/chyroc/lark v0.0.96 github.com/tidwall/gjson v1.13.0 github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 - gopkg.in/natefinch/lumberjack.v2 v2.2.1 gorm.io/datatypes v1.1.0 ) require ( - 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/bytedance/sonic v1.8.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/BurntSushi/toml v1.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/glebarez/go-sqlite v1.20.3 // 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/goccy/go-json v0.10.0 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/lib/pq v1.10.4 // indirect - github.com/mailru/easyjson v0.7.6 // indirect github.com/microsoft/go-mssqldb v0.17.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb // indirect - golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/tools v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.22.2 // indirect modernc.org/mathutil v1.5.0 // indirect @@ -85,6 +69,7 @@ require ( github.com/go-asn1-ber/asn1-ber v1.5.1 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.13.0 // indirect @@ -109,13 +94,13 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/ugorji/go/codec v1.2.9 // indirect + github.com/ugorji/go/codec v1.2.3 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 036fc27..dabb587 100644 --- a/go.sum +++ b/go.sum @@ -43,35 +43,25 @@ github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzU github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/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= -github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= -github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= 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/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/appleboy/gin-jwt/v2 v2.6.4 h1:4YlMh3AjCFnuIRiL27b7TXns7nLx8tU/TiSgh40RRUI= github.com/appleboy/gin-jwt/v2 v2.6.4/go.mod h1:CZpq1cRw+kqi0+yD2CwVw7VGXrrx4AqBdeZnwxVmoAs= github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4= github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -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.21.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/casbin/v2 v2.22.0 h1:1duZ3Fr383ou/6KqRljYNQBw1WWfnXTwofzJ7UBLITc= github.com/casbin/casbin/v2 v2.22.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/gorm-adapter/v3 v3.1.0 h1:qYjsP40gIjQwS6/yk7x1IkHA4qWWhpB399DrYQtJbu0= github.com/casbin/gorm-adapter/v3 v3.1.0/go.mod h1:kaMBsBHluoYwudSbVnism8LhJeVyuuqIb5nWYS/1IBU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/chyroc/go-ptr v1.6.0 h1:4GwCNrNfk4806eQKbHO2A/N/YOLW6jHIrBPWKfMe6F0= github.com/chyroc/go-ptr v1.6.0/go.mod h1:FKNjNg3sCLx7VhQGwuml6sITX1mvhKS0Je9uN9tt65Q= github.com/chyroc/lark v0.0.96 h1:3G977xmpktiIoposLjAEO8VOfrIfqWtzBhX9/Z/JSHc= @@ -107,12 +97,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= 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 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -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.20.3 h1:89BkqGOXR9oRmG58ZrzgoY/Fhy5x0M+/WV48U5zVrZ4= github.com/glebarez/go-sqlite v1.20.3/go.mod h1:u3N6D/wftiAzIOJtZl6BmedqxmmkDfH3q+ihjqxC9u0= github.com/glebarez/sqlite v1.7.0 h1:A7Xj/KN2Lvie4Z4rrgQHY8MsbebX3NyWsL3n2i82MVI= @@ -128,36 +116,22 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-ldap/ldap/v3 v3.4.2 h1:zFZKcXKLqZpFMrMQGHeHWKXbDTdNCmhGY9AK41zPh+8= github.com/go-ldap/ldap/v3 v3.4.2/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -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/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -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-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.9.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-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-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -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 v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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= @@ -197,6 +171,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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= @@ -310,8 +286,6 @@ github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -320,8 +294,6 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -348,10 +320,6 @@ github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -378,13 +346,12 @@ github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3P github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mozillazg/go-pinyin v0.19.0 h1:p+J8/kjJ558KPvVGYLvqBhxf8jbZA2exSLCs2uUVN8c= github.com/mozillazg/go-pinyin v0.19.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -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/pelletier/go-toml/v2 v2.0.0 h1:P7Bq0SaI8nsexyay5UAyDo+ICWy5MQPgEZ5+l8JQTKo= +github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -429,7 +396,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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= @@ -438,17 +404,10 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 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 v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= -github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= -github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= -github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= -github.com/swaggo/swag v1.16.2 h1:28Pp+8DkQoV+HLzLx8RGJZXNGKbFqnuvSbAAtoxiY04= -github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg03f+E= github.com/thoas/go-funk v0.7.0 h1:GmirKrs6j6zJbhJIficOsz2aAI7700KsU/5YrdHRM1Y= github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= @@ -460,12 +419,11 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -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.3/go.mod h1:5l8GZ8hZvmL4uMdy+mhCO1LjswGRYco9Q3HfuisB21A= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -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/ugorji/go/codec v1.2.3 h1:/mVYEV+Jo3IZKeA5gBngN0AvNnQltEDkR+eQikkWQu0= +github.com/ugorji/go/codec v1.2.3/go.mod h1:5FxzDJIgeiWJZslYHPj+LS1dq1ZBQVelZFnjsFGI/Uc= github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb h1:4/6Qqg+E8z98SCi21dFnhL6goSWOYMunJkMc+YanrEw= github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb/go.mod h1:aQUkMiMp1qZkuSsdu2Vy2ZQK33cPNVmyWFzXatfP+Y4= github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 h1:wRIOQxBR5XbUZVMKziAjCnlnDhdAjVjBmLsUSn/j/+M= @@ -475,8 +433,9 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +github.com/zhaoyunxing92/dingtalk/v2 v2.0.7-0.20220601083444-173c10c3f835 h1:T6/rI54b4nVpQlIDv0iB0hTff4hzlXe63QcBcZ3u73s= +github.com/zhaoyunxing92/dingtalk/v2 v2.0.7-0.20220601083444-173c10c3f835/go.mod h1:MSvHUbYR94ffuWbJKFb8yHYyHg3qC/kQ3Hqpr6lK5ko= github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 h1:Ur2sZLt+zwZeYw3aNi/YhsreTnXqIeM7YrmaSH3obmA= github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5/go.mod h1:MSvHUbYR94ffuWbJKFb8yHYyHg3qC/kQ3Hqpr6lK5ko= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -504,8 +463,6 @@ 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.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -521,13 +478,11 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b h1:huxqepDufQpLLIRXiVkTvnxrzJlpwmIWAObmcCcUFr0= golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b/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 +517,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -598,13 +551,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 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= @@ -625,7 +573,6 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -668,7 +615,6 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -678,16 +624,12 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.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= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -695,10 +637,8 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.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= @@ -756,9 +696,6 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= 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= @@ -854,13 +791,13 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= 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= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -869,15 +806,14 @@ gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkp gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -918,6 +854,5 @@ modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/sqlite v1.20.3 h1:SqGJMMxjj1PHusLxdYxeQSodg7Jxn9WWkaAQjKrntZs= modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= \ No newline at end of file From 9485ef3e2aebccb5c34d68a404374e716abb2d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Fri, 17 May 2024 19:00:37 +0800 Subject: [PATCH 07/21] =?UTF-8?q?fix:=E6=81=A2=E5=A4=8D=E9=AB=98=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 47 +++++++++++++++-------- go.sum | 119 ++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 123 insertions(+), 43 deletions(-) diff --git a/go.mod b/go.mod index 5949792..6cb3058 100644 --- a/go.mod +++ b/go.mod @@ -3,28 +3,27 @@ module github.com/eryajf/go-ldap-admin go 1.18 require ( - github.com/swaggo/files v1.0.1 - github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.2 github.com/appleboy/gin-jwt/v2 v2.6.4 github.com/casbin/casbin/v2 v2.22.0 github.com/casbin/gorm-adapter/v3 v3.1.0 github.com/fsnotify/fsnotify v1.5.4 - github.com/gin-gonic/gin v1.6.3 + github.com/gin-gonic/gin v1.9.0 github.com/glebarez/sqlite v1.7.0 github.com/go-ldap/ldap/v3 v3.4.2 - github.com/go-playground/locales v0.14.0 - github.com/go-playground/universal-translator v0.18.0 - github.com/go-playground/validator/v10 v10.10.0 + github.com/go-playground/locales v0.14.1 + github.com/go-playground/universal-translator v0.18.1 + github.com/go-playground/validator/v10 v10.11.2 github.com/juju/ratelimit v1.0.1 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/robfig/cron/v3 v3.0.0 github.com/spf13/viper v1.11.0 + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.2 github.com/thoas/go-funk v0.7.0 github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 go.uber.org/zap v1.19.1 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df - gopkg.in/natefinch/lumberjack.v2 v2.0.0 gorm.io/driver/mysql v1.4.7 gorm.io/gorm v1.24.5 ) @@ -33,27 +32,44 @@ require ( github.com/chyroc/lark v0.0.96 github.com/tidwall/gjson v1.13.0 github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 + gopkg.in/natefinch/lumberjack.v2 v2.2.1 gorm.io/datatypes v1.1.0 ) require ( - github.com/BurntSushi/toml v1.1.0 // 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/bytedance/sonic v1.8.0 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/glebarez/go-sqlite v1.20.3 // 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/goccy/go-json v0.10.0 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/lib/pq v1.10.4 // indirect + github.com/mailru/easyjson v0.7.6 // indirect github.com/microsoft/go-mssqldb v0.17.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb // indirect + golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/tools v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.22.2 // indirect modernc.org/mathutil v1.5.0 // indirect @@ -69,7 +85,6 @@ require ( github.com/go-asn1-ber/asn1-ber v1.5.1 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.13.0 // indirect @@ -94,13 +109,13 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/ugorji/go/codec v1.2.3 // indirect + github.com/ugorji/go/codec v1.2.9 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index dabb587..036fc27 100644 --- a/go.sum +++ b/go.sum @@ -43,25 +43,35 @@ github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzU github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= -github.com/BurntSushi/toml v1.1.0/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= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= 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/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/appleboy/gin-jwt/v2 v2.6.4 h1:4YlMh3AjCFnuIRiL27b7TXns7nLx8tU/TiSgh40RRUI= github.com/appleboy/gin-jwt/v2 v2.6.4/go.mod h1:CZpq1cRw+kqi0+yD2CwVw7VGXrrx4AqBdeZnwxVmoAs= github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4= github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +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.21.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/casbin/v2 v2.22.0 h1:1duZ3Fr383ou/6KqRljYNQBw1WWfnXTwofzJ7UBLITc= github.com/casbin/casbin/v2 v2.22.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/gorm-adapter/v3 v3.1.0 h1:qYjsP40gIjQwS6/yk7x1IkHA4qWWhpB399DrYQtJbu0= github.com/casbin/gorm-adapter/v3 v3.1.0/go.mod h1:kaMBsBHluoYwudSbVnism8LhJeVyuuqIb5nWYS/1IBU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +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/chyroc/go-ptr v1.6.0 h1:4GwCNrNfk4806eQKbHO2A/N/YOLW6jHIrBPWKfMe6F0= github.com/chyroc/go-ptr v1.6.0/go.mod h1:FKNjNg3sCLx7VhQGwuml6sITX1mvhKS0Je9uN9tt65Q= github.com/chyroc/lark v0.0.96 h1:3G977xmpktiIoposLjAEO8VOfrIfqWtzBhX9/Z/JSHc= @@ -97,10 +107,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= 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 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +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.20.3 h1:89BkqGOXR9oRmG58ZrzgoY/Fhy5x0M+/WV48U5zVrZ4= github.com/glebarez/go-sqlite v1.20.3/go.mod h1:u3N6D/wftiAzIOJtZl6BmedqxmmkDfH3q+ihjqxC9u0= github.com/glebarez/sqlite v1.7.0 h1:A7Xj/KN2Lvie4Z4rrgQHY8MsbebX3NyWsL3n2i82MVI= @@ -116,22 +128,36 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-ldap/ldap/v3 v3.4.2 h1:zFZKcXKLqZpFMrMQGHeHWKXbDTdNCmhGY9AK41zPh+8= github.com/go-ldap/ldap/v3 v3.4.2/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +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/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +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/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.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -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-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +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 v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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= @@ -171,8 +197,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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= @@ -286,6 +310,8 @@ github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -294,6 +320,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -320,6 +348,10 @@ github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -346,12 +378,13 @@ github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3P github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/mozillazg/go-pinyin v0.19.0 h1:p+J8/kjJ558KPvVGYLvqBhxf8jbZA2exSLCs2uUVN8c= github.com/mozillazg/go-pinyin v0.19.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0 h1:P7Bq0SaI8nsexyay5UAyDo+ICWy5MQPgEZ5+l8JQTKo= -github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +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-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -396,6 +429,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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= @@ -404,10 +438,17 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 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 v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= +github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg= +github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M= +github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo= +github.com/swaggo/swag v1.16.2 h1:28Pp+8DkQoV+HLzLx8RGJZXNGKbFqnuvSbAAtoxiY04= +github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg03f+E= github.com/thoas/go-funk v0.7.0 h1:GmirKrs6j6zJbhJIficOsz2aAI7700KsU/5YrdHRM1Y= github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= @@ -419,11 +460,12 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +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.3/go.mod h1:5l8GZ8hZvmL4uMdy+mhCO1LjswGRYco9Q3HfuisB21A= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.3 h1:/mVYEV+Jo3IZKeA5gBngN0AvNnQltEDkR+eQikkWQu0= -github.com/ugorji/go/codec v1.2.3/go.mod h1:5FxzDJIgeiWJZslYHPj+LS1dq1ZBQVelZFnjsFGI/Uc= +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/wenerme/go-req v0.0.0-20210907160348-d822e81276bb h1:4/6Qqg+E8z98SCi21dFnhL6goSWOYMunJkMc+YanrEw= github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb/go.mod h1:aQUkMiMp1qZkuSsdu2Vy2ZQK33cPNVmyWFzXatfP+Y4= github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 h1:wRIOQxBR5XbUZVMKziAjCnlnDhdAjVjBmLsUSn/j/+M= @@ -433,9 +475,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -github.com/zhaoyunxing92/dingtalk/v2 v2.0.7-0.20220601083444-173c10c3f835 h1:T6/rI54b4nVpQlIDv0iB0hTff4hzlXe63QcBcZ3u73s= -github.com/zhaoyunxing92/dingtalk/v2 v2.0.7-0.20220601083444-173c10c3f835/go.mod h1:MSvHUbYR94ffuWbJKFb8yHYyHg3qC/kQ3Hqpr6lK5ko= github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 h1:Ur2sZLt+zwZeYw3aNi/YhsreTnXqIeM7YrmaSH3obmA= github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5/go.mod h1:MSvHUbYR94ffuWbJKFb8yHYyHg3qC/kQ3Hqpr6lK5ko= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -463,6 +504,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.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -478,11 +521,13 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b h1:huxqepDufQpLLIRXiVkTvnxrzJlpwmIWAObmcCcUFr0= golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b/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= @@ -517,6 +562,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -551,8 +598,13 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= 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= @@ -573,6 +625,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -615,6 +668,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -624,12 +678,16 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.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= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -637,8 +695,10 @@ 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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.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= @@ -696,6 +756,9 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= 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= @@ -791,13 +854,13 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +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/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= 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= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -806,14 +869,15 @@ gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkp gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -854,5 +918,6 @@ modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/sqlite v1.20.3 h1:SqGJMMxjj1PHusLxdYxeQSodg7Jxn9WWkaAQjKrntZs= modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= \ No newline at end of file +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From c9095a5e325e3dabaddc1eceb4990f0953c19dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Fri, 17 May 2024 22:27:27 +0800 Subject: [PATCH 08/21] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 49 +++++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 6cb3058..666eb42 100644 --- a/go.mod +++ b/go.mod @@ -3,27 +3,28 @@ module github.com/eryajf/go-ldap-admin go 1.18 require ( + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.2 github.com/appleboy/gin-jwt/v2 v2.6.4 github.com/casbin/casbin/v2 v2.22.0 github.com/casbin/gorm-adapter/v3 v3.1.0 github.com/fsnotify/fsnotify v1.5.4 - github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin v1.6.3 github.com/glebarez/sqlite v1.7.0 github.com/go-ldap/ldap/v3 v3.4.2 - github.com/go-playground/locales v0.14.1 - github.com/go-playground/universal-translator v0.18.1 - github.com/go-playground/validator/v10 v10.11.2 + github.com/go-playground/locales v0.14.0 + github.com/go-playground/universal-translator v0.18.0 + github.com/go-playground/validator/v10 v10.10.0 github.com/juju/ratelimit v1.0.1 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/robfig/cron/v3 v3.0.0 github.com/spf13/viper v1.11.0 - github.com/swaggo/files v1.0.1 - github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.2 github.com/thoas/go-funk v0.7.0 github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 go.uber.org/zap v1.19.1 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df + gopkg.in/natefinch/lumberjack.v2 v2.0.0 gorm.io/driver/mysql v1.4.7 gorm.io/gorm v1.24.5 ) @@ -32,44 +33,27 @@ require ( github.com/chyroc/lark v0.0.96 github.com/tidwall/gjson v1.13.0 github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 - gopkg.in/natefinch/lumberjack.v2 v2.2.1 gorm.io/datatypes v1.1.0 ) require ( - 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/bytedance/sonic v1.8.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/BurntSushi/toml v1.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/glebarez/go-sqlite v1.20.3 // 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/goccy/go-json v0.10.0 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/lib/pq v1.10.4 // indirect - github.com/mailru/easyjson v0.7.6 // indirect github.com/microsoft/go-mssqldb v0.17.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb // indirect - golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/tools v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.22.2 // indirect modernc.org/mathutil v1.5.0 // indirect @@ -85,6 +69,7 @@ require ( github.com/go-asn1-ber/asn1-ber v1.5.1 // indirect github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.13.0 // indirect @@ -109,16 +94,16 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/ugorji/go/codec v1.2.9 // indirect + github.com/ugorji/go/codec v1.2.3 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gorm.io/driver/postgres v1.4.5 // indirect gorm.io/driver/sqlserver v1.4.1 // indirect -) +) \ No newline at end of file From 9bd3f1a17e0f1ef49e0bafb174c8796f584279ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <46562911+nangongchengfeng@users.noreply.github.com> Date: Sat, 18 May 2024 10:54:48 +0800 Subject: [PATCH 09/21] =?UTF-8?q?fix=EF=BC=9Ago.mod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 666eb42..cc90f83 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,6 @@ module github.com/eryajf/go-ldap-admin go 1.18 require ( - github.com/swaggo/files v1.0.1 - github.com/swaggo/gin-swagger v1.6.0 - github.com/swaggo/swag v1.16.2 github.com/appleboy/gin-jwt/v2 v2.6.4 github.com/casbin/casbin/v2 v2.22.0 github.com/casbin/gorm-adapter/v3 v3.1.0 @@ -20,6 +17,9 @@ require ( github.com/patrickmn/go-cache v2.1.0+incompatible github.com/robfig/cron/v3 v3.0.0 github.com/spf13/viper v1.11.0 + github.com/swaggo/files v1.0.1 + github.com/swaggo/gin-swagger v1.6.0 + github.com/swaggo/swag v1.16.2 github.com/thoas/go-funk v0.7.0 github.com/zhaoyunxing92/dingtalk/v2 v2.1.1-0.20231013102126-c1568b7fbac5 go.uber.org/zap v1.19.1 @@ -106,4 +106,4 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gorm.io/driver/postgres v1.4.5 // indirect gorm.io/driver/sqlserver v1.4.1 // indirect -) \ No newline at end of file +) From 5e1e9c90517b699ae4021e54f2fb2904a6395448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <46562911+nangongchengfeng@users.noreply.github.com> Date: Sat, 18 May 2024 11:00:56 +0800 Subject: [PATCH 10/21] =?UTF-8?q?fix:=E4=BF=9D=E6=8C=81=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cc90f83..eea1ec3 100644 --- a/go.mod +++ b/go.mod @@ -38,13 +38,22 @@ require ( require ( github.com/BurntSushi/toml v1.1.0 // 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/dustin/go-humanize v1.0.1 // indirect github.com/glebarez/go-sqlite v1.20.3 // 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/golang-sql/sqlexp v0.1.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/lib/pq v1.10.4 // indirect + github.com/mailru/easyjson v0.7.6 // indirect github.com/microsoft/go-mssqldb v0.17.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -54,6 +63,8 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/tools v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.22.2 // indirect modernc.org/mathutil v1.5.0 // indirect @@ -97,9 +108,9 @@ require ( github.com/ugorji/go/codec v1.2.3 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.66.4 // indirect @@ -107,3 +118,16 @@ require ( gorm.io/driver/postgres v1.4.5 // indirect gorm.io/driver/sqlserver v1.4.1 // indirect ) + +exclude ( + github.com/gin-gonic/gin v1.9.0 + github.com/go-playground/locales v0.14.1 + github.com/go-playground/universal-translator v0.18.1 + github.com/go-playground/validator/v10 v10.11.2 + github.com/pelletier/go-toml/v2 v2.0.6 + github.com/ugorji/go/codec v1.2.9 + golang.org/x/crypto v0.14.0 + golang.org/x/sys v0.13.0 + golang.org/x/text v0.13.0 + google.golang.org/protobuf v1.28.1 +) From b55272c5c6d3ecc6c4d004b2b18a2e7710d9deaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <46562911+nangongchengfeng@users.noreply.github.com> Date: Sat, 18 May 2024 11:04:55 +0800 Subject: [PATCH 11/21] =?UTF-8?q?fix:=E4=BF=9D=E6=8C=81=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.sum | 54 ++++++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/go.sum b/go.sum index 036fc27..4d71d6b 100644 --- a/go.sum +++ b/go.sum @@ -43,6 +43,8 @@ github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzU github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= +github.com/BurntSushi/toml v1.1.0/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= @@ -60,18 +62,12 @@ github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -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.21.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/casbin/v2 v2.22.0 h1:1duZ3Fr383ou/6KqRljYNQBw1WWfnXTwofzJ7UBLITc= github.com/casbin/casbin/v2 v2.22.0/go.mod h1:wUgota0cQbTXE6Vd+KWpg41726jFRi7upxio0sR+Xd0= github.com/casbin/gorm-adapter/v3 v3.1.0 h1:qYjsP40gIjQwS6/yk7x1IkHA4qWWhpB399DrYQtJbu0= github.com/casbin/gorm-adapter/v3 v3.1.0/go.mod h1:kaMBsBHluoYwudSbVnism8LhJeVyuuqIb5nWYS/1IBU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/chyroc/go-ptr v1.6.0 h1:4GwCNrNfk4806eQKbHO2A/N/YOLW6jHIrBPWKfMe6F0= github.com/chyroc/go-ptr v1.6.0/go.mod h1:FKNjNg3sCLx7VhQGwuml6sITX1mvhKS0Je9uN9tt65Q= github.com/chyroc/lark v0.0.96 h1:3G977xmpktiIoposLjAEO8VOfrIfqWtzBhX9/Z/JSHc= @@ -110,9 +106,8 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4= 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 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -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.20.3 h1:89BkqGOXR9oRmG58ZrzgoY/Fhy5x0M+/WV48U5zVrZ4= github.com/glebarez/go-sqlite v1.20.3/go.mod h1:u3N6D/wftiAzIOJtZl6BmedqxmmkDfH3q+ihjqxC9u0= github.com/glebarez/sqlite v1.7.0 h1:A7Xj/KN2Lvie4Z4rrgQHY8MsbebX3NyWsL3n2i82MVI= @@ -138,26 +133,22 @@ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7 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-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.9.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-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-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -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 v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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= @@ -197,6 +188,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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= @@ -320,8 +313,6 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/juju/ratelimit v1.0.1 h1:+7AIFJVQ0EQgq/K9+0Krm7m530Du7tIz0METWzN0RgY= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -383,8 +374,8 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -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/pelletier/go-toml/v2 v2.0.0 h1:P7Bq0SaI8nsexyay5UAyDo+ICWy5MQPgEZ5+l8JQTKo= +github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -429,7 +420,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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= @@ -440,7 +430,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 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 v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE= @@ -460,12 +449,11 @@ github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JT github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -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.3/go.mod h1:5l8GZ8hZvmL4uMdy+mhCO1LjswGRYco9Q3HfuisB21A= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -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/ugorji/go/codec v1.2.3 h1:/mVYEV+Jo3IZKeA5gBngN0AvNnQltEDkR+eQikkWQu0= +github.com/ugorji/go/codec v1.2.3/go.mod h1:5FxzDJIgeiWJZslYHPj+LS1dq1ZBQVelZFnjsFGI/Uc= github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb h1:4/6Qqg+E8z98SCi21dFnhL6goSWOYMunJkMc+YanrEw= github.com/wenerme/go-req v0.0.0-20210907160348-d822e81276bb/go.mod h1:aQUkMiMp1qZkuSsdu2Vy2ZQK33cPNVmyWFzXatfP+Y4= github.com/wenerme/go-wecom v0.0.0-20220617125121-2ee950da3e63 h1:wRIOQxBR5XbUZVMKziAjCnlnDhdAjVjBmLsUSn/j/+M= @@ -504,8 +492,6 @@ 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.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -854,8 +840,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -869,8 +856,8 @@ gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkp gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -918,6 +905,5 @@ modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/sqlite v1.20.3 h1:SqGJMMxjj1PHusLxdYxeQSodg7Jxn9WWkaAQjKrntZs= modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 8da2d495e305d67cfc7d425dbd55cc04164ec63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Sun, 19 May 2024 09:43:14 +0800 Subject: [PATCH 12/21] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dtag=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E4=B8=BA=E5=9F=BA=E7=A1=80=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/a_controller.go | 2 +- controller/base_controller.go | 10 +++++----- routes/base_routes.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/controller/a_controller.go b/controller/a_controller.go index 4c39cbb..48b23c2 100644 --- a/controller/a_controller.go +++ b/controller/a_controller.go @@ -67,7 +67,7 @@ func Run(c *gin.Context, req interface{}, fn func() (interface{}, interface{})) // Demo // @Summary 健康检测 -// @Tags 用户管理 +// @Tags 基础管理 // @Produce json // @Description 健康检测 // @Success 200 {object} response.ResponseBody diff --git a/controller/base_controller.go b/controller/base_controller.go index e5c9ca7..827d7fc 100644 --- a/controller/base_controller.go +++ b/controller/base_controller.go @@ -12,7 +12,7 @@ type BaseController struct{} // SendCode 给用户邮箱发送验证码 // @Summary 发送验证码 // @Description 向指定邮箱发送验证码 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Param data body request.BaseSendCodeReq true "发送验证码请求数据" @@ -28,7 +28,7 @@ func (m *BaseController) SendCode(c *gin.Context) { // ChangePwd 用户通过邮箱修改密码 // @Summary 用户通过邮箱修改密码 // @Description 使用邮箱验证码修改密码 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Param data body request.BaseChangePwdReq true "发送验证码请求数据" @@ -44,7 +44,7 @@ func (m *BaseController) ChangePwd(c *gin.Context) { // Dashboard 系统首页展示数据 // @Summary 获取仪表盘数据 // @Description 获取系统仪表盘概览数据 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Success 200 {object} response.ResponseBody @@ -59,7 +59,7 @@ func (m *BaseController) Dashboard(c *gin.Context) { // EncryptPasswd 密码加密 // @Summary 密码加密 // @Description 将明文密码加密 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Param passwd query string true "需要加密的明文密码" @@ -75,7 +75,7 @@ func (m *BaseController) EncryptPasswd(c *gin.Context) { // DecryptPasswd 密码解密为明文 // @Summary 密码解密 // @Description 将加密后的密码解密为明文 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Param passwd query string true "需要解密的加密密码" diff --git a/routes/base_routes.go b/routes/base_routes.go index e9f6cef..54daca9 100644 --- a/routes/base_routes.go +++ b/routes/base_routes.go @@ -9,7 +9,7 @@ import ( // LoginHandler // @Summary 登录接口 (异常,缺少私钥) // @Description 用户登录 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Param data body request.RegisterAndLoginReq true "用户登录信息账号和密码" @@ -20,7 +20,7 @@ func LoginHandler() {} // LogoutHandler // @Summary 退出登录 // @Description 用户退出登录 -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Success 200 {object} response.ResponseBody @@ -31,7 +31,7 @@ func LogoutHandler() { // RefreshHandler // @Summary 刷新 Token // @Description 使用旧的 Token 获取新的 Token -// @Tags 用户管理 +// @Tags 基础管理 // @Accept application/json // @Produce application/json // @Param Authorization header string true "Bearer 旧的 Token" From 28cbf07b0871cf33527acb00f2a6304212a4955d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Sun, 19 May 2024 10:34:13 +0800 Subject: [PATCH 13/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=8412=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/user_controller.go | 122 +++++- docs/docs.go | 804 +++++++++++++++++++++++++++++++--- docs/swagger.json | 804 +++++++++++++++++++++++++++++++--- docs/swagger.yaml | 475 +++++++++++++++++++- main.go | 3 + 5 files changed, 2088 insertions(+), 120 deletions(-) diff --git a/controller/user_controller.go b/controller/user_controller.go index 24b6f5d..c25b18b 100644 --- a/controller/user_controller.go +++ b/controller/user_controller.go @@ -9,7 +9,16 @@ import ( type UserController struct{} -// Add 添加记录 +// Add 添加用户记录 +// @Summary 添加用户记录 +// @Description 添加用户记录 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.UserAddReq true "添加用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /user/add [post] +// @Security ApiKeyAuth func (m *UserController) Add(c *gin.Context) { req := new(request.UserAddReq) Run(c, req, func() (interface{}, interface{}) { @@ -17,7 +26,16 @@ func (m *UserController) Add(c *gin.Context) { }) } -// Update 更新记录 +// Update 更新用户记录 +// @Summary 更新用户记录 +// @Description 添加用户记录 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.UserUpdateReq true "更改用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /user/update [post] +// @Security ApiKeyAuth func (m *UserController) Update(c *gin.Context) { req := new(request.UserUpdateReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +44,14 @@ func (m *UserController) Update(c *gin.Context) { } // List 记录列表 +// @Summary 获取所有用户记录列表 +// @Description 获取所有用户记录列表 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /user/list [get] +// @Security ApiKeyAuth func (m *UserController) List(c *gin.Context) { req := new(request.UserListReq) Run(c, req, func() (interface{}, interface{}) { @@ -33,7 +59,16 @@ func (m *UserController) List(c *gin.Context) { }) } -// Delete 删除记录 +// Delete 删除用户记录 +// @Summary 删除用户记录 +// @Description 删除用户记录 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.UserDeleteReq true "删除用户记录的结构体ID" +// @Success 200 {object} response.ResponseBody +// @Router /user/delete [post] +// @Security ApiKeyAuth func (m UserController) Delete(c *gin.Context) { req := new(request.UserDeleteReq) Run(c, req, func() (interface{}, interface{}) { @@ -42,6 +77,15 @@ func (m UserController) Delete(c *gin.Context) { } // ChangePwd 更新密码 +// @Summary 更新密码 +// @Description 更新密码 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.UserChangePwdReq true "更改用户密码的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /user/changePwd [post] +// @Security ApiKeyAuth func (m UserController) ChangePwd(c *gin.Context) { req := new(request.UserChangePwdReq) Run(c, req, func() (interface{}, interface{}) { @@ -50,6 +94,15 @@ func (m UserController) ChangePwd(c *gin.Context) { } // ChangeUserStatus 更改用户状态 +// @Summary 更改用户状态 +// @Description 更改用户状态 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.UserChangeUserStatusReq true "更改用户状态的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /user/changeUserStatus [post] +// @Security ApiKeyAuth func (m UserController) ChangeUserStatus(c *gin.Context) { req := new(request.UserChangeUserStatusReq) Run(c, req, func() (interface{}, interface{}) { @@ -58,6 +111,14 @@ func (m UserController) ChangeUserStatus(c *gin.Context) { } // GetUserInfo 获取当前登录用户信息 +// @Summary 获取当前登录用户信息 +// @Description 获取当前登录用户信息 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /user/info [get] +// @Security ApiKeyAuth func (uc UserController) GetUserInfo(c *gin.Context) { req := new(request.UserGetUserInfoReq) Run(c, req, func() (interface{}, interface{}) { @@ -65,7 +126,16 @@ func (uc UserController) GetUserInfo(c *gin.Context) { }) } -// 同步钉钉用户信息 +// SyncDingTalkUsers 同步钉钉用户信息 +// @Summary 同步钉钉用户信息 +// @Description 同步钉钉用户信息 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.SyncDingUserReq true "同步钉钉用户信息" +// @Success 200 {object} response.ResponseBody +// @Router /user/syncDingTalkUsers [post] +// @Security ApiKeyAuth func (uc UserController) SyncDingTalkUsers(c *gin.Context) { req := new(request.SyncDingUserReq) Run(c, req, func() (interface{}, interface{}) { @@ -73,7 +143,16 @@ func (uc UserController) SyncDingTalkUsers(c *gin.Context) { }) } -// 同步企业微信用户信息 +// SyncWeComUsers 同步企业微信用户信息 +// @Summary 同步企业微信用户信息 +// @Description 同步企业微信用户信息 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.SyncWeComUserReq true "同步企业微信用户信息" +// @Success 200 {object} response.ResponseBody +// @Router /user/syncWeComUsers [post] +// @Security ApiKeyAuth func (uc UserController) SyncWeComUsers(c *gin.Context) { req := new(request.SyncWeComUserReq) Run(c, req, func() (interface{}, interface{}) { @@ -81,7 +160,16 @@ func (uc UserController) SyncWeComUsers(c *gin.Context) { }) } -// 同步飞书用户信息 +// SyncFeiShuUsers 同步飞书用户信息 +// @Summary 同步飞书用户信息 +// @Description 同步飞书用户信息 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.SyncFeiShuUserReq true "同步飞书用户信息" +// @Success 200 {object} response.ResponseBody +// @Router /user/syncFeiShuUsers [post] +// @Security ApiKeyAuth func (uc UserController) SyncFeiShuUsers(c *gin.Context) { req := new(request.SyncFeiShuUserReq) Run(c, req, func() (interface{}, interface{}) { @@ -89,7 +177,16 @@ func (uc UserController) SyncFeiShuUsers(c *gin.Context) { }) } -// 同步ldap用户信息 +// SyncOpenLdapUsers 同步ldap用户信息 +// @Summary 同步ldap用户信息 +// @Description 同步ldap用户信息 +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.SyncOpenLdapUserReq true "同步ldap用户信息" +// @Success 200 {object} response.ResponseBody +// @Router /user/syncOpenLdapUsers [post] +// @Security ApiKeyAuth func (uc UserController) SyncOpenLdapUsers(c *gin.Context) { req := new(request.SyncOpenLdapUserReq) Run(c, req, func() (interface{}, interface{}) { @@ -97,7 +194,16 @@ func (uc UserController) SyncOpenLdapUsers(c *gin.Context) { }) } -// 同步sql用户信息到ldap +// SyncSqlUsers 同步sql用户信息到ldap +// @Summary 同步sql用户信息到ldap +// @Description 同步sql用户信息到ldap +// @Tags 用户管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.SyncSqlUserReq true "更改用户状态的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /user/syncSqlUsers [post] +// @Security ApiKeyAuth func (uc UserController) SyncSqlUsers(c *gin.Context) { req := new(request.SyncSqlUserReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index b7405e6..f4b4ad2 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -29,18 +29,404 @@ const docTemplate = `{ "produces": [ "application/json" ], + "tags": [ + "基础管理" + ], + "summary": "用户通过邮箱修改密码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseChangePwdReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/dashboard": { + "get": { + "description": "获取系统仪表盘概览数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "获取仪表盘数据", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/decryptpwd": { + "get": { + "description": "将加密后的密码解密为明文", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "密码解密", + "parameters": [ + { + "type": "string", + "description": "需要解密的加密密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/encryptpwd": { + "get": { + "description": "将明文密码加密", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "密码加密", + "parameters": [ + { + "type": "string", + "description": "需要加密的明文密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/login": { + "post": { + "description": "用户登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "登录接口 (异常,缺少私钥)", + "parameters": [ + { + "description": "用户登录信息账号和密码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RegisterAndLoginReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/logout": { + "post": { + "description": "用户退出登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "退出登录", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/ping": { + "get": { + "description": "健康检测", + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "健康检测", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/refreshToken": { + "post": { + "description": "使用旧的 Token 获取新的 Token", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "刷新 Token", + "parameters": [ + { + "type": "string", + "description": "Bearer 旧的 Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/sendcode": { + "post": { + "description": "向指定邮箱发送验证码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "发送验证码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseSendCodeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加用户记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "添加用户记录", + "parameters": [ + { + "description": "添加用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UserAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/changePwd": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新密码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "更新密码", + "parameters": [ + { + "description": "更改用户密码的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UserChangePwdReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/changeUserStatus": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更改用户状态", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "更改用户状态", + "parameters": [ + { + "description": "更改用户状态的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UserChangeUserStatusReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除用户记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "用户管理" ], - "summary": "用户通过邮箱修改密码", + "summary": "删除用户记录", "parameters": [ { - "description": "发送验证码请求数据", + "description": "删除用户记录的结构体ID", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.BaseChangePwdReq" + "$ref": "#/definitions/request.UserDeleteReq" } } ], @@ -54,9 +440,14 @@ const docTemplate = `{ } } }, - "/base/dashboard": { + "/user/info": { "get": { - "description": "获取系统仪表盘概览数据", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取当前登录用户信息", "consumes": [ "application/json" ], @@ -66,7 +457,7 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "获取仪表盘数据", + "summary": "获取当前登录用户信息", "responses": { "200": { "description": "OK", @@ -77,9 +468,14 @@ const docTemplate = `{ } } }, - "/base/decryptpwd": { + "/user/list": { "get": { - "description": "将加密后的密码解密为明文", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取所有用户记录列表", "consumes": [ "application/json" ], @@ -89,16 +485,7 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "密码解密", - "parameters": [ - { - "type": "string", - "description": "需要解密的加密密码", - "name": "passwd", - "in": "query", - "required": true - } - ], + "summary": "获取所有用户记录列表", "responses": { "200": { "description": "OK", @@ -109,9 +496,14 @@ const docTemplate = `{ } } }, - "/base/encryptpwd": { - "get": { - "description": "将明文密码加密", + "/user/syncDingTalkUsers": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步钉钉用户信息", "consumes": [ "application/json" ], @@ -121,14 +513,16 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "密码加密", + "summary": "同步钉钉用户信息", "parameters": [ { - "type": "string", - "description": "需要加密的明文密码", - "name": "passwd", - "in": "query", - "required": true + "description": "同步钉钉用户信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncDingUserReq" + } } ], "responses": { @@ -141,9 +535,14 @@ const docTemplate = `{ } } }, - "/base/login": { + "/user/syncFeiShuUsers": { "post": { - "description": "用户登录", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步飞书用户信息", "consumes": [ "application/json" ], @@ -153,15 +552,15 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "登录接口 (异常,缺少私钥)", + "summary": "同步飞书用户信息", "parameters": [ { - "description": "用户登录信息账号和密码", + "description": "同步飞书用户信息", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.RegisterAndLoginReq" + "$ref": "#/definitions/request.SyncFeiShuUserReq" } } ], @@ -175,9 +574,14 @@ const docTemplate = `{ } } }, - "/base/logout": { + "/user/syncOpenLdapUsers": { "post": { - "description": "用户退出登录", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步ldap用户信息", "consumes": [ "application/json" ], @@ -187,7 +591,18 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "退出登录", + "summary": "同步ldap用户信息", + "parameters": [ + { + "description": "同步ldap用户信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncOpenLdapUserReq" + } + } + ], "responses": { "200": { "description": "OK", @@ -198,16 +613,35 @@ const docTemplate = `{ } } }, - "/base/ping": { - "get": { - "description": "健康检测", + "/user/syncSqlUsers": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步sql用户信息到ldap", + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "用户管理" ], - "summary": "健康检测", + "summary": "同步sql用户信息到ldap", + "parameters": [ + { + "description": "更改用户状态的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncSqlUserReq" + } + } + ], "responses": { "200": { "description": "OK", @@ -218,9 +652,14 @@ const docTemplate = `{ } } }, - "/base/refreshToken": { + "/user/syncWeComUsers": { "post": { - "description": "使用旧的 Token 获取新的 Token", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步企业微信用户信息", "consumes": [ "application/json" ], @@ -230,14 +669,16 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "刷新 Token", + "summary": "同步企业微信用户信息", "parameters": [ { - "type": "string", - "description": "Bearer 旧的 Token", - "name": "Authorization", - "in": "header", - "required": true + "description": "同步企业微信用户信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncWeComUserReq" + } } ], "responses": { @@ -250,9 +691,14 @@ const docTemplate = `{ } } }, - "/base/sendcode": { + "/user/update": { "post": { - "description": "向指定邮箱发送验证码", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加用户记录", "consumes": [ "application/json" ], @@ -262,15 +708,15 @@ const docTemplate = `{ "tags": [ "用户管理" ], - "summary": "发送验证码", + "summary": "更新用户记录", "parameters": [ { - "description": "发送验证码请求数据", + "description": "更改用户记录的结构体", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.BaseSendCodeReq" + "$ref": "#/definitions/request.UserUpdateReq" } } ], @@ -331,6 +777,253 @@ const docTemplate = `{ } } }, + "request.SyncDingUserReq": { + "type": "object" + }, + "request.SyncFeiShuUserReq": { + "type": "object" + }, + "request.SyncOpenLdapUserReq": { + "type": "object" + }, + "request.SyncSqlUserReq": { + "type": "object", + "required": [ + "userIds" + ], + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.SyncWeComUserReq": { + "type": "object" + }, + "request.UserAddReq": { + "type": "object", + "required": [ + "departmentId", + "jobNumber", + "mail", + "mobile", + "nickname", + "roleIds", + "username" + ], + "properties": { + "avatar": { + "type": "string" + }, + "departmentId": { + "type": "array", + "items": { + "type": "integer" + } + }, + "departments": { + "type": "string", + "maxLength": 512, + "minLength": 0 + }, + "givenName": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "introduction": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "jobNumber": { + "type": "string", + "maxLength": 20, + "minLength": 0 + }, + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "mobile": { + "type": "string" + }, + "nickname": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "password": { + "type": "string" + }, + "position": { + "type": "string", + "maxLength": 128, + "minLength": 0 + }, + "postalAddress": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "source": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "username": { + "type": "string", + "maxLength": 50, + "minLength": 2 + } + } + }, + "request.UserChangePwdReq": { + "type": "object", + "required": [ + "newPassword", + "oldPassword" + ], + "properties": { + "newPassword": { + "type": "string" + }, + "oldPassword": { + "type": "string" + } + } + }, + "request.UserChangeUserStatusReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + } + } + }, + "request.UserDeleteReq": { + "type": "object", + "required": [ + "userIds" + ], + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.UserUpdateReq": { + "type": "object", + "required": [ + "departmentId", + "id", + "roleIds", + "username" + ], + "properties": { + "avatar": { + "type": "string" + }, + "departmentId": { + "type": "array", + "items": { + "type": "integer" + } + }, + "departments": { + "type": "string", + "maxLength": 512, + "minLength": 0 + }, + "givenName": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "id": { + "type": "integer" + }, + "introduction": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "jobNumber": { + "type": "string", + "maxLength": 20, + "minLength": 0 + }, + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "mobile": { + "type": "string" + }, + "nickname": { + "type": "string", + "maxLength": 20, + "minLength": 0 + }, + "position": { + "type": "string", + "maxLength": 128, + "minLength": 0 + }, + "postalAddress": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "source": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "username": { + "type": "string", + "maxLength": 50, + "minLength": 2 + } + } + }, "response.ResponseBody": { "type": "object", "properties": { @@ -343,6 +1036,13 @@ const docTemplate = `{ } } } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } } }` diff --git a/docs/swagger.json b/docs/swagger.json index 6de4d54..d3af3bb 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -23,18 +23,404 @@ "produces": [ "application/json" ], + "tags": [ + "基础管理" + ], + "summary": "用户通过邮箱修改密码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseChangePwdReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/dashboard": { + "get": { + "description": "获取系统仪表盘概览数据", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "获取仪表盘数据", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/decryptpwd": { + "get": { + "description": "将加密后的密码解密为明文", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "密码解密", + "parameters": [ + { + "type": "string", + "description": "需要解密的加密密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/encryptpwd": { + "get": { + "description": "将明文密码加密", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "密码加密", + "parameters": [ + { + "type": "string", + "description": "需要加密的明文密码", + "name": "passwd", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/login": { + "post": { + "description": "用户登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "登录接口 (异常,缺少私钥)", + "parameters": [ + { + "description": "用户登录信息账号和密码", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RegisterAndLoginReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/logout": { + "post": { + "description": "用户退出登录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "退出登录", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/ping": { + "get": { + "description": "健康检测", + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "健康检测", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/refreshToken": { + "post": { + "description": "使用旧的 Token 获取新的 Token", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "刷新 Token", + "parameters": [ + { + "type": "string", + "description": "Bearer 旧的 Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/base/sendcode": { + "post": { + "description": "向指定邮箱发送验证码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "基础管理" + ], + "summary": "发送验证码", + "parameters": [ + { + "description": "发送验证码请求数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.BaseSendCodeReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加用户记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "添加用户记录", + "parameters": [ + { + "description": "添加用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UserAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/changePwd": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新密码", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "更新密码", + "parameters": [ + { + "description": "更改用户密码的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UserChangePwdReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/changeUserStatus": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更改用户状态", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "用户管理" + ], + "summary": "更改用户状态", + "parameters": [ + { + "description": "更改用户状态的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UserChangeUserStatusReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/user/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除用户记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "tags": [ "用户管理" ], - "summary": "用户通过邮箱修改密码", + "summary": "删除用户记录", "parameters": [ { - "description": "发送验证码请求数据", + "description": "删除用户记录的结构体ID", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.BaseChangePwdReq" + "$ref": "#/definitions/request.UserDeleteReq" } } ], @@ -48,9 +434,14 @@ } } }, - "/base/dashboard": { + "/user/info": { "get": { - "description": "获取系统仪表盘概览数据", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取当前登录用户信息", "consumes": [ "application/json" ], @@ -60,7 +451,7 @@ "tags": [ "用户管理" ], - "summary": "获取仪表盘数据", + "summary": "获取当前登录用户信息", "responses": { "200": { "description": "OK", @@ -71,9 +462,14 @@ } } }, - "/base/decryptpwd": { + "/user/list": { "get": { - "description": "将加密后的密码解密为明文", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取所有用户记录列表", "consumes": [ "application/json" ], @@ -83,16 +479,7 @@ "tags": [ "用户管理" ], - "summary": "密码解密", - "parameters": [ - { - "type": "string", - "description": "需要解密的加密密码", - "name": "passwd", - "in": "query", - "required": true - } - ], + "summary": "获取所有用户记录列表", "responses": { "200": { "description": "OK", @@ -103,9 +490,14 @@ } } }, - "/base/encryptpwd": { - "get": { - "description": "将明文密码加密", + "/user/syncDingTalkUsers": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步钉钉用户信息", "consumes": [ "application/json" ], @@ -115,14 +507,16 @@ "tags": [ "用户管理" ], - "summary": "密码加密", + "summary": "同步钉钉用户信息", "parameters": [ { - "type": "string", - "description": "需要加密的明文密码", - "name": "passwd", - "in": "query", - "required": true + "description": "同步钉钉用户信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncDingUserReq" + } } ], "responses": { @@ -135,9 +529,14 @@ } } }, - "/base/login": { + "/user/syncFeiShuUsers": { "post": { - "description": "用户登录", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步飞书用户信息", "consumes": [ "application/json" ], @@ -147,15 +546,15 @@ "tags": [ "用户管理" ], - "summary": "登录接口 (异常,缺少私钥)", + "summary": "同步飞书用户信息", "parameters": [ { - "description": "用户登录信息账号和密码", + "description": "同步飞书用户信息", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.RegisterAndLoginReq" + "$ref": "#/definitions/request.SyncFeiShuUserReq" } } ], @@ -169,9 +568,14 @@ } } }, - "/base/logout": { + "/user/syncOpenLdapUsers": { "post": { - "description": "用户退出登录", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步ldap用户信息", "consumes": [ "application/json" ], @@ -181,7 +585,18 @@ "tags": [ "用户管理" ], - "summary": "退出登录", + "summary": "同步ldap用户信息", + "parameters": [ + { + "description": "同步ldap用户信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncOpenLdapUserReq" + } + } + ], "responses": { "200": { "description": "OK", @@ -192,16 +607,35 @@ } } }, - "/base/ping": { - "get": { - "description": "健康检测", + "/user/syncSqlUsers": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步sql用户信息到ldap", + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "用户管理" ], - "summary": "健康检测", + "summary": "同步sql用户信息到ldap", + "parameters": [ + { + "description": "更改用户状态的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncSqlUserReq" + } + } + ], "responses": { "200": { "description": "OK", @@ -212,9 +646,14 @@ } } }, - "/base/refreshToken": { + "/user/syncWeComUsers": { "post": { - "description": "使用旧的 Token 获取新的 Token", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步企业微信用户信息", "consumes": [ "application/json" ], @@ -224,14 +663,16 @@ "tags": [ "用户管理" ], - "summary": "刷新 Token", + "summary": "同步企业微信用户信息", "parameters": [ { - "type": "string", - "description": "Bearer 旧的 Token", - "name": "Authorization", - "in": "header", - "required": true + "description": "同步企业微信用户信息", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.SyncWeComUserReq" + } } ], "responses": { @@ -244,9 +685,14 @@ } } }, - "/base/sendcode": { + "/user/update": { "post": { - "description": "向指定邮箱发送验证码", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加用户记录", "consumes": [ "application/json" ], @@ -256,15 +702,15 @@ "tags": [ "用户管理" ], - "summary": "发送验证码", + "summary": "更新用户记录", "parameters": [ { - "description": "发送验证码请求数据", + "description": "更改用户记录的结构体", "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.BaseSendCodeReq" + "$ref": "#/definitions/request.UserUpdateReq" } } ], @@ -325,6 +771,253 @@ } } }, + "request.SyncDingUserReq": { + "type": "object" + }, + "request.SyncFeiShuUserReq": { + "type": "object" + }, + "request.SyncOpenLdapUserReq": { + "type": "object" + }, + "request.SyncSqlUserReq": { + "type": "object", + "required": [ + "userIds" + ], + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.SyncWeComUserReq": { + "type": "object" + }, + "request.UserAddReq": { + "type": "object", + "required": [ + "departmentId", + "jobNumber", + "mail", + "mobile", + "nickname", + "roleIds", + "username" + ], + "properties": { + "avatar": { + "type": "string" + }, + "departmentId": { + "type": "array", + "items": { + "type": "integer" + } + }, + "departments": { + "type": "string", + "maxLength": 512, + "minLength": 0 + }, + "givenName": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "introduction": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "jobNumber": { + "type": "string", + "maxLength": 20, + "minLength": 0 + }, + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "mobile": { + "type": "string" + }, + "nickname": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "password": { + "type": "string" + }, + "position": { + "type": "string", + "maxLength": 128, + "minLength": 0 + }, + "postalAddress": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "source": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "username": { + "type": "string", + "maxLength": 50, + "minLength": 2 + } + } + }, + "request.UserChangePwdReq": { + "type": "object", + "required": [ + "newPassword", + "oldPassword" + ], + "properties": { + "newPassword": { + "type": "string" + }, + "oldPassword": { + "type": "string" + } + } + }, + "request.UserChangeUserStatusReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer" + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + } + } + }, + "request.UserDeleteReq": { + "type": "object", + "required": [ + "userIds" + ], + "properties": { + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.UserUpdateReq": { + "type": "object", + "required": [ + "departmentId", + "id", + "roleIds", + "username" + ], + "properties": { + "avatar": { + "type": "string" + }, + "departmentId": { + "type": "array", + "items": { + "type": "integer" + } + }, + "departments": { + "type": "string", + "maxLength": 512, + "minLength": 0 + }, + "givenName": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "id": { + "type": "integer" + }, + "introduction": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "jobNumber": { + "type": "string", + "maxLength": 20, + "minLength": 0 + }, + "mail": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "mobile": { + "type": "string" + }, + "nickname": { + "type": "string", + "maxLength": 20, + "minLength": 0 + }, + "position": { + "type": "string", + "maxLength": 128, + "minLength": 0 + }, + "postalAddress": { + "type": "string", + "maxLength": 255, + "minLength": 0 + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "source": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "username": { + "type": "string", + "maxLength": 50, + "minLength": 2 + } + } + }, "response.ResponseBody": { "type": "object", "properties": { @@ -337,5 +1030,12 @@ } } } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } } } \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 47a4426..1a43014 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -31,6 +31,186 @@ definitions: - password - username type: object + request.SyncDingUserReq: + type: object + request.SyncFeiShuUserReq: + type: object + request.SyncOpenLdapUserReq: + type: object + request.SyncSqlUserReq: + properties: + userIds: + items: + type: integer + type: array + required: + - userIds + type: object + request.SyncWeComUserReq: + type: object + request.UserAddReq: + properties: + avatar: + type: string + departmentId: + items: + type: integer + type: array + departments: + maxLength: 512 + minLength: 0 + type: string + givenName: + maxLength: 50 + minLength: 0 + type: string + introduction: + maxLength: 255 + minLength: 0 + type: string + jobNumber: + maxLength: 20 + minLength: 0 + type: string + mail: + maxLength: 100 + minLength: 0 + type: string + mobile: + type: string + nickname: + maxLength: 50 + minLength: 0 + type: string + password: + type: string + position: + maxLength: 128 + minLength: 0 + type: string + postalAddress: + maxLength: 255 + minLength: 0 + type: string + roleIds: + items: + type: integer + type: array + source: + maxLength: 50 + minLength: 0 + type: string + status: + enum: + - 1 + - 2 + type: integer + username: + maxLength: 50 + minLength: 2 + type: string + required: + - departmentId + - jobNumber + - mail + - mobile + - nickname + - roleIds + - username + type: object + request.UserChangePwdReq: + properties: + newPassword: + type: string + oldPassword: + type: string + required: + - newPassword + - oldPassword + type: object + request.UserChangeUserStatusReq: + properties: + id: + type: integer + status: + enum: + - 1 + - 2 + type: integer + required: + - id + type: object + request.UserDeleteReq: + properties: + userIds: + items: + type: integer + type: array + required: + - userIds + type: object + request.UserUpdateReq: + properties: + avatar: + type: string + departmentId: + items: + type: integer + type: array + departments: + maxLength: 512 + minLength: 0 + type: string + givenName: + maxLength: 50 + minLength: 0 + type: string + id: + type: integer + introduction: + maxLength: 255 + minLength: 0 + type: string + jobNumber: + maxLength: 20 + minLength: 0 + type: string + mail: + maxLength: 100 + minLength: 0 + type: string + mobile: + type: string + nickname: + maxLength: 20 + minLength: 0 + type: string + position: + maxLength: 128 + minLength: 0 + type: string + postalAddress: + maxLength: 255 + minLength: 0 + type: string + roleIds: + items: + type: integer + type: array + source: + maxLength: 50 + minLength: 0 + type: string + username: + maxLength: 50 + minLength: 2 + type: string + required: + - departmentId + - id + - roleIds + - username + type: object response.ResponseBody: properties: code: @@ -71,7 +251,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 用户通过邮箱修改密码 tags: - - 用户管理 + - 基础管理 /base/dashboard: get: consumes: @@ -86,7 +266,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 获取仪表盘数据 tags: - - 用户管理 + - 基础管理 /base/decryptpwd: get: consumes: @@ -107,7 +287,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 密码解密 tags: - - 用户管理 + - 基础管理 /base/encryptpwd: get: consumes: @@ -128,7 +308,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 密码加密 tags: - - 用户管理 + - 基础管理 /base/login: post: consumes: @@ -150,7 +330,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 登录接口 (异常,缺少私钥) tags: - - 用户管理 + - 基础管理 /base/logout: post: consumes: @@ -165,7 +345,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 退出登录 tags: - - 用户管理 + - 基础管理 /base/ping: get: description: 健康检测 @@ -178,7 +358,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 健康检测 tags: - - 用户管理 + - 基础管理 /base/refreshToken: post: consumes: @@ -199,7 +379,7 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 刷新 Token tags: - - 用户管理 + - 基础管理 /base/sendcode: post: consumes: @@ -221,5 +401,284 @@ paths: $ref: '#/definitions/response.ResponseBody' summary: 发送验证码 tags: + - 基础管理 + /user/add: + post: + consumes: + - application/json + description: 添加用户记录 + parameters: + - description: 添加用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.UserAddReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 添加用户记录 + tags: + - 用户管理 + /user/changePwd: + post: + consumes: + - application/json + description: 更新密码 + parameters: + - description: 更改用户密码的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.UserChangePwdReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更新密码 + tags: + - 用户管理 + /user/changeUserStatus: + post: + consumes: + - application/json + description: 更改用户状态 + parameters: + - description: 更改用户状态的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.UserChangeUserStatusReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更改用户状态 + tags: + - 用户管理 + /user/delete: + post: + consumes: + - application/json + description: 删除用户记录 + parameters: + - description: 删除用户记录的结构体ID + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.UserDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 删除用户记录 + tags: + - 用户管理 + /user/info: + get: + consumes: + - application/json + description: 获取当前登录用户信息 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取当前登录用户信息 + tags: + - 用户管理 + /user/list: + get: + consumes: + - application/json + description: 获取所有用户记录列表 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取所有用户记录列表 + tags: + - 用户管理 + /user/syncDingTalkUsers: + post: + consumes: + - application/json + description: 同步钉钉用户信息 + parameters: + - description: 同步钉钉用户信息 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.SyncDingUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步钉钉用户信息 + tags: + - 用户管理 + /user/syncFeiShuUsers: + post: + consumes: + - application/json + description: 同步飞书用户信息 + parameters: + - description: 同步飞书用户信息 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.SyncFeiShuUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步飞书用户信息 + tags: + - 用户管理 + /user/syncOpenLdapUsers: + post: + consumes: + - application/json + description: 同步ldap用户信息 + parameters: + - description: 同步ldap用户信息 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.SyncOpenLdapUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步ldap用户信息 + tags: + - 用户管理 + /user/syncSqlUsers: + post: + consumes: + - application/json + description: 同步sql用户信息到ldap + parameters: + - description: 更改用户状态的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.SyncSqlUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步sql用户信息到ldap + tags: + - 用户管理 + /user/syncWeComUsers: + post: + consumes: + - application/json + description: 同步企业微信用户信息 + parameters: + - description: 同步企业微信用户信息 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.SyncWeComUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步企业微信用户信息 + tags: + - 用户管理 + /user/update: + post: + consumes: + - application/json + description: 添加用户记录 + parameters: + - description: 更改用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.UserUpdateReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更新用户记录 + tags: - 用户管理 +securityDefinitions: + ApiKeyAuth: + in: header + name: Authorization + type: apiKey swagger: "2.0" diff --git a/main.go b/main.go index d34d3de..b6882d1 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,9 @@ import ( // @host 127.0.0.1:8888 // @BasePath /api +// @securityDefinitions.apikey ApiKeyAuth +// @in header +// @name Authorization func main() { // 加载配置文件到全局配置结构体 From b5e8e49a79b4cebd947eada595bf3c29a72bbe2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 11:42:16 +0800 Subject: [PATCH 14/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=88=86=E7=BB=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=8414=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/group_controller.go | 133 +++++++- docs/docs.go | 580 +++++++++++++++++++++++++++++++++ docs/swagger.json | 580 +++++++++++++++++++++++++++++++++ docs/swagger.yaml | 366 +++++++++++++++++++++ 4 files changed, 1653 insertions(+), 6 deletions(-) diff --git a/controller/group_controller.go b/controller/group_controller.go index d156172..e592409 100644 --- a/controller/group_controller.go +++ b/controller/group_controller.go @@ -10,6 +10,14 @@ import ( type GroupController struct{} // List 记录列表 +// @Summary 获取分组记录列表 +// @Description 获取分组记录列表 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/list [get] +// @Security ApiKeyAuth func (m *GroupController) List(c *gin.Context) { req := new(request.GroupListReq) Run(c, req, func() (interface{}, interface{}) { @@ -18,6 +26,16 @@ func (m *GroupController) List(c *gin.Context) { } // UserInGroup 在分组内的用户 +// @Summary 获取分组内用户 +// @Description 获取分组内用户 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param groupId query int true "分组ID" +// @Param nickname query string false "昵称" +// @Success 200 {object} response.ResponseBody +// @Router /group/useringroup [get] +// @Security ApiKeyAuth func (m *GroupController) UserInGroup(c *gin.Context) { req := new(request.UserInGroupReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +44,16 @@ func (m *GroupController) UserInGroup(c *gin.Context) { } // UserNoInGroup 不在分组的用户 +// @Summary 不在分组的用户 +// @Description 不在分组的用户 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param groupId query int true "分组ID" +// @Param nickname query string false "昵称" +// @Success 200 {object} response.ResponseBody +// @Router /group/usernoingroup [get] +// @Security ApiKeyAuth func (m *GroupController) UserNoInGroup(c *gin.Context) { req := new(request.UserNoInGroupReq) Run(c, req, func() (interface{}, interface{}) { @@ -34,6 +62,14 @@ func (m *GroupController) UserNoInGroup(c *gin.Context) { } // GetTree 接口树 +// @Summary 获取分组接口树 +// @Description 获取分组接口树 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/tree [get] +// @Security ApiKeyAuth func (m *GroupController) GetTree(c *gin.Context) { req := new(request.GroupListReq) Run(c, req, func() (interface{}, interface{}) { @@ -41,7 +77,16 @@ func (m *GroupController) GetTree(c *gin.Context) { }) } -// Add 新建记录 +// Add 新建分组记录 +// @Summary 添加分组记录 +// @Description 添加分组记录 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.GroupAddReq true "添加用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /group/add [post] +// @Security ApiKeyAuth func (m *GroupController) Add(c *gin.Context) { req := new(request.GroupAddReq) Run(c, req, func() (interface{}, interface{}) { @@ -50,6 +95,15 @@ func (m *GroupController) Add(c *gin.Context) { } // Update 更新记录 +// @Summary 更新分组记录 +// @Description 更新分组记录 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.GroupUpdateReq true "更新用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /group/update [post] +// @Security ApiKeyAuth func (m *GroupController) Update(c *gin.Context) { req := new(request.GroupUpdateReq) Run(c, req, func() (interface{}, interface{}) { @@ -58,6 +112,15 @@ func (m *GroupController) Update(c *gin.Context) { } // Delete 删除记录 +// @Summary 删除分组记录 +// @Description 删除分组记录 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.GroupDeleteReq true "删除用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /group/delete [post] +// @Security ApiKeyAuth func (m *GroupController) Delete(c *gin.Context) { req := new(request.GroupDeleteReq) Run(c, req, func() (interface{}, interface{}) { @@ -66,6 +129,15 @@ func (m *GroupController) Delete(c *gin.Context) { } // AddUser 添加用户 +// @Summary 添加用户 +// @Description 添加用户 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.GroupAddUserReq true "添加用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /group/adduser [post] +// @Security ApiKeyAuth func (m *GroupController) AddUser(c *gin.Context) { req := new(request.GroupAddUserReq) Run(c, req, func() (interface{}, interface{}) { @@ -74,6 +146,15 @@ func (m *GroupController) AddUser(c *gin.Context) { } // RemoveUser 移除用户 +// @Summary 移除用户 +// @Description 移除用户 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.GroupRemoveUserReq true "移除用户记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /group/removeuser [post] +// @Security ApiKeyAuth func (m *GroupController) RemoveUser(c *gin.Context) { req := new(request.GroupRemoveUserReq) Run(c, req, func() (interface{}, interface{}) { @@ -81,7 +162,15 @@ func (m *GroupController) RemoveUser(c *gin.Context) { }) } -//同步钉钉部门信息 +// SyncDingTalkDepts 同步钉钉部门信息 +// @Summary 同步钉钉部门信息 +// @Description 同步钉钉部门信息 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/syncDingTalkDepts [post] +// @Security ApiKeyAuth func (m *GroupController) SyncDingTalkDepts(c *gin.Context) { req := new(request.SyncDingTalkDeptsReq) Run(c, req, func() (interface{}, interface{}) { @@ -89,7 +178,15 @@ func (m *GroupController) SyncDingTalkDepts(c *gin.Context) { }) } -//同步企业微信部门信息 +// SyncWeComDepts 同步企业微信部门信息 +// @Summary 同步企业微信部门信息 +// @Description 同步企业微信部门信息 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/syncWeComDepts [post] +// @Security ApiKeyAuth func (m *GroupController) SyncWeComDepts(c *gin.Context) { req := new(request.SyncWeComDeptsReq) Run(c, req, func() (interface{}, interface{}) { @@ -97,7 +194,15 @@ func (m *GroupController) SyncWeComDepts(c *gin.Context) { }) } -//同步飞书部门信息 +// SyncFeiShuDepts 同步飞书部门信息 +// @Summary 同步飞书部门信息 +// @Description 同步飞书部门信息 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/syncFeiShuDepts [post] +// @Security ApiKeyAuth func (m *GroupController) SyncFeiShuDepts(c *gin.Context) { req := new(request.SyncFeiShuDeptsReq) Run(c, req, func() (interface{}, interface{}) { @@ -105,7 +210,15 @@ func (m *GroupController) SyncFeiShuDepts(c *gin.Context) { }) } -//同步原ldap部门信息 +// SyncOpenLdapDepts 同步原ldap部门信息 +// @Summary 同步原ldap部门信息 +// @Description 同步原ldap部门信息 +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/syncOpenLdapDepts [post] +// @Security ApiKeyAuth func (m *GroupController) SyncOpenLdapDepts(c *gin.Context) { req := new(request.SyncOpenLdapDeptsReq) Run(c, req, func() (interface{}, interface{}) { @@ -113,7 +226,15 @@ func (m *GroupController) SyncOpenLdapDepts(c *gin.Context) { }) } -//同步Sql中的分组信息到ldap +// SyncSqlGroups 同步Sql中的分组信息到ldap +// @Summary 同步Sql中的分组信息到ldap +// @Description 同步Sql中的分组信息到ldap +// @Tags 分组管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /group/syncSqlGroups [post] +// @Security ApiKeyAuth func (m *GroupController) SyncSqlGroups(c *gin.Context) { req := new(request.SyncSqlGrooupsReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index f4b4ad2..6d1a435 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -284,6 +284,483 @@ const docTemplate = `{ } } }, + "/group/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加分组记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "添加分组记录", + "parameters": [ + { + "description": "添加用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/adduser": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "添加用户", + "parameters": [ + { + "description": "添加用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupAddUserReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除分组记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "删除分组记录", + "parameters": [ + { + "description": "删除用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取分组记录列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "获取分组记录列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/removeuser": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "移除用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "移除用户", + "parameters": [ + { + "description": "移除用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupRemoveUserReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncDingTalkDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步钉钉部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步钉钉部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncFeiShuDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步飞书部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步飞书部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncOpenLdapDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步原ldap部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步原ldap部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncSqlGroups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步Sql中的分组信息到ldap", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步Sql中的分组信息到ldap", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncWeComDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步企业微信部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步企业微信部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取分组接口树", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "获取分组接口树", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新分组记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "更新分组记录", + "parameters": [ + { + "description": "更新用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/useringroup": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取分组内用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "获取分组内用户", + "parameters": [ + { + "type": "integer", + "description": "分组ID", + "name": "groupId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "昵称", + "name": "nickname", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/usernoingroup": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "不在分组的用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "不在分组的用户", + "parameters": [ + { + "type": "integer", + "description": "分组ID", + "name": "groupId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "昵称", + "name": "nickname", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/user/add": { "post": { "security": [ @@ -762,6 +1239,109 @@ const docTemplate = `{ } } }, + "request.GroupAddReq": { + "type": "object", + "required": [ + "groupName", + "groupType" + ], + "properties": { + "groupName": { + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + "groupType": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "parentId": { + "description": "父级Id 大于等于0 必填", + "type": "integer", + "minimum": 0 + }, + "remark": { + "description": "分组的中文描述", + "type": "string", + "maxLength": 128, + "minLength": 0 + } + } + }, + "request.GroupAddUserReq": { + "type": "object", + "required": [ + "groupId", + "userIds" + ], + "properties": { + "groupId": { + "type": "integer" + }, + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.GroupDeleteReq": { + "type": "object", + "required": [ + "groupIds" + ], + "properties": { + "groupIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.GroupRemoveUserReq": { + "type": "object", + "required": [ + "groupId", + "userIds" + ], + "properties": { + "groupId": { + "type": "integer" + }, + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.GroupUpdateReq": { + "type": "object", + "required": [ + "groupName", + "id" + ], + "properties": { + "groupName": { + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + "id": { + "type": "integer" + }, + "remark": { + "description": "分组的中文描述", + "type": "string", + "maxLength": 128, + "minLength": 0 + } + } + }, "request.RegisterAndLoginReq": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index d3af3bb..0a87758 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -278,6 +278,483 @@ } } }, + "/group/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加分组记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "添加分组记录", + "parameters": [ + { + "description": "添加用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/adduser": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "添加用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "添加用户", + "parameters": [ + { + "description": "添加用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupAddUserReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除分组记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "删除分组记录", + "parameters": [ + { + "description": "删除用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取分组记录列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "获取分组记录列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/removeuser": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "移除用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "移除用户", + "parameters": [ + { + "description": "移除用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupRemoveUserReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncDingTalkDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步钉钉部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步钉钉部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncFeiShuDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步飞书部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步飞书部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncOpenLdapDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步原ldap部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步原ldap部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncSqlGroups": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步Sql中的分组信息到ldap", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步Sql中的分组信息到ldap", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/syncWeComDepts": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "同步企业微信部门信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "同步企业微信部门信息", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取分组接口树", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "获取分组接口树", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新分组记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "更新分组记录", + "parameters": [ + { + "description": "更新用户记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.GroupUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/useringroup": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取分组内用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "获取分组内用户", + "parameters": [ + { + "type": "integer", + "description": "分组ID", + "name": "groupId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "昵称", + "name": "nickname", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/group/usernoingroup": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "不在分组的用户", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "分组管理" + ], + "summary": "不在分组的用户", + "parameters": [ + { + "type": "integer", + "description": "分组ID", + "name": "groupId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "昵称", + "name": "nickname", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/user/add": { "post": { "security": [ @@ -756,6 +1233,109 @@ } } }, + "request.GroupAddReq": { + "type": "object", + "required": [ + "groupName", + "groupType" + ], + "properties": { + "groupName": { + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + "groupType": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "parentId": { + "description": "父级Id 大于等于0 必填", + "type": "integer", + "minimum": 0 + }, + "remark": { + "description": "分组的中文描述", + "type": "string", + "maxLength": 128, + "minLength": 0 + } + } + }, + "request.GroupAddUserReq": { + "type": "object", + "required": [ + "groupId", + "userIds" + ], + "properties": { + "groupId": { + "type": "integer" + }, + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.GroupDeleteReq": { + "type": "object", + "required": [ + "groupIds" + ], + "properties": { + "groupIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.GroupRemoveUserReq": { + "type": "object", + "required": [ + "groupId", + "userIds" + ], + "properties": { + "groupId": { + "type": "integer" + }, + "userIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.GroupUpdateReq": { + "type": "object", + "required": [ + "groupName", + "id" + ], + "properties": { + "groupName": { + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + "id": { + "type": "integer" + }, + "remark": { + "description": "分组的中文描述", + "type": "string", + "maxLength": 128, + "minLength": 0 + } + } + }, "request.RegisterAndLoginReq": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 1a43014..262758e 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -21,6 +21,79 @@ definitions: required: - mail type: object + request.GroupAddReq: + properties: + groupName: + maxLength: 128 + minLength: 1 + type: string + groupType: + maxLength: 20 + minLength: 1 + type: string + parentId: + description: 父级Id 大于等于0 必填 + minimum: 0 + type: integer + remark: + description: 分组的中文描述 + maxLength: 128 + minLength: 0 + type: string + required: + - groupName + - groupType + type: object + request.GroupAddUserReq: + properties: + groupId: + type: integer + userIds: + items: + type: integer + type: array + required: + - groupId + - userIds + type: object + request.GroupDeleteReq: + properties: + groupIds: + items: + type: integer + type: array + required: + - groupIds + type: object + request.GroupRemoveUserReq: + properties: + groupId: + type: integer + userIds: + items: + type: integer + type: array + required: + - groupId + - userIds + type: object + request.GroupUpdateReq: + properties: + groupName: + maxLength: 128 + minLength: 1 + type: string + id: + type: integer + remark: + description: 分组的中文描述 + maxLength: 128 + minLength: 0 + type: string + required: + - groupName + - id + type: object request.RegisterAndLoginReq: properties: password: @@ -402,6 +475,299 @@ paths: summary: 发送验证码 tags: - 基础管理 + /group/add: + post: + consumes: + - application/json + description: 添加分组记录 + parameters: + - description: 添加用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.GroupAddReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 添加分组记录 + tags: + - 分组管理 + /group/adduser: + post: + consumes: + - application/json + description: 添加用户 + parameters: + - description: 添加用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.GroupAddUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 添加用户 + tags: + - 分组管理 + /group/delete: + post: + consumes: + - application/json + description: 删除分组记录 + parameters: + - description: 删除用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.GroupDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 删除分组记录 + tags: + - 分组管理 + /group/list: + get: + consumes: + - application/json + description: 获取分组记录列表 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取分组记录列表 + tags: + - 分组管理 + /group/removeuser: + post: + consumes: + - application/json + description: 移除用户 + parameters: + - description: 移除用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.GroupRemoveUserReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 移除用户 + tags: + - 分组管理 + /group/syncDingTalkDepts: + post: + consumes: + - application/json + description: 同步钉钉部门信息 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步钉钉部门信息 + tags: + - 分组管理 + /group/syncFeiShuDepts: + post: + consumes: + - application/json + description: 同步飞书部门信息 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步飞书部门信息 + tags: + - 分组管理 + /group/syncOpenLdapDepts: + post: + consumes: + - application/json + description: 同步原ldap部门信息 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步原ldap部门信息 + tags: + - 分组管理 + /group/syncSqlGroups: + post: + consumes: + - application/json + description: 同步Sql中的分组信息到ldap + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步Sql中的分组信息到ldap + tags: + - 分组管理 + /group/syncWeComDepts: + post: + consumes: + - application/json + description: 同步企业微信部门信息 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 同步企业微信部门信息 + tags: + - 分组管理 + /group/tree: + get: + consumes: + - application/json + description: 获取分组接口树 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取分组接口树 + tags: + - 分组管理 + /group/update: + post: + consumes: + - application/json + description: 更新分组记录 + parameters: + - description: 更新用户记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.GroupUpdateReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更新分组记录 + tags: + - 分组管理 + /group/useringroup: + get: + consumes: + - application/json + description: 获取分组内用户 + parameters: + - description: 分组ID + in: query + name: groupId + required: true + type: integer + - description: 昵称 + in: query + name: nickname + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取分组内用户 + tags: + - 分组管理 + /group/usernoingroup: + get: + consumes: + - application/json + description: 不在分组的用户 + parameters: + - description: 分组ID + in: query + name: groupId + required: true + type: integer + - description: 昵称 + in: query + name: nickname + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 不在分组的用户 + tags: + - 分组管理 /user/add: post: consumes: From c2b760f703328ec3c27500fe87d94a02e499b740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 12:06:08 +0800 Subject: [PATCH 15/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=848=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/role_controller.go | 73 +++++- docs/docs.go | 423 ++++++++++++++++++++++++++++++++++ docs/swagger.json | 423 ++++++++++++++++++++++++++++++++++ docs/swagger.yaml | 273 ++++++++++++++++++++++ 4 files changed, 1191 insertions(+), 1 deletion(-) diff --git a/controller/role_controller.go b/controller/role_controller.go index 2e693a9..5b60397 100644 --- a/controller/role_controller.go +++ b/controller/role_controller.go @@ -9,7 +9,15 @@ import ( type RoleController struct{} -// List 记录列表 +// List 角色记录列表 +// @Summary 获取角色记录列表 +// @Description 获取角色记录列表 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /role/list [get] +// @Security ApiKeyAuth func (m *RoleController) List(c *gin.Context) { req := new(request.RoleListReq) Run(c, req, func() (interface{}, interface{}) { @@ -18,6 +26,15 @@ func (m *RoleController) List(c *gin.Context) { } // Add 新建 +// @Summary 新建角色记录 +// @Description 新建角色记录 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.RoleAddReq true "添加角色记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /role/add [post] +// @Security ApiKeyAuth func (m *RoleController) Add(c *gin.Context) { req := new(request.RoleAddReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +43,15 @@ func (m *RoleController) Add(c *gin.Context) { } // Update 更新记录 +// @Summary 更新角色记录 +// @Description 更新角色记录 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.RoleUpdateReq true "更新角色记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /role/update [post] +// @Security ApiKeyAuth func (m *RoleController) Update(c *gin.Context) { req := new(request.RoleUpdateReq) Run(c, req, func() (interface{}, interface{}) { @@ -34,6 +60,15 @@ func (m *RoleController) Update(c *gin.Context) { } // Delete 删除记录 +// @Summary 删除角色记录 +// @Description 删除角色记录 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.RoleDeleteReq true "删除角色记录的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /role/delete [post] +// @Security ApiKeyAuth func (m *RoleController) Delete(c *gin.Context) { req := new(request.RoleDeleteReq) Run(c, req, func() (interface{}, interface{}) { @@ -42,6 +77,15 @@ func (m *RoleController) Delete(c *gin.Context) { } // GetMenuList 获取菜单列表 +// @Summary 获取菜单列表 +// @Description 获取菜单列表 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param roleId query int true "角色ID" +// @Success 200 {object} response.ResponseBody +// @Router /role/getmenulist [get] +// @Security ApiKeyAuth func (m *RoleController) GetMenuList(c *gin.Context) { req := new(request.RoleGetMenuListReq) Run(c, req, func() (interface{}, interface{}) { @@ -50,6 +94,15 @@ func (m *RoleController) GetMenuList(c *gin.Context) { } // GetApiList 获取接口列表 +// @Summary 获取接口列表 +// @Description 获取接口列表 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param roleId query int true "角色ID" +// @Success 200 {object} response.ResponseBody +// @Router /role/getapilist [get] +// @Security ApiKeyAuth func (m *RoleController) GetApiList(c *gin.Context) { req := new(request.RoleGetApiListReq) Run(c, req, func() (interface{}, interface{}) { @@ -58,6 +111,15 @@ func (m *RoleController) GetApiList(c *gin.Context) { } // UpdateMenus 更新菜单 +// @Summary 更新菜单 +// @Description 更新菜单 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.RoleUpdateMenusReq true "更新菜单的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /role/updatemenus [post] +// @Security ApiKeyAuth func (m *RoleController) UpdateMenus(c *gin.Context) { req := new(request.RoleUpdateMenusReq) Run(c, req, func() (interface{}, interface{}) { @@ -66,6 +128,15 @@ func (m *RoleController) UpdateMenus(c *gin.Context) { } // UpdateApis 更新接口 +// @Summary 更新接口 +// @Description 更新接口 +// @Tags 角色管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.RoleUpdateApisReq true "更新接口的结构体" +// @Success 200 {object} response.ResponseBody +// @Router /role/updateapis [post] +// @Security ApiKeyAuth func (m *RoleController) UpdateApis(c *gin.Context) { req := new(request.RoleUpdateApisReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index 6d1a435..1a4eb6d 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -761,6 +761,303 @@ const docTemplate = `{ } } }, + "/role/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "新建角色记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "新建角色记录", + "parameters": [ + { + "description": "添加角色记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除角色记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "删除角色记录", + "parameters": [ + { + "description": "删除角色记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/getapilist": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取接口列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "获取接口列表", + "parameters": [ + { + "type": "integer", + "description": "角色ID", + "name": "roleId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/getmenulist": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取菜单列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "获取菜单列表", + "parameters": [ + { + "type": "integer", + "description": "角色ID", + "name": "roleId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取角色记录列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "获取角色记录列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新角色记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "更新角色记录", + "parameters": [ + { + "description": "更新角色记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/updateapis": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "更新接口", + "parameters": [ + { + "description": "更新接口的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleUpdateApisReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/updatemenus": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新菜单", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "更新菜单", + "parameters": [ + { + "description": "更新菜单的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleUpdateMenusReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/user/add": { "post": { "security": [ @@ -1357,6 +1654,132 @@ const docTemplate = `{ } } }, + "request.RoleAddReq": { + "type": "object", + "required": [ + "keyword", + "name" + ], + "properties": { + "keyword": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "name": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + } + } + }, + "request.RoleDeleteReq": { + "type": "object", + "required": [ + "roleIds" + ], + "properties": { + "roleIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.RoleUpdateApisReq": { + "type": "object", + "required": [ + "apiIds", + "roleId" + ], + "properties": { + "apiIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "roleId": { + "type": "integer" + } + } + }, + "request.RoleUpdateMenusReq": { + "type": "object", + "required": [ + "menuIds", + "roleId" + ], + "properties": { + "menuIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "roleId": { + "type": "integer" + } + } + }, + "request.RoleUpdateReq": { + "type": "object", + "required": [ + "id", + "keyword", + "name" + ], + "properties": { + "id": { + "type": "integer" + }, + "keyword": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "name": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + } + } + }, "request.SyncDingUserReq": { "type": "object" }, diff --git a/docs/swagger.json b/docs/swagger.json index 0a87758..d3e657b 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -755,6 +755,303 @@ } } }, + "/role/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "新建角色记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "新建角色记录", + "parameters": [ + { + "description": "添加角色记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "删除角色记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "删除角色记录", + "parameters": [ + { + "description": "删除角色记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/getapilist": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取接口列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "获取接口列表", + "parameters": [ + { + "type": "integer", + "description": "角色ID", + "name": "roleId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/getmenulist": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取菜单列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "获取菜单列表", + "parameters": [ + { + "type": "integer", + "description": "角色ID", + "name": "roleId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "获取角色记录列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "获取角色记录列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新角色记录", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "更新角色记录", + "parameters": [ + { + "description": "更新角色记录的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/updateapis": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新接口", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "更新接口", + "parameters": [ + { + "description": "更新接口的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleUpdateApisReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/role/updatemenus": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "更新菜单", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "角色管理" + ], + "summary": "更新菜单", + "parameters": [ + { + "description": "更新菜单的结构体", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.RoleUpdateMenusReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/user/add": { "post": { "security": [ @@ -1351,6 +1648,132 @@ } } }, + "request.RoleAddReq": { + "type": "object", + "required": [ + "keyword", + "name" + ], + "properties": { + "keyword": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "name": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + } + } + }, + "request.RoleDeleteReq": { + "type": "object", + "required": [ + "roleIds" + ], + "properties": { + "roleIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.RoleUpdateApisReq": { + "type": "object", + "required": [ + "apiIds", + "roleId" + ], + "properties": { + "apiIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "roleId": { + "type": "integer" + } + } + }, + "request.RoleUpdateMenusReq": { + "type": "object", + "required": [ + "menuIds", + "roleId" + ], + "properties": { + "menuIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "roleId": { + "type": "integer" + } + } + }, + "request.RoleUpdateReq": { + "type": "object", + "required": [ + "id", + "keyword", + "name" + ], + "properties": { + "id": { + "type": "integer" + }, + "keyword": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "name": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + } + } + }, "request.SyncDingUserReq": { "type": "object" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 262758e..9b6c5c2 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -104,6 +104,96 @@ definitions: - password - username type: object + request.RoleAddReq: + properties: + keyword: + maxLength: 20 + minLength: 1 + type: string + name: + maxLength: 20 + minLength: 1 + type: string + remark: + maxLength: 100 + minLength: 0 + type: string + sort: + maximum: 999 + minimum: 1 + type: integer + status: + enum: + - 1 + - 2 + type: integer + required: + - keyword + - name + type: object + request.RoleDeleteReq: + properties: + roleIds: + items: + type: integer + type: array + required: + - roleIds + type: object + request.RoleUpdateApisReq: + properties: + apiIds: + items: + type: integer + type: array + roleId: + type: integer + required: + - apiIds + - roleId + type: object + request.RoleUpdateMenusReq: + properties: + menuIds: + items: + type: integer + type: array + roleId: + type: integer + required: + - menuIds + - roleId + type: object + request.RoleUpdateReq: + properties: + id: + type: integer + keyword: + maxLength: 20 + minLength: 1 + type: string + name: + maxLength: 20 + minLength: 1 + type: string + remark: + maxLength: 100 + minLength: 0 + type: string + sort: + maximum: 999 + minimum: 1 + type: integer + status: + enum: + - 1 + - 2 + type: integer + required: + - id + - keyword + - name + type: object request.SyncDingUserReq: type: object request.SyncFeiShuUserReq: @@ -768,6 +858,189 @@ paths: summary: 不在分组的用户 tags: - 分组管理 + /role/add: + post: + consumes: + - application/json + description: 新建角色记录 + parameters: + - description: 添加角色记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.RoleAddReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 新建角色记录 + tags: + - 角色管理 + /role/delete: + post: + consumes: + - application/json + description: 删除角色记录 + parameters: + - description: 删除角色记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.RoleDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 删除角色记录 + tags: + - 角色管理 + /role/getapilist: + get: + consumes: + - application/json + description: 获取接口列表 + parameters: + - description: 角色ID + in: query + name: roleId + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取接口列表 + tags: + - 角色管理 + /role/getmenulist: + get: + consumes: + - application/json + description: 获取菜单列表 + parameters: + - description: 角色ID + in: query + name: roleId + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取菜单列表 + tags: + - 角色管理 + /role/list: + get: + consumes: + - application/json + description: 获取角色记录列表 + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 获取角色记录列表 + tags: + - 角色管理 + /role/update: + post: + consumes: + - application/json + description: 更新角色记录 + parameters: + - description: 更新角色记录的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.RoleUpdateReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更新角色记录 + tags: + - 角色管理 + /role/updateapis: + post: + consumes: + - application/json + description: 更新接口 + parameters: + - description: 更新接口的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.RoleUpdateApisReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更新接口 + tags: + - 角色管理 + /role/updatemenus: + post: + consumes: + - application/json + description: 更新菜单 + parameters: + - description: 更新菜单的结构体 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.RoleUpdateMenusReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [] + summary: 更新菜单 + tags: + - 角色管理 /user/add: post: consumes: From 70ec4c5fa8e2d3db9cf6819494df0dc9df3943ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 13:48:47 +0800 Subject: [PATCH 16/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=845=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/menu_controller.go | 41 +++- docs/docs.go | 373 ++++++++++++++++++++++++++++++++++ docs/swagger.json | 373 ++++++++++++++++++++++++++++++++++ docs/swagger.yaml | 253 +++++++++++++++++++++++ 4 files changed, 1039 insertions(+), 1 deletion(-) diff --git a/controller/menu_controller.go b/controller/menu_controller.go index 5e68a10..1ade699 100644 --- a/controller/menu_controller.go +++ b/controller/menu_controller.go @@ -10,6 +10,13 @@ import ( type MenuController struct{} // GetTree 菜单树 +// @Summary 获取菜单树 +// @Tags 菜单管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /menu/tree [get] +// @Security ApiKeyAuth func (m *MenuController) GetTree(c *gin.Context) { req := new(request.MenuGetTreeReq) Run(c, req, func() (interface{}, interface{}) { @@ -17,7 +24,15 @@ func (m *MenuController) GetTree(c *gin.Context) { }) } -// GetUserMenuTreeByUserId 获取用户菜单树 +// GetAccessTree GetUserMenuTreeByUserId 获取用户菜单树 +// @Summary 获取用户菜单树 +// @Tags 菜单管理 +// @Accept application/json +// @Produce application/json +// @Param id query int true "分组ID" +// @Success 200 {object} response.ResponseBody +// @Router /menu/access/tree [get] +// @Security ApiKeyAuth func (m *MenuController) GetAccessTree(c *gin.Context) { req := new(request.MenuGetAccessTreeReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +41,14 @@ func (m *MenuController) GetAccessTree(c *gin.Context) { } // Add 新建 +// @Summary 新建菜单 +// @Tags 菜单管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.MenuAddReq true "新建菜单" +// @Success 200 {object} response.ResponseBody +// @Router /menu/add [post] +// @Security ApiKeyAuth func (m *MenuController) Add(c *gin.Context) { req := new(request.MenuAddReq) Run(c, req, func() (interface{}, interface{}) { @@ -34,6 +57,14 @@ func (m *MenuController) Add(c *gin.Context) { } // Update 更新记录 +// @Summary 更新菜单 +// @Tags 菜单管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.MenuUpdateReq true "更新菜单" +// @Success 200 {object} response.ResponseBody +// @Router /menu/update [post] +// @Security ApiKeyAuth func (m *MenuController) Update(c *gin.Context) { req := new(request.MenuUpdateReq) Run(c, req, func() (interface{}, interface{}) { @@ -42,6 +73,14 @@ func (m *MenuController) Update(c *gin.Context) { } // Delete 删除记录 +// @Summary 删除菜单 +// @Tags 菜单管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.MenuDeleteReq true "删除菜单" +// @Success 200 {object} response.ResponseBody +// @Router /menu/delete [post] +// @Security ApiKeyAuth func (m *MenuController) Delete(c *gin.Context) { req := new(request.MenuDeleteReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index 1a4eb6d..45bc688 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -761,6 +761,183 @@ const docTemplate = `{ } } }, + "/menu/access/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "获取用户菜单树", + "parameters": [ + { + "type": "integer", + "description": "分组ID", + "name": "id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "新建菜单", + "parameters": [ + { + "description": "新建菜单", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.MenuAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "删除菜单", + "parameters": [ + { + "description": "删除菜单", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.MenuDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "获取菜单树", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "更新菜单", + "parameters": [ + { + "description": "更新菜单", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.MenuUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/role/add": { "post": { "security": [ @@ -1639,6 +1816,202 @@ const docTemplate = `{ } } }, + "request.MenuAddReq": { + "type": "object", + "required": [ + "component", + "name", + "path", + "title" + ], + "properties": { + "activeMenu": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "alwaysShow": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "breadcrumb": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "component": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "hidden": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "icon": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "noCache": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "parentId": { + "type": "integer" + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "redirect": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "title": { + "type": "string", + "maxLength": 50, + "minLength": 1 + } + } + }, + "request.MenuDeleteReq": { + "type": "object", + "required": [ + "menuIds" + ], + "properties": { + "menuIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.MenuUpdateReq": { + "type": "object", + "required": [ + "id", + "name", + "path", + "title" + ], + "properties": { + "activeMenu": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "alwaysShow": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "breadcrumb": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "component": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "hidden": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "icon": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "noCache": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "parentId": { + "type": "integer", + "minimum": 0 + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "redirect": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "title": { + "type": "string", + "maxLength": 50, + "minLength": 1 + } + } + }, "request.RegisterAndLoginReq": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index d3e657b..9b8c4b6 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -755,6 +755,183 @@ } } }, + "/menu/access/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "获取用户菜单树", + "parameters": [ + { + "type": "integer", + "description": "分组ID", + "name": "id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "新建菜单", + "parameters": [ + { + "description": "新建菜单", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.MenuAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "删除菜单", + "parameters": [ + { + "description": "删除菜单", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.MenuDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "获取菜单树", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/menu/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "菜单管理" + ], + "summary": "更新菜单", + "parameters": [ + { + "description": "更新菜单", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.MenuUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/role/add": { "post": { "security": [ @@ -1633,6 +1810,202 @@ } } }, + "request.MenuAddReq": { + "type": "object", + "required": [ + "component", + "name", + "path", + "title" + ], + "properties": { + "activeMenu": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "alwaysShow": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "breadcrumb": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "component": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "hidden": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "icon": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "noCache": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "parentId": { + "type": "integer" + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "redirect": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "title": { + "type": "string", + "maxLength": 50, + "minLength": 1 + } + } + }, + "request.MenuDeleteReq": { + "type": "object", + "required": [ + "menuIds" + ], + "properties": { + "menuIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.MenuUpdateReq": { + "type": "object", + "required": [ + "id", + "name", + "path", + "title" + ], + "properties": { + "activeMenu": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "alwaysShow": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "breadcrumb": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "component": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "hidden": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "icon": { + "type": "string", + "maxLength": 50, + "minLength": 0 + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "noCache": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "parentId": { + "type": "integer", + "minimum": 0 + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "redirect": { + "type": "string", + "maxLength": 100, + "minLength": 0 + }, + "sort": { + "type": "integer", + "maximum": 999, + "minimum": 1 + }, + "status": { + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "title": { + "type": "string", + "maxLength": 50, + "minLength": 1 + } + } + }, "request.RegisterAndLoginReq": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 9b6c5c2..28a903b 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -94,6 +94,152 @@ definitions: - groupName - id type: object + request.MenuAddReq: + properties: + activeMenu: + maxLength: 100 + minLength: 0 + type: string + alwaysShow: + enum: + - 1 + - 2 + type: integer + breadcrumb: + enum: + - 1 + - 2 + type: integer + component: + maxLength: 100 + minLength: 1 + type: string + hidden: + enum: + - 1 + - 2 + type: integer + icon: + maxLength: 50 + minLength: 0 + type: string + name: + maxLength: 50 + minLength: 1 + type: string + noCache: + enum: + - 1 + - 2 + type: integer + parentId: + type: integer + path: + maxLength: 100 + minLength: 1 + type: string + redirect: + maxLength: 100 + minLength: 0 + type: string + sort: + maximum: 999 + minimum: 1 + type: integer + status: + enum: + - 1 + - 2 + type: integer + title: + maxLength: 50 + minLength: 1 + type: string + required: + - component + - name + - path + - title + type: object + request.MenuDeleteReq: + properties: + menuIds: + items: + type: integer + type: array + required: + - menuIds + type: object + request.MenuUpdateReq: + properties: + activeMenu: + maxLength: 100 + minLength: 0 + type: string + alwaysShow: + enum: + - 1 + - 2 + type: integer + breadcrumb: + enum: + - 1 + - 2 + type: integer + component: + maxLength: 100 + minLength: 0 + type: string + hidden: + enum: + - 1 + - 2 + type: integer + icon: + maxLength: 50 + minLength: 0 + type: string + id: + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + noCache: + enum: + - 1 + - 2 + type: integer + parentId: + minimum: 0 + type: integer + path: + maxLength: 100 + minLength: 1 + type: string + redirect: + maxLength: 100 + minLength: 0 + type: string + sort: + maximum: 999 + minimum: 1 + type: integer + status: + enum: + - 1 + - 2 + type: integer + title: + maxLength: 50 + minLength: 1 + type: string + required: + - id + - name + - path + - title + type: object request.RegisterAndLoginReq: properties: password: @@ -858,6 +1004,113 @@ paths: summary: 不在分组的用户 tags: - 分组管理 + /menu/access/tree: + get: + consumes: + - application/json + parameters: + - description: 分组ID + in: query + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 获取用户菜单树 + tags: + - 菜单管理 + /menu/add: + post: + consumes: + - application/json + parameters: + - description: 新建菜单 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.MenuAddReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 新建菜单 + tags: + - 菜单管理 + /menu/delete: + post: + consumes: + - application/json + parameters: + - description: 删除菜单 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.MenuDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 删除菜单 + tags: + - 菜单管理 + /menu/tree: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 获取菜单树 + tags: + - 菜单管理 + /menu/update: + post: + consumes: + - application/json + parameters: + - description: 更新菜单 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.MenuUpdateReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 更新菜单 + tags: + - 菜单管理 /role/add: post: consumes: From 2fcdb56dd1befe5cfd7147ae81e22c3033bee0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 14:07:57 +0800 Subject: [PATCH 17/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=845=E4=B8=AA=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/api_controller.go | 43 +++++++ docs/docs.go | 243 +++++++++++++++++++++++++++++++++++ docs/swagger.json | 243 +++++++++++++++++++++++++++++++++++ docs/swagger.yaml | 156 ++++++++++++++++++++++ 4 files changed, 685 insertions(+) diff --git a/controller/api_controller.go b/controller/api_controller.go index b9bd055..cb67fb0 100644 --- a/controller/api_controller.go +++ b/controller/api_controller.go @@ -10,6 +10,14 @@ import ( type ApiController struct{} // List 记录列表 +// @Summary 获取API接口列表 +// Description: 获取API接口列表 +// @Tags 接口管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /api/list [get] +// @Security ApiKeyAuth func (m *ApiController) List(c *gin.Context) { req := new(request.ApiListReq) Run(c, req, func() (interface{}, interface{}) { @@ -18,6 +26,14 @@ func (m *ApiController) List(c *gin.Context) { } // GetTree 接口树 +// @Summary 获取API接口树 +// Description: 获取API接口树 +// @Tags 接口管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /api/tree [get] +// @Security ApiKeyAuth func (m *ApiController) GetTree(c *gin.Context) { req := new(request.ApiGetTreeReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +42,15 @@ func (m *ApiController) GetTree(c *gin.Context) { } // Add 新建记录 +// @Summary 新建API接口 +// @Tags 接口管理 +// Description: 新建API接口 +// @Accept application/json +// @Produce application/json +// @Param data body request.ApiAddReq true "新建API" +// @Success 200 {object} response.ResponseBody +// @Router /api/add [post] +// @Security ApiKeyAuth func (m *ApiController) Add(c *gin.Context) { req := new(request.ApiAddReq) Run(c, req, func() (interface{}, interface{}) { @@ -34,6 +59,15 @@ func (m *ApiController) Add(c *gin.Context) { } // Update 更新记录 +// @Summary 更新API接口 +// @Tags 接口管理 +// Description: 更新API接口 +// @Accept application/json +// @Produce application/json +// @Param data body request.ApiUpdateReq true "更新API" +// @Success 200 {object} response.ResponseBody +// @Router /api/update [post] +// @Security ApiKeyAuth func (m *ApiController) Update(c *gin.Context) { req := new(request.ApiUpdateReq) Run(c, req, func() (interface{}, interface{}) { @@ -42,6 +76,15 @@ func (m *ApiController) Update(c *gin.Context) { } // Delete 删除记录 +// @Summary 删除API接口 +// @Tags 接口管理 +// Description: 删除API接口 +// @Accept application/json +// @Produce application/json +// @Param data body request.ApiDeleteReq true "删除API" +// @Success 200 {object} response.ResponseBody +// @Router /api/delete [post] +// @Security ApiKeyAuth func (m *ApiController) Delete(c *gin.Context) { req := new(request.ApiDeleteReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index 45bc688..815e283 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -20,6 +20,174 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/api/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "新建API接口", + "parameters": [ + { + "description": "新建API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ApiAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "删除API接口", + "parameters": [ + { + "description": "删除API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ApiDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "获取API接口列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "获取API接口树", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "更新API接口", + "parameters": [ + { + "description": "更新API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ApiUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/base/changePwd": { "post": { "description": "使用邮箱验证码修改密码", @@ -1683,6 +1851,81 @@ const docTemplate = `{ } }, "definitions": { + "request.ApiAddReq": { + "type": "object", + "required": [ + "category", + "method", + "path" + ], + "properties": { + "category": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "method": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, + "request.ApiDeleteReq": { + "type": "object", + "required": [ + "apiIds" + ], + "properties": { + "apiIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.ApiUpdateReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "category": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "id": { + "type": "integer" + }, + "method": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, "request.BaseChangePwdReq": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index 9b8c4b6..2fd8907 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -14,6 +14,174 @@ "host": "127.0.0.1:8888", "basePath": "/api", "paths": { + "/api/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "新建API接口", + "parameters": [ + { + "description": "新建API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ApiAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "删除API接口", + "parameters": [ + { + "description": "删除API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ApiDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "获取API接口列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/tree": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "获取API接口树", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/api/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接口管理" + ], + "summary": "更新API接口", + "parameters": [ + { + "description": "更新API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.ApiUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/base/changePwd": { "post": { "description": "使用邮箱验证码修改密码", @@ -1677,6 +1845,81 @@ } }, "definitions": { + "request.ApiAddReq": { + "type": "object", + "required": [ + "category", + "method", + "path" + ], + "properties": { + "category": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "method": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, + "request.ApiDeleteReq": { + "type": "object", + "required": [ + "apiIds" + ], + "properties": { + "apiIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.ApiUpdateReq": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "category": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "id": { + "type": "integer" + }, + "method": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "path": { + "type": "string", + "maxLength": 100, + "minLength": 1 + }, + "remark": { + "type": "string", + "maxLength": 100, + "minLength": 0 + } + } + }, "request.BaseChangePwdReq": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 28a903b..bec9030 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,5 +1,60 @@ basePath: /api definitions: + request.ApiAddReq: + properties: + category: + maxLength: 50 + minLength: 1 + type: string + method: + maxLength: 20 + minLength: 1 + type: string + path: + maxLength: 100 + minLength: 1 + type: string + remark: + maxLength: 100 + minLength: 0 + type: string + required: + - category + - method + - path + type: object + request.ApiDeleteReq: + properties: + apiIds: + items: + type: integer + type: array + required: + - apiIds + type: object + request.ApiUpdateReq: + properties: + category: + maxLength: 50 + minLength: 1 + type: string + id: + type: integer + method: + maxLength: 20 + minLength: 1 + type: string + path: + maxLength: 100 + minLength: 1 + type: string + remark: + maxLength: 100 + minLength: 0 + type: string + required: + - id + type: object request.BaseChangePwdReq: properties: code: @@ -539,6 +594,107 @@ info: title: Go Ldap Admin version: "1.0" paths: + /api/add: + post: + consumes: + - application/json + parameters: + - description: 新建API + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.ApiAddReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 新建API接口 + tags: + - 接口管理 + /api/delete: + post: + consumes: + - application/json + parameters: + - description: 删除API + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.ApiDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 删除API接口 + tags: + - 接口管理 + /api/list: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 获取API接口列表 + tags: + - 接口管理 + /api/tree: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 获取API接口树 + tags: + - 接口管理 + /api/update: + post: + consumes: + - application/json + parameters: + - description: 更新API + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.ApiUpdateReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 更新API接口 + tags: + - 接口管理 /base/changePwd: post: consumes: From af77717da526535826844be4fdfc7e3e7558878a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 14:28:30 +0800 Subject: [PATCH 18/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=AE=A1=E7=90=86=E7=9A=843=E4=B8=AA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/operation_log_controller.go | 32 ++++++ docs/docs.go | 150 +++++++++++++++++++++++++ docs/swagger.json | 150 +++++++++++++++++++++++++ docs/swagger.yaml | 93 +++++++++++++++ logic/operation_log_logic.go | 2 +- 5 files changed, 426 insertions(+), 1 deletion(-) diff --git a/controller/operation_log_controller.go b/controller/operation_log_controller.go index 652f03b..a47e08d 100644 --- a/controller/operation_log_controller.go +++ b/controller/operation_log_controller.go @@ -10,6 +10,21 @@ import ( type OperationLogController struct{} // List 记录列表 +// @Summary 获取操作日志记录列表 +// Description: 获取操作日志记录列表 +// @Tags 操作日志管理 +// @Accept application/json +// @Produce application/json +// @Param username query string false "用户名" +// @Param ip query string false "IP地址" +// @Param path query string false "路径" +// @Param method query string false "方法" +// @Param status query int false "状态码" +// @Param pageNum query int false "页码" +// @Param pageSize query int false "每页数量" +// @Success 200 {object} response.ResponseBody +// @Router /log/operation/list [get] +// @Security ApiKeyAuth func (m *OperationLogController) List(c *gin.Context) { req := new(request.OperationLogListReq) Run(c, req, func() (interface{}, interface{}) { @@ -18,6 +33,15 @@ func (m *OperationLogController) List(c *gin.Context) { } // Delete 删除记录 +// @Summary 删除操作日志记录 +// Description: 删除操作日志记录 +// @Tags 操作日志管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.OperationLogDeleteReq true "删除日志的ID" +// @Success 200 {object} response.ResponseBody +// @Router /log/operation/delete [post] +// @Security ApiKeyAuth func (m *OperationLogController) Delete(c *gin.Context) { req := new(request.OperationLogDeleteReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +50,14 @@ func (m *OperationLogController) Delete(c *gin.Context) { } // Clean 清空记录 +// @Summary 清空操作日志记录 +// Description: 清空操作日志记录 +// @Tags 操作日志管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /log/operation/clean [delete] +// @Security ApiKeyAuth func (m *OperationLogController) Clean(c *gin.Context) { req := new(request.OperationLogListReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index 815e283..e9e7d16 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -929,6 +929,142 @@ const docTemplate = `{ } } }, + "/log/operation/clean": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "操作日志管理" + ], + "summary": "清空操作日志记录", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/log/operation/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "操作日志管理" + ], + "summary": "删除操作日志记录", + "parameters": [ + { + "description": "删除日志的ID", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.OperationLogDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/log/operation/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "操作日志管理" + ], + "summary": "获取操作日志记录列表", + "parameters": [ + { + "type": "string", + "description": "用户名", + "name": "username", + "in": "query" + }, + { + "type": "string", + "description": "IP地址", + "name": "ip", + "in": "query" + }, + { + "type": "string", + "description": "路径", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "方法", + "name": "method", + "in": "query" + }, + { + "type": "integer", + "description": "状态码", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + }, + { + "type": "integer", + "description": "每页数量", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/menu/access/tree": { "get": { "security": [ @@ -2255,6 +2391,20 @@ const docTemplate = `{ } } }, + "request.OperationLogDeleteReq": { + "type": "object", + "required": [ + "operationLogIds" + ], + "properties": { + "operationLogIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "request.RegisterAndLoginReq": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index 2fd8907..7040625 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -923,6 +923,142 @@ } } }, + "/log/operation/clean": { + "delete": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "操作日志管理" + ], + "summary": "清空操作日志记录", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/log/operation/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "操作日志管理" + ], + "summary": "删除操作日志记录", + "parameters": [ + { + "description": "删除日志的ID", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.OperationLogDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/log/operation/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "操作日志管理" + ], + "summary": "获取操作日志记录列表", + "parameters": [ + { + "type": "string", + "description": "用户名", + "name": "username", + "in": "query" + }, + { + "type": "string", + "description": "IP地址", + "name": "ip", + "in": "query" + }, + { + "type": "string", + "description": "路径", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "方法", + "name": "method", + "in": "query" + }, + { + "type": "integer", + "description": "状态码", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + }, + { + "type": "integer", + "description": "每页数量", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/menu/access/tree": { "get": { "security": [ @@ -2249,6 +2385,20 @@ } } }, + "request.OperationLogDeleteReq": { + "type": "object", + "required": [ + "operationLogIds" + ], + "properties": { + "operationLogIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "request.RegisterAndLoginReq": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index bec9030..6a06434 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -295,6 +295,15 @@ definitions: - path - title type: object + request.OperationLogDeleteReq: + properties: + operationLogIds: + items: + type: integer + type: array + required: + - operationLogIds + type: object request.RegisterAndLoginReq: properties: password: @@ -1160,6 +1169,90 @@ paths: summary: 不在分组的用户 tags: - 分组管理 + /log/operation/clean: + delete: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 清空操作日志记录 + tags: + - 操作日志管理 + /log/operation/delete: + post: + consumes: + - application/json + parameters: + - description: 删除日志的ID + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.OperationLogDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 删除操作日志记录 + tags: + - 操作日志管理 + /log/operation/list: + get: + consumes: + - application/json + parameters: + - description: 用户名 + in: query + name: username + type: string + - description: IP地址 + in: query + name: ip + type: string + - description: 路径 + in: query + name: path + type: string + - description: 方法 + in: query + name: method + type: string + - description: 状态码 + in: query + name: status + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + - description: 每页数量 + in: query + name: pageSize + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 获取操作日志记录列表 + tags: + - 操作日志管理 /menu/access/tree: get: consumes: diff --git a/logic/operation_log_logic.go b/logic/operation_log_logic.go index b59da37..b24eac9 100644 --- a/logic/operation_log_logic.go +++ b/logic/operation_log_logic.go @@ -83,5 +83,5 @@ func (l OperationLogLogic) Clean(c *gin.Context, req interface{}) (data interfac if err != nil { return err, nil } - return "操作日志情况完成", nil + return "操作日志清空完成", nil } From 73def369f5928d9e8fafa80dd36bf7753f46c341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 14:43:26 +0800 Subject: [PATCH 19/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E7=AE=A1=E7=90=86=E7=9A=844=E4=B8=AA?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/field_relation_controller.go | 35 +++++ docs/docs.go | 199 ++++++++++++++++++++++++ docs/swagger.json | 199 ++++++++++++++++++++++++ docs/swagger.yaml | 125 +++++++++++++++ 4 files changed, 558 insertions(+) diff --git a/controller/field_relation_controller.go b/controller/field_relation_controller.go index a311289..303b3bd 100644 --- a/controller/field_relation_controller.go +++ b/controller/field_relation_controller.go @@ -10,6 +10,14 @@ import ( type FieldRelationController struct{} // List 记录列表 +// @Summary 获字段关系管理列表 +// Description: 获字段关系管理列表 +// @Tags 字段关系管理 +// @Accept application/json +// @Produce application/json +// @Success 200 {object} response.ResponseBody +// @Router /fieldrelation/list [get] +// @Security ApiKeyAuth func (m *FieldRelationController) List(c *gin.Context) { req := new(request.FieldRelationListReq) Run(c, req, func() (interface{}, interface{}) { @@ -18,6 +26,15 @@ func (m *FieldRelationController) List(c *gin.Context) { } // Add 新建记录 +// @Summary 新建字段关系管理记录 +// Description: 新建字段关系管理记录 +// @Tags 字段关系管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.FieldRelationAddReq true "新建字段关系管理记录" +// @Success 200 {object} response.ResponseBody +// @Router /fieldrelation/add [post] +// @Security ApiKeyAuth func (m *FieldRelationController) Add(c *gin.Context) { req := new(request.FieldRelationAddReq) Run(c, req, func() (interface{}, interface{}) { @@ -26,6 +43,15 @@ func (m *FieldRelationController) Add(c *gin.Context) { } // Update 更新记录 +// @Summary 更新字段关系管理记录 +// Description: 更新字段关系管理记录 +// @Tags 字段关系管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.FieldRelationUpdateReq true "更新字段关系管理记录" +// @Success 200 {object} response.ResponseBody +// @Router /fieldrelation/update [post] +// @Security ApiKeyAuth func (m *FieldRelationController) Update(c *gin.Context) { req := new(request.FieldRelationUpdateReq) Run(c, req, func() (interface{}, interface{}) { @@ -34,6 +60,15 @@ func (m *FieldRelationController) Update(c *gin.Context) { } // Delete 删除记录 +// @Summary 删除字段关系管理记录 +// Description: 删除字段关系管理记录 +// @Tags 字段关系管理 +// @Accept application/json +// @Produce application/json +// @Param data body request.FieldRelationDeleteReq true "删除字段关系管理记录" +// @Success 200 {object} response.ResponseBody +// @Router /fieldrelation/delete [post] +// @Security ApiKeyAuth func (m *FieldRelationController) Delete(c *gin.Context) { req := new(request.FieldRelationDeleteReq) Run(c, req, func() (interface{}, interface{}) { diff --git a/docs/docs.go b/docs/docs.go index e9e7d16..1daa8bc 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -452,6 +452,147 @@ const docTemplate = `{ } } }, + "/fieldrelation/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "新建字段关系管理记录", + "parameters": [ + { + "description": "新建字段关系管理记录", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FieldRelationAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/fieldrelation/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "删除字段关系管理记录", + "parameters": [ + { + "description": "删除字段关系管理记录", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FieldRelationDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/fieldrelation/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "获字段关系管理列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/fieldrelation/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "更新字段关系管理记录", + "parameters": [ + { + "description": "更新字段关系管理记录", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FieldRelationUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/group/add": { "post": { "security": [ @@ -2092,6 +2233,64 @@ const docTemplate = `{ } } }, + "request.FieldRelationAddReq": { + "type": "object", + "required": [ + "attributes", + "flag" + ], + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "flag": { + "type": "string", + "maxLength": 20, + "minLength": 1 + } + } + }, + "request.FieldRelationDeleteReq": { + "type": "object", + "required": [ + "fieldRelationIds" + ], + "properties": { + "fieldRelationIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.FieldRelationUpdateReq": { + "type": "object", + "required": [ + "attributes", + "flag", + "id" + ], + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "flag": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "id": { + "type": "integer" + } + } + }, "request.GroupAddReq": { "type": "object", "required": [ diff --git a/docs/swagger.json b/docs/swagger.json index 7040625..a80a284 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -446,6 +446,147 @@ } } }, + "/fieldrelation/add": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "新建字段关系管理记录", + "parameters": [ + { + "description": "新建字段关系管理记录", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FieldRelationAddReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/fieldrelation/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "删除字段关系管理记录", + "parameters": [ + { + "description": "删除字段关系管理记录", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FieldRelationDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/fieldrelation/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "获字段关系管理列表", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, + "/fieldrelation/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "字段关系管理" + ], + "summary": "更新字段关系管理记录", + "parameters": [ + { + "description": "更新字段关系管理记录", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.FieldRelationUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/response.ResponseBody" + } + } + } + } + }, "/group/add": { "post": { "security": [ @@ -2086,6 +2227,64 @@ } } }, + "request.FieldRelationAddReq": { + "type": "object", + "required": [ + "attributes", + "flag" + ], + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "flag": { + "type": "string", + "maxLength": 20, + "minLength": 1 + } + } + }, + "request.FieldRelationDeleteReq": { + "type": "object", + "required": [ + "fieldRelationIds" + ], + "properties": { + "fieldRelationIds": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "request.FieldRelationUpdateReq": { + "type": "object", + "required": [ + "attributes", + "flag", + "id" + ], + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "flag": { + "type": "string", + "maxLength": 20, + "minLength": 1 + }, + "id": { + "type": "integer" + } + } + }, "request.GroupAddReq": { "type": "object", "required": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 6a06434..c724aed 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -76,6 +76,46 @@ definitions: required: - mail type: object + request.FieldRelationAddReq: + properties: + attributes: + additionalProperties: + type: string + type: object + flag: + maxLength: 20 + minLength: 1 + type: string + required: + - attributes + - flag + type: object + request.FieldRelationDeleteReq: + properties: + fieldRelationIds: + items: + type: integer + type: array + required: + - fieldRelationIds + type: object + request.FieldRelationUpdateReq: + properties: + attributes: + additionalProperties: + type: string + type: object + flag: + maxLength: 20 + minLength: 1 + type: string + id: + type: integer + required: + - attributes + - flag + - id + type: object request.GroupAddReq: properties: groupName: @@ -876,6 +916,91 @@ paths: summary: 发送验证码 tags: - 基础管理 + /fieldrelation/add: + post: + consumes: + - application/json + parameters: + - description: 新建字段关系管理记录 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.FieldRelationAddReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 新建字段关系管理记录 + tags: + - 字段关系管理 + /fieldrelation/delete: + post: + consumes: + - application/json + parameters: + - description: 删除字段关系管理记录 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.FieldRelationDeleteReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 删除字段关系管理记录 + tags: + - 字段关系管理 + /fieldrelation/list: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 获字段关系管理列表 + tags: + - 字段关系管理 + /fieldrelation/update: + post: + consumes: + - application/json + parameters: + - description: 更新字段关系管理记录 + in: body + name: data + required: true + schema: + $ref: '#/definitions/request.FieldRelationUpdateReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/response.ResponseBody' + security: + - ApiKeyAuth: [ ] + summary: 更新字段关系管理记录 + tags: + - 字段关系管理 /group/add: post: consumes: From b8cf0f09f95c68361bb2bde79d529adaaf912e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 15:08:13 +0800 Subject: [PATCH 20/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/base_routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/base_routes.go b/routes/base_routes.go index 54daca9..78ac433 100644 --- a/routes/base_routes.go +++ b/routes/base_routes.go @@ -7,7 +7,7 @@ import ( ) // LoginHandler -// @Summary 登录接口 (异常,缺少私钥) +// @Summary 登录接口 (手动加上: Bearer + token(密码加密接口)) // @Description 用户登录 // @Tags 基础管理 // @Accept application/json From 29612b699702772884242a9d419345a74b215521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E4=B9=98=E9=A3=8E?= <1794748404@qq.com> Date: Mon, 20 May 2024 15:08:34 +0800 Subject: [PATCH 21/21] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 2 +- docs/swagger.json | 2 +- docs/swagger.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 1daa8bc..339b40e 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -321,7 +321,7 @@ const docTemplate = `{ "tags": [ "基础管理" ], - "summary": "登录接口 (异常,缺少私钥)", + "summary": "登录接口 (手动加上: Bearer + token(密码加密接口))", "parameters": [ { "description": "用户登录信息账号和密码", diff --git a/docs/swagger.json b/docs/swagger.json index a80a284..90eda5d 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -315,7 +315,7 @@ "tags": [ "基础管理" ], - "summary": "登录接口 (异常,缺少私钥)", + "summary": "登录接口 (手动加上: Bearer + token(密码加密接口))", "parameters": [ { "description": "用户登录信息账号和密码", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index c724aed..e967f51 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -842,7 +842,7 @@ paths: description: OK schema: $ref: '#/definitions/response.ResponseBody' - summary: 登录接口 (异常,缺少私钥) + summary: '登录接口 (手动加上: Bearer + token(密码加密接口))' tags: - 基础管理 /base/logout: