docs.go 31 KB

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