docs.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag
  3. package docs
  4. import (
  5. "bytes"
  6. "encoding/json"
  7. "strings"
  8. "github.com/alecthomas/template"
  9. "github.com/swaggo/swag"
  10. )
  11. var doc = `{
  12. "schemes": {{ marshal .Schemes }},
  13. "swagger": "2.0",
  14. "info": {
  15. "description": "{{.Description}}",
  16. "title": "{{.Title}}",
  17. "contact": {},
  18. "version": "{{.Version}}"
  19. },
  20. "host": "{{.Host}}",
  21. "basePath": "{{.BasePath}}",
  22. "paths": {
  23. "/area/getArea": {
  24. "get": {
  25. "description": "获取省市区",
  26. "produces": [
  27. "application/json"
  28. ],
  29. "tags": [
  30. "area"
  31. ],
  32. "summary": "获取省市区",
  33. "parameters": [
  34. {
  35. "type": "string",
  36. "description": "地区code",
  37. "name": "p_code",
  38. "in": "query"
  39. }
  40. ],
  41. "responses": {
  42. "200": {
  43. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  44. "schema": {
  45. "type": "string"
  46. }
  47. }
  48. }
  49. }
  50. },
  51. "/cert/list": {
  52. "get": {
  53. "description": "获取证书列表",
  54. "produces": [
  55. "application/json"
  56. ],
  57. "tags": [
  58. "cert"
  59. ],
  60. "summary": "获取证书列表",
  61. "parameters": [
  62. {
  63. "type": "string",
  64. "description": "类型:传1",
  65. "name": "type",
  66. "in": "query"
  67. }
  68. ],
  69. "responses": {
  70. "200": {
  71. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  72. "schema": {
  73. "type": "string"
  74. }
  75. }
  76. }
  77. }
  78. },
  79. "/cert/userList": {
  80. "get": {
  81. "description": "获取用户获得证书列表",
  82. "produces": [
  83. "application/json"
  84. ],
  85. "tags": [
  86. "cert"
  87. ],
  88. "summary": "获取用户获得证书列表",
  89. "parameters": [
  90. {
  91. "type": "string",
  92. "description": "用户id",
  93. "name": "userId",
  94. "in": "query"
  95. }
  96. ],
  97. "responses": {
  98. "200": {
  99. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  100. "schema": {
  101. "type": "string"
  102. }
  103. }
  104. }
  105. }
  106. },
  107. "/customer/getBlacklist": {
  108. "post": {
  109. "description": "获取用户黑白名单列表",
  110. "produces": [
  111. "application/json"
  112. ],
  113. "tags": [
  114. "Customer"
  115. ],
  116. "summary": "获取用户黑白名单列表",
  117. "parameters": [
  118. {
  119. "description": "获取黑白名单列表",
  120. "name": "body",
  121. "in": "body",
  122. "required": true,
  123. "schema": {
  124. "$ref": "#/definitions/models.GetBlackListReq"
  125. }
  126. }
  127. ],
  128. "responses": {
  129. "200": {
  130. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"username\":\"\",\"user_avatar\":\"https://\"}}}",
  131. "schema": {
  132. "type": "string"
  133. }
  134. }
  135. }
  136. }
  137. },
  138. "/customer/getInfo": {
  139. "get": {
  140. "description": "获取用户详细信息",
  141. "produces": [
  142. "application/json"
  143. ],
  144. "tags": [
  145. "Customer"
  146. ],
  147. "summary": "获取用户详细信息",
  148. "parameters": [
  149. {
  150. "type": "string",
  151. "description": "用户ID",
  152. "name": "user_id",
  153. "in": "query",
  154. "required": true
  155. },
  156. {
  157. "type": "string",
  158. "description": "另一个用户id",
  159. "name": "other_id",
  160. "in": "query"
  161. }
  162. ],
  163. "responses": {
  164. "200": {
  165. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  166. "schema": {
  167. "type": "string"
  168. }
  169. }
  170. }
  171. }
  172. },
  173. "/customer/order": {
  174. "get": {
  175. "description": "获取赛事订单",
  176. "produces": [
  177. "application/json"
  178. ],
  179. "tags": [
  180. "Customer"
  181. ],
  182. "summary": "获取赛事订单",
  183. "parameters": [
  184. {
  185. "type": "string",
  186. "description": "用户ID",
  187. "name": "user_id",
  188. "in": "query",
  189. "required": true
  190. }
  191. ],
  192. "responses": {
  193. "200": {
  194. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  195. "schema": {
  196. "type": "string"
  197. }
  198. }
  199. }
  200. }
  201. },
  202. "/customer/qualifying": {
  203. "get": {
  204. "description": "获取排位赛列表",
  205. "produces": [
  206. "application/json"
  207. ],
  208. "tags": [
  209. "Customer"
  210. ],
  211. "summary": "获取排位赛列表",
  212. "parameters": [
  213. {
  214. "type": "string",
  215. "description": "用户ID",
  216. "name": "user_id",
  217. "in": "query",
  218. "required": true
  219. }
  220. ],
  221. "responses": {
  222. "200": {
  223. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"user_id\":\"\",\"mobile_phone\":\"\",\"user_name\":\"\",\"avatar\":\"https://\",\"gender\":2,\"birthday\":\"\",\"area\":\"江苏省-南京市-鼓楼区\",\"email\":\"\",\"customer_level\":0,\"user_point\":0,\"user_money\":0.00,\"register_time\":\"\"}}}",
  224. "schema": {
  225. "type": "string"
  226. }
  227. }
  228. }
  229. }
  230. },
  231. "/customer/updateProfile": {
  232. "post": {
  233. "description": "修改用户资料",
  234. "produces": [
  235. "application/json"
  236. ],
  237. "tags": [
  238. "Customer"
  239. ],
  240. "summary": "修改用户资料",
  241. "parameters": [
  242. {
  243. "description": "修改用户资料请求内容",
  244. "name": "body",
  245. "in": "body",
  246. "required": true,
  247. "schema": {
  248. "$ref": "#/definitions/models.UpdateProfileReq"
  249. }
  250. }
  251. ],
  252. "responses": {
  253. "200": {
  254. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  255. "schema": {
  256. "type": "string"
  257. }
  258. }
  259. }
  260. }
  261. },
  262. "/customer/uploadBase64": {
  263. "post": {
  264. "description": "上传base64图片",
  265. "produces": [
  266. "application/json"
  267. ],
  268. "tags": [
  269. "Customer"
  270. ],
  271. "summary": "上传base64图片",
  272. "parameters": [
  273. {
  274. "description": "修改用户资料请求内容",
  275. "name": "body",
  276. "in": "body",
  277. "required": true,
  278. "schema": {
  279. "$ref": "#/definitions/models.UploadBaseReq"
  280. }
  281. }
  282. ],
  283. "responses": {
  284. "200": {
  285. "description": "{\"code\":200,\"message\":\"success\",\"data\":{}}",
  286. "schema": {
  287. "type": "string"
  288. }
  289. }
  290. }
  291. }
  292. },
  293. "/medal/list": {
  294. "get": {
  295. "description": "获取勋章列表",
  296. "produces": [
  297. "application/json"
  298. ],
  299. "tags": [
  300. "medal"
  301. ],
  302. "summary": "获取勋章列表",
  303. "parameters": [
  304. {
  305. "type": "string",
  306. "description": "类型:传1",
  307. "name": "type",
  308. "in": "query"
  309. }
  310. ],
  311. "responses": {
  312. "200": {
  313. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  314. "schema": {
  315. "type": "string"
  316. }
  317. }
  318. }
  319. }
  320. },
  321. "/medal/userList": {
  322. "get": {
  323. "description": "获取用户获得勋章列表",
  324. "produces": [
  325. "application/json"
  326. ],
  327. "tags": [
  328. "medal"
  329. ],
  330. "summary": "获取用户获得勋章列表",
  331. "parameters": [
  332. {
  333. "type": "string",
  334. "description": "用户id",
  335. "name": "userId",
  336. "in": "query"
  337. }
  338. ],
  339. "responses": {
  340. "200": {
  341. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"customer\":{\"id\":\"\",\"code\":\"\",\"name\":\"\"}}}",
  342. "schema": {
  343. "type": "string"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "/passport/quickLogin": {
  350. "post": {
  351. "security": [
  352. {
  353. "ApiKeyAuth": []
  354. }
  355. ],
  356. "description": "登录注册",
  357. "consumes": [
  358. "application/json"
  359. ],
  360. "produces": [
  361. "application/json"
  362. ],
  363. "tags": [
  364. "Passport"
  365. ],
  366. "summary": "登录注册",
  367. "parameters": [
  368. {
  369. "description": "快捷登录请求内容",
  370. "name": "body",
  371. "in": "body",
  372. "required": true,
  373. "schema": {
  374. "$ref": "#/definitions/models.QuickLoginReq"
  375. }
  376. }
  377. ],
  378. "responses": {
  379. "200": {
  380. "description": "{\"code\":200,\"message\":\"success\",\"data\":{\"token\":\"\",\"user\":{}}}",
  381. "schema": {
  382. "type": "string"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "/sms/get": {
  389. "get": {
  390. "security": [
  391. {
  392. "ApiKeyAuth": []
  393. }
  394. ],
  395. "description": "获取短信验证码",
  396. "produces": [
  397. "application/json"
  398. ],
  399. "tags": [
  400. "Sms"
  401. ],
  402. "summary": "获取短信验证码",
  403. "parameters": [
  404. {
  405. "type": "string",
  406. "description": "手机号码",
  407. "name": "mobile",
  408. "in": "query",
  409. "required": true
  410. },
  411. {
  412. "enum": [
  413. 1,
  414. 2,
  415. 3,
  416. 4
  417. ],
  418. "type": "integer",
  419. "default": 1,
  420. "description": "短信验证码类型(1=注册登录)",
  421. "name": "type",
  422. "in": "query",
  423. "required": true
  424. }
  425. ],
  426. "responses": {
  427. "200": {
  428. "description": "{\"code\":200, \"message\":\"success\"}",
  429. "schema": {
  430. "type": "string"
  431. }
  432. }
  433. }
  434. }
  435. },
  436. "/sms/remind": {
  437. "post": {
  438. "security": [
  439. {
  440. "ApiKeyAuth": []
  441. }
  442. ],
  443. "description": "发送提醒短信",
  444. "consumes": [
  445. "application/json"
  446. ],
  447. "produces": [
  448. "application/json"
  449. ],
  450. "tags": [
  451. "Sms"
  452. ],
  453. "summary": "发送提醒短信",
  454. "parameters": [
  455. {
  456. "description": "短信请求内容",
  457. "name": "body",
  458. "in": "body",
  459. "required": true,
  460. "schema": {
  461. "$ref": "#/definitions/models.SendSmsReq"
  462. }
  463. }
  464. ],
  465. "responses": {
  466. "200": {
  467. "description": "{\"code\":200, \"message\":\"success\"}",
  468. "schema": {
  469. "type": "string"
  470. }
  471. }
  472. }
  473. }
  474. }
  475. },
  476. "definitions": {
  477. "models.GetBlackListReq": {
  478. "type": "object",
  479. "properties": {
  480. "type": {
  481. "description": "类型",
  482. "type": "integer"
  483. },
  484. "user_id": {
  485. "description": "用户ID",
  486. "type": "string"
  487. }
  488. }
  489. },
  490. "models.QuickLoginReq": {
  491. "type": "object",
  492. "properties": {
  493. "mobile_phone": {
  494. "type": "string"
  495. },
  496. "valid_code": {
  497. "type": "string"
  498. }
  499. }
  500. },
  501. "models.SendSmsReq": {
  502. "type": "object",
  503. "properties": {
  504. "content": {
  505. "type": "string"
  506. },
  507. "mobile": {
  508. "type": "string"
  509. }
  510. }
  511. },
  512. "models.UpdateProfileReq": {
  513. "type": "object",
  514. "properties": {
  515. "area": {
  516. "description": "地区",
  517. "type": "string"
  518. },
  519. "birthday": {
  520. "description": "生日",
  521. "type": "string"
  522. },
  523. "gender": {
  524. "description": "性别",
  525. "type": "integer"
  526. },
  527. "height": {
  528. "description": "用户身高",
  529. "type": "integer"
  530. },
  531. "user_avatar": {
  532. "description": "地区",
  533. "type": "string"
  534. },
  535. "user_id": {
  536. "description": "用户代码",
  537. "type": "string"
  538. },
  539. "username": {
  540. "description": "会员昵称",
  541. "type": "string"
  542. },
  543. "weight": {
  544. "description": "用户体重",
  545. "type": "integer"
  546. }
  547. }
  548. },
  549. "models.UploadBaseReq": {
  550. "type": "object",
  551. "properties": {
  552. "base64": {
  553. "description": "base64字符串",
  554. "type": "string"
  555. },
  556. "map_base": {
  557. "description": "mapBase64",
  558. "type": "string"
  559. },
  560. "task_id": {
  561. "description": "任务id",
  562. "type": "string"
  563. },
  564. "user_id": {
  565. "description": "用户id",
  566. "type": "string"
  567. }
  568. }
  569. }
  570. },
  571. "securityDefinitions": {
  572. "ApiKeyAuth": {
  573. "type": "apiKey",
  574. "name": "x-app-id",
  575. "in": "header"
  576. }
  577. }
  578. }`
  579. type swaggerInfo struct {
  580. Version string
  581. Host string
  582. BasePath string
  583. Schemes []string
  584. Title string
  585. Description string
  586. }
  587. // SwaggerInfo holds exported Swagger Info so clients can modify it
  588. var SwaggerInfo = swaggerInfo{
  589. Version: "0.0.1",
  590. Host: "",
  591. BasePath: "/",
  592. Schemes: []string{},
  593. Title: "gin-blog API",
  594. Description: "This is a gin blog example",
  595. }
  596. type s struct{}
  597. func (s *s) ReadDoc() string {
  598. sInfo := SwaggerInfo
  599. sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
  600. t, err := template.New("swagger_info").Funcs(template.FuncMap{
  601. "marshal": func(v interface{}) string {
  602. a, _ := json.Marshal(v)
  603. return string(a)
  604. },
  605. }).Parse(doc)
  606. if err != nil {
  607. return doc
  608. }
  609. var tpl bytes.Buffer
  610. if err := t.Execute(&tpl, sInfo); err != nil {
  611. return doc
  612. }
  613. return tpl.String()
  614. }
  615. func init() {
  616. swag.Register(swag.Name, &s{})
  617. }