docs.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  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. "delete": {
  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/stop/collect": {
  172. "get": {
  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/trans": {
  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/add": {
  218. "post": {
  219. "description": "新增设备",
  220. "consumes": [
  221. "application/json"
  222. ],
  223. "produces": [
  224. "application/json"
  225. ],
  226. "tags": [
  227. "设备管理"
  228. ],
  229. "summary": "新增设备",
  230. "parameters": [
  231. {
  232. "description": "type:类型 0脑电1心电;mac:设备MAC地址",
  233. "name": "device",
  234. "in": "body",
  235. "required": true,
  236. "schema": {
  237. "type": "string"
  238. }
  239. }
  240. ],
  241. "responses": {
  242. "200": {
  243. "description": "ok",
  244. "schema": {
  245. "type": "string"
  246. }
  247. }
  248. }
  249. }
  250. },
  251. "/v1/device/connection": {
  252. "get": {
  253. "description": "连接设备",
  254. "consumes": [
  255. "application/json"
  256. ],
  257. "produces": [
  258. "application/json"
  259. ],
  260. "tags": [
  261. "设备管理"
  262. ],
  263. "summary": "连接设备",
  264. "parameters": [
  265. {
  266. "description": "chip:芯片编号,0或1;mac:Mac地址;addrType:地址类型 public/random ",
  267. "name": "device",
  268. "in": "body",
  269. "required": true,
  270. "schema": {
  271. "type": "string"
  272. }
  273. }
  274. ],
  275. "responses": {
  276. "200": {
  277. "description": "ok",
  278. "schema": {
  279. "type": "string"
  280. }
  281. }
  282. }
  283. }
  284. },
  285. "/v1/device/open/notify/": {
  286. "get": {
  287. "description": "开启数据通知",
  288. "consumes": [
  289. "application/json"
  290. ],
  291. "produces": [
  292. "application/json"
  293. ],
  294. "tags": [
  295. "设备管理"
  296. ],
  297. "summary": "开启数据通知",
  298. "responses": {
  299. "200": {
  300. "description": "ok",
  301. "schema": {
  302. "type": "string"
  303. }
  304. }
  305. }
  306. }
  307. },
  308. "/v1/device/scan": {
  309. "get": {
  310. "description": "扫描设备",
  311. "consumes": [
  312. "application/json"
  313. ],
  314. "produces": [
  315. "application/json"
  316. ],
  317. "tags": [
  318. "设备管理"
  319. ],
  320. "summary": "扫描设备",
  321. "parameters": [
  322. {
  323. "description": "chip:芯片编号,1或1;filterName:0 脑电 1 心电;filterRssi:信号强度,小于0的整数,字符串格式传输;filterMac:过滤Mac地址,以",
  324. "name": "device",
  325. "in": "body",
  326. "required": true,
  327. "schema": {
  328. "type": "string"
  329. }
  330. }
  331. ],
  332. "responses": {
  333. "200": {
  334. "description": "ok",
  335. "schema": {
  336. "type": "string"
  337. }
  338. }
  339. }
  340. }
  341. },
  342. "/v1/device/write/data/": {
  343. "post": {
  344. "description": "写入数据——发送指令 ,ECG设备开启测试功能",
  345. "consumes": [
  346. "application/json"
  347. ],
  348. "produces": [
  349. "application/json"
  350. ],
  351. "tags": [
  352. "设备管理"
  353. ],
  354. "summary": "写入数据——发送指令",
  355. "parameters": [
  356. {
  357. "description": "mac:设备MAC地址 userName:用户姓名 gender:性别 age:年龄 height:身高 weight:体重",
  358. "name": "mac",
  359. "in": "body",
  360. "required": true,
  361. "schema": {
  362. "type": "string"
  363. }
  364. }
  365. ],
  366. "responses": {
  367. "200": {
  368. "description": "ok",
  369. "schema": {
  370. "type": "string"
  371. }
  372. }
  373. }
  374. }
  375. },
  376. "/v1/user/change/password": {
  377. "post": {
  378. "description": "用户修改密码",
  379. "consumes": [
  380. "application/json"
  381. ],
  382. "produces": [
  383. "application/json"
  384. ],
  385. "tags": [
  386. "用户管理"
  387. ],
  388. "summary": "用户修改密码",
  389. "parameters": [
  390. {
  391. "description": "userName:用户名 password:密码 newPassword:新密码",
  392. "name": "user",
  393. "in": "body",
  394. "required": true,
  395. "schema": {
  396. "type": "string"
  397. }
  398. }
  399. ],
  400. "responses": {
  401. "200": {
  402. "description": "ok",
  403. "schema": {
  404. "type": "string"
  405. }
  406. }
  407. }
  408. }
  409. },
  410. "/v1/user/find": {
  411. "post": {
  412. "description": "用户列表查询",
  413. "consumes": [
  414. "application/json"
  415. ],
  416. "produces": [
  417. "application/json"
  418. ],
  419. "tags": [
  420. "用户管理"
  421. ],
  422. "summary": "用户列表查询",
  423. "parameters": [
  424. {
  425. "description": "role:角色;userName:用户名;pageNum:页数;pageSize:每页记录数",
  426. "name": "user",
  427. "in": "body",
  428. "required": true,
  429. "schema": {
  430. "type": "string"
  431. }
  432. }
  433. ],
  434. "responses": {
  435. "200": {
  436. "description": "ok",
  437. "schema": {
  438. "type": "string"
  439. }
  440. }
  441. }
  442. }
  443. },
  444. "/v1/user/login": {
  445. "post": {
  446. "description": "用户登录",
  447. "consumes": [
  448. "application/json"
  449. ],
  450. "produces": [
  451. "application/json"
  452. ],
  453. "tags": [
  454. "用户管理"
  455. ],
  456. "summary": "用户登录",
  457. "parameters": [
  458. {
  459. "description": "username:编号;password:密码;role:角色;",
  460. "name": "user",
  461. "in": "body",
  462. "required": true,
  463. "schema": {
  464. "type": "string"
  465. }
  466. }
  467. ],
  468. "responses": {
  469. "200": {
  470. "description": "ok",
  471. "schema": {
  472. "type": "string"
  473. }
  474. }
  475. }
  476. }
  477. },
  478. "/v1/user/register": {
  479. "post": {
  480. "description": "用户注册",
  481. "consumes": [
  482. "application/json"
  483. ],
  484. "produces": [
  485. "application/json"
  486. ],
  487. "tags": [
  488. "用户管理"
  489. ],
  490. "summary": "用户注册",
  491. "parameters": [
  492. {
  493. "description": "userName:用户名;password:密码;role:角色",
  494. "name": "user",
  495. "in": "body",
  496. "required": true,
  497. "schema": {
  498. "type": "string"
  499. }
  500. }
  501. ],
  502. "responses": {
  503. "200": {
  504. "description": "ok",
  505. "schema": {
  506. "type": "string"
  507. }
  508. }
  509. }
  510. }
  511. },
  512. "/v1/user/reset": {
  513. "post": {
  514. "description": "管理员重置普通用户密码",
  515. "consumes": [
  516. "application/json"
  517. ],
  518. "produces": [
  519. "application/json"
  520. ],
  521. "tags": [
  522. "用户管理"
  523. ],
  524. "summary": "管理员重置普通用户密码",
  525. "parameters": [
  526. {
  527. "description": "username:管理员编号;usernameInit:被重置用户编号",
  528. "name": "user",
  529. "in": "body",
  530. "required": true,
  531. "schema": {
  532. "type": "string"
  533. }
  534. }
  535. ],
  536. "responses": {
  537. "200": {
  538. "description": "ok",
  539. "schema": {
  540. "type": "string"
  541. }
  542. }
  543. }
  544. }
  545. }
  546. }
  547. }`
  548. // SwaggerInfo holds exported Swagger Info so clients can modify it
  549. var SwaggerInfo = &swag.Spec{
  550. Version: "1.0",
  551. Host: "",
  552. BasePath: "",
  553. Schemes: []string{},
  554. Title: "对抗训练",
  555. Description: "对抗训练",
  556. InfoInstanceName: "swagger",
  557. SwaggerTemplate: docTemplate,
  558. LeftDelim: "{{",
  559. RightDelim: "}}",
  560. }
  561. func init() {
  562. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  563. }