2020-12-27 20:40:43 +08:00
|
|
|
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
|
|
|
// This file was generated by swaggo/swag
|
|
|
|
|
|
|
|
|
|
package docs
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/alecthomas/template"
|
|
|
|
|
"github.com/swaggo/swag"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var doc = `{
|
|
|
|
|
"schemes": {{ marshal .Schemes }},
|
|
|
|
|
"swagger": "2.0",
|
|
|
|
|
"info": {
|
|
|
|
|
"description": "{{.Description}}",
|
|
|
|
|
"title": "{{.Title}}",
|
|
|
|
|
"contact": {},
|
2021-01-23 16:46:01 +08:00
|
|
|
"license": {
|
|
|
|
|
"name": "MIT",
|
|
|
|
|
"url": "https://github.com/xinliangnote/go-gin-api/blob/master/LICENSE"
|
|
|
|
|
},
|
2020-12-27 20:40:43 +08:00
|
|
|
"version": "{{.Version}}"
|
|
|
|
|
},
|
|
|
|
|
"host": "{{.Host}}",
|
|
|
|
|
"basePath": "{{.BasePath}}",
|
|
|
|
|
"paths": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/admin": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"get": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "管理员列表",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
2021-05-09 21:43:23 +08:00
|
|
|
"multipart/form-data"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.admin"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "管理员列表",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "第几页",
|
|
|
|
|
"name": "page",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "每页显示条数",
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "用户名",
|
|
|
|
|
"name": "username",
|
2021-03-28 15:52:02 +08:00
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "昵称",
|
|
|
|
|
"name": "nickname",
|
2021-03-28 15:52:02 +08:00
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "手机号",
|
|
|
|
|
"name": "mobile",
|
2021-03-28 15:52:02 +08:00
|
|
|
"in": "query"
|
2021-04-10 15:05:50 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.listResponse"
|
|
|
|
|
}
|
2021-03-28 15:52:02 +08:00
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "新增管理员",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
|
|
|
|
"summary": "新增管理员",
|
|
|
|
|
"parameters": [
|
2021-03-28 15:52:02 +08:00
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "用户名",
|
|
|
|
|
"name": "username",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "昵称",
|
|
|
|
|
"name": "nickname",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "手机号",
|
|
|
|
|
"name": "mobile",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "密码",
|
|
|
|
|
"name": "password",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/admin_handler.createResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-10 15:05:50 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/admin/info": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "管理员详情",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
|
|
|
|
"summary": "管理员详情",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.detailResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/admin/login": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"post": {
|
2021-05-15 13:01:30 +08:00
|
|
|
"description": "管理员登出",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
2021-05-15 13:01:30 +08:00
|
|
|
"application/json"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.admin"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-05-15 13:01:30 +08:00
|
|
|
"summary": "管理员登出",
|
2021-04-10 15:05:50 +08:00
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
2021-03-28 15:52:02 +08:00
|
|
|
"schema": {
|
2021-05-15 13:01:30 +08:00
|
|
|
"$ref": "#/definitions/admin_handler.logoutResponse"
|
2021-04-10 15:05:50 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
}
|
2021-04-10 15:05:50 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-09 21:43:23 +08:00
|
|
|
"/api/admin/menu": {
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "提交菜单授权",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
|
|
|
|
"summary": "提交菜单授权",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "功能权限ID,多个用,分割",
|
|
|
|
|
"name": "actions",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.createResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/admin/menu/:id": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "菜单授权列表",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
|
|
|
|
"summary": "菜单授权列表",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.listAdminMenuResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/admin/modify_password": {
|
|
|
|
|
"patch": {
|
2021-08-28 15:09:20 +08:00
|
|
|
"description": "修改密码",
|
2021-04-10 15:05:50 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
2021-08-28 15:09:20 +08:00
|
|
|
"summary": "修改密码",
|
2021-04-10 15:05:50 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-08-28 15:09:20 +08:00
|
|
|
"description": "旧密码",
|
|
|
|
|
"name": "old_password",
|
2021-04-10 15:05:50 +08:00
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-08-28 15:09:20 +08:00
|
|
|
"description": "新密码",
|
|
|
|
|
"name": "new_password",
|
2021-04-10 15:05:50 +08:00
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-08-28 15:09:20 +08:00
|
|
|
"$ref": "#/definitions/admin_handler.modifyPasswordResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-15 13:01:30 +08:00
|
|
|
"/api/admin/offline": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "下线管理员",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
|
|
|
|
"summary": "下线管理员",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.offlineResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/admin/reset_password/{id}": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"patch": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "重置密码",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.admin"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "重置密码",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.resetPasswordResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
2021-03-28 15:52:02 +08:00
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/code.Failure"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
}
|
2021-04-10 15:05:50 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/admin/used": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "更新管理员为启用/禁用",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
|
|
|
|
"summary": "更新管理员为启用/禁用",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "used",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/admin_handler.updateUsedResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/admin/{id}": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"delete": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "删除管理员",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.admin"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "删除管理员",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/admin_handler.deleteResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/authorized": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"get": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "调用方列表",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.authorized"
|
|
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "调用方列表",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
2021-04-10 15:05:50 +08:00
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "第几页",
|
|
|
|
|
"name": "page",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "每页显示条数",
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
2021-03-28 15:52:02 +08:00
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "调用方key",
|
|
|
|
|
"name": "business_key",
|
|
|
|
|
"in": "query"
|
2021-04-10 15:05:50 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "调用方secret",
|
|
|
|
|
"name": "business_secret",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "调用方对接人",
|
|
|
|
|
"name": "business_developer",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "备注",
|
|
|
|
|
"name": "remark",
|
|
|
|
|
"in": "path"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/authorized_handler.listResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "新增调用方",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"multipart/form-data"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.authorized"
|
|
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "新增调用方",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "string",
|
|
|
|
|
"description": "调用方key",
|
|
|
|
|
"name": "business_key",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "调用方对接人",
|
|
|
|
|
"name": "business_developer",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "备注",
|
|
|
|
|
"name": "remark",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/authorized_handler.createResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/authorized/used": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "更新调用方为启用/禁用",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"multipart/form-data"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.authorized"
|
|
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "更新调用方为启用/禁用",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
2021-03-28 15:52:02 +08:00
|
|
|
"name": "id",
|
2021-04-10 15:05:50 +08:00
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "used",
|
|
|
|
|
"in": "formData",
|
2021-03-28 15:52:02 +08:00
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/authorized_handler.updateUsedResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/authorized/{id}": {
|
|
|
|
|
"delete": {
|
|
|
|
|
"description": "删除调用方",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.authorized"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "删除调用方",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "hashId",
|
2021-03-28 15:52:02 +08:00
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/authorized_handler.deleteResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/authorized_api": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"get": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "调用方接口地址列表",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
2021-05-09 21:43:23 +08:00
|
|
|
"multipart/form-data"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.authorized"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "调用方接口地址列表",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-05-09 21:43:23 +08:00
|
|
|
"description": "hashID",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "query",
|
|
|
|
|
"required": true
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/authorized_handler.listAPIResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-10 15:05:50 +08:00
|
|
|
},
|
2021-01-23 16:46:01 +08:00
|
|
|
"post": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "授权调用方接口地址",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"multipart/form-data"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.authorized"
|
|
|
|
|
],
|
|
|
|
|
"summary": "授权调用方接口地址",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "HashID",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "请求方法",
|
|
|
|
|
"name": "method",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "请求地址",
|
|
|
|
|
"name": "api",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/authorized_handler.createAPIResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"/api/authorized_api/{id}": {
|
|
|
|
|
"delete": {
|
|
|
|
|
"description": "删除调用方接口地址",
|
2021-03-28 15:52:02 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-10 15:05:50 +08:00
|
|
|
"API.authorized"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-10 15:05:50 +08:00
|
|
|
"summary": "删除调用方接口地址",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "主键ID",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/authorized_handler.deleteAPIResponse"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-18 19:54:31 +08:00
|
|
|
"/api/config/email": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "修改邮件配置",
|
2021-01-23 16:46:01 +08:00
|
|
|
"consumes": [
|
2021-04-18 19:54:31 +08:00
|
|
|
"multipart/form-data"
|
2021-01-23 16:46:01 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-18 19:54:31 +08:00
|
|
|
"API.config"
|
2021-03-28 15:52:02 +08:00
|
|
|
],
|
2021-04-18 19:54:31 +08:00
|
|
|
"summary": "修改邮件配置",
|
2021-03-28 15:52:02 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "邮箱服务器",
|
|
|
|
|
"name": "host",
|
|
|
|
|
"in": "formData",
|
2021-04-10 15:05:50 +08:00
|
|
|
"required": true
|
2021-02-19 22:00:01 +08:00
|
|
|
},
|
2021-01-01 10:51:55 +08:00
|
|
|
{
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "端口",
|
|
|
|
|
"name": "port",
|
|
|
|
|
"in": "formData",
|
2021-04-10 15:05:50 +08:00
|
|
|
"required": true
|
2021-03-28 15:52:02 +08:00
|
|
|
},
|
|
|
|
|
{
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "发件人邮箱",
|
|
|
|
|
"name": "user",
|
|
|
|
|
"in": "formData",
|
2021-04-10 15:05:50 +08:00
|
|
|
"required": true
|
2021-01-23 16:46:01 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "发件人密码",
|
|
|
|
|
"name": "pass",
|
|
|
|
|
"in": "formData",
|
2021-01-09 20:10:13 +08:00
|
|
|
"required": true
|
2021-01-23 16:46:01 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "收件人邮箱地址,多个用,分割",
|
|
|
|
|
"name": "to",
|
|
|
|
|
"in": "formData",
|
2021-01-23 16:46:01 +08:00
|
|
|
"required": true
|
2021-01-09 20:10:13 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
2021-02-20 20:43:39 +08:00
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
2021-04-18 19:54:31 +08:00
|
|
|
"$ref": "#/definitions/config_handler.emailResponse"
|
2021-02-20 20:43:39 +08:00
|
|
|
}
|
2021-02-19 22:00:01 +08:00
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
2021-01-09 20:10:13 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-28 15:09:20 +08:00
|
|
|
"/api/cron": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "任务列表",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.cron"
|
|
|
|
|
],
|
|
|
|
|
"summary": "任务列表",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "第几页",
|
|
|
|
|
"name": "page",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "每页显示条数",
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "任务名称",
|
|
|
|
|
"name": "name",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "执行方式 1:shell 2:http",
|
|
|
|
|
"name": "protocol",
|
|
|
|
|
"in": "query"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "is_used",
|
|
|
|
|
"in": "query"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/cron_handler.listResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "创建任务",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.cron"
|
|
|
|
|
],
|
|
|
|
|
"summary": "创建任务",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "任务名称",
|
|
|
|
|
"name": "name",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "crontab 表达式",
|
|
|
|
|
"name": "spec",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "执行命令",
|
|
|
|
|
"name": "command",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "执行方式 1:shell 2:http",
|
|
|
|
|
"name": "protocol",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "http 请求方式 1:get 2:post",
|
|
|
|
|
"name": "http_method",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "超时时间(单位:秒)",
|
|
|
|
|
"name": "timeout",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "重试次数",
|
|
|
|
|
"name": "retry_times",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "重试间隔(单位:秒)",
|
|
|
|
|
"name": "retry_interval",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
|
|
|
|
|
"name": "notify_status",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "通知类型 1:邮件 2:webhook",
|
|
|
|
|
"name": "notify_type",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "通知者邮箱地址(多个用,分割)",
|
|
|
|
|
"name": "notify_receiver_email",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "通知匹配关键字(多个用,分割)",
|
|
|
|
|
"name": "notify_keyword",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "备注",
|
|
|
|
|
"name": "remark",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "is_used",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/cron_handler.createResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/cron/:id": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "获取单条任务详情",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.cron"
|
|
|
|
|
],
|
|
|
|
|
"summary": "获取单条任务详情",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/cron_handler.detailResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/cron/used": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "更新任务为启用/禁用",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.cron"
|
|
|
|
|
],
|
|
|
|
|
"summary": "更新任务为启用/禁用",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "used",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/cron_handler.updateUsedResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/cron/{id}": {
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "编辑任务",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.cron"
|
|
|
|
|
],
|
|
|
|
|
"summary": "编辑任务",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "任务名称",
|
|
|
|
|
"name": "name",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "crontab 表达式",
|
|
|
|
|
"name": "spec",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "执行命令",
|
|
|
|
|
"name": "command",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "执行方式 1:shell 2:http",
|
|
|
|
|
"name": "protocol",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "http 请求方式 1:get 2:post",
|
|
|
|
|
"name": "http_method",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "超时时间(单位:秒)",
|
|
|
|
|
"name": "timeout",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "重试次数",
|
|
|
|
|
"name": "retry_times",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "重试间隔(单位:秒)",
|
|
|
|
|
"name": "retry_interval",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
|
|
|
|
|
"name": "notify_status",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "通知类型 1:邮件 2:webhook",
|
|
|
|
|
"name": "notify_type",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "通知者邮箱地址(多个用,分割)",
|
|
|
|
|
"name": "notify_receiver_email",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "通知匹配关键字(多个用,分割)",
|
|
|
|
|
"name": "notify_keyword",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "备注",
|
|
|
|
|
"name": "remark",
|
|
|
|
|
"in": "formData"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "is_used",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/cron_handler.modifyResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-05 17:20:48 +08:00
|
|
|
"/api/menu": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "菜单列表",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "菜单列表",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.listResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "创建/编辑菜单",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "创建/编辑菜单",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"description": "请求信息",
|
|
|
|
|
"name": "Request",
|
|
|
|
|
"in": "body",
|
|
|
|
|
"required": true,
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.createRequest"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.createResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-15 13:01:30 +08:00
|
|
|
"/api/menu/sort": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "更新菜单排序",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "更新菜单排序",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "排序",
|
|
|
|
|
"name": "sort",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.updateSortResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-05 17:20:48 +08:00
|
|
|
"/api/menu/used": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "更新菜单为启用/禁用",
|
|
|
|
|
"consumes": [
|
2021-05-15 13:01:30 +08:00
|
|
|
"multipart/form-data"
|
2021-05-05 17:20:48 +08:00
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "更新菜单为启用/禁用",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Hashid",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"name": "used",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.updateUsedResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/menu/{id}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "菜单详情",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "菜单详情",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.detailResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"delete": {
|
|
|
|
|
"description": "删除菜单",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "删除菜单",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.deleteResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-09 21:43:23 +08:00
|
|
|
"/api/menu_action": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "功能权限列表",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "功能权限列表",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashID",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "query",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.listActionResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "创建功能权限",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "创建功能权限",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "HashID",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "请求方法",
|
|
|
|
|
"name": "method",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "请求地址",
|
|
|
|
|
"name": "api",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.createActionResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/menu_action/{id}": {
|
|
|
|
|
"delete": {
|
|
|
|
|
"description": "删除功能权限",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.menu"
|
|
|
|
|
],
|
|
|
|
|
"summary": "删除功能权限",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "hashId",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.deleteActionResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-05 17:20:48 +08:00
|
|
|
"/api/tool/cache/clear": {
|
|
|
|
|
"patch": {
|
|
|
|
|
"description": "清空缓存",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.tool"
|
|
|
|
|
],
|
|
|
|
|
"summary": "清空缓存",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Redis Key",
|
|
|
|
|
"name": "redis_key",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.searchCacheResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/tool/cache/search": {
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "查询缓存",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.tool"
|
|
|
|
|
],
|
|
|
|
|
"summary": "查询缓存",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "Redis Key",
|
|
|
|
|
"name": "redis_key",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.searchCacheResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/tool/data/dbs": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "查询 DB",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.tool"
|
|
|
|
|
],
|
|
|
|
|
"summary": "查询 DB",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.dbsResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/tool/data/mysql": {
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "执行 SQL 语句",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.tool"
|
|
|
|
|
],
|
|
|
|
|
"summary": "执行 SQL 语句",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "数据库名称",
|
|
|
|
|
"name": "db_name",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "数据表名称",
|
|
|
|
|
"name": "table_name",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "SQL 语句",
|
|
|
|
|
"name": "sql",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.searchMySQLResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/tool/data/tables": {
|
|
|
|
|
"post": {
|
|
|
|
|
"description": "查询 Table",
|
|
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.tool"
|
|
|
|
|
],
|
|
|
|
|
"summary": "查询 Table",
|
|
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "数据库名称",
|
|
|
|
|
"name": "db_name",
|
|
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.tablesResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-18 19:54:31 +08:00
|
|
|
"/api/tool/hashids/decode/{id}": {
|
2021-01-23 16:46:01 +08:00
|
|
|
"get": {
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "HashIds 解密",
|
2021-01-01 10:51:55 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-18 19:54:31 +08:00
|
|
|
"API.tool"
|
2021-01-01 10:51:55 +08:00
|
|
|
],
|
2021-04-18 19:54:31 +08:00
|
|
|
"summary": "HashIds 解密",
|
2021-01-01 10:51:55 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
2021-01-23 16:46:01 +08:00
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "需解密的密文",
|
|
|
|
|
"name": "id",
|
2021-01-23 16:46:01 +08:00
|
|
|
"in": "path",
|
|
|
|
|
"required": true
|
2021-01-01 10:51:55 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
2021-02-19 22:00:01 +08:00
|
|
|
"description": "OK",
|
2021-01-01 10:51:55 +08:00
|
|
|
"schema": {
|
2021-04-18 19:54:31 +08:00
|
|
|
"$ref": "#/definitions/tool_handler.hashIdsDecodeResponse"
|
2021-01-09 20:10:13 +08:00
|
|
|
}
|
2021-02-19 22:00:01 +08:00
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
2021-01-09 20:10:13 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-18 19:54:31 +08:00
|
|
|
"/api/tool/hashids/encode/{id}": {
|
|
|
|
|
"get": {
|
|
|
|
|
"description": "HashIds 加密",
|
2021-01-09 20:10:13 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
2021-04-18 19:54:31 +08:00
|
|
|
"API.tool"
|
2021-01-09 20:10:13 +08:00
|
|
|
],
|
2021-04-18 19:54:31 +08:00
|
|
|
"summary": "HashIds 加密",
|
2021-01-09 20:10:13 +08:00
|
|
|
"parameters": [
|
2021-01-23 16:46:01 +08:00
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "需加密的数字",
|
|
|
|
|
"name": "id",
|
|
|
|
|
"in": "path",
|
2021-01-23 16:46:01 +08:00
|
|
|
"required": true
|
2021-01-09 20:10:13 +08:00
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
2021-02-19 22:00:01 +08:00
|
|
|
"description": "OK",
|
2021-01-09 20:10:13 +08:00
|
|
|
"schema": {
|
2021-04-18 19:54:31 +08:00
|
|
|
"$ref": "#/definitions/tool_handler.hashIdsEncodeResponse"
|
2021-01-01 10:51:55 +08:00
|
|
|
}
|
2021-02-19 22:00:01 +08:00
|
|
|
},
|
|
|
|
|
"400": {
|
|
|
|
|
"description": "Bad Request",
|
|
|
|
|
"schema": {
|
|
|
|
|
"$ref": "#/definitions/code.Failure"
|
|
|
|
|
}
|
2021-01-01 10:51:55 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"definitions": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"admin_handler.createResponse": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.deleteResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.detailResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2021-05-15 13:01:30 +08:00
|
|
|
"menu": {
|
|
|
|
|
"description": "菜单栏",
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/admin_service.ListMyMenuData"
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"mobile": {
|
|
|
|
|
"description": "手机号",
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "string"
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"nickname": {
|
|
|
|
|
"description": "昵称",
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "string"
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"username": {
|
|
|
|
|
"description": "用户名",
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-09 21:43:23 +08:00
|
|
|
"admin_handler.listAdminMenuResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/admin_service.ListMenuData"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"username": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"admin_handler.listData": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"created_at": {
|
|
|
|
|
"description": "创建时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"created_user": {
|
|
|
|
|
"description": "创建人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hashid": {
|
|
|
|
|
"description": "hashid",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
2021-03-28 15:52:02 +08:00
|
|
|
"id": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"description": "ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
2021-05-15 13:01:30 +08:00
|
|
|
"is_online": {
|
|
|
|
|
"description": "是否在线 1:是 -1:否",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"is_used": {
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "integer"
|
2021-04-10 15:05:50 +08:00
|
|
|
},
|
|
|
|
|
"mobile": {
|
|
|
|
|
"description": "手机号",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"nickname": {
|
|
|
|
|
"description": "昵称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"updated_at": {
|
|
|
|
|
"description": "更新时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"updated_user": {
|
|
|
|
|
"description": "更新人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"username": {
|
|
|
|
|
"description": "用户名",
|
|
|
|
|
"type": "string"
|
2021-03-28 15:52:02 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"admin_handler.listResponse": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/admin_handler.listData"
|
|
|
|
|
}
|
2021-03-28 15:52:02 +08:00
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"pagination": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"current_page": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
2021-08-28 15:09:20 +08:00
|
|
|
"per_page_count": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"total": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.loginResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"token": {
|
|
|
|
|
"description": "用户身份标识",
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "string"
|
2021-04-10 15:05:50 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.logoutResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"username": {
|
|
|
|
|
"description": "用户账号",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.modifyPasswordResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"username": {
|
|
|
|
|
"description": "用户账号",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.modifyPersonalInfoResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"username": {
|
|
|
|
|
"description": "用户账号",
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-15 13:01:30 +08:00
|
|
|
"admin_handler.offlineResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"admin_handler.resetPasswordResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"admin_handler.updateUsedResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-09 21:43:23 +08:00
|
|
|
"admin_service.ListMenuData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"is_have": {
|
|
|
|
|
"description": "是否已拥有权限",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "菜单名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"pid": {
|
|
|
|
|
"description": "父类ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-15 13:01:30 +08:00
|
|
|
"admin_service.ListMyMenuData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"icon": {
|
|
|
|
|
"description": "图标",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"link": {
|
|
|
|
|
"description": "链接地址",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "菜单名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"pid": {
|
|
|
|
|
"description": "父类ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-10 15:05:50 +08:00
|
|
|
"authorized_handler.createAPIResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-03-28 15:52:02 +08:00
|
|
|
"authorized_handler.createResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.deleteAPIResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.deleteResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.listAPIData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"api": {
|
|
|
|
|
"description": "调用方对接人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"business_key": {
|
|
|
|
|
"description": "调用方key",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hash_id": {
|
|
|
|
|
"description": "hashID",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"method": {
|
|
|
|
|
"description": "调用方secret",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.listAPIResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2021-05-09 21:43:23 +08:00
|
|
|
"business_key": {
|
|
|
|
|
"description": "调用方key",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
2021-03-28 15:52:02 +08:00
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/authorized_handler.listAPIData"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.listData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"business_developer": {
|
|
|
|
|
"description": "调用方对接人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"business_key": {
|
|
|
|
|
"description": "调用方key",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"business_secret": {
|
|
|
|
|
"description": "调用方secret",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"created_at": {
|
|
|
|
|
"description": "创建时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"created_user": {
|
|
|
|
|
"description": "创建人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hashid": {
|
|
|
|
|
"description": "hashid",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"is_used": {
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"remark": {
|
|
|
|
|
"description": "备注",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"updated_at": {
|
|
|
|
|
"description": "更新时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"updated_user": {
|
|
|
|
|
"description": "更新人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.listResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/authorized_handler.listData"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"pagination": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"current_page": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
2021-08-28 15:09:20 +08:00
|
|
|
"per_page_count": {
|
2021-03-28 15:52:02 +08:00
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"total": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"authorized_handler.updateUsedResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-02-19 22:00:01 +08:00
|
|
|
"code.Failure": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"code": {
|
|
|
|
|
"description": "业务码",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"message": {
|
|
|
|
|
"description": "描述信息",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-04-18 19:54:31 +08:00
|
|
|
"config_handler.emailResponse": {
|
2021-01-23 16:46:01 +08:00
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
2021-04-18 19:54:31 +08:00
|
|
|
"email": {
|
|
|
|
|
"description": "邮箱地址",
|
2021-01-23 16:46:01 +08:00
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-08-28 15:09:20 +08:00
|
|
|
"cron_handler.createResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cron_handler.detailResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"command": {
|
|
|
|
|
"description": "执行命令",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"http_method": {
|
|
|
|
|
"description": "http 请求方式 1:get 2:post",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"is_used": {
|
|
|
|
|
"description": "是否启用 1:是 -1:否",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "任务名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"notify_keyword": {
|
|
|
|
|
"description": "通知匹配关键字(多个用,分割)",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"notify_receiver_email": {
|
|
|
|
|
"description": "通知者邮箱地址(多个用,分割)",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"notify_status": {
|
|
|
|
|
"description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"notify_type": {
|
|
|
|
|
"description": "通知类型 1:邮件 2:webhook",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"protocol": {
|
|
|
|
|
"description": "执行方式 1:shell 2:http",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"remark": {
|
|
|
|
|
"description": "备注",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"retry_interval": {
|
|
|
|
|
"description": "重试间隔(单位:秒)",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"retry_times": {
|
|
|
|
|
"description": "重试次数",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"spec": {
|
|
|
|
|
"description": "crontab 表达式",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"timeout": {
|
|
|
|
|
"description": "超时时间(单位:秒)",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cron_handler.listData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"command": {
|
|
|
|
|
"description": "执行命令",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"created_at": {
|
|
|
|
|
"description": "创建时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"created_user": {
|
|
|
|
|
"description": "创建人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hashid": {
|
|
|
|
|
"description": "hashid",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"http_method": {
|
|
|
|
|
"description": "http 请求方式 1:get 2:post",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"http_method_text": {
|
|
|
|
|
"description": "http 请求方式",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"is_used": {
|
|
|
|
|
"description": "是否启用 1=启用 2=禁用",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"is_used_text": {
|
|
|
|
|
"description": "是否启用",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "任务名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"notify_status": {
|
|
|
|
|
"description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"notify_status_text": {
|
|
|
|
|
"description": "执行结束是否通知",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"protocol": {
|
|
|
|
|
"description": "执行方式 1:shell 2:http",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"protocol_text": {
|
|
|
|
|
"description": "执行方式",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"retry_interval": {
|
|
|
|
|
"description": "重试间隔(单位:秒)",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"retry_times": {
|
|
|
|
|
"description": "重试次数",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"spec": {
|
|
|
|
|
"description": "crontab 表达式",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"timeout": {
|
|
|
|
|
"description": "超时时间(单位:秒)",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"updated_at": {
|
|
|
|
|
"description": "更新时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"updated_user": {
|
|
|
|
|
"description": "更新人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cron_handler.listResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/cron_handler.listData"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"pagination": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"current_page": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"per_page_count": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"total": {
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cron_handler.modifyResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cron_handler.updateUsedResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-09 21:43:23 +08:00
|
|
|
"menu_handler.createActionResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-05 17:20:48 +08:00
|
|
|
"menu_handler.createRequest": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"icon": {
|
|
|
|
|
"description": "图标",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "ID",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"level": {
|
|
|
|
|
"description": "菜单类型 1:一级菜单 2:二级菜单",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"link": {
|
|
|
|
|
"description": "链接地址",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "菜单名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"pid": {
|
|
|
|
|
"description": "父类ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_handler.createResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-09 21:43:23 +08:00
|
|
|
"menu_handler.deleteActionResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-05 17:20:48 +08:00
|
|
|
"menu_handler.deleteResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_handler.detailResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"icon": {
|
|
|
|
|
"description": "图标",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"link": {
|
|
|
|
|
"description": "链接地址",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "菜单名称",
|
|
|
|
|
"type": "string"
|
2021-05-09 21:43:23 +08:00
|
|
|
},
|
|
|
|
|
"pid": {
|
|
|
|
|
"description": "父类ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_handler.listActionData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"api": {
|
|
|
|
|
"description": "调用方对接人",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"hash_id": {
|
|
|
|
|
"description": "hashID",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"menu_id": {
|
|
|
|
|
"description": "菜单栏ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"method": {
|
|
|
|
|
"description": "调用方secret",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_handler.listActionResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.listActionData"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_name": {
|
|
|
|
|
"type": "string"
|
2021-05-05 17:20:48 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_handler.listData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"hashid": {
|
|
|
|
|
"description": "hashid",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"icon": {
|
|
|
|
|
"description": "图标",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"is_used": {
|
|
|
|
|
"description": "是否启用 1=启用 -1=禁用",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
},
|
|
|
|
|
"link": {
|
|
|
|
|
"description": "链接地址",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "菜单名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"pid": {
|
|
|
|
|
"description": "父类ID",
|
|
|
|
|
"type": "integer"
|
2021-05-15 13:01:30 +08:00
|
|
|
},
|
|
|
|
|
"sort": {
|
|
|
|
|
"description": "排序",
|
|
|
|
|
"type": "integer"
|
2021-05-05 17:20:48 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"menu_handler.listResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/menu_handler.listData"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-15 13:01:30 +08:00
|
|
|
"menu_handler.updateSortResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-05-05 17:20:48 +08:00
|
|
|
"menu_handler.updateUsedResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"id": {
|
|
|
|
|
"description": "主键ID",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.dbData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"db_name": {
|
|
|
|
|
"description": "数据库名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.dbsResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"description": "数据库列表",
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.dbData"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-03-28 15:52:02 +08:00
|
|
|
"tool_handler.hashIdsDecodeResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"val": {
|
|
|
|
|
"description": "解密后的值",
|
|
|
|
|
"type": "integer"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.hashIdsEncodeResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"val": {
|
|
|
|
|
"description": "加密后的值",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-05-05 17:20:48 +08:00
|
|
|
},
|
|
|
|
|
"tool_handler.searchCacheResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"ttl": {
|
|
|
|
|
"description": "过期时间",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"val": {
|
|
|
|
|
"description": "查询后的值",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.searchMySQLResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"cols": {
|
|
|
|
|
"description": "查询后的行",
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cols_info": {
|
|
|
|
|
"description": "行信息",
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.tableColumn"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"list": {
|
|
|
|
|
"description": "查询后的数据",
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.tableColumn": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"column_comment": {
|
|
|
|
|
"description": "字段注释",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"column_name": {
|
|
|
|
|
"description": "字段名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.tableData": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"table_comment": {
|
|
|
|
|
"description": "数据表备注",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"table_name": {
|
|
|
|
|
"description": "数据表名称",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"tool_handler.tablesResponse": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"list": {
|
|
|
|
|
"description": "数据表列表",
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"$ref": "#/definitions/tool_handler.tableData"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-27 20:40:43 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}`
|
|
|
|
|
|
|
|
|
|
type swaggerInfo struct {
|
|
|
|
|
Version string
|
|
|
|
|
Host string
|
|
|
|
|
BasePath string
|
|
|
|
|
Schemes []string
|
|
|
|
|
Title string
|
|
|
|
|
Description string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
|
var SwaggerInfo = swaggerInfo{
|
2021-01-31 14:51:41 +08:00
|
|
|
Version: "2.0",
|
2021-01-01 10:51:55 +08:00
|
|
|
Host: "127.0.0.1:9999",
|
2020-12-27 20:40:43 +08:00
|
|
|
BasePath: "",
|
|
|
|
|
Schemes: []string{},
|
2021-01-31 14:51:41 +08:00
|
|
|
Title: "swagger 接口文档",
|
2020-12-27 20:40:43 +08:00
|
|
|
Description: "",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type s struct{}
|
|
|
|
|
|
|
|
|
|
func (s *s) ReadDoc() string {
|
|
|
|
|
sInfo := SwaggerInfo
|
|
|
|
|
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
|
|
|
|
|
|
|
|
|
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
|
|
|
|
"marshal": func(v interface{}) string {
|
|
|
|
|
a, _ := json.Marshal(v)
|
|
|
|
|
return string(a)
|
|
|
|
|
},
|
|
|
|
|
}).Parse(doc)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return doc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var tpl bytes.Buffer
|
|
|
|
|
if err := t.Execute(&tpl, sInfo); err != nil {
|
|
|
|
|
return doc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return tpl.String()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
swag.Register(swag.Name, &s{})
|
|
|
|
|
}
|