docs.go 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. // Code generated by swaggo/swag. DO NOT EDIT
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "contact": {},
  11. "version": "{{.Version}}"
  12. },
  13. "host": "{{.Host}}",
  14. "basePath": "{{.BasePath}}",
  15. "paths": {
  16. "/admin/getalluser": {
  17. "post": {
  18. "consumes": [
  19. "application/json"
  20. ],
  21. "tags": [
  22. "用户管理"
  23. ],
  24. "summary": "获取所有用户",
  25. "parameters": [
  26. {
  27. "description": "分页信息",
  28. "name": "req",
  29. "in": "body",
  30. "required": true,
  31. "schema": {
  32. "$ref": "#/definitions/page.PageParams"
  33. }
  34. }
  35. ],
  36. "responses": {
  37. "200": {
  38. "description": "OK",
  39. "schema": {
  40. "$ref": "#/definitions/e.R"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "/admin/user": {
  47. "post": {
  48. "consumes": [
  49. "application/json"
  50. ],
  51. "tags": [
  52. "用户管理"
  53. ],
  54. "summary": "获取所有用户",
  55. "parameters": [
  56. {
  57. "description": "分页信息",
  58. "name": "req",
  59. "in": "body",
  60. "required": true,
  61. "schema": {
  62. "$ref": "#/definitions/page.PageParams"
  63. }
  64. }
  65. ],
  66. "responses": {
  67. "200": {
  68. "description": "OK",
  69. "schema": {
  70. "$ref": "#/definitions/e.R"
  71. }
  72. }
  73. }
  74. },
  75. "delete": {
  76. "consumes": [
  77. "application/json"
  78. ],
  79. "tags": [
  80. "用户管理"
  81. ],
  82. "summary": "删除用户",
  83. "parameters": [
  84. {
  85. "type": "string",
  86. "description": "id",
  87. "name": "id",
  88. "in": "query",
  89. "required": true
  90. }
  91. ],
  92. "responses": {
  93. "200": {
  94. "description": "OK",
  95. "schema": {
  96. "$ref": "#/definitions/e.R"
  97. }
  98. }
  99. }
  100. }
  101. },
  102. "/codelogin": {
  103. "post": {
  104. "consumes": [
  105. "application/json"
  106. ],
  107. "tags": [
  108. "用户管理"
  109. ],
  110. "summary": "验证码登录",
  111. "parameters": [
  112. {
  113. "description": "账号信息",
  114. "name": "req",
  115. "in": "body",
  116. "required": true,
  117. "schema": {
  118. "$ref": "#/definitions/models.UserRegist"
  119. }
  120. }
  121. ],
  122. "responses": {
  123. "200": {
  124. "description": "OK",
  125. "schema": {
  126. "$ref": "#/definitions/e.R"
  127. }
  128. }
  129. }
  130. }
  131. },
  132. "/sendcode": {
  133. "post": {
  134. "consumes": [
  135. "application/json"
  136. ],
  137. "tags": [
  138. "用户管理"
  139. ],
  140. "summary": "发送验证码",
  141. "parameters": [
  142. {
  143. "type": "string",
  144. "description": "手机号",
  145. "name": "phone",
  146. "in": "query",
  147. "required": true
  148. }
  149. ],
  150. "responses": {
  151. "200": {
  152. "description": "OK",
  153. "schema": {
  154. "$ref": "#/definitions/e.R"
  155. }
  156. }
  157. }
  158. }
  159. },
  160. "/user": {
  161. "post": {
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "tags": [
  166. "用户管理"
  167. ],
  168. "summary": "账号密码登录",
  169. "parameters": [
  170. {
  171. "description": "账号信息",
  172. "name": "req",
  173. "in": "body",
  174. "required": true,
  175. "schema": {
  176. "$ref": "#/definitions/models.UserRegist"
  177. }
  178. }
  179. ],
  180. "responses": {
  181. "200": {
  182. "description": "OK",
  183. "schema": {
  184. "$ref": "#/definitions/e.R"
  185. }
  186. }
  187. }
  188. }
  189. }
  190. },
  191. "definitions": {
  192. "e.R": {
  193. "type": "object",
  194. "properties": {
  195. "code": {
  196. "$ref": "#/definitions/e.Rescode"
  197. },
  198. "data": {},
  199. "message": {}
  200. }
  201. },
  202. "e.Rescode": {
  203. "type": "integer",
  204. "enum": [
  205. 200,
  206. 201,
  207. 1001,
  208. 1002,
  209. 1003,
  210. 1004,
  211. 1005,
  212. 1006,
  213. 1007,
  214. 1008,
  215. 1009,
  216. 1010,
  217. 1011,
  218. 1012,
  219. 1013,
  220. 1014,
  221. 1015,
  222. 1016,
  223. 1017
  224. ],
  225. "x-enum-varnames": [
  226. "SUCCESS",
  227. "ERROR",
  228. "TokenIsInvalid",
  229. "TokenIsExpired",
  230. "DELETEFAIL",
  231. "UPDATEFAIL",
  232. "PaginationFailed",
  233. "JSONParsingFailed",
  234. "TheUserAlreadyExists",
  235. "AlreadyExists",
  236. "TheSystemIsAbnormal",
  237. "CodeIsError",
  238. "Theuseralreadyexists",
  239. "ThePhoneNumberIsWrong",
  240. "AnExceptionOccursWhenSendingAnSMSVerificationCode",
  241. "TokenIsFaild",
  242. "ThePasswordIsWrongOrThePhoneNumberIsIncorrect",
  243. "HasSend",
  244. "TheUserIsEmpty"
  245. ]
  246. },
  247. "models.UserRegist": {
  248. "type": "object",
  249. "required": [
  250. "account",
  251. "code",
  252. "password",
  253. "phone",
  254. "username"
  255. ],
  256. "properties": {
  257. "account": {
  258. "description": "账号",
  259. "type": "string",
  260. "maxLength": 20,
  261. "minLength": 6
  262. },
  263. "code": {
  264. "description": "验证码",
  265. "type": "string",
  266. "maxLength": 6,
  267. "minLength": 6
  268. },
  269. "password": {
  270. "description": "密码",
  271. "type": "string",
  272. "maxLength": 20,
  273. "minLength": 6
  274. },
  275. "phone": {
  276. "description": "手机号",
  277. "type": "string",
  278. "maxLength": 11,
  279. "minLength": 11
  280. },
  281. "username": {
  282. "description": "用户名",
  283. "type": "string",
  284. "maxLength": 20,
  285. "minLength": 2
  286. }
  287. }
  288. },
  289. "page.PageParams": {
  290. "type": "object",
  291. "properties": {
  292. "desc": {
  293. "type": "string"
  294. },
  295. "page": {
  296. "type": "integer"
  297. },
  298. "size": {
  299. "type": "integer"
  300. }
  301. }
  302. }
  303. }
  304. }`
  305. // SwaggerInfo holds exported Swagger Info so clients can modify it
  306. var SwaggerInfo = &swag.Spec{
  307. Version: "1.0",
  308. Host: "127.0.0.1:8080",
  309. BasePath: "/api",
  310. Schemes: []string{},
  311. Title: "统一登录平台",
  312. Description: "统一登录平台",
  313. InfoInstanceName: "swagger",
  314. SwaggerTemplate: docTemplate,
  315. }
  316. func init() {
  317. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  318. }