log.go 29 KB

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