docs.go 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901
  1. // Package docs 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. "version": "{{.Version}}"
  12. },
  13. "host": "{{.Host}}",
  14. "basePath": "{{.BasePath}}",
  15. "paths": {
  16. "/api-sa/v1/audio/batchDelete": {
  17. "delete": {
  18. "produces": [
  19. "application/json"
  20. ],
  21. "tags": [
  22. "音频"
  23. ],
  24. "summary": "批量删除音频",
  25. "parameters": [
  26. {
  27. "description": "参数",
  28. "name": "object",
  29. "in": "body",
  30. "required": true,
  31. "schema": {
  32. "$ref": "#/definitions/request.BatchProcessAudio"
  33. }
  34. }
  35. ],
  36. "responses": {
  37. "200": {
  38. "description": "成功",
  39. "schema": {
  40. "$ref": "#/definitions/util.Response"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "/api-sa/v1/audio/batchProcess": {
  47. "post": {
  48. "produces": [
  49. "application/json"
  50. ],
  51. "tags": [
  52. "音频"
  53. ],
  54. "summary": "批量处理音频",
  55. "parameters": [
  56. {
  57. "description": "参数",
  58. "name": "object",
  59. "in": "body",
  60. "required": true,
  61. "schema": {
  62. "$ref": "#/definitions/request.BatchProcessAudio"
  63. }
  64. }
  65. ],
  66. "responses": {
  67. "200": {
  68. "description": "成功",
  69. "schema": {
  70. "$ref": "#/definitions/util.Response"
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "/api-sa/v1/audio/delete": {
  77. "delete": {
  78. "produces": [
  79. "application/json"
  80. ],
  81. "tags": [
  82. "音频"
  83. ],
  84. "summary": "删除音频",
  85. "parameters": [
  86. {
  87. "description": "参数",
  88. "name": "object",
  89. "in": "body",
  90. "required": true,
  91. "schema": {
  92. "$ref": "#/definitions/request.ProcessAudio"
  93. }
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "成功",
  99. "schema": {
  100. "$ref": "#/definitions/util.Response"
  101. }
  102. }
  103. }
  104. }
  105. },
  106. "/api-sa/v1/audio/download": {
  107. "get": {
  108. "produces": [
  109. "application/json"
  110. ],
  111. "tags": [
  112. "音频"
  113. ],
  114. "summary": "音频下载",
  115. "parameters": [
  116. {
  117. "type": "integer",
  118. "name": "id",
  119. "in": "query",
  120. "required": true
  121. }
  122. ],
  123. "responses": {
  124. "200": {
  125. "description": "成功",
  126. "schema": {
  127. "allOf": [
  128. {
  129. "$ref": "#/definitions/util.Response"
  130. },
  131. {
  132. "type": "object",
  133. "properties": {
  134. "data": {
  135. "$ref": "#/definitions/models.Audio"
  136. }
  137. }
  138. }
  139. ]
  140. }
  141. }
  142. }
  143. }
  144. },
  145. "/api-sa/v1/audio/follow": {
  146. "post": {
  147. "produces": [
  148. "application/json"
  149. ],
  150. "tags": [
  151. "音频"
  152. ],
  153. "summary": "关注/取消关注",
  154. "parameters": [
  155. {
  156. "description": "参数",
  157. "name": "object",
  158. "in": "body",
  159. "required": true,
  160. "schema": {
  161. "$ref": "#/definitions/request.FollowReq"
  162. }
  163. }
  164. ],
  165. "responses": {
  166. "200": {
  167. "description": "成功",
  168. "schema": {
  169. "allOf": [
  170. {
  171. "$ref": "#/definitions/util.Response"
  172. },
  173. {
  174. "type": "object",
  175. "properties": {
  176. "data": {
  177. "$ref": "#/definitions/response.FollowResp"
  178. }
  179. }
  180. }
  181. ]
  182. }
  183. }
  184. }
  185. }
  186. },
  187. "/api-sa/v1/audio/info": {
  188. "get": {
  189. "produces": [
  190. "application/json"
  191. ],
  192. "tags": [
  193. "音频"
  194. ],
  195. "summary": "音频详情,含解析结果",
  196. "parameters": [
  197. {
  198. "type": "integer",
  199. "name": "id",
  200. "in": "query",
  201. "required": true
  202. }
  203. ],
  204. "responses": {
  205. "200": {
  206. "description": "成功",
  207. "schema": {
  208. "allOf": [
  209. {
  210. "$ref": "#/definitions/util.Response"
  211. },
  212. {
  213. "type": "object",
  214. "properties": {
  215. "data": {
  216. "$ref": "#/definitions/models.Audio"
  217. }
  218. }
  219. }
  220. ]
  221. }
  222. }
  223. }
  224. }
  225. },
  226. "/api-sa/v1/audio/list": {
  227. "get": {
  228. "produces": [
  229. "application/json"
  230. ],
  231. "tags": [
  232. "音频"
  233. ],
  234. "summary": "音频分析检索",
  235. "parameters": [
  236. {
  237. "type": "string",
  238. "description": "开始时间",
  239. "name": "beginTime",
  240. "in": "query"
  241. },
  242. {
  243. "type": "string",
  244. "description": "司机号",
  245. "name": "driverNumber",
  246. "in": "query"
  247. },
  248. {
  249. "type": "string",
  250. "description": "结束时间",
  251. "name": "endTime",
  252. "in": "query"
  253. },
  254. {
  255. "enum": [
  256. 1,
  257. 2
  258. ],
  259. "type": "integer",
  260. "x-enum-comments": {
  261. "BoolTypeFalse": "false",
  262. "BoolTypeTrue": "true"
  263. },
  264. "x-enum-varnames": [
  265. "BoolTypeTrue",
  266. "BoolTypeFalse"
  267. ],
  268. "description": "是否关注 1关注 2未关注",
  269. "name": "isFollowed",
  270. "in": "query"
  271. },
  272. {
  273. "type": "string",
  274. "description": "关键字",
  275. "name": "keyword",
  276. "in": "query"
  277. },
  278. {
  279. "type": "string",
  280. "description": "机车号",
  281. "name": "locomotiveNumber",
  282. "in": "query"
  283. },
  284. {
  285. "type": "integer",
  286. "description": "页码",
  287. "name": "page",
  288. "in": "query"
  289. },
  290. {
  291. "type": "integer",
  292. "description": "每页大小",
  293. "name": "pageSize",
  294. "in": "query"
  295. },
  296. {
  297. "type": "string",
  298. "description": "车站号",
  299. "name": "stationNumber",
  300. "in": "query"
  301. },
  302. {
  303. "type": "array",
  304. "items": {
  305. "enum": [
  306. 0,
  307. 1,
  308. 2,
  309. 3,
  310. 4
  311. ],
  312. "type": "integer"
  313. },
  314. "collectionFormat": "csv",
  315. "description": "音频状态数组",
  316. "name": "statusList",
  317. "in": "query"
  318. },
  319. {
  320. "type": "string",
  321. "description": "车次",
  322. "name": "trainNumber",
  323. "in": "query"
  324. }
  325. ],
  326. "responses": {
  327. "200": {
  328. "description": "成功",
  329. "schema": {
  330. "allOf": [
  331. {
  332. "$ref": "#/definitions/util.ResponseList"
  333. },
  334. {
  335. "type": "object",
  336. "properties": {
  337. "data": {
  338. "type": "array",
  339. "items": {
  340. "$ref": "#/definitions/models.Audio"
  341. }
  342. }
  343. }
  344. }
  345. ]
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "/api-sa/v1/audio/process": {
  352. "post": {
  353. "produces": [
  354. "application/json"
  355. ],
  356. "tags": [
  357. "音频"
  358. ],
  359. "summary": "处理音频",
  360. "parameters": [
  361. {
  362. "description": "参数",
  363. "name": "object",
  364. "in": "body",
  365. "required": true,
  366. "schema": {
  367. "$ref": "#/definitions/request.ProcessAudio"
  368. }
  369. }
  370. ],
  371. "responses": {
  372. "200": {
  373. "description": "成功",
  374. "schema": {
  375. "$ref": "#/definitions/util.Response"
  376. }
  377. }
  378. }
  379. }
  380. },
  381. "/api-sa/v1/audio/trainInfoList": {
  382. "get": {
  383. "produces": [
  384. "application/json"
  385. ],
  386. "tags": [
  387. "音频"
  388. ],
  389. "summary": "获取火车信息",
  390. "parameters": [
  391. {
  392. "enum": [
  393. 1,
  394. 2,
  395. 3
  396. ],
  397. "type": "integer",
  398. "x-enum-comments": {
  399. "ClassLocomotive": "机车",
  400. "ClassStation": "车站",
  401. "ClassTrain": "车次"
  402. },
  403. "x-enum-varnames": [
  404. "ClassLocomotive",
  405. "ClassTrain",
  406. "ClassStation"
  407. ],
  408. "description": "信息分类 1机车2车次3车站",
  409. "name": "class",
  410. "in": "query"
  411. },
  412. {
  413. "type": "integer",
  414. "description": "页码",
  415. "name": "page",
  416. "in": "query"
  417. },
  418. {
  419. "type": "integer",
  420. "description": "每页大小",
  421. "name": "pageSize",
  422. "in": "query"
  423. },
  424. {
  425. "type": "integer",
  426. "description": "上级id",
  427. "name": "parentID",
  428. "in": "query"
  429. }
  430. ],
  431. "responses": {
  432. "200": {
  433. "description": "成功",
  434. "schema": {
  435. "allOf": [
  436. {
  437. "$ref": "#/definitions/util.ResponseList"
  438. },
  439. {
  440. "type": "object",
  441. "properties": {
  442. "data": {
  443. "type": "array",
  444. "items": {
  445. "$ref": "#/definitions/models.TrainInfo"
  446. }
  447. }
  448. }
  449. }
  450. ]
  451. }
  452. }
  453. }
  454. }
  455. },
  456. "/api-sa/v1/audio/upload": {
  457. "post": {
  458. "produces": [
  459. "application/json"
  460. ],
  461. "tags": [
  462. "音频"
  463. ],
  464. "summary": "上传音频",
  465. "parameters": [
  466. {
  467. "type": "file",
  468. "description": "音频文件",
  469. "name": "file",
  470. "in": "formData"
  471. },
  472. {
  473. "type": "array",
  474. "items": {
  475. "type": "file"
  476. },
  477. "collectionFormat": "csv",
  478. "description": "多个音频文件",
  479. "name": "files",
  480. "in": "formData"
  481. }
  482. ],
  483. "responses": {
  484. "200": {
  485. "description": "成功",
  486. "schema": {
  487. "$ref": "#/definitions/util.Response"
  488. }
  489. }
  490. }
  491. }
  492. },
  493. "/api-sa/v1/text/add": {
  494. "post": {
  495. "produces": [
  496. "application/json"
  497. ],
  498. "tags": [
  499. "文字库"
  500. ],
  501. "summary": "新增文字",
  502. "parameters": [
  503. {
  504. "description": "参数",
  505. "name": "object",
  506. "in": "body",
  507. "required": true,
  508. "schema": {
  509. "$ref": "#/definitions/request.AddTextReq"
  510. }
  511. }
  512. ],
  513. "responses": {
  514. "200": {
  515. "description": "成功",
  516. "schema": {
  517. "$ref": "#/definitions/util.Response"
  518. }
  519. }
  520. }
  521. }
  522. },
  523. "/api-sa/v1/text/list": {
  524. "get": {
  525. "produces": [
  526. "application/json"
  527. ],
  528. "tags": [
  529. "文字库"
  530. ],
  531. "summary": "文字库列表",
  532. "parameters": [
  533. {
  534. "type": "string",
  535. "description": "关键字",
  536. "name": "keyword",
  537. "in": "query"
  538. },
  539. {
  540. "type": "integer",
  541. "description": "页码",
  542. "name": "page",
  543. "in": "query"
  544. },
  545. {
  546. "type": "integer",
  547. "description": "每页大小",
  548. "name": "pageSize",
  549. "in": "query"
  550. }
  551. ],
  552. "responses": {
  553. "200": {
  554. "description": "成功",
  555. "schema": {
  556. "allOf": [
  557. {
  558. "$ref": "#/definitions/util.ResponseList"
  559. },
  560. {
  561. "type": "object",
  562. "properties": {
  563. "data": {
  564. "type": "array",
  565. "items": {
  566. "$ref": "#/definitions/models.Word"
  567. }
  568. }
  569. }
  570. }
  571. ]
  572. }
  573. }
  574. }
  575. }
  576. }
  577. },
  578. "definitions": {
  579. "constvar.AudioStatus": {
  580. "type": "integer",
  581. "enum": [
  582. 0,
  583. 1,
  584. 2,
  585. 3,
  586. 4
  587. ],
  588. "x-enum-comments": {
  589. "AudioStatusFailed": "处理失败",
  590. "AudioStatusFinish": "处理完成",
  591. "AudioStatusProcessing": "处理中",
  592. "AudioStatusUploadOk": "上传成功 待处理",
  593. "AudioStatusUploading": "上传中"
  594. },
  595. "x-enum-varnames": [
  596. "AudioStatusUploading",
  597. "AudioStatusUploadOk",
  598. "AudioStatusProcessing",
  599. "AudioStatusFinish",
  600. "AudioStatusFailed"
  601. ]
  602. },
  603. "constvar.BoolType": {
  604. "type": "integer",
  605. "enum": [
  606. 1,
  607. 2
  608. ],
  609. "x-enum-comments": {
  610. "BoolTypeFalse": "false",
  611. "BoolTypeTrue": "true"
  612. },
  613. "x-enum-varnames": [
  614. "BoolTypeTrue",
  615. "BoolTypeFalse"
  616. ]
  617. },
  618. "constvar.Class": {
  619. "type": "integer",
  620. "enum": [
  621. 1,
  622. 2,
  623. 3
  624. ],
  625. "x-enum-comments": {
  626. "ClassLocomotive": "机车",
  627. "ClassStation": "车站",
  628. "ClassTrain": "车次"
  629. },
  630. "x-enum-varnames": [
  631. "ClassLocomotive",
  632. "ClassTrain",
  633. "ClassStation"
  634. ]
  635. },
  636. "gorm.DeletedAt": {
  637. "type": "object",
  638. "properties": {
  639. "time": {
  640. "type": "string"
  641. },
  642. "valid": {
  643. "description": "Valid is true if Time is not NULL",
  644. "type": "boolean"
  645. }
  646. }
  647. },
  648. "models.Audio": {
  649. "type": "object",
  650. "properties": {
  651. "audioStatus": {
  652. "description": "音频状态",
  653. "allOf": [
  654. {
  655. "$ref": "#/definitions/constvar.AudioStatus"
  656. }
  657. ]
  658. },
  659. "audioText": {
  660. "description": "解析出的文本",
  661. "type": "string"
  662. },
  663. "createdAt": {
  664. "type": "string"
  665. },
  666. "deletedAt": {
  667. "$ref": "#/definitions/gorm.DeletedAt"
  668. },
  669. "driverNumber": {
  670. "description": "司机号",
  671. "type": "string"
  672. },
  673. "id": {
  674. "type": "integer"
  675. },
  676. "isFollowed": {
  677. "description": "是否关注 1关注 2未关注",
  678. "allOf": [
  679. {
  680. "$ref": "#/definitions/constvar.BoolType"
  681. }
  682. ]
  683. },
  684. "locomotiveNumber": {
  685. "description": "机车号",
  686. "type": "string"
  687. },
  688. "name": {
  689. "description": "音频名称",
  690. "type": "string"
  691. },
  692. "occurrenceTime": {
  693. "type": "string"
  694. },
  695. "score": {
  696. "description": "置信度",
  697. "type": "number"
  698. },
  699. "size": {
  700. "description": "音频大小",
  701. "type": "integer"
  702. },
  703. "station": {
  704. "description": "车站",
  705. "type": "string"
  706. },
  707. "trainNumber": {
  708. "description": "车次",
  709. "type": "string"
  710. },
  711. "updatedAt": {
  712. "type": "string"
  713. },
  714. "words": {
  715. "description": "匹配到的文字数组",
  716. "type": "array",
  717. "items": {
  718. "type": "string"
  719. }
  720. }
  721. }
  722. },
  723. "models.TrainInfo": {
  724. "type": "object",
  725. "properties": {
  726. "class": {
  727. "description": "分类 1 机车 2车次 3 车站",
  728. "allOf": [
  729. {
  730. "$ref": "#/definitions/constvar.Class"
  731. }
  732. ]
  733. },
  734. "createdAt": {
  735. "type": "string"
  736. },
  737. "deletedAt": {
  738. "$ref": "#/definitions/gorm.DeletedAt"
  739. },
  740. "id": {
  741. "type": "integer"
  742. },
  743. "name": {
  744. "description": "名称",
  745. "type": "string"
  746. },
  747. "parentID": {
  748. "description": "上级id",
  749. "type": "integer"
  750. },
  751. "updatedAt": {
  752. "type": "string"
  753. }
  754. }
  755. },
  756. "models.Word": {
  757. "type": "object",
  758. "properties": {
  759. "content": {
  760. "description": "文字",
  761. "type": "string"
  762. },
  763. "createdAt": {
  764. "type": "string"
  765. },
  766. "deletedAt": {
  767. "$ref": "#/definitions/gorm.DeletedAt"
  768. },
  769. "id": {
  770. "type": "integer"
  771. },
  772. "locomotiveNumber": {
  773. "description": "机车号",
  774. "type": "string"
  775. },
  776. "updatedAt": {
  777. "type": "string"
  778. }
  779. }
  780. },
  781. "request.AddTextReq": {
  782. "type": "object",
  783. "required": [
  784. "content",
  785. "locomotiveNumber"
  786. ],
  787. "properties": {
  788. "content": {
  789. "description": "音频名称",
  790. "type": "string"
  791. },
  792. "locomotiveNumber": {
  793. "description": "机车号",
  794. "type": "string"
  795. }
  796. }
  797. },
  798. "request.BatchProcessAudio": {
  799. "type": "object",
  800. "required": [
  801. "ids"
  802. ],
  803. "properties": {
  804. "ids": {
  805. "type": "array",
  806. "items": {
  807. "type": "integer"
  808. }
  809. }
  810. }
  811. },
  812. "request.FollowReq": {
  813. "type": "object",
  814. "required": [
  815. "id"
  816. ],
  817. "properties": {
  818. "id": {
  819. "type": "integer"
  820. }
  821. }
  822. },
  823. "request.ProcessAudio": {
  824. "type": "object",
  825. "required": [
  826. "id"
  827. ],
  828. "properties": {
  829. "id": {
  830. "type": "integer"
  831. }
  832. }
  833. },
  834. "response.FollowResp": {
  835. "type": "object",
  836. "properties": {
  837. "followStatus": {
  838. "description": "1 已关注 2未关注",
  839. "allOf": [
  840. {
  841. "$ref": "#/definitions/constvar.BoolType"
  842. }
  843. ]
  844. }
  845. }
  846. },
  847. "util.Response": {
  848. "type": "object",
  849. "properties": {
  850. "code": {
  851. "type": "integer"
  852. },
  853. "data": {},
  854. "msg": {
  855. "type": "string"
  856. }
  857. }
  858. },
  859. "util.ResponseList": {
  860. "type": "object",
  861. "properties": {
  862. "code": {
  863. "type": "integer"
  864. },
  865. "data": {},
  866. "msg": {
  867. "type": "string"
  868. },
  869. "page": {
  870. "type": "integer"
  871. },
  872. "pageSize": {
  873. "type": "integer"
  874. },
  875. "total": {
  876. "type": "integer"
  877. }
  878. }
  879. }
  880. }
  881. }`
  882. // SwaggerInfo holds exported Swagger Info so clients can modify it
  883. var SwaggerInfo = &swag.Spec{
  884. Version: "",
  885. Host: "",
  886. BasePath: "",
  887. Schemes: []string{},
  888. Title: "",
  889. Description: "",
  890. InfoInstanceName: "swagger",
  891. SwaggerTemplate: docTemplate,
  892. LeftDelim: "{{",
  893. RightDelim: "}}",
  894. }
  895. func init() {
  896. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  897. }