docs.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  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. "/v2/device/conn": {
  616. "post": {
  617. "description": "连接设备",
  618. "consumes": [
  619. "application/json"
  620. ],
  621. "produces": [
  622. "application/json"
  623. ],
  624. "tags": [
  625. "设备管理"
  626. ],
  627. "summary": "连接设备",
  628. "parameters": [
  629. {
  630. "description": "mac:设备MAC地址 ai:终端BLE设备的地址ID at:终端BLE设备的地址类型 ",
  631. "name": "device",
  632. "in": "body",
  633. "required": true,
  634. "schema": {
  635. "type": "string"
  636. }
  637. }
  638. ],
  639. "responses": {
  640. "200": {
  641. "description": "ok",
  642. "schema": {
  643. "type": "string"
  644. }
  645. }
  646. }
  647. }
  648. },
  649. "/v2/device/connected/list": {
  650. "get": {
  651. "description": "已连接列表",
  652. "consumes": [
  653. "application/json"
  654. ],
  655. "produces": [
  656. "application/json"
  657. ],
  658. "tags": [
  659. "设备管理"
  660. ],
  661. "summary": "已连接列表 已连接列表中不再做任何处理,在连接或断开连接 成功或失败时系统自动调用",
  662. "responses": {
  663. "200": {
  664. "description": "ok",
  665. "schema": {
  666. "type": "string"
  667. }
  668. }
  669. }
  670. }
  671. },
  672. "/v2/device/dis/conn": {
  673. "post": {
  674. "description": "断开连接设备",
  675. "consumes": [
  676. "application/json"
  677. ],
  678. "produces": [
  679. "application/json"
  680. ],
  681. "tags": [
  682. "设备管理"
  683. ],
  684. "summary": "断开连接设备",
  685. "parameters": [
  686. {
  687. "description": "mac:设备MAC地址 ",
  688. "name": "device",
  689. "in": "body",
  690. "required": true,
  691. "schema": {
  692. "type": "string"
  693. }
  694. }
  695. ],
  696. "responses": {
  697. "200": {
  698. "description": "ok",
  699. "schema": {
  700. "type": "string"
  701. }
  702. }
  703. }
  704. }
  705. },
  706. "/v2/device/dis/connAll": {
  707. "get": {
  708. "description": "断开所有已连接设备",
  709. "consumes": [
  710. "application/json"
  711. ],
  712. "produces": [
  713. "application/json"
  714. ],
  715. "tags": [
  716. "设备管理"
  717. ],
  718. "summary": "断开所有已连接设备",
  719. "responses": {
  720. "200": {
  721. "description": "ok",
  722. "schema": {
  723. "type": "string"
  724. }
  725. }
  726. }
  727. }
  728. },
  729. "/v2/device/scan": {
  730. "get": {
  731. "description": "扫描设备",
  732. "consumes": [
  733. "application/json"
  734. ],
  735. "produces": [
  736. "application/json"
  737. ],
  738. "tags": [
  739. "设备管理"
  740. ],
  741. "summary": "扫描设备",
  742. "responses": {
  743. "200": {
  744. "description": "ok",
  745. "schema": {
  746. "type": "string"
  747. }
  748. }
  749. }
  750. }
  751. },
  752. "/v2/device/stop/scan": {
  753. "get": {
  754. "description": "停止扫描设备",
  755. "consumes": [
  756. "application/json"
  757. ],
  758. "produces": [
  759. "application/json"
  760. ],
  761. "tags": [
  762. "设备管理"
  763. ],
  764. "summary": "停止扫描设备",
  765. "responses": {
  766. "200": {
  767. "description": "ok",
  768. "schema": {
  769. "type": "string"
  770. }
  771. }
  772. }
  773. }
  774. },
  775. "/v2/device/write/data": {
  776. "post": {
  777. "description": "写入数据-脑电写入指令",
  778. "consumes": [
  779. "application/json"
  780. ],
  781. "produces": [
  782. "application/json"
  783. ],
  784. "tags": [
  785. "设备管理"
  786. ],
  787. "summary": "写入数据-脑电写入指令",
  788. "parameters": [
  789. {
  790. "description": "mac:设备MAC地址 userName:用户姓名 gender:性别 age:年龄 height:身高 weight:体重",
  791. "name": "mac",
  792. "in": "body",
  793. "required": true,
  794. "schema": {
  795. "type": "string"
  796. }
  797. }
  798. ],
  799. "responses": {
  800. "200": {
  801. "description": "ok",
  802. "schema": {
  803. "type": "string"
  804. }
  805. }
  806. }
  807. }
  808. },
  809. "/v2/gateway/find": {
  810. "get": {
  811. "description": "查询可能是蓝牙网关的设备",
  812. "consumes": [
  813. "application/json"
  814. ],
  815. "produces": [
  816. "application/json"
  817. ],
  818. "tags": [
  819. "设备管理"
  820. ],
  821. "summary": "查询可能是蓝牙网关的设备",
  822. "responses": {
  823. "200": {
  824. "description": "ok",
  825. "schema": {
  826. "type": "string"
  827. }
  828. }
  829. }
  830. }
  831. },
  832. "/v2/gateway/set": {
  833. "post": {
  834. "description": "保存网关MAC-脑电写入指令",
  835. "consumes": [
  836. "application/json"
  837. ],
  838. "produces": [
  839. "application/json"
  840. ],
  841. "tags": [
  842. "设备管理"
  843. ],
  844. "summary": "保存网关MAC",
  845. "parameters": [
  846. {
  847. "description": "mac:网关MAC地址 ",
  848. "name": "mac",
  849. "in": "body",
  850. "required": true,
  851. "schema": {
  852. "type": "string"
  853. }
  854. }
  855. ],
  856. "responses": {
  857. "200": {
  858. "description": "ok",
  859. "schema": {
  860. "type": "string"
  861. }
  862. }
  863. }
  864. }
  865. }
  866. }
  867. }`
  868. // SwaggerInfo holds exported Swagger Info so clients can modify it
  869. var SwaggerInfo = &swag.Spec{
  870. Version: "1.0",
  871. Host: "",
  872. BasePath: "",
  873. Schemes: []string{},
  874. Title: "对抗训练",
  875. Description: "对抗训练",
  876. InfoInstanceName: "swagger",
  877. SwaggerTemplate: docTemplate,
  878. LeftDelim: "{{",
  879. RightDelim: "}}",
  880. }
  881. func init() {
  882. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  883. }