docs.go 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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/list": {
  17. "get": {
  18. "produces": [
  19. "application/json"
  20. ],
  21. "tags": [
  22. "音频"
  23. ],
  24. "summary": "音频分析检索",
  25. "parameters": [
  26. {
  27. "type": "string",
  28. "description": "司机号",
  29. "name": "driverNumber",
  30. "in": "query"
  31. },
  32. {
  33. "type": "string",
  34. "description": "关键字",
  35. "name": "keyword",
  36. "in": "query"
  37. },
  38. {
  39. "type": "string",
  40. "description": "机车号",
  41. "name": "locomotiveNumber",
  42. "in": "query"
  43. },
  44. {
  45. "type": "integer",
  46. "description": "页码",
  47. "name": "page",
  48. "in": "query"
  49. },
  50. {
  51. "type": "integer",
  52. "description": "每页大小",
  53. "name": "pageSize",
  54. "in": "query"
  55. },
  56. {
  57. "type": "string",
  58. "description": "车站号",
  59. "name": "stationNumber",
  60. "in": "query"
  61. },
  62. {
  63. "type": "string",
  64. "description": "车次",
  65. "name": "trainNumber",
  66. "in": "query"
  67. }
  68. ],
  69. "responses": {
  70. "200": {
  71. "description": "成功",
  72. "schema": {
  73. "allOf": [
  74. {
  75. "$ref": "#/definitions/util.ResponseList"
  76. },
  77. {
  78. "type": "object",
  79. "properties": {
  80. "data": {
  81. "type": "array",
  82. "items": {
  83. "$ref": "#/definitions/models.Audio"
  84. }
  85. }
  86. }
  87. }
  88. ]
  89. }
  90. }
  91. }
  92. }
  93. },
  94. "/api-sa/v1/audio/process": {
  95. "post": {
  96. "produces": [
  97. "application/json"
  98. ],
  99. "tags": [
  100. "音频"
  101. ],
  102. "summary": "处理音频",
  103. "parameters": [
  104. {
  105. "description": "音频信息",
  106. "name": "object",
  107. "in": "body",
  108. "required": true,
  109. "schema": {
  110. "$ref": "#/definitions/request.ProcessAudio"
  111. }
  112. }
  113. ],
  114. "responses": {
  115. "200": {
  116. "description": "成功",
  117. "schema": {
  118. "$ref": "#/definitions/util.Response"
  119. }
  120. }
  121. }
  122. }
  123. },
  124. "/api-sa/v1/audio/upload": {
  125. "post": {
  126. "produces": [
  127. "application/json"
  128. ],
  129. "tags": [
  130. "音频"
  131. ],
  132. "summary": "上传音频",
  133. "parameters": [
  134. {
  135. "type": "file",
  136. "description": "音频文件",
  137. "name": "file",
  138. "in": "formData",
  139. "required": true
  140. }
  141. ],
  142. "responses": {
  143. "200": {
  144. "description": "成功",
  145. "schema": {
  146. "$ref": "#/definitions/util.Response"
  147. }
  148. }
  149. }
  150. }
  151. }
  152. },
  153. "definitions": {
  154. "constvar.AudioStatus": {
  155. "type": "integer",
  156. "enum": [
  157. 0,
  158. 1,
  159. 2,
  160. 3,
  161. 4
  162. ],
  163. "x-enum-comments": {
  164. "AudioStatusFailed": "处理失败",
  165. "AudioStatusFinish": "处理完成",
  166. "AudioStatusProcessing": "处理中",
  167. "AudioStatusUploadOk": "上传成功 待处理",
  168. "AudioStatusUploading": "上传中"
  169. },
  170. "x-enum-varnames": [
  171. "AudioStatusUploading",
  172. "AudioStatusUploadOk",
  173. "AudioStatusProcessing",
  174. "AudioStatusFinish",
  175. "AudioStatusFailed"
  176. ]
  177. },
  178. "constvar.BoolType": {
  179. "type": "integer",
  180. "enum": [
  181. 1,
  182. 2
  183. ],
  184. "x-enum-comments": {
  185. "BoolTypeFalse": "false",
  186. "BoolTypeTrue": "true"
  187. },
  188. "x-enum-varnames": [
  189. "BoolTypeTrue",
  190. "BoolTypeFalse"
  191. ]
  192. },
  193. "gorm.DeletedAt": {
  194. "type": "object",
  195. "properties": {
  196. "time": {
  197. "type": "string"
  198. },
  199. "valid": {
  200. "description": "Valid is true if Time is not NULL",
  201. "type": "boolean"
  202. }
  203. }
  204. },
  205. "models.Audio": {
  206. "type": "object",
  207. "properties": {
  208. "audioStatus": {
  209. "description": "音频状态",
  210. "allOf": [
  211. {
  212. "$ref": "#/definitions/constvar.AudioStatus"
  213. }
  214. ]
  215. },
  216. "createdAt": {
  217. "type": "string"
  218. },
  219. "deletedAt": {
  220. "$ref": "#/definitions/gorm.DeletedAt"
  221. },
  222. "driverNumber": {
  223. "description": "司机号",
  224. "type": "string"
  225. },
  226. "id": {
  227. "type": "integer"
  228. },
  229. "isFollowed": {
  230. "description": "是否关注 1关注 2未关注",
  231. "allOf": [
  232. {
  233. "$ref": "#/definitions/constvar.BoolType"
  234. }
  235. ]
  236. },
  237. "locomotiveNumber": {
  238. "description": "机车号",
  239. "type": "string"
  240. },
  241. "name": {
  242. "description": "音频名称",
  243. "type": "string"
  244. },
  245. "occurrenceTime": {
  246. "type": "string"
  247. },
  248. "size": {
  249. "description": "音频大小",
  250. "type": "integer"
  251. },
  252. "stationNumber": {
  253. "description": "车站号",
  254. "type": "string"
  255. },
  256. "trainNumber": {
  257. "description": "车次",
  258. "type": "string"
  259. },
  260. "updatedAt": {
  261. "type": "string"
  262. }
  263. }
  264. },
  265. "request.ProcessAudio": {
  266. "type": "object",
  267. "required": [
  268. "id"
  269. ],
  270. "properties": {
  271. "id": {
  272. "type": "integer"
  273. }
  274. }
  275. },
  276. "util.Response": {
  277. "type": "object",
  278. "properties": {
  279. "code": {
  280. "type": "integer"
  281. },
  282. "data": {},
  283. "msg": {
  284. "type": "string"
  285. }
  286. }
  287. },
  288. "util.ResponseList": {
  289. "type": "object",
  290. "properties": {
  291. "code": {
  292. "type": "integer"
  293. },
  294. "data": {},
  295. "msg": {
  296. "type": "string"
  297. },
  298. "page": {
  299. "type": "integer"
  300. },
  301. "pageSize": {
  302. "type": "integer"
  303. },
  304. "total": {
  305. "type": "integer"
  306. }
  307. }
  308. }
  309. }
  310. }`
  311. // SwaggerInfo holds exported Swagger Info so clients can modify it
  312. var SwaggerInfo = &swag.Spec{
  313. Version: "",
  314. Host: "",
  315. BasePath: "",
  316. Schemes: []string{},
  317. Title: "",
  318. Description: "",
  319. InfoInstanceName: "swagger",
  320. SwaggerTemplate: docTemplate,
  321. LeftDelim: "{{",
  322. RightDelim: "}}",
  323. }
  324. func init() {
  325. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  326. }