|
@@ -0,0 +1,322 @@
|
|
|
+// Code generated by swaggo/swag. DO NOT EDIT
|
|
|
+package docs
|
|
|
+
|
|
|
+import "github.com/swaggo/swag"
|
|
|
+
|
|
|
+const docTemplate = `{
|
|
|
+ "schemes": {{ marshal .Schemes }},
|
|
|
+ "swagger": "2.0",
|
|
|
+ "info": {
|
|
|
+ "description": "{{escape .Description}}",
|
|
|
+ "title": "{{.Title}}",
|
|
|
+ "contact": {},
|
|
|
+ "version": "{{.Version}}"
|
|
|
+ },
|
|
|
+ "host": "{{.Host}}",
|
|
|
+ "basePath": "{{.BasePath}}",
|
|
|
+ "paths": {
|
|
|
+ "/admin/getalluser": {
|
|
|
+ "post": {
|
|
|
+ "consumes": [
|
|
|
+ "application/json"
|
|
|
+ ],
|
|
|
+ "tags": [
|
|
|
+ "用户管理"
|
|
|
+ ],
|
|
|
+ "summary": "获取所有用户",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "description": "分页信息",
|
|
|
+ "name": "req",
|
|
|
+ "in": "body",
|
|
|
+ "required": true,
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/page.PageParams"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "OK",
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/e.R"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "/admin/user": {
|
|
|
+ "post": {
|
|
|
+ "consumes": [
|
|
|
+ "application/json"
|
|
|
+ ],
|
|
|
+ "tags": [
|
|
|
+ "用户管理"
|
|
|
+ ],
|
|
|
+ "summary": "获取所有用户",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "description": "分页信息",
|
|
|
+ "name": "req",
|
|
|
+ "in": "body",
|
|
|
+ "required": true,
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/page.PageParams"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "OK",
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/e.R"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "delete": {
|
|
|
+ "consumes": [
|
|
|
+ "application/json"
|
|
|
+ ],
|
|
|
+ "tags": [
|
|
|
+ "用户管理"
|
|
|
+ ],
|
|
|
+ "summary": "删除用户",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "type": "string",
|
|
|
+ "description": "id",
|
|
|
+ "name": "id",
|
|
|
+ "in": "query",
|
|
|
+ "required": true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "OK",
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/e.R"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "/codelogin": {
|
|
|
+ "post": {
|
|
|
+ "consumes": [
|
|
|
+ "application/json"
|
|
|
+ ],
|
|
|
+ "tags": [
|
|
|
+ "用户管理"
|
|
|
+ ],
|
|
|
+ "summary": "验证码登录",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "description": "账号信息",
|
|
|
+ "name": "req",
|
|
|
+ "in": "body",
|
|
|
+ "required": true,
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/models.UserRegist"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "OK",
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/e.R"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "/sendcode": {
|
|
|
+ "post": {
|
|
|
+ "consumes": [
|
|
|
+ "application/json"
|
|
|
+ ],
|
|
|
+ "tags": [
|
|
|
+ "用户管理"
|
|
|
+ ],
|
|
|
+ "summary": "发送验证码",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "type": "string",
|
|
|
+ "description": "手机号",
|
|
|
+ "name": "phone",
|
|
|
+ "in": "query",
|
|
|
+ "required": true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "OK",
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/e.R"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "/user": {
|
|
|
+ "post": {
|
|
|
+ "consumes": [
|
|
|
+ "application/json"
|
|
|
+ ],
|
|
|
+ "tags": [
|
|
|
+ "用户管理"
|
|
|
+ ],
|
|
|
+ "summary": "账号密码登录",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "description": "账号信息",
|
|
|
+ "name": "req",
|
|
|
+ "in": "body",
|
|
|
+ "required": true,
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/models.UserRegist"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "OK",
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/definitions/e.R"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "definitions": {
|
|
|
+ "e.R": {
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "code": {
|
|
|
+ "$ref": "#/definitions/e.Rescode"
|
|
|
+ },
|
|
|
+ "data": {},
|
|
|
+ "message": {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "e.Rescode": {
|
|
|
+ "type": "integer",
|
|
|
+ "enum": [
|
|
|
+ 200,
|
|
|
+ 201,
|
|
|
+ 1001,
|
|
|
+ 1002,
|
|
|
+ 1003,
|
|
|
+ 1004,
|
|
|
+ 1005,
|
|
|
+ 1006,
|
|
|
+ 1007,
|
|
|
+ 1008,
|
|
|
+ 1009,
|
|
|
+ 1010,
|
|
|
+ 1011,
|
|
|
+ 1012,
|
|
|
+ 1013,
|
|
|
+ 1014,
|
|
|
+ 1015,
|
|
|
+ 1016,
|
|
|
+ 1017
|
|
|
+ ],
|
|
|
+ "x-enum-varnames": [
|
|
|
+ "SUCCESS",
|
|
|
+ "ERROR",
|
|
|
+ "TokenIsInvalid",
|
|
|
+ "TokenIsExpired",
|
|
|
+ "DELETEFAIL",
|
|
|
+ "UPDATEFAIL",
|
|
|
+ "PaginationFailed",
|
|
|
+ "JSONParsingFailed",
|
|
|
+ "TheUserAlreadyExists",
|
|
|
+ "AlreadyExists",
|
|
|
+ "TheSystemIsAbnormal",
|
|
|
+ "CodeIsError",
|
|
|
+ "Theuseralreadyexists",
|
|
|
+ "ThePhoneNumberIsWrong",
|
|
|
+ "AnExceptionOccursWhenSendingAnSMSVerificationCode",
|
|
|
+ "TokenIsFaild",
|
|
|
+ "ThePasswordIsWrongOrThePhoneNumberIsIncorrect",
|
|
|
+ "HasSend",
|
|
|
+ "TheUserIsEmpty"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "models.UserRegist": {
|
|
|
+ "type": "object",
|
|
|
+ "required": [
|
|
|
+ "account",
|
|
|
+ "code",
|
|
|
+ "password",
|
|
|
+ "phone",
|
|
|
+ "username"
|
|
|
+ ],
|
|
|
+ "properties": {
|
|
|
+ "account": {
|
|
|
+ "description": "账号",
|
|
|
+ "type": "string",
|
|
|
+ "maxLength": 20,
|
|
|
+ "minLength": 6
|
|
|
+ },
|
|
|
+ "code": {
|
|
|
+ "description": "验证码",
|
|
|
+ "type": "string",
|
|
|
+ "maxLength": 6,
|
|
|
+ "minLength": 6
|
|
|
+ },
|
|
|
+ "password": {
|
|
|
+ "description": "密码",
|
|
|
+ "type": "string",
|
|
|
+ "maxLength": 20,
|
|
|
+ "minLength": 6
|
|
|
+ },
|
|
|
+ "phone": {
|
|
|
+ "description": "手机号",
|
|
|
+ "type": "string",
|
|
|
+ "maxLength": 11,
|
|
|
+ "minLength": 11
|
|
|
+ },
|
|
|
+ "username": {
|
|
|
+ "description": "用户名",
|
|
|
+ "type": "string",
|
|
|
+ "maxLength": 20,
|
|
|
+ "minLength": 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "page.PageParams": {
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "desc": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "page": {
|
|
|
+ "type": "integer"
|
|
|
+ },
|
|
|
+ "size": {
|
|
|
+ "type": "integer"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}`
|
|
|
+
|
|
|
+// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
+var SwaggerInfo = &swag.Spec{
|
|
|
+ Version: "1.0",
|
|
|
+ Host: "127.0.0.1:8080",
|
|
|
+ BasePath: "/api",
|
|
|
+ Schemes: []string{},
|
|
|
+ Title: "统一登录平台",
|
|
|
+ Description: "统一登录平台",
|
|
|
+ InfoInstanceName: "swagger",
|
|
|
+ SwaggerTemplate: docTemplate,
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
+}
|