docs.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  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. "name": "Develoven"
  12. },
  13. "version": "{{.Version}}"
  14. },
  15. "host": "{{.Host}}",
  16. "basePath": "{{.BasePath}}",
  17. "paths": {
  18. "/v1/chat/create/answer": {
  19. "post": {
  20. "description": "录入答案",
  21. "consumes": [
  22. "application/json"
  23. ],
  24. "produces": [
  25. "application/json"
  26. ],
  27. "tags": [
  28. "问答管理"
  29. ],
  30. "summary": "录入答案",
  31. "parameters": [
  32. {
  33. "description": "questionNo:问题编号;NextQuestionNo:下一个问题编号;answer:答案",
  34. "name": "q",
  35. "in": "body",
  36. "required": true,
  37. "schema": {
  38. "type": "string"
  39. }
  40. }
  41. ],
  42. "responses": {
  43. "200": {
  44. "description": "ok",
  45. "schema": {
  46. "type": "string"
  47. }
  48. }
  49. }
  50. }
  51. },
  52. "/v1/chat/create/chat": {
  53. "post": {
  54. "description": "录入问题",
  55. "consumes": [
  56. "application/json"
  57. ],
  58. "produces": [
  59. "application/json"
  60. ],
  61. "tags": [
  62. "问答管理"
  63. ],
  64. "summary": "录入问题",
  65. "parameters": [
  66. {
  67. "description": "chat:问题;nextQuestionNo:下一个问题编号:如果此编号不为空,则说明此问题为陈述,没有答案信息;questionType:题目类型:0选择题;1填空题",
  68. "name": "q",
  69. "in": "body",
  70. "required": true,
  71. "schema": {
  72. "type": "string"
  73. }
  74. }
  75. ],
  76. "responses": {
  77. "200": {
  78. "description": "ok",
  79. "schema": {
  80. "type": "string"
  81. }
  82. }
  83. }
  84. }
  85. },
  86. "/v1/chat/get/answer": {
  87. "get": {
  88. "description": "查询答案",
  89. "consumes": [
  90. "application/json"
  91. ],
  92. "produces": [
  93. "application/json"
  94. ],
  95. "tags": [
  96. "问答管理"
  97. ],
  98. "summary": "查询答案",
  99. "parameters": [
  100. {
  101. "type": "integer",
  102. "description": "id:问题主键",
  103. "name": "id",
  104. "in": "query"
  105. }
  106. ],
  107. "responses": {
  108. "200": {
  109. "description": "ok",
  110. "schema": {
  111. "type": "string"
  112. }
  113. }
  114. }
  115. }
  116. },
  117. "/v1/chat/get/chat": {
  118. "get": {
  119. "description": "查询问题",
  120. "consumes": [
  121. "application/json"
  122. ],
  123. "produces": [
  124. "application/json"
  125. ],
  126. "tags": [
  127. "问答管理"
  128. ],
  129. "summary": "查询问题",
  130. "parameters": [
  131. {
  132. "type": "integer",
  133. "description": "id:问题主键",
  134. "name": "id",
  135. "in": "query"
  136. }
  137. ],
  138. "responses": {
  139. "200": {
  140. "description": "ok",
  141. "schema": {
  142. "type": "string"
  143. }
  144. }
  145. }
  146. }
  147. },
  148. "/v1/device/:mac/disconnect": {
  149. "get": {
  150. "description": "断开连接",
  151. "consumes": [
  152. "application/json"
  153. ],
  154. "produces": [
  155. "application/json"
  156. ],
  157. "tags": [
  158. "设备管理"
  159. ],
  160. "summary": "断开连接",
  161. "responses": {
  162. "200": {
  163. "description": "ok",
  164. "schema": {
  165. "type": "string"
  166. }
  167. }
  168. }
  169. }
  170. },
  171. "/v1/device/:mac/remove": {
  172. "delete": {
  173. "description": "移除设备",
  174. "consumes": [
  175. "application/json"
  176. ],
  177. "produces": [
  178. "application/json"
  179. ],
  180. "tags": [
  181. "设备管理"
  182. ],
  183. "summary": "移除设备",
  184. "responses": {
  185. "200": {
  186. "description": "ok",
  187. "schema": {
  188. "type": "string"
  189. }
  190. }
  191. }
  192. }
  193. },
  194. "/v1/device/:mac/stop/collect": {
  195. "get": {
  196. "description": "停止采集",
  197. "consumes": [
  198. "application/json"
  199. ],
  200. "produces": [
  201. "application/json"
  202. ],
  203. "tags": [
  204. "设备管理"
  205. ],
  206. "summary": "停止采集",
  207. "responses": {
  208. "200": {
  209. "description": "ok",
  210. "schema": {
  211. "type": "string"
  212. }
  213. }
  214. }
  215. }
  216. },
  217. "/v1/device/:mac/stop/trans": {
  218. "get": {
  219. "description": "停止传输",
  220. "consumes": [
  221. "application/json"
  222. ],
  223. "produces": [
  224. "application/json"
  225. ],
  226. "tags": [
  227. "设备管理"
  228. ],
  229. "summary": "停止传输",
  230. "responses": {
  231. "200": {
  232. "description": "ok",
  233. "schema": {
  234. "type": "string"
  235. }
  236. }
  237. }
  238. }
  239. },
  240. "/v1/device/add": {
  241. "post": {
  242. "description": "新增设备",
  243. "consumes": [
  244. "application/json"
  245. ],
  246. "produces": [
  247. "application/json"
  248. ],
  249. "tags": [
  250. "设备管理"
  251. ],
  252. "summary": "新增设备",
  253. "parameters": [
  254. {
  255. "description": "type:类型 0脑电1心电;mac:设备MAC地址",
  256. "name": "device",
  257. "in": "body",
  258. "required": true,
  259. "schema": {
  260. "type": "string"
  261. }
  262. }
  263. ],
  264. "responses": {
  265. "200": {
  266. "description": "ok",
  267. "schema": {
  268. "type": "string"
  269. }
  270. }
  271. }
  272. }
  273. },
  274. "/v1/device/connected": {
  275. "get": {
  276. "description": "连接列表",
  277. "consumes": [
  278. "application/json"
  279. ],
  280. "produces": [
  281. "application/json"
  282. ],
  283. "tags": [
  284. "设备管理"
  285. ],
  286. "summary": "连接列表",
  287. "responses": {
  288. "200": {
  289. "description": "ok",
  290. "schema": {
  291. "type": "string"
  292. }
  293. }
  294. }
  295. }
  296. },
  297. "/v1/device/connection": {
  298. "post": {
  299. "description": "连接设备",
  300. "consumes": [
  301. "application/json"
  302. ],
  303. "produces": [
  304. "application/json"
  305. ],
  306. "tags": [
  307. "设备管理"
  308. ],
  309. "summary": "连接设备",
  310. "parameters": [
  311. {
  312. "description": "chip:芯片编号,0或1;mac:Mac地址;addrType:地址类型 public/random ",
  313. "name": "device",
  314. "in": "body",
  315. "required": true,
  316. "schema": {
  317. "type": "string"
  318. }
  319. }
  320. ],
  321. "responses": {
  322. "200": {
  323. "description": "ok",
  324. "schema": {
  325. "type": "string"
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/v1/device/list/:type": {
  332. "get": {
  333. "description": "设备列表",
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "设备管理"
  342. ],
  343. "summary": "设备列表",
  344. "responses": {
  345. "200": {
  346. "description": "ok",
  347. "schema": {
  348. "type": "string"
  349. }
  350. }
  351. }
  352. }
  353. },
  354. "/v1/device/open/notify/": {
  355. "get": {
  356. "description": "开启数据通知",
  357. "consumes": [
  358. "application/json"
  359. ],
  360. "produces": [
  361. "application/json"
  362. ],
  363. "tags": [
  364. "设备管理"
  365. ],
  366. "summary": "开启数据通知",
  367. "responses": {
  368. "200": {
  369. "description": "ok",
  370. "schema": {
  371. "type": "string"
  372. }
  373. }
  374. }
  375. }
  376. },
  377. "/v1/device/scan": {
  378. "post": {
  379. "description": "扫描设备",
  380. "consumes": [
  381. "application/json"
  382. ],
  383. "produces": [
  384. "application/json"
  385. ],
  386. "tags": [
  387. "设备管理"
  388. ],
  389. "summary": "扫描设备",
  390. "parameters": [
  391. {
  392. "description": "chip:芯片编号,1或1;filterName:0 脑电 1 心电;filterRssi:信号强度,小于0的整数,字符串格式传输;filterMac:过滤Mac地址,以",
  393. "name": "device",
  394. "in": "body",
  395. "required": true,
  396. "schema": {
  397. "type": "string"
  398. }
  399. }
  400. ],
  401. "responses": {
  402. "200": {
  403. "description": "ok",
  404. "schema": {
  405. "type": "string"
  406. }
  407. }
  408. }
  409. }
  410. },
  411. "/v1/device/write/data/": {
  412. "post": {
  413. "description": "写入数据——发送指令 ,ECG设备开启测试功能",
  414. "consumes": [
  415. "application/json"
  416. ],
  417. "produces": [
  418. "application/json"
  419. ],
  420. "tags": [
  421. "设备管理"
  422. ],
  423. "summary": "写入数据——发送指令",
  424. "parameters": [
  425. {
  426. "description": "mac:设备MAC地址 userName:用户姓名 gender:性别 age:年龄 height:身高 weight:体重",
  427. "name": "mac",
  428. "in": "body",
  429. "required": true,
  430. "schema": {
  431. "type": "string"
  432. }
  433. }
  434. ],
  435. "responses": {
  436. "200": {
  437. "description": "ok",
  438. "schema": {
  439. "type": "string"
  440. }
  441. }
  442. }
  443. }
  444. },
  445. "/v1/user/change/password": {
  446. "post": {
  447. "description": "用户修改密码",
  448. "consumes": [
  449. "application/json"
  450. ],
  451. "produces": [
  452. "application/json"
  453. ],
  454. "tags": [
  455. "用户管理"
  456. ],
  457. "summary": "用户修改密码",
  458. "parameters": [
  459. {
  460. "description": "userName:用户名 password:密码 newPassword:新密码",
  461. "name": "user",
  462. "in": "body",
  463. "required": true,
  464. "schema": {
  465. "type": "string"
  466. }
  467. }
  468. ],
  469. "responses": {
  470. "200": {
  471. "description": "ok",
  472. "schema": {
  473. "type": "string"
  474. }
  475. }
  476. }
  477. }
  478. },
  479. "/v1/user/find": {
  480. "post": {
  481. "description": "用户列表查询",
  482. "consumes": [
  483. "application/json"
  484. ],
  485. "produces": [
  486. "application/json"
  487. ],
  488. "tags": [
  489. "用户管理"
  490. ],
  491. "summary": "用户列表查询",
  492. "parameters": [
  493. {
  494. "description": "role:角色;userName:用户名;pageNum:页数;pageSize:每页记录数",
  495. "name": "user",
  496. "in": "body",
  497. "required": true,
  498. "schema": {
  499. "type": "string"
  500. }
  501. }
  502. ],
  503. "responses": {
  504. "200": {
  505. "description": "ok",
  506. "schema": {
  507. "type": "string"
  508. }
  509. }
  510. }
  511. }
  512. },
  513. "/v1/user/login": {
  514. "post": {
  515. "description": "用户登录",
  516. "consumes": [
  517. "application/json"
  518. ],
  519. "produces": [
  520. "application/json"
  521. ],
  522. "tags": [
  523. "用户管理"
  524. ],
  525. "summary": "用户登录",
  526. "parameters": [
  527. {
  528. "description": "username:编号;password:密码;role:角色;",
  529. "name": "user",
  530. "in": "body",
  531. "required": true,
  532. "schema": {
  533. "type": "string"
  534. }
  535. }
  536. ],
  537. "responses": {
  538. "200": {
  539. "description": "ok",
  540. "schema": {
  541. "type": "string"
  542. }
  543. }
  544. }
  545. }
  546. },
  547. "/v1/user/register": {
  548. "post": {
  549. "description": "用户注册",
  550. "consumes": [
  551. "application/json"
  552. ],
  553. "produces": [
  554. "application/json"
  555. ],
  556. "tags": [
  557. "用户管理"
  558. ],
  559. "summary": "用户注册",
  560. "parameters": [
  561. {
  562. "description": "userName:用户名;password:密码;role:角色",
  563. "name": "user",
  564. "in": "body",
  565. "required": true,
  566. "schema": {
  567. "type": "string"
  568. }
  569. }
  570. ],
  571. "responses": {
  572. "200": {
  573. "description": "ok",
  574. "schema": {
  575. "type": "string"
  576. }
  577. }
  578. }
  579. }
  580. },
  581. "/v1/user/reset": {
  582. "post": {
  583. "description": "管理员重置普通用户密码",
  584. "consumes": [
  585. "application/json"
  586. ],
  587. "produces": [
  588. "application/json"
  589. ],
  590. "tags": [
  591. "用户管理"
  592. ],
  593. "summary": "管理员重置普通用户密码",
  594. "parameters": [
  595. {
  596. "description": "username:管理员编号;usernameInit:被重置用户编号",
  597. "name": "user",
  598. "in": "body",
  599. "required": true,
  600. "schema": {
  601. "type": "string"
  602. }
  603. }
  604. ],
  605. "responses": {
  606. "200": {
  607. "description": "ok",
  608. "schema": {
  609. "type": "string"
  610. }
  611. }
  612. }
  613. }
  614. }
  615. }
  616. }`
  617. // SwaggerInfo holds exported Swagger Info so clients can modify it
  618. var SwaggerInfo = &swag.Spec{
  619. Version: "1.0",
  620. Host: "",
  621. BasePath: "",
  622. Schemes: []string{},
  623. Title: "对抗训练",
  624. Description: "对抗训练",
  625. InfoInstanceName: "swagger",
  626. SwaggerTemplate: docTemplate,
  627. LeftDelim: "{{",
  628. RightDelim: "}}",
  629. }
  630. func init() {
  631. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  632. }