2022-10-03 15:10:03 +08:00
|
|
|
// Package docs GENERATED BY SWAG; DO NOT EDIT
|
|
|
|
// This file was generated by swaggo/swag
|
|
|
|
package docs
|
|
|
|
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
|
|
|
|
const docTemplate = `{
|
|
|
|
"schemes": {{ marshal .Schemes }},
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"description": "{{escape .Description}}",
|
|
|
|
"title": "{{.Title}}",
|
|
|
|
"termsOfService": "http://swagger.io/terms/",
|
|
|
|
"contact": {
|
|
|
|
"name": "Shikong",
|
|
|
|
"email": "919411476@qq.com"
|
|
|
|
},
|
|
|
|
"license": {
|
|
|
|
"name": "Apache 2.0",
|
|
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
|
|
},
|
|
|
|
"version": "{{.Version}}"
|
|
|
|
},
|
|
|
|
"host": "{{.Host}}",
|
|
|
|
"basePath": "{{.BasePath}}",
|
|
|
|
"paths": {
|
2022-10-06 17:23:22 +08:00
|
|
|
"/auth/login": {
|
|
|
|
"post": {
|
|
|
|
"description": "用户登录",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Auth"
|
|
|
|
],
|
|
|
|
"summary": "用户登录",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "用户登录",
|
|
|
|
"name": "vo",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/dto.Login"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-05 19:46:48 +08:00
|
|
|
"/casbin/getUserRoles": {
|
2022-10-03 15:37:55 +08:00
|
|
|
"get": {
|
2022-10-05 19:46:48 +08:00
|
|
|
"description": "用户所有角色",
|
2022-10-03 15:37:55 +08:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-10-05 19:46:48 +08:00
|
|
|
"CasBin"
|
2022-10-03 15:37:55 +08:00
|
|
|
],
|
2022-10-05 19:46:48 +08:00
|
|
|
"summary": "用户所有角色",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"default": "root",
|
|
|
|
"description": "用户账号",
|
|
|
|
"name": "account",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
2022-10-03 15:37:55 +08:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
2022-10-05 19:46:48 +08:00
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
2022-10-03 15:37:55 +08:00
|
|
|
"schema": {
|
2022-10-05 19:46:48 +08:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2022-10-03 15:37:55 +08:00
|
|
|
}
|
2022-10-05 19:46:48 +08:00
|
|
|
},
|
2022-10-03 15:37:55 +08:00
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-04 00:24:41 +08:00
|
|
|
}
|
|
|
|
},
|
2022-10-05 19:46:48 +08:00
|
|
|
"/casbin/reload": {
|
|
|
|
"post": {
|
|
|
|
"description": "重新加载 casbin 策略",
|
2022-10-03 15:37:55 +08:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-10-05 19:46:48 +08:00
|
|
|
"CasBin"
|
2022-10-03 15:37:55 +08:00
|
|
|
],
|
2022-10-05 19:46:48 +08:00
|
|
|
"summary": "重新加载 casbin 策略",
|
2022-10-03 15:37:55 +08:00
|
|
|
"responses": {
|
2022-10-04 00:24:41 +08:00
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
2022-10-03 15:10:03 +08:00
|
|
|
"schema": {
|
2022-10-04 13:06:13 +08:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
2022-10-05 19:46:48 +08:00
|
|
|
"type": "string"
|
2022-10-04 13:06:13 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2022-10-03 15:10:03 +08:00
|
|
|
}
|
2022-10-05 19:46:48 +08:00
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
2022-10-03 15:10:03 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-04 14:59:46 +08:00
|
|
|
},
|
2022-10-05 19:46:48 +08:00
|
|
|
"/casbin/test": {
|
2022-10-05 16:02:09 +08:00
|
|
|
"get": {
|
|
|
|
"description": "casbin 鉴权测试",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-10-05 19:46:48 +08:00
|
|
|
"CasBin"
|
2022-10-05 16:02:09 +08:00
|
|
|
],
|
|
|
|
"summary": "casbin 鉴权测试",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "身份",
|
|
|
|
"name": "identity",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "系统",
|
|
|
|
"name": "system",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "api",
|
|
|
|
"name": "api",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "动作",
|
|
|
|
"name": "act",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2022-10-05 17:55:39 +08:00
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-05 19:46:48 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"/error": {
|
|
|
|
"get": {
|
|
|
|
"description": "错误信息示例",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Error"
|
|
|
|
],
|
|
|
|
"summary": "错误处理",
|
|
|
|
"responses": {
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"put": {
|
|
|
|
"description": "错误信息示例",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Error"
|
|
|
|
],
|
|
|
|
"summary": "错误处理",
|
|
|
|
"responses": {
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-05 17:55:39 +08:00
|
|
|
},
|
|
|
|
"post": {
|
2022-10-05 19:46:48 +08:00
|
|
|
"description": "错误信息示例",
|
2022-10-05 17:55:39 +08:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2022-10-05 19:46:48 +08:00
|
|
|
"Error"
|
2022-10-05 17:55:39 +08:00
|
|
|
],
|
2022-10-05 19:46:48 +08:00
|
|
|
"summary": "错误处理",
|
|
|
|
"responses": {
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"description": "错误信息示例",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Error"
|
|
|
|
],
|
|
|
|
"summary": "错误处理",
|
|
|
|
"responses": {
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"patch": {
|
|
|
|
"description": "错误信息示例",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Error"
|
|
|
|
],
|
|
|
|
"summary": "错误处理",
|
|
|
|
"responses": {
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/routes": {
|
|
|
|
"get": {
|
|
|
|
"description": "获取所有路由信息",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Routes"
|
|
|
|
],
|
|
|
|
"summary": "获取所有路由",
|
2022-10-05 17:55:39 +08:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
2022-10-05 16:02:09 +08:00
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
2022-10-05 19:46:48 +08:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/fiber.Route"
|
|
|
|
}
|
|
|
|
}
|
2022-10-05 16:02:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-06 00:01:30 +08:00
|
|
|
"/test/jwt": {
|
|
|
|
"get": {
|
|
|
|
"description": "jwt token 解析测试",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Test"
|
|
|
|
],
|
|
|
|
"summary": "jwt token 解析测试",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "token",
|
|
|
|
"name": "token",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"$ref": "#/definitions/global.UserClaims"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"post": {
|
|
|
|
"description": "jwt token 生成测试",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Test"
|
|
|
|
],
|
|
|
|
"summary": "jwt token 生成测试",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"description": "userClaims",
|
2022-10-06 00:03:56 +08:00
|
|
|
"name": "vo",
|
2022-10-06 00:01:30 +08:00
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/global.UserClaims"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-06 20:46:17 +08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/test/nanoid": {
|
|
|
|
"get": {
|
|
|
|
"description": "nanoid 生成测试",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Test"
|
|
|
|
],
|
|
|
|
"summary": "nanoid 生成测试",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/test/sonyFlake": {
|
|
|
|
"get": {
|
|
|
|
"description": "sonyFlake id 生成测试",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Test"
|
|
|
|
],
|
|
|
|
"summary": "sonyFlake id 生成测试",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-06 00:01:30 +08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-04 14:59:46 +08:00
|
|
|
"/user/account": {
|
|
|
|
"get": {
|
2022-10-05 14:47:07 +08:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"Token": []
|
|
|
|
}
|
|
|
|
],
|
2022-10-04 14:59:46 +08:00
|
|
|
"description": "根据 账号 获取用户信息",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"User"
|
|
|
|
],
|
|
|
|
"summary": "根据 账号 获取用户信息",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "string",
|
|
|
|
"description": "账号名称",
|
|
|
|
"name": "account",
|
|
|
|
"in": "query",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/response.Response"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"data": {
|
|
|
|
"$ref": "#/definitions/models.User"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/errorx.CodeErrorResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-10-03 15:10:03 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"definitions": {
|
2022-10-06 17:23:22 +08:00
|
|
|
"dto.Login": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"account": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "root"
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "12341234"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-03 15:10:03 +08:00
|
|
|
"errorx.CodeErrorResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"code": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 200
|
|
|
|
},
|
|
|
|
"data": {},
|
|
|
|
"msg": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "OK"
|
|
|
|
}
|
|
|
|
}
|
2022-10-03 15:37:55 +08:00
|
|
|
},
|
2022-10-04 13:06:13 +08:00
|
|
|
"fiber.Route": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"method": {
|
|
|
|
"description": "Public fields",
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"description": "Route's name",
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"params": {
|
|
|
|
"description": "Case sensitive param keys",
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"path": {
|
|
|
|
"description": "Original registered route path",
|
|
|
|
"type": "string"
|
|
|
|
}
|
2022-10-06 00:01:30 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"global.UserClaims": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"account": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2022-10-04 13:06:13 +08:00
|
|
|
}
|
|
|
|
},
|
2022-10-04 14:59:46 +08:00
|
|
|
"models.User": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"account": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"active": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"alias": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"contact": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"email": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"emailVerify": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"lastLoginTime": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"memo": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"registerTime": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"userName": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-03 15:37:55 +08:00
|
|
|
"response.Response": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"code": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 200
|
|
|
|
},
|
|
|
|
"data": {},
|
|
|
|
"msg": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "OK"
|
|
|
|
}
|
|
|
|
}
|
2022-10-03 15:10:03 +08:00
|
|
|
}
|
2022-10-05 14:47:07 +08:00
|
|
|
},
|
|
|
|
"securityDefinitions": {
|
|
|
|
"Token": {
|
|
|
|
"type": "apiKey",
|
|
|
|
"name": "token",
|
|
|
|
"in": "header"
|
|
|
|
}
|
2022-10-03 15:10:03 +08:00
|
|
|
}
|
|
|
|
}`
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
var SwaggerInfo = &swag.Spec{
|
|
|
|
Version: "1.0",
|
|
|
|
Host: "",
|
|
|
|
BasePath: "/",
|
|
|
|
Schemes: []string{},
|
|
|
|
Title: "GoFiber Study API",
|
|
|
|
Description: "基于 Fiber 框架的 swagger",
|
|
|
|
InfoInstanceName: "swagger",
|
|
|
|
SwaggerTemplate: docTemplate,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
|
}
|