log.go 26 KB

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