log.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. package apis
  2. type AccessLog struct {
  3. Id int64 `json:"id" bson:"-"`
  4. MerchantId int64 `json:"-" bson:"merchant_id"`
  5. ApiId int64 `json:"-" bson:"api_id"`
  6. MerchantName string `json:"merchant_name" bson:"merchant_name"`
  7. ApiName string `json:"api_name" bson:"api_name"`
  8. RequestParams string `json:"request_params" bson:"request_params"`
  9. ResponseParams string `json:"origin_response" bson:"origin_response"`
  10. RawRequestParams string `json:"origin_request" bson:"origin_request"`
  11. RawResponseParams string `json:"response_params" bson:"-"`
  12. RawCode int `json:"raw_code" bson:"raw_code"`
  13. Code int `json:"code" bson:"code"`
  14. Msg string `json:"msg" bson:"-"`
  15. IsReuse bool `json:"is_reuse" bson:""`
  16. State bool `json:"state" bson:""`
  17. RemoteAddr string `json:"remote_addr" bson:""`
  18. Elapsed float64 `json:"elapsed" bson:""`
  19. Timestamp int64 `json:"timestamp" bson:""`
  20. ProviderCount int `json:"provider_count"`
  21. UtSource string `json:"ut_source"`
  22. CreateTime string `json:"create_time" bson:""`
  23. Search string `json:"search"`
  24. RawSearch string `json:"raw_search"`
  25. MerchantDataApiId int64 `json:"merchant_data_api_id"`
  26. OrderNo string `json:"order_no"`
  27. }
  28. type TGdAccessLogMonth1 struct {
  29. AccessLog `json:"access_log"`
  30. }
  31. type TGdAccessLogMonth2 struct {
  32. AccessLog `json:"access_log"`
  33. }
  34. type TGdAccessLogMonth3 struct {
  35. AccessLog `json:"access_log"`
  36. }
  37. type TGdAccessLogMonth4 struct {
  38. AccessLog `json:"access_log"`
  39. }
  40. type TGdAccessLogMonth5 struct {
  41. AccessLog `json:"access_log"`
  42. }
  43. type TGdAccessLogMonth6 struct {
  44. AccessLog `json:"access_log"`
  45. }
  46. type TGdAccessLogMonth7 struct {
  47. AccessLog `json:"access_log"`
  48. }
  49. type TGdAccessLogMonth8 struct {
  50. AccessLog `json:"access_log"`
  51. }
  52. type TGdAccessLogMonth9 struct {
  53. AccessLog `json:"access_log"`
  54. }
  55. type TGdAccessLogMonth10 struct {
  56. AccessLog `json:"access_log"`
  57. }
  58. type TGdAccessLogMonth11 struct {
  59. AccessLog `json:"access_log"`
  60. }
  61. type TGdAccessLogMonth12 struct {
  62. AccessLog `json:"access_log"`
  63. }
  64. type AccessLogDay struct {
  65. AccessLog `json:"access_log"`
  66. }
  67. func (o *TGdAccessLogMonth1) TableName() string {
  68. return "t_gd_access_log_month1"
  69. }
  70. func (o *TGdAccessLogMonth2) TableName() string {
  71. return "t_gd_access_log_month2"
  72. }
  73. func (o *TGdAccessLogMonth3) TableName() string {
  74. return "t_gd_access_log_month3"
  75. }
  76. func (o *TGdAccessLogMonth4) TableName() string {
  77. return "t_gd_access_log_month4"
  78. }
  79. func (o *TGdAccessLogMonth5) TableName() string {
  80. return "t_gd_access_log_month5"
  81. }
  82. func (o *TGdAccessLogMonth6) TableName() string {
  83. return "t_gd_access_log_month6"
  84. }
  85. func (o *TGdAccessLogMonth7) TableName() string {
  86. return "t_gd_access_log_month7"
  87. }
  88. func (o *TGdAccessLogMonth8) TableName() string {
  89. return "t_gd_access_log_month8"
  90. }
  91. func (o *TGdAccessLogMonth9) TableName() string {
  92. return "t_gd_access_log_month9"
  93. }
  94. func (o *TGdAccessLogMonth10) TableName() string {
  95. return "t_gd_access_log_month10"
  96. }
  97. func (o *TGdAccessLogMonth11) TableName() string {
  98. return "t_gd_access_log_month11"
  99. }
  100. func (o *TGdAccessLogMonth12) TableName() string {
  101. return "t_gd_access_log_month12"
  102. }
  103. func (o *TGdThirdpartLogMonth1) TableName() string {
  104. return "t_gd_thirdpart_log_month1"
  105. }
  106. func (o *TGdThirdpartLogMonth2) TableName() string {
  107. return "t_gd_thirdpart_log_month2"
  108. }
  109. func (o *TGdThirdpartLogMonth3) TableName() string {
  110. return "t_gd_thirdpart_log_month3"
  111. }
  112. func (o *TGdThirdpartLogMonth4) TableName() string {
  113. return "t_gd_thirdpart_log_month4"
  114. }
  115. func (o *TGdThirdpartLogMonth5) TableName() string {
  116. return "t_gd_thirdpart_log_month5"
  117. }
  118. func (o *TGdThirdpartLogMonth6) TableName() string {
  119. return "t_gd_thirdpart_log_month6"
  120. }
  121. func (o *TGdThirdpartLogMonth7) TableName() string {
  122. return "t_gd_thirdpart_log_month7"
  123. }
  124. func (o *TGdThirdpartLogMonth8) TableName() string {
  125. return "t_gd_thirdpart_log_month8"
  126. }
  127. func (o *TGdThirdpartLogMonth9) TableName() string {
  128. return "t_gd_thirdpart_log_month9"
  129. }
  130. func (o *TGdThirdpartLogMonth10) TableName() string {
  131. return "t_gd_thirdpart_log_month10"
  132. }
  133. func (o *TGdThirdpartLogMonth11) TableName() string {
  134. return "t_gd_thirdpart_log_month11"
  135. }
  136. func (o *TGdThirdpartLogMonth12) TableName() string {
  137. return "t_gd_thirdpart_log_month12"
  138. }
  139. func (o *AccessLogDay) TableName() string {
  140. return "t_gd_access_log_day"
  141. }
  142. type ThirdpartLogDay struct {
  143. ThirdpartLog `json:"thirdpart_log"`
  144. }
  145. func (o *ThirdpartLogDay) TableName() string {
  146. return "t_gd_thirdpart_log_day"
  147. }
  148. type TGdAccessLogHistory struct {
  149. AccessLog
  150. }
  151. func (o *TGdAccessLogHistory) TableName() string {
  152. return "t_gd_access_log_history"
  153. }
  154. func (o *AccessLog) TableName() string {
  155. return "t_gd_access_log"
  156. }
  157. type InvalidAccessLog struct {
  158. Id int64 `json:"id"`
  159. MerchantId int64 `json:"-"`
  160. ApiId int64 `json:"-"`
  161. MerchantName string `json:"merchant_name"`
  162. ApiName string `json:"api_name"`
  163. RequestParams string `json:"request_params"`
  164. Code int `json:"code"`
  165. Msg string `json:"msg"`
  166. RemoteAddr string `json:"remote_addr"`
  167. Elapsed float64 `json:"elapsed"`
  168. Timestamp int64 `json:"-"`
  169. CreateTime string `json:"create_time"`
  170. }
  171. func (o *InvalidAccessLog) TableName() string {
  172. return "t_gd_access_log_invalid"
  173. }
  174. type ThirdpartLog struct {
  175. Id int64 `json:"id"`
  176. AccessId int64 `json:"access_id"`
  177. MerchantId int64 `json:"-"`
  178. ApiId int64 `json:"-"`
  179. ProviderId int64 `json:"-"`
  180. ProviderApiId int64 `json:"-"`
  181. MerchantName string `json:"merchant_name"`
  182. ApiName string `json:"api_name"`
  183. ProviderName string `json:"provider_name"`
  184. ProviderApiName string `json:"provider_api_name"`
  185. RequestParams string `json:"request_params"`
  186. ResponseParams string `json:"response_params"`
  187. RawCode string `json:"raw_code"`
  188. Code int `json:"code"`
  189. Msg string `json:"msg"`
  190. State bool `json:"state"`
  191. RemoteAddr string `json:"remote_addr"`
  192. Search string `json:"search"`
  193. Elapsed float64 `json:"elapsed"`
  194. Timestamp int64 `json:"timestamp"`
  195. CreateTime string `json:"create_time"`
  196. }
  197. type TGdThirdpartAccessLogHistory struct {
  198. ThirdpartLog
  199. }
  200. type TGdThirdpartLogMonth1 struct {
  201. ThirdpartLog
  202. }
  203. type TGdThirdpartLogMonth2 struct {
  204. ThirdpartLog
  205. }
  206. type TGdThirdpartLogMonth3 struct {
  207. ThirdpartLog
  208. }
  209. type TGdThirdpartLogMonth4 struct {
  210. ThirdpartLog
  211. }
  212. type TGdThirdpartLogMonth5 struct {
  213. ThirdpartLog
  214. }
  215. type TGdThirdpartLogMonth6 struct {
  216. ThirdpartLog
  217. }
  218. type TGdThirdpartLogMonth7 struct {
  219. ThirdpartLog
  220. }
  221. type TGdThirdpartLogMonth8 struct {
  222. ThirdpartLog
  223. }
  224. type TGdThirdpartLogMonth9 struct {
  225. ThirdpartLog
  226. }
  227. type TGdThirdpartLogMonth10 struct {
  228. ThirdpartLog
  229. }
  230. type TGdThirdpartLogMonth11 struct {
  231. ThirdpartLog
  232. }
  233. type TGdThirdpartLogMonth12 struct {
  234. ThirdpartLog
  235. }
  236. func (o *TGdThirdpartAccessLogHistory) TableName() string {
  237. return "t_gd_thirdpart_access_log_history"
  238. }
  239. func (o *ThirdpartLog) TableName() string {
  240. return "t_gd_thirdpart_access_log"
  241. }
  242. type AccessLogWrite struct {
  243. State bool `json:"state"`
  244. Code int `json:"code"` // 原始错误码,非输出
  245. RespCode int `json:"resp_code"` // 输出错误码
  246. Msg string `json:"msg"`
  247. RawRequestParams string `json:"raw_request_params"`
  248. RawResponseParams string `json:"raw_response_params"`
  249. RequestParams string `json:"request_params"`
  250. ResponseParams string `json:"response_params"`
  251. IsReuse bool `json:"is_reuse"`
  252. UtSource string `json:"ut_source"`
  253. Elapsed float64 `json:"elapsed"`
  254. Search string `json:"search"`
  255. OrderNo string `json:"order_no"`
  256. }
  257. type ThirdpartLogWrite struct {
  258. ProviderApiId int64 `json:"provider_api_id"`
  259. RequestParams string `json:"request_params"`
  260. ResponseParams string `json:"response_params"`
  261. RawCode string `json:"raw_code"`
  262. Code int `json:"code"`
  263. Msg string `json:"msg"`
  264. State bool `json:"state"`
  265. Elapsed float64 `json:"elapsed"`
  266. ProviderCode string `json:"provider_code"`
  267. Search string `json:"search"`
  268. Timestamp int64 `json:"timestamp"`
  269. }
  270. type LogAddAccessLogReq struct {
  271. AccessLogWrite
  272. MerchantId int64 `json:"merchant_id"`
  273. ApiId int64 `json:"api_id"`
  274. RemoteAddr string `json:"remote_addr"`
  275. TimeStamp int64 `json:"time_stamp"`
  276. ThirdpartLogWrites []ThirdpartLogWrite `json:"thirdpart_log_writes"`
  277. MerchantChildApiId int64 `json:"merchant_child_api_id"`
  278. MerchantDataApiId int64 `json:"merchant_data_api_id"`
  279. }
  280. type LogAddAccessLogReply struct {
  281. }
  282. /*type LogAddThirdpartLogReq struct {
  283. MerchantId int64 `json:"merchant_id"`
  284. ApiId int64 `json:"api_id"`
  285. ProviderId int64 `json:"provider_id"`
  286. ProviderApiId int64 `json:"provider_api_id"`
  287. PlateNo string `json:"plate_no"`
  288. PlateType string `json:"plate_type"`
  289. Vin string `json:"vin"`
  290. RequestParams string `json:"request_params"`
  291. ResponseParams string `json:"response_params"`
  292. Code int `json:"code"`
  293. Msg string `json:"msg"`
  294. State bool `json:"state"`
  295. RemoteAddr string `json:"remote_addr"`
  296. Elapsed float64 `json:"elapsed"`
  297. Timestamp int64 `json:"timestamp"`
  298. }
  299. type LogAddThirdpartLogReply struct {
  300. }*/
  301. type LogQueryAccessLogReq struct {
  302. /*Vin string `json:"vin"`
  303. PlateNo string `json:"plate_no"`
  304. */
  305. MerchantId int64 `json:"merchant_id"`
  306. ApiId int64 `json:"api_id"`
  307. RequestParam string `json:"request_param"`
  308. State int `json:"state"`
  309. StartTimestamp int64 `json:"start_timestamp"`
  310. EndTimestamp int64 `json:"end_timestamp"`
  311. PageSize int64 `json:"page_size"`
  312. PageNumber int64 `json:"page_number"`
  313. Search string `json:"search"`
  314. Code int `json:"code"`
  315. }
  316. type LogQueryAccessLogReply struct {
  317. PageSize int64 `json:"page_size"`
  318. PageNumber int64 `json:"page_number"`
  319. Total int64 `json:"total"`
  320. AccessLogs []AccessLog `json:"access_logs"`
  321. }
  322. type LogQueryThirdpartAccessLogReq struct {
  323. /*Vin string `json:"vin"`
  324. PlateNo string `json:"plate_no"`*/
  325. RequestParam string `json:"request_param"`
  326. State int `json:"state"`
  327. ProviderId int64 `json:"provider_id"`
  328. ProviderApiId int64 `json:"provider_api_id"`
  329. StartTimestamp int64 `json:"start_timestamp"`
  330. EndTimestamp int64 `json:"end_timestamp"`
  331. PageSize int64 `json:"page_size"`
  332. PageNumber int64 `json:"page_number"`
  333. Search string `json:"search"`
  334. }
  335. type LogQueryThirdpartAccessLogReply struct {
  336. PageSize int64 `json:"page_size"`
  337. PageNumber int64 `json:"page_number"`
  338. Total int64 `json:"total"`
  339. ThirdpartLogs []ThirdpartLog `json:"thirdpart_logs"`
  340. }
  341. type LogQueryAccessLogCountReq struct {
  342. MerchantId int64 `json:"merchant_id"`
  343. ApiId int64 `json:"api_id"`
  344. StartTimestamp int64 `json:"start_timestamp"`
  345. EndTimestamp int64 `json:"end_timestamp"`
  346. PageSize int64 `json:"page_size"`
  347. PageNumber int64 `json:"page_number"`
  348. }
  349. type QueryAccessLogCount struct {
  350. Date string `json:"date"`
  351. MerchantName string `json:"merchant_name"`
  352. ApiName string `json:"api_name"`
  353. Total int64 `json:"total"`
  354. Success int64 `json:"success"`
  355. Reuse int64 `json:"reuse"`
  356. Elapsed float64 `json:"elapsed"`
  357. Failed int64 `json:"failed"`
  358. SuccessRate string `json:"success_rate"`
  359. ReuseRate string `json:"reuse_rate"`
  360. }
  361. type LogQueryAccessLogCountReply struct {
  362. PageSize int64 `json:"page_size"`
  363. PageNumber int64 `json:"page_number"`
  364. Total int64 `json:"total"`
  365. QueryAccessLogCounts []QueryAccessLogCount `json:"query_access_log_counts"`
  366. }
  367. type QueryThirdpartAccessLogCount struct {
  368. Date string `json:"date"`
  369. ProviderName string `json:"provider_name"`
  370. ProviderApiName string `json:"provider_api_name"`
  371. Total int64 `json:"total"`
  372. Success int64 `json:"success"`
  373. Elapsed float64 `json:"elapsed"`
  374. Failed int64 `json:"failed"`
  375. SuccessRate string `json:"success_rate"`
  376. }
  377. type LogQueryThirdpartAccessLogCountReq struct {
  378. ProviderId int64 `json:"provider_id"`
  379. ProviderApiId int64 `json:"provider_api_id"`
  380. StartTimestamp int64 `json:"start_timestamp"`
  381. EndTimestamp int64 `json:"end_timestamp"`
  382. PageSize int64 `json:"page_size"`
  383. PageNumber int64 `json:"page_number"`
  384. }
  385. type LogQueryThirdpartAccessLogCountReply struct {
  386. PageSize int64 `json:"page_size"`
  387. PageNumber int64 `json:"page_number"`
  388. Total int64 `json:"total"`
  389. QueryThirdpartAccessLogCounts []QueryThirdpartAccessLogCount `json:"query_thirdpart_access_log_count"`
  390. }
  391. type LogQueryAccessLogThirdpartLogReq struct {
  392. AccessId int64 `json:"access_id"`
  393. Timestamp int64 `json:"timestamp"`
  394. }
  395. type LogQueryAccessLogThirdpartLogReply struct {
  396. ThirdpartLogs []ThirdpartLog `json:"thirdpart_logs"`
  397. }
  398. type LogAddInvalidAccessLogReq struct {
  399. MerchantId int64 `json:"merchant_id"`
  400. ApiId int64 `json:"api_id"`
  401. RemoteAddr string `json:"remote_addr"`
  402. TimeStamp int64 `json:"time_stamp"`
  403. Code int `json:"code"`
  404. Msg string `json:"msg"`
  405. RequestParams string `json:"request_params"`
  406. Elapsed float64 `json:"elapsed"`
  407. }
  408. type LogAddInvalidAccessLogReply struct {
  409. }
  410. // 访问接口统计详情
  411. type LogQueryInterfaceCountReq struct {
  412. ApiId int64 `json:"api_id"`
  413. MerchantId int64 `json:"merchant_id"`
  414. StartTimestamp int64 `json:"start_timestamp"`
  415. EndTimestamp int64 `json:"end_timestamp"`
  416. Option int `json:"option"`
  417. TabName string `json:"tab_name"`
  418. }
  419. type LogQuerySuccessCount struct {
  420. Reuse int64 `json:"reuse"`
  421. Query int64 `json:"query"`
  422. UnQuery int64 `json:"un_query"`
  423. }
  424. type LogQueryFailCount struct {
  425. ProviderFail int64 `json:"provider_fail"`
  426. ServiceFail int64 `json:"service_fail"`
  427. }
  428. type LogQueryInvalidCount struct {
  429. ParamError int64 `json:"param_error"`
  430. ParamFormatError int64 `json:"param_format_error"`
  431. }
  432. type LogQueryInterfaceCountReply struct {
  433. Total int64 `json:"total"`
  434. SuccessRate float64 `json:"success_rate"`
  435. FailRate float64 `json:"fail_rate"`
  436. ReuseRate float64 `json:"reuse_rate"`
  437. QueryRate float64 `json:"query_rate"`
  438. UnQueryRate float64 `json:"un_query_rate"`
  439. ProviderFailRate float64 `json:"provider_fail_rate"`
  440. ServiceFailRate float64 `json:"service_fail_rate"`
  441. LogQuerySuccessCount LogQuerySuccessCount
  442. LogQueryFailCount LogQueryFailCount
  443. LogQueryInvalidCount LogQueryInvalidCount
  444. }
  445. type LogQueryUserAccessCountReq struct {
  446. ApiId int64 `json:"api_id"`
  447. MerchantId int64 `json:"merchant_id"`
  448. StartTimestamp int64 `json:"start_timestamp"`
  449. EndTimestamp int64 `json:"end_timestamp"`
  450. PageSize int64 `json:"page_size"`
  451. PageNumber int64 `json:"page_number"`
  452. }
  453. type LogQueryUserAcessCount struct {
  454. Date string `json:"date"`
  455. ApiName string `json:"api_name"`
  456. Total int64 `json:"total"`
  457. Valid int64 `json:"valid"`
  458. Fail int64 `json:"fail"`
  459. Query int64 `json:"query"`
  460. Reuse int64 `json:"reuse"`
  461. MerchantId int64 `json:"-"`
  462. ApiId int64 `json:"-"`
  463. ValidRate string `json:"valid_rate"`
  464. FailRate string `json:"fail_rate"`
  465. QueryRate string `json:"query_rate"`
  466. ReuseRate string `json:"reuse_rate"`
  467. Elapsed float64 `json:"elapsed"`
  468. Charge int64 `json:"charge"`
  469. ChargeRate string `json:"charge_rate"`
  470. MerchantDataApiId string `json:"-"`
  471. }
  472. type LogQueryUserAccessCountReply struct {
  473. PageSize int64 `json:"page_size"`
  474. PageNumber int64 `json:"page_number"`
  475. Total int64 `json:"total"`
  476. LogQueryUserAcessCount []LogQueryUserAcessCount
  477. }
  478. type LogQueryThirdpartAccessCountReq struct {
  479. ProviderApiId int64 `json:"provider_api_id"`
  480. Time string `json:"time"`
  481. StartTimestamp int64 `json:"start_timestamp"`
  482. EndTimestamp int64 `json:"end_timestamp"`
  483. }
  484. type LogQueryThirdpartAccessCountReply struct {
  485. Total int64 `json:"total" description:"总用量"`
  486. UseCount int64 `json:"use_count" description:"已用量"`
  487. LeftCount int64 `json:"left_count" description:"剩余用量"`
  488. }
  489. type LogQueryThirdpartInterfaceCountReq struct {
  490. ProviderApiId int64 `json:"provider_api_id"`
  491. StartTimestamp int64 `json:"start_timestamp"`
  492. EndTimestamp int64 `json:"end_timestamp"`
  493. PageSize int64 `json:"page_size"`
  494. PageNumber int64 `json:"page_number"`
  495. }
  496. type LogQueryThirdpartInterfaceCount struct {
  497. Date string `json:"date"`
  498. ProviderApiName string `json:"provider_api_name"`
  499. ProviderName string `json:"provider_name"`
  500. Total int64 `json:"total"`
  501. Success int64 `json:"success"`
  502. Fail int64 `json:"fail"`
  503. Query int64 `json:"query"`
  504. UnQuery int64 `json:"un_query"`
  505. FailRate string `json:"fail_rate"`
  506. QueryRate string `json:"query_rate"`
  507. }
  508. type LogQueryThirdpartInterfaceCountReply struct {
  509. PageSize int64 `json:"page_size"`
  510. PageNumber int64 `json:"page_number"`
  511. Total int64 `json:"total"`
  512. LogQueryThirdpartInterfaceCount []LogQueryThirdpartInterfaceCount `json:"log_query_thirdpart_interface_count"`
  513. }
  514. type LogQueryUserAccessCountExportReq struct {
  515. MerchantIds []int64 `json:"merchant_ids"`
  516. ApiIdList []int64 `json:"api_id_list"`
  517. MerchantId int64 `json:"merchant_id"`
  518. StartTimestamp int64 `json:"start_timestamp"`
  519. EndTimestamp int64 `json:"end_timestamp"`
  520. TimeList string `json:"time_list"`
  521. NeedCount bool `json:"need_count"`
  522. GroupByMerchant bool `json:"group_by_merchant"`
  523. TabName string `json:"tab_name"`
  524. }
  525. type LogQueryUserAcessCountExport struct {
  526. Date string `json:"date"`
  527. ApiName string `json:"api_name"`
  528. MerchantName string
  529. Total int64 `json:"total"`
  530. Valid int64 `json:"valid"`
  531. Success int64 `json:"success"`
  532. Query int64 `json:"query"`
  533. Reuse int64 `json:"reuse"`
  534. ValidRate string `json:"valid_rate"`
  535. SuccessRate string `json:"success_rate"`
  536. QueryRate string `json:"query_rate"`
  537. ReuseRate string `json:"reuse_rate"`
  538. AvgElapsed float64 `json:"avg_elapsed"`
  539. SumElapsed float64 `json:"sum_elapsed"`
  540. PlatformError int64 `json:"platform_error"`
  541. PlatformErrorRate string `json:"platform_error_rate"`
  542. ProviderError int64 `json:"provider_error"`
  543. ProviderErrorRate string `json:"provider_error_rate"`
  544. BigElapseds string `json:"big_elapseds"`
  545. BigElapsedList []int `json:"big_elapsed_list"`
  546. ChargeBigElapsedList []int `json:"charge_big_elapsed_list"`
  547. ApiId int64 `json:"api_id"`
  548. MerchantId int64 `json:"merchant_id"`
  549. Charge int64 `json:"charge"`
  550. ChargeRate string `json:"charge_rate"`
  551. CountInfos []MerchantApiCountInfo `orm:"-" json:"count_infos"`
  552. MerchantDataApiId string `json:"-"`
  553. TimeoutCount int `json:"timeout_count"`
  554. TimeoutInfo string `json:"timeout_info"`
  555. NotShow bool `json:"not_show"`
  556. }
  557. type MerchantApiCountInfo struct {
  558. MerchantDataApiId int64
  559. ComboType int
  560. Count int
  561. Used int
  562. Remain int
  563. }
  564. type SourceNameCount struct {
  565. Name string `json:"name"`
  566. Count int `json:"count"`
  567. Rate string `json:"rate"`
  568. }
  569. type SourceExport struct {
  570. ApiName string `json:"api_name"`
  571. Date string `json:"date"`
  572. Provider string `json:"provider"`
  573. Total int `json:"total"`
  574. Sources []SourceNameCount `json:"sources"`
  575. }
  576. type ErrorCodeCount struct {
  577. Code string
  578. Count int
  579. Rate string
  580. }
  581. type ErrorExport struct {
  582. ApiName string `json:"api_name"`
  583. Codes string `json:"codes"`
  584. Total int `json:"total"`
  585. Date string `json:"date"`
  586. Errors []ErrorCodeCount `json:"errors"`
  587. }
  588. type LogQueryUserAccessCountExportReply struct {
  589. LogQueryUserAcessCount []LogQueryUserAcessCountExport
  590. SourceCount []SourceExport
  591. ErrorCount []ErrorExport
  592. }
  593. type TGdAccessLogCountExport struct {
  594. Id int64 `json:"id"`
  595. FileName string `json:"file_name"`
  596. Path string `json:"path"`
  597. Status string `json:"status"`
  598. CreateTime string `json:"create_time"`
  599. ExportType int `json:"export_type"`
  600. }
  601. type LogExportCreateReq struct {
  602. Id int64 `json:"id"`
  603. FileName string `json:"file_name"`
  604. Path string `json:"path"`
  605. Status string `json:"status"`
  606. ExportType int `json:"export_type"`
  607. }
  608. type LogExportCreateReply struct {
  609. Id int64 `json:"id"`
  610. }
  611. type LogExportListReq struct {
  612. PageNumber int64 `json:"page_number"`
  613. IsAll bool `json:"is_all"`
  614. ExportType int `json:"export_type"`
  615. }
  616. type LogExportListReply struct {
  617. PageNumber int64 `json:"page_number"`
  618. PageSize int64 `json:"page_size"`
  619. Total int64 `json:"total"`
  620. ExportList []TGdAccessLogCountExport `json:"export_list"`
  621. }
  622. type LogExportDeleteReq struct {
  623. Id int64 `json:"id"`
  624. ExportDir string `json:"export_dir"`
  625. }
  626. type LogExportDeleteReply struct {
  627. }
  628. type LogQueryProviderCountExportReq struct {
  629. ProviderApiIdList []int64 `json:"provider_api_id_list"`
  630. ProviderId int64 `json:"provider_id"`
  631. StartTimestamp int64 `json:"start_timestamp"`
  632. EndTimestamp int64 `json:"end_timestamp"`
  633. TimeList string `json:"time_list"`
  634. TabName string `json:"tab_name"`
  635. }
  636. type ProviderApiIdTotal struct {
  637. ProviderApiId int64
  638. BigElapseds string
  639. Total int64
  640. }
  641. type LogQueryProviderCountExport struct {
  642. Date string `json:"date"`
  643. ProviderApiIdTotals []ProviderApiIdTotal `json:"provider_api_id_totals"`
  644. ProviderApiIds []int64
  645. ProviderName string `json:"provider_name"`
  646. ProviderApiName string `json:"provider_api_name"`
  647. ProviderApiId int64 `json:"provider_api_id"`
  648. Total int64 `json:"total"`
  649. Success int64 `json:"success"`
  650. Failed int64 `json:"failed"`
  651. FailedRate string `json:"failed_rate"`
  652. Query int64 `json:"query"`
  653. QueryNoRecord int64 `json:"query_no_record"`
  654. QueryNoRecordRate string `json:"query_no_record_rate"`
  655. AvgElapsed float64 `json:"avg_elapsed"`
  656. SumElapsed float64 `json:"sum_elapsed"`
  657. BigElapseds string `json:"big_elapseds"`
  658. BigElapsedList []int `json:"big_elapsed_list"`
  659. ChargeBigElapsedList []int `json:"charge_big_elapsed_list"`
  660. Charge int64 `json:"charge"`
  661. ChargeRate string `json:"charge_rate"`
  662. }
  663. type LogQueryProviderCountExportReply struct {
  664. LogQueryProviderCount []LogQueryProviderCountExport
  665. }
  666. type LogQueryInterfaceAnalyzeError struct {
  667. Code int `json:"code"`
  668. Msg string `json:"msg"`
  669. Count int `json:"count"`
  670. }
  671. type LogQueryInterfaceAnalyzeErrorReply struct {
  672. List []LogQueryInterfaceAnalyzeError `json:"list"`
  673. }
  674. type LogQueryInterfaceThirdPartyCount struct {
  675. ProviderName string `json:"provider_name"`
  676. ProviderApiName string `json:"provider_api_name"`
  677. Count int `json:"count"`
  678. }
  679. type LogQueryInterfaceThirdPartyCountReply struct {
  680. List []LogQueryInterfaceThirdPartyCount
  681. }
  682. type ThirdPartyInterfaceErrorAnalyzeReq struct {
  683. ApiId int64 `json:"api_id"`
  684. StartTimestamp int64 `json:"start_timestamp"`
  685. EndTimestamp int64 `json:"end_timestamp"`
  686. TabName string `json:"tab_name"`
  687. }
  688. type ThirdPartyInterfaceErrorAnalyze struct {
  689. Code string `json:"code"`
  690. Msg string `json:"msg"`
  691. Count int `json:"count"`
  692. }
  693. type ThirdPartyInterfaceErrorAnalyzeReply struct {
  694. List []ThirdPartyInterfaceErrorAnalyze `json:"list"`
  695. }
  696. type LogUpdateApiNameReq struct {
  697. Type int `json:"type" description:"0 api name, 1 provider_api_name 2 merchant_name, 3 provider_name"`
  698. Name string `json:"api_name"`
  699. Id int64 `json:"id"`
  700. }
  701. type LogUpdateApiNameReply struct {
  702. }
  703. type LogGenerateReportReq struct {
  704. Dates string `json:"dates"`
  705. ApiReport bool `json:"api_report"`
  706. ProviderReport bool `json:"provider_report"`
  707. MerchantId int64 `json:"merchant_id"`
  708. ApiId int64 `json:"api_id"`
  709. ProviderApiId int64 `json:"provider_api_id"`
  710. MysqlAddr string `json:"-"`
  711. MysqlUser string `json:"-"`
  712. MysqlPass string `json:"-"`
  713. }
  714. type LogGenerateReportReply struct {
  715. }