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": [
|
|
|
|
|
"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": "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-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": "管理员登出",
|
|
|
|
|
"responses": {
|
|
|
|
|
"200": {
|
|
|
|
|
"description": "OK",
|
2021-03-28 15:52:02 +08:00
|
|
|
"schema": {
|
2021-04-10 15:05:50 +08:00
|
|
|
"$ref": "#/definitions/admin_handler.logoutResponse"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"/api/admin/modify_password": {
|
|
|
|
|
"patch": {
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "修改密码",
|
2021-04-10 15:05:50 +08:00
|
|
|
"consumes": [
|
|
|
|
|
"multipart/form-data"
|
|
|
|
|
],
|
|
|
|
|
"produces": [
|
|
|
|
|
"application/json"
|
|
|
|
|
],
|
|
|
|
|
"tags": [
|
|
|
|
|
"API.admin"
|
|
|
|
|
],
|
2021-04-18 19:54:31 +08:00
|
|
|
"summary": "修改密码",
|
2021-04-10 15:05:50 +08:00
|
|
|
"parameters": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +08:00
|
|
|
"description": "旧密码",
|
|
|
|
|
"name": "old_password",
|
2021-04-10 15:05:50 +08:00
|
|
|
"in": "formData",
|
|
|
|
|
"required": true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
2021-04-18 19:54:31 +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-04-18 19:54:31 +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-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": [
|
|
|
|
|
"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": "调用方key",
|
|
|
|
|
"name": "business_key",
|
|
|
|
|
"in": "query"
|
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-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": {
|
|
|
|
|
"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-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"
|
|
|
|
|
},
|
|
|
|
|
"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"
|
|
|
|
|
},
|
|
|
|
|
"pre_page_count": {
|
|
|
|
|
"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-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"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"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": {
|
|
|
|
|
"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"
|
|
|
|
|
},
|
|
|
|
|
"pre_page_count": {
|
|
|
|
|
"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-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"
|
|
|
|
|
}
|
|
|
|
|
}
|
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{})
|
|
|
|
|
}
|