bi.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package apis
  4. type BiGetDashReq struct {
  5. }
  6. type BiDashVehicle struct {
  7. Count int64 `json:"count"`
  8. Increase int64 `json:"increase"`
  9. }
  10. type BiDashCharge struct {
  11. Charge int64 `json:"charge"`
  12. ChargeRate float64 `json:"charge_rage"`
  13. Increase float64 `json:"increase"`
  14. }
  15. type BiDashFail struct {
  16. Fail int64 `json:"fail"`
  17. FailRate float64 `json:"fail_rate"`
  18. Increase float64 `json:"increase"`
  19. }
  20. type BiDash struct {
  21. VehicleInfo BiDashVehicle `json:"vehicle_info"`
  22. ChargeInfo BiDashCharge `json:"charge_info"`
  23. FailInfo BiDashFail `json:"fail_info"`
  24. }
  25. type BiGetDashReply struct {
  26. DashInfo BiDash `json:"dash_info"`
  27. }
  28. type BiGetServiceStatusReq struct {
  29. StartTimestamp int64 `json:"start_timestamp"`
  30. EndTimestamp int64 `json:"end_timestamp"`
  31. MerchantId int64 `json:"merchant_id"`
  32. ApiId int64 `json:"api_id"`
  33. }
  34. type ServiceStatus struct {
  35. TimestampMinute int64 `json:"timestamp_minute"`
  36. FailCount int `json:"fail_count"`
  37. AvgElapsed float64 `json:"avg_elapsed"`
  38. }
  39. type BiGetServiceStatusReply struct {
  40. Infos []ServiceStatus `json:"infos"`
  41. }
  42. type BiGetProviderServiceStatusReq struct {
  43. StartTimestamp int64 `json:"start_timestamp"`
  44. EndTimestamp int64 `json:"end_timestamp"`
  45. ProviderApiId int64 `json:"provider_api_id"`
  46. }
  47. type BiGetProviderServiceStatusReply struct {
  48. Infos []ServiceStatus `json:"infos"`
  49. }
  50. type BiGetTrendReq struct {
  51. StartTimestamp int64 `json:"start_timestamp"`
  52. EndTimestamp int64 `json:"end_timestamp"`
  53. MerchantId int64 `json:"merchant_id"`
  54. ApiId int64 `json:"api_id"`
  55. }
  56. type Trend struct {
  57. Date string `json:"date"`
  58. Total int64 `json:"total"`
  59. Charge int64 `json:"charge"`
  60. }
  61. type BiGetTrendReply struct {
  62. Infos []Trend `json:"infos"`
  63. TotalMax int64 `json:"total_max"`
  64. TotalAvg int64 `json:"total_avg"`
  65. TotalCurrent int64 `json:"total_current"`
  66. ChargeMax int64 `json:"charge_max"`
  67. ChargeAvg int64 `json:"charge_avg"`
  68. ChargeCurrent int64 `json:"charge_current"`
  69. LastStageTotalAvg int64 `json:"last_stage_total_avg"`
  70. LastStageChargeAvg int64 `json:"last_stage_charge_avg"`
  71. }
  72. type BiGetProviderTrendReq struct {
  73. StartTimestamp int64 `json:"start_timestamp"`
  74. EndTimestamp int64 `json:"end_timestamp"`
  75. ProviderApiId int64 `json:"provider_api_id"`
  76. ProviderApiIdNew int64 `json:"provider_api_id_new"`
  77. }
  78. type BiGetProviderTrendReply struct {
  79. Infos []Trend `json:"infos"`
  80. TotalMax int64 `json:"total_max"`
  81. TotalAvg int64 `json:"total_avg"`
  82. TotalCurrent int64 `json:"total_current"`
  83. ChargeMax int64 `json:"charge_max"`
  84. ChargeAvg int64 `json:"charge_avg"`
  85. ChargeCurrent int64 `json:"charge_current"`
  86. LastStageTotalAvg int64 `json:"last_stage_total_avg"`
  87. LastStageChargeAvg int64 `json:"last_stage_charge_avg"`
  88. }
  89. type BiGetReportReq struct {
  90. Date []string `json:"date"`
  91. MerchantId int64 `json:"merchant_id"`
  92. MerchantIds []int64 `json:"merchant_ids"`
  93. ApiId []int64 `json:"api_id"`
  94. PageNumber int `json:"page_number"`
  95. PageSize int `json:"page_size"`
  96. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  97. IsAll bool `json:"is_all"`
  98. }
  99. type BiReportInfo struct {
  100. MerchantName string `json:"merchant_name"`
  101. Date string `json:"date"`
  102. ApiName string `json:"api_name"`
  103. Total int64 `json:"total"`
  104. Valid int64 `json:"valid"`
  105. ValidRate string `json:"valid_rate"`
  106. QueryNoRecord int64 `json:"query_no_record"`
  107. QueryNoRecordRate string `json:"query_no_record_rate"`
  108. Fail int64 `json:"fail"`
  109. FailRate string `json:"fail_rate"`
  110. Charge int64 `json:"charge"`
  111. ChargeRate string `json:"charge_rate"`
  112. AvgElapsed string `json:"avg_elapsed"`
  113. Reuse int64 `json:"reuse"`
  114. Success int64 `json:"-"`
  115. ApiId int64 `json:"-"`
  116. ReuseRate string `json:"reuse_rate"`
  117. }
  118. type BiProviderReportInfo struct {
  119. ProviderName string `json:"provider_name"`
  120. Date string `json:"date"`
  121. ProviderApiName string `json:"provider_api_name"`
  122. Total int64 `json:"total"`
  123. QueryNoRecord int64 `json:"query_no_record"`
  124. QueryNoRecordRate string `json:"query_no_record_rate"`
  125. Fail int64 `json:"fail"`
  126. FailRate string `json:"fail_rate"`
  127. Charge int64 `json:"charge"`
  128. ChargeRate string `json:"charge_rate"`
  129. AvgElapsed string `json:"avg_elapsed"`
  130. ProviderApiId int64 `json:"provider_api_id"`
  131. }
  132. type BiGetReportReply struct {
  133. PageSize int `json:"page_size"`
  134. Total int `json:"total"`
  135. Infos []BiReportInfo `json:"bi_report_info"`
  136. Sum BiReportInfo `json:"sum"`
  137. }
  138. type BiGetProviderReportReq struct {
  139. Date []string `json:"date"`
  140. ProviderApiId []int64 `json:"provider_api_id"`
  141. ProviderId int64 `json:"provider_id"`
  142. PageNumber int `json:"page_number"`
  143. ProviderApiIdNew []int64 `json:"provider_api_id_new"`
  144. TodayEndTimestamp int64 `json:"today_end_timestamp"`
  145. IsAll bool `json:"is_all"`
  146. PageSize int `json:"page_size"`
  147. }
  148. type BiGetProviderReportReply struct {
  149. Total int `json:"total"`
  150. PageSize int `json:"page_size"`
  151. Infos []BiProviderReportInfo `json:"infos"`
  152. Sum BiProviderReportInfo `json:"sum"`
  153. }
  154. type BiGetDistributionReq struct {
  155. ApiId int64 `json:"api_id"`
  156. MerchantId int64 `json:"merchant_id"`
  157. StartTimestamp int64 `json:"start_timestamp"`
  158. EndTimestamp int64 `json:"end_timestamp"`
  159. PageNumber int `json:"page_number"`
  160. }
  161. type CodeCount struct {
  162. Code string `json:"code"`
  163. Msg string `json:"msg"`
  164. Count int `json:"count"`
  165. }
  166. type ProviderCount struct {
  167. ProviderApiName string `json:"provider_api_name"`
  168. ProviderName string `json:"provider_name"`
  169. Count int `json:"count"`
  170. Success int `json:"success"`
  171. Query int `json:"query"`
  172. }
  173. type BiDistribution struct {
  174. ApiCodeTotal int64 `json:"api_code_total"`
  175. ApiValid int `json:"api_valid"`
  176. ApiCharge int `json:"api_charge"`
  177. ApiSuccess int `json:"api_success"`
  178. ApiCodeList []CodeCount `json:"api_code_list"`
  179. ProviderList []ProviderCount `provider_list`
  180. }
  181. type BiProviderDistribution struct {
  182. ProviderCharge int `json:"provider_charge"`
  183. ProviderSuccess int `json:"provider_success"`
  184. ProviderCodeTotal int `json:"provider_code_total"`
  185. ProviderCodeList []CodeCount `json:"provider_code_list"`
  186. }
  187. type BiGetDistributionReply struct {
  188. Info BiDistribution `json:"info"`
  189. }
  190. type BiGetProviderDistributionReq struct {
  191. ProviderApiId int64 `json:"provider_api_id"`
  192. StartTimestamp int64 `json:"start_timestamp"`
  193. EndTimestamp int64 `json:"end_timestamp"`
  194. }
  195. type BiGetProviderDistributionReply struct {
  196. Info BiProviderDistribution `json:"info"`
  197. }