docs.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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/connection": {
  275. "get": {
  276. "description": "连接设备",
  277. "consumes": [
  278. "application/json"
  279. ],
  280. "produces": [
  281. "application/json"
  282. ],
  283. "tags": [
  284. "设备管理"
  285. ],
  286. "summary": "连接设备",
  287. "parameters": [
  288. {
  289. "description": "chip:芯片编号,0或1;mac:Mac地址;addrType:地址类型 public/random ",
  290. "name": "device",
  291. "in": "body",
  292. "required": true,
  293. "schema": {
  294. "type": "string"
  295. }
  296. }
  297. ],
  298. "responses": {
  299. "200": {
  300. "description": "ok",
  301. "schema": {
  302. "type": "string"
  303. }
  304. }
  305. }
  306. }
  307. },
  308. "/v1/device/list/:type": {
  309. "get": {
  310. "description": "设备列表",
  311. "consumes": [
  312. "application/json"
  313. ],
  314. "produces": [
  315. "application/json"
  316. ],
  317. "tags": [
  318. "设备管理"
  319. ],
  320. "summary": "设备列表",
  321. "responses": {
  322. "200": {
  323. "description": "ok",
  324. "schema": {
  325. "type": "string"
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "/v1/device/open/notify/": {
  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/scan": {
  355. "post": {
  356. "description": "扫描设备",
  357. "consumes": [
  358. "application/json"
  359. ],
  360. "produces": [
  361. "application/json"
  362. ],
  363. "tags": [
  364. "设备管理"
  365. ],
  366. "summary": "扫描设备",
  367. "parameters": [
  368. {
  369. "description": "chip:芯片编号,1或1;filterName:0 脑电 1 心电;filterRssi:信号强度,小于0的整数,字符串格式传输;filterMac:过滤Mac地址,以",
  370. "name": "device",
  371. "in": "body",
  372. "required": true,
  373. "schema": {
  374. "type": "string"
  375. }
  376. }
  377. ],
  378. "responses": {
  379. "200": {
  380. "description": "ok",
  381. "schema": {
  382. "type": "string"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "/v1/device/write/data/": {
  389. "post": {
  390. "description": "写入数据——发送指令 ,ECG设备开启测试功能",
  391. "consumes": [
  392. "application/json"
  393. ],
  394. "produces": [
  395. "application/json"
  396. ],
  397. "tags": [
  398. "设备管理"
  399. ],
  400. "summary": "写入数据——发送指令",
  401. "parameters": [
  402. {
  403. "description": "mac:设备MAC地址 userName:用户姓名 gender:性别 age:年龄 height:身高 weight:体重",
  404. "name": "mac",
  405. "in": "body",
  406. "required": true,
  407. "schema": {
  408. "type": "string"
  409. }
  410. }
  411. ],
  412. "responses": {
  413. "200": {
  414. "description": "ok",
  415. "schema": {
  416. "type": "string"
  417. }
  418. }
  419. }
  420. }
  421. },
  422. "/v1/user/change/password": {
  423. "post": {
  424. "description": "用户修改密码",
  425. "consumes": [
  426. "application/json"
  427. ],
  428. "produces": [
  429. "application/json"
  430. ],
  431. "tags": [
  432. "用户管理"
  433. ],
  434. "summary": "用户修改密码",
  435. "parameters": [
  436. {
  437. "description": "userName:用户名 password:密码 newPassword:新密码",
  438. "name": "user",
  439. "in": "body",
  440. "required": true,
  441. "schema": {
  442. "type": "string"
  443. }
  444. }
  445. ],
  446. "responses": {
  447. "200": {
  448. "description": "ok",
  449. "schema": {
  450. "type": "string"
  451. }
  452. }
  453. }
  454. }
  455. },
  456. "/v1/user/find": {
  457. "post": {
  458. "description": "用户列表查询",
  459. "consumes": [
  460. "application/json"
  461. ],
  462. "produces": [
  463. "application/json"
  464. ],
  465. "tags": [
  466. "用户管理"
  467. ],
  468. "summary": "用户列表查询",
  469. "parameters": [
  470. {
  471. "description": "role:角色;userName:用户名;pageNum:页数;pageSize:每页记录数",
  472. "name": "user",
  473. "in": "body",
  474. "required": true,
  475. "schema": {
  476. "type": "string"
  477. }
  478. }
  479. ],
  480. "responses": {
  481. "200": {
  482. "description": "ok",
  483. "schema": {
  484. "type": "string"
  485. }
  486. }
  487. }
  488. }
  489. },
  490. "/v1/user/login": {
  491. "post": {
  492. "description": "用户登录",
  493. "consumes": [
  494. "application/json"
  495. ],
  496. "produces": [
  497. "application/json"
  498. ],
  499. "tags": [
  500. "用户管理"
  501. ],
  502. "summary": "用户登录",
  503. "parameters": [
  504. {
  505. "description": "username:编号;password:密码;role:角色;",
  506. "name": "user",
  507. "in": "body",
  508. "required": true,
  509. "schema": {
  510. "type": "string"
  511. }
  512. }
  513. ],
  514. "responses": {
  515. "200": {
  516. "description": "ok",
  517. "schema": {
  518. "type": "string"
  519. }
  520. }
  521. }
  522. }
  523. },
  524. "/v1/user/register": {
  525. "post": {
  526. "description": "用户注册",
  527. "consumes": [
  528. "application/json"
  529. ],
  530. "produces": [
  531. "application/json"
  532. ],
  533. "tags": [
  534. "用户管理"
  535. ],
  536. "summary": "用户注册",
  537. "parameters": [
  538. {
  539. "description": "userName:用户名;password:密码;role:角色",
  540. "name": "user",
  541. "in": "body",
  542. "required": true,
  543. "schema": {
  544. "type": "string"
  545. }
  546. }
  547. ],
  548. "responses": {
  549. "200": {
  550. "description": "ok",
  551. "schema": {
  552. "type": "string"
  553. }
  554. }
  555. }
  556. }
  557. },
  558. "/v1/user/reset": {
  559. "post": {
  560. "description": "管理员重置普通用户密码",
  561. "consumes": [
  562. "application/json"
  563. ],
  564. "produces": [
  565. "application/json"
  566. ],
  567. "tags": [
  568. "用户管理"
  569. ],
  570. "summary": "管理员重置普通用户密码",
  571. "parameters": [
  572. {
  573. "description": "username:管理员编号;usernameInit:被重置用户编号",
  574. "name": "user",
  575. "in": "body",
  576. "required": true,
  577. "schema": {
  578. "type": "string"
  579. }
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "ok",
  585. "schema": {
  586. "type": "string"
  587. }
  588. }
  589. }
  590. }
  591. }
  592. }
  593. }`
  594. // SwaggerInfo holds exported Swagger Info so clients can modify it
  595. var SwaggerInfo = &swag.Spec{
  596. Version: "1.0",
  597. Host: "",
  598. BasePath: "",
  599. Schemes: []string{},
  600. Title: "对抗训练",
  601. Description: "对抗训练",
  602. InfoInstanceName: "swagger",
  603. SwaggerTemplate: docTemplate,
  604. LeftDelim: "{{",
  605. RightDelim: "}}",
  606. }
  607. func init() {
  608. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  609. }