// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at // 2019-09-27 10:56:45.7469034 +0800 CST m=+0.047123001 package docs import ( "bytes" "github.com/alecthomas/template" "github.com/swaggo/swag" ) var doc = `{ "swagger": "2.0", "info": { "description": "kptyun_service", "title": "科湃腾Go语言后台API", "contact": { "name": "朱红宾", "url": "https://www.dairyinfo.com.cn", "email": "kptzhu@163.com" }, "license": {}, "version": "1.1.2" }, "basePath": "/", "paths": { "/auth": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "获取登录token 信息", "parameters": [ { "type": "string", "description": "admin", "name": "username", "in": "formData", "required": true }, { "type": "string", "description": "123456", "name": "password", "in": "formData", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200e, \"data\": { \"token\": \"xxx\" }, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/authdata/GetRoleMenus": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "menu" ], "summary": "递归获取所有", "parameters": [ { "type": "string", "description": "Ton", "name": "Ton", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/menus": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "menu" ], "summary": "获取所有菜单", "parameters": [ { "type": "string", "description": "Ton", "name": "Ton", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "menu" ], "summary": "增加菜单", "parameters": [ { "type": "string", "description": "name", "name": "name", "in": "query", "required": true }, { "type": "string", "description": "path", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/menus/": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "menu" ], "summary": "获取单个菜单", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "menu" ], "summary": "更新菜单", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "name", "name": "name", "in": "query", "required": true }, { "type": "string", "description": "path", "name": "path", "in": "query", "required": true }, { "type": "string", "description": "method", "name": "method", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "menu" ], "summary": "删除菜单", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/roles": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "role" ], "summary": "获取所有角色", "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "role" ], "summary": "增加角色", "parameters": [ { "type": "string", "description": "name", "name": "name", "in": "query", "required": true }, { "type": "string", "description": "menu_id", "name": "menu_id", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/roles/": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "role" ], "summary": "获取单个角色", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "role" ], "summary": "更新角色", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "name", "name": "name", "in": "query", "required": true }, { "type": "string", "description": "menu_id", "name": "menu_id", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "role" ], "summary": "删除角色", "parameters": [ { "type": "string", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/userinfo": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取单个用户信息", "parameters": [ { "type": "integer", "description": "iddd", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/users": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取所有用户", "parameters": [ { "type": "string", "description": "username", "name": "username", "in": "path" } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "增加用户1", "parameters": [ { "type": "string", "description": "username", "name": "username", "in": "query", "required": true }, { "type": "string", "description": "password", "name": "password", "in": "query", "required": true }, { "type": "integer", "description": "role_id", "name": "role_id", "in": "path" } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/authdata/users/": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "获取单个用户信息", "parameters": [ { "type": "integer", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "更新用户", "parameters": [ { "type": "string", "description": "username", "name": "username", "in": "query", "required": true }, { "type": "string", "description": "password", "name": "password", "in": "query", "required": true }, { "type": "integer", "description": "role_id", "name": "role_id", "in": "query" } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "删除用户", "parameters": [ { "type": "integer", "description": "id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } } } } }, "/data/GetDataByNameForm": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "GetDataByNameForm" ], "summary": "根据APISQL表中SQL执行得到数据集", "parameters": [ { "description": "sqlname", "name": "sqlname", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/json" } }, { "type": "integer", "description": "offset", "name": "offset", "in": "query", "required": true }, { "type": "integer", "description": "pagecount", "name": "pagecount", "in": "query", "required": true }, { "type": "string", "description": "returntype", "name": "returntype", "in": "query", "required": true }, { "type": "json", "description": "ss", "name": "s", "in": "formData", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/data/GetDataByNames": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "GetDataByNames" ], "summary": "根据APISQL表中SQL执行得到数据集", "parameters": [ { "type": "integer", "description": "offset", "name": "offset", "in": "query", "required": true }, { "type": "integer", "description": "pagecount", "name": "pagecount", "in": "query", "required": true }, { "type": "string", "description": "returntype", "name": "returntype", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/data/ImportExcel": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ImportExcel" ], "summary": "导入excel文件到数据库,excel第一行作为参数", "parameters": [ { "type": "string", "description": "文件名", "name": "file", "in": "query", "required": true }, { "type": "string", "description": "执行sql的名字", "name": "name", "in": "header", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/data/PostDataByName": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "PostDataByName" ], "summary": "根据APISQL表中SQL执行得到数据集", "parameters": [ { "type": "string", "description": "sqlname", "name": "sqlname", "in": "query", "required": true }, { "type": "integer", "description": "offset", "name": "offset", "in": "query", "required": true }, { "type": "integer", "description": "pagecount", "name": "pagecount", "in": "query", "required": true }, { "type": "string", "description": "returntype", "name": "returntype", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/data/PostDataByNameForm": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "PostDataByNameForm" ], "summary": "根据APISQL表中SQL执行得到数据集", "parameters": [ { "type": "string", "description": "sqlname", "name": "sqlname", "in": "query", "required": true }, { "type": "integer", "description": "offset", "name": "offset", "in": "query", "required": true }, { "type": "integer", "description": "pagecount", "name": "pagecount", "in": "query", "required": true }, { "type": "string", "description": "returntype", "name": "returntype", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误朱红彬彬\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/data/PostDatasByName": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "PostDatasByName" ], "summary": "根据APISQL表中SQL执行得到数据集", "parameters": [ { "type": "string", "description": "sqlname", "name": "sqlname", "in": "query", "required": true }, { "type": "integer", "description": "offset", "name": "offset", "in": "query", "required": true }, { "type": "integer", "description": "pagecount", "name": "pagecount", "in": "query", "required": true }, { "type": "string", "description": "returntype", "name": "returntype", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } }, "/data/getdata": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "getData" ], "summary": "根据SQL执行得到数据集", "parameters": [ { "type": "string", "description": "sql", "name": "sql", "in": "query", "required": true } ], "responses": { "200": { "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }", "schema": { "type": "string" } }, "400": { "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } }, "404": { "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}", "schema": { "type": "string" } } } } } } }` type swaggerInfo struct { Version string Host string BasePath string Title string Description string } // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo swaggerInfo type s struct{} func (s *s) ReadDoc() string { t, err := template.New("swagger_info").Parse(doc) if err != nil { return doc } var tpl bytes.Buffer if err := t.Execute(&tpl, SwaggerInfo); err != nil { return doc } return tpl.String() } func init() { swag.Register(swag.Name, &s{}) }