123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- // 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)
- }
|