权限初步模板
This commit is contained in:
+190
-37
@@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-09-07 22:49:45.2497438 +0800 CST m=+0.040919801
|
||||
// 2019-09-08 16:14:12.6903257 +0800 CST m=+0.106563301
|
||||
|
||||
package docs
|
||||
|
||||
@@ -26,6 +26,162 @@ var doc = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/api/createApi": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Api"
|
||||
],
|
||||
"summary": "为指定角色创建api",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "创建api",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.CreateApiParams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/deleteApi": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Api"
|
||||
],
|
||||
"summary": "删除指定角色api",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除api",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.DeleteApiParams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/authority/createAuthority": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"authority"
|
||||
],
|
||||
"summary": "创建角色",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "创建角色",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.CreateAuthorityPatams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/authority/deleteAuthority": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"authority"
|
||||
],
|
||||
"summary": "删除角色",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除角色",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.DeleteAuthorityPatams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/base/login": {
|
||||
"post": {
|
||||
"produces": [
|
||||
@@ -88,42 +244,6 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/menu/getMenu": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Menu"
|
||||
],
|
||||
"summary": "获取用户动态路由",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "可以什么都不填",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.RegistAndLoginStuct"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/changePassWord": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -258,6 +378,39 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.CreateApiParams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.CreateAuthorityPatams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorityId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"authorityName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.DeleteApiParams": {
|
||||
"type": "object"
|
||||
},
|
||||
"api.DeleteAuthorityPatams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorityId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.RegistAndLoginStuct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+189
-36
@@ -9,6 +9,162 @@
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/createApi": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Api"
|
||||
],
|
||||
"summary": "为指定角色创建api",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "创建api",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.CreateApiParams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/deleteApi": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Api"
|
||||
],
|
||||
"summary": "删除指定角色api",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除api",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.DeleteApiParams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/authority/createAuthority": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"authority"
|
||||
],
|
||||
"summary": "创建角色",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "创建角色",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.CreateAuthorityPatams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/authority/deleteAuthority": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"authority"
|
||||
],
|
||||
"summary": "删除角色",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "删除角色",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.DeleteAuthorityPatams"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/base/login": {
|
||||
"post": {
|
||||
"produces": [
|
||||
@@ -71,42 +227,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/menu/getMenu": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Menu"
|
||||
],
|
||||
"summary": "获取用户动态路由",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "可以什么都不填",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/api.RegistAndLoginStuct"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/changePassWord": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -241,6 +361,39 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.CreateApiParams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.CreateAuthorityPatams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorityId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"authorityName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.DeleteApiParams": {
|
||||
"type": "object"
|
||||
},
|
||||
"api.DeleteAuthorityPatams": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"authorityId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"api.RegistAndLoginStuct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+117
-22
@@ -9,6 +9,27 @@ definitions:
|
||||
userName:
|
||||
type: string
|
||||
type: object
|
||||
api.CreateApiParams:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
type: object
|
||||
api.CreateAuthorityPatams:
|
||||
properties:
|
||||
authorityId:
|
||||
type: integer
|
||||
authorityName:
|
||||
type: string
|
||||
type: object
|
||||
api.DeleteApiParams:
|
||||
type: object
|
||||
api.DeleteAuthorityPatams:
|
||||
properties:
|
||||
authorityId:
|
||||
type: integer
|
||||
type: object
|
||||
api.RegistAndLoginStuct:
|
||||
properties:
|
||||
passWord:
|
||||
@@ -30,6 +51,102 @@ info:
|
||||
title: Swagger Example API
|
||||
version: 0.0.1
|
||||
paths:
|
||||
/api/createApi:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 创建api
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api.CreateApiParams'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"获取成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 为指定角色创建api
|
||||
tags:
|
||||
- Api
|
||||
/api/deleteApi:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 删除api
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api.DeleteApiParams'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"获取成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 删除指定角色api
|
||||
tags:
|
||||
- Api
|
||||
/authority/createAuthority:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 创建角色
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api.CreateAuthorityPatams'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"获取成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 创建角色
|
||||
tags:
|
||||
- authority
|
||||
/authority/deleteAuthority:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 删除角色
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api.DeleteAuthorityPatams'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"获取成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 删除角色
|
||||
tags:
|
||||
- authority
|
||||
/base/login:
|
||||
post:
|
||||
parameters:
|
||||
@@ -70,28 +187,6 @@ paths:
|
||||
summary: 用户注册账号
|
||||
tags:
|
||||
- Base
|
||||
/menu/getMenu:
|
||||
post:
|
||||
parameters:
|
||||
- description: 可以什么都不填
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api.RegistAndLoginStuct'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: '{"success":true,"data":{},"msg":"返回成功"}'
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 获取用户动态路由
|
||||
tags:
|
||||
- Menu
|
||||
/user/changePassWord:
|
||||
post:
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user