docs.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  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. "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": "string",
  304. "description": "车次",
  305. "name": "trainNumber",
  306. "in": "query"
  307. }
  308. ],
  309. "responses": {
  310. "200": {
  311. "description": "成功",
  312. "schema": {
  313. "allOf": [
  314. {
  315. "$ref": "#/definitions/util.ResponseList"
  316. },
  317. {
  318. "type": "object",
  319. "properties": {
  320. "data": {
  321. "type": "array",
  322. "items": {
  323. "$ref": "#/definitions/models.Audio"
  324. }
  325. }
  326. }
  327. }
  328. ]
  329. }
  330. }
  331. }
  332. }
  333. },
  334. "/api-sa/v1/audio/process": {
  335. "post": {
  336. "produces": [
  337. "application/json"
  338. ],
  339. "tags": [
  340. "音频"
  341. ],
  342. "summary": "处理音频",
  343. "parameters": [
  344. {
  345. "description": "参数",
  346. "name": "object",
  347. "in": "body",
  348. "required": true,
  349. "schema": {
  350. "$ref": "#/definitions/request.ProcessAudio"
  351. }
  352. }
  353. ],
  354. "responses": {
  355. "200": {
  356. "description": "成功",
  357. "schema": {
  358. "$ref": "#/definitions/util.Response"
  359. }
  360. }
  361. }
  362. }
  363. },
  364. "/api-sa/v1/audio/trainInfoList": {
  365. "get": {
  366. "produces": [
  367. "application/json"
  368. ],
  369. "tags": [
  370. "音频"
  371. ],
  372. "summary": "获取火车信息",
  373. "parameters": [
  374. {
  375. "enum": [
  376. 1,
  377. 2,
  378. 3
  379. ],
  380. "type": "integer",
  381. "x-enum-comments": {
  382. "ClassLocomotive": "机车",
  383. "ClassStation": "车站",
  384. "ClassTrain": "车次"
  385. },
  386. "x-enum-varnames": [
  387. "ClassLocomotive",
  388. "ClassTrain",
  389. "ClassStation"
  390. ],
  391. "description": "信息分类 1机车2车次3车站",
  392. "name": "class",
  393. "in": "query"
  394. },
  395. {
  396. "type": "integer",
  397. "description": "页码",
  398. "name": "page",
  399. "in": "query"
  400. },
  401. {
  402. "type": "integer",
  403. "description": "每页大小",
  404. "name": "pageSize",
  405. "in": "query"
  406. },
  407. {
  408. "type": "integer",
  409. "description": "上级id",
  410. "name": "parentID",
  411. "in": "query"
  412. }
  413. ],
  414. "responses": {
  415. "200": {
  416. "description": "成功",
  417. "schema": {
  418. "allOf": [
  419. {
  420. "$ref": "#/definitions/util.ResponseList"
  421. },
  422. {
  423. "type": "object",
  424. "properties": {
  425. "data": {
  426. "type": "array",
  427. "items": {
  428. "$ref": "#/definitions/models.TrainInfo"
  429. }
  430. }
  431. }
  432. }
  433. ]
  434. }
  435. }
  436. }
  437. }
  438. },
  439. "/api-sa/v1/audio/upload": {
  440. "post": {
  441. "produces": [
  442. "application/json"
  443. ],
  444. "tags": [
  445. "音频"
  446. ],
  447. "summary": "上传音频",
  448. "parameters": [
  449. {
  450. "type": "file",
  451. "description": "音频文件",
  452. "name": "file",
  453. "in": "formData",
  454. "required": true
  455. }
  456. ],
  457. "responses": {
  458. "200": {
  459. "description": "成功",
  460. "schema": {
  461. "$ref": "#/definitions/util.Response"
  462. }
  463. }
  464. }
  465. }
  466. },
  467. "/api-sa/v1/text/add": {
  468. "post": {
  469. "produces": [
  470. "application/json"
  471. ],
  472. "tags": [
  473. "文字库"
  474. ],
  475. "summary": "新增文字",
  476. "parameters": [
  477. {
  478. "description": "参数",
  479. "name": "object",
  480. "in": "body",
  481. "required": true,
  482. "schema": {
  483. "$ref": "#/definitions/request.AddTextReq"
  484. }
  485. }
  486. ],
  487. "responses": {
  488. "200": {
  489. "description": "成功",
  490. "schema": {
  491. "$ref": "#/definitions/util.Response"
  492. }
  493. }
  494. }
  495. }
  496. },
  497. "/api-sa/v1/text/list": {
  498. "get": {
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "文字库"
  504. ],
  505. "summary": "文字库列表",
  506. "parameters": [
  507. {
  508. "type": "string",
  509. "description": "关键字",
  510. "name": "keyword",
  511. "in": "query"
  512. },
  513. {
  514. "type": "integer",
  515. "description": "页码",
  516. "name": "page",
  517. "in": "query"
  518. },
  519. {
  520. "type": "integer",
  521. "description": "每页大小",
  522. "name": "pageSize",
  523. "in": "query"
  524. }
  525. ],
  526. "responses": {
  527. "200": {
  528. "description": "成功",
  529. "schema": {
  530. "allOf": [
  531. {
  532. "$ref": "#/definitions/util.ResponseList"
  533. },
  534. {
  535. "type": "object",
  536. "properties": {
  537. "data": {
  538. "type": "array",
  539. "items": {
  540. "$ref": "#/definitions/models.Word"
  541. }
  542. }
  543. }
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. }
  551. },
  552. "definitions": {
  553. "constvar.AudioStatus": {
  554. "type": "integer",
  555. "enum": [
  556. 0,
  557. 1,
  558. 2,
  559. 3,
  560. 4
  561. ],
  562. "x-enum-comments": {
  563. "AudioStatusFailed": "处理失败",
  564. "AudioStatusFinish": "处理完成",
  565. "AudioStatusProcessing": "处理中",
  566. "AudioStatusUploadOk": "上传成功 待处理",
  567. "AudioStatusUploading": "上传中"
  568. },
  569. "x-enum-varnames": [
  570. "AudioStatusUploading",
  571. "AudioStatusUploadOk",
  572. "AudioStatusProcessing",
  573. "AudioStatusFinish",
  574. "AudioStatusFailed"
  575. ]
  576. },
  577. "constvar.BoolType": {
  578. "type": "integer",
  579. "enum": [
  580. 1,
  581. 2
  582. ],
  583. "x-enum-comments": {
  584. "BoolTypeFalse": "false",
  585. "BoolTypeTrue": "true"
  586. },
  587. "x-enum-varnames": [
  588. "BoolTypeTrue",
  589. "BoolTypeFalse"
  590. ]
  591. },
  592. "constvar.Class": {
  593. "type": "integer",
  594. "enum": [
  595. 1,
  596. 2,
  597. 3
  598. ],
  599. "x-enum-comments": {
  600. "ClassLocomotive": "机车",
  601. "ClassStation": "车站",
  602. "ClassTrain": "车次"
  603. },
  604. "x-enum-varnames": [
  605. "ClassLocomotive",
  606. "ClassTrain",
  607. "ClassStation"
  608. ]
  609. },
  610. "gorm.DeletedAt": {
  611. "type": "object",
  612. "properties": {
  613. "time": {
  614. "type": "string"
  615. },
  616. "valid": {
  617. "description": "Valid is true if Time is not NULL",
  618. "type": "boolean"
  619. }
  620. }
  621. },
  622. "models.Audio": {
  623. "type": "object",
  624. "properties": {
  625. "audioStatus": {
  626. "description": "音频状态",
  627. "allOf": [
  628. {
  629. "$ref": "#/definitions/constvar.AudioStatus"
  630. }
  631. ]
  632. },
  633. "audioText": {
  634. "description": "解析出的文本",
  635. "type": "string"
  636. },
  637. "createdAt": {
  638. "type": "string"
  639. },
  640. "deletedAt": {
  641. "$ref": "#/definitions/gorm.DeletedAt"
  642. },
  643. "driverNumber": {
  644. "description": "司机号",
  645. "type": "string"
  646. },
  647. "id": {
  648. "type": "integer"
  649. },
  650. "isFollowed": {
  651. "description": "是否关注 1关注 2未关注",
  652. "allOf": [
  653. {
  654. "$ref": "#/definitions/constvar.BoolType"
  655. }
  656. ]
  657. },
  658. "locomotiveNumber": {
  659. "description": "机车号",
  660. "type": "string"
  661. },
  662. "name": {
  663. "description": "音频名称",
  664. "type": "string"
  665. },
  666. "occurrenceTime": {
  667. "type": "string"
  668. },
  669. "score": {
  670. "description": "置信度",
  671. "type": "number"
  672. },
  673. "size": {
  674. "description": "音频大小",
  675. "type": "integer"
  676. },
  677. "station": {
  678. "description": "车站",
  679. "type": "string"
  680. },
  681. "trainNumber": {
  682. "description": "车次",
  683. "type": "string"
  684. },
  685. "updatedAt": {
  686. "type": "string"
  687. },
  688. "words": {
  689. "description": "匹配到的文字数组",
  690. "type": "array",
  691. "items": {
  692. "type": "string"
  693. }
  694. }
  695. }
  696. },
  697. "models.TrainInfo": {
  698. "type": "object",
  699. "properties": {
  700. "class": {
  701. "description": "分类 1 机车 2车次 3 车站",
  702. "allOf": [
  703. {
  704. "$ref": "#/definitions/constvar.Class"
  705. }
  706. ]
  707. },
  708. "createdAt": {
  709. "type": "string"
  710. },
  711. "deletedAt": {
  712. "$ref": "#/definitions/gorm.DeletedAt"
  713. },
  714. "id": {
  715. "type": "integer"
  716. },
  717. "name": {
  718. "description": "名称",
  719. "type": "string"
  720. },
  721. "parentID": {
  722. "description": "上级id",
  723. "type": "integer"
  724. },
  725. "updatedAt": {
  726. "type": "string"
  727. }
  728. }
  729. },
  730. "models.Word": {
  731. "type": "object",
  732. "properties": {
  733. "content": {
  734. "description": "文字",
  735. "type": "string"
  736. },
  737. "createdAt": {
  738. "type": "string"
  739. },
  740. "deletedAt": {
  741. "$ref": "#/definitions/gorm.DeletedAt"
  742. },
  743. "id": {
  744. "type": "integer"
  745. },
  746. "locomotiveNumber": {
  747. "description": "机车号",
  748. "type": "string"
  749. },
  750. "updatedAt": {
  751. "type": "string"
  752. }
  753. }
  754. },
  755. "request.AddTextReq": {
  756. "type": "object",
  757. "required": [
  758. "content",
  759. "locomotiveNumber"
  760. ],
  761. "properties": {
  762. "content": {
  763. "description": "音频名称",
  764. "type": "string"
  765. },
  766. "locomotiveNumber": {
  767. "description": "机车号",
  768. "type": "string"
  769. }
  770. }
  771. },
  772. "request.BatchProcessAudio": {
  773. "type": "object",
  774. "required": [
  775. "ids"
  776. ],
  777. "properties": {
  778. "ids": {
  779. "type": "array",
  780. "items": {
  781. "type": "integer"
  782. }
  783. }
  784. }
  785. },
  786. "request.FollowReq": {
  787. "type": "object",
  788. "required": [
  789. "id"
  790. ],
  791. "properties": {
  792. "id": {
  793. "type": "integer"
  794. }
  795. }
  796. },
  797. "request.ProcessAudio": {
  798. "type": "object",
  799. "required": [
  800. "id"
  801. ],
  802. "properties": {
  803. "id": {
  804. "type": "integer"
  805. }
  806. }
  807. },
  808. "response.FollowResp": {
  809. "type": "object",
  810. "properties": {
  811. "followStatus": {
  812. "description": "1 已关注 2未关注",
  813. "allOf": [
  814. {
  815. "$ref": "#/definitions/constvar.BoolType"
  816. }
  817. ]
  818. }
  819. }
  820. },
  821. "util.Response": {
  822. "type": "object",
  823. "properties": {
  824. "code": {
  825. "type": "integer"
  826. },
  827. "data": {},
  828. "msg": {
  829. "type": "string"
  830. }
  831. }
  832. },
  833. "util.ResponseList": {
  834. "type": "object",
  835. "properties": {
  836. "code": {
  837. "type": "integer"
  838. },
  839. "data": {},
  840. "msg": {
  841. "type": "string"
  842. },
  843. "page": {
  844. "type": "integer"
  845. },
  846. "pageSize": {
  847. "type": "integer"
  848. },
  849. "total": {
  850. "type": "integer"
  851. }
  852. }
  853. }
  854. }
  855. }`
  856. // SwaggerInfo holds exported Swagger Info so clients can modify it
  857. var SwaggerInfo = &swag.Spec{
  858. Version: "",
  859. Host: "",
  860. BasePath: "",
  861. Schemes: []string{},
  862. Title: "",
  863. Description: "",
  864. InfoInstanceName: "swagger",
  865. SwaggerTemplate: docTemplate,
  866. LeftDelim: "{{",
  867. RightDelim: "}}",
  868. }
  869. func init() {
  870. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  871. }