access_log.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package apis
  4. type AccessLogWrite struct {
  5. State bool `json:"state"`
  6. Code int `json:"code"` // 原始错误码,非输出
  7. RespCode int `json:"resp_code"` // 输出错误码
  8. Msg string `json:"msg"`
  9. RawRequestParams string `json:"raw_request_params"`
  10. RawResponseParams string `json:"raw_response_params"`
  11. RequestParams string `json:"request_params"`
  12. ResponseParams string `json:"response_params"`
  13. IsReuse bool `json:"is_reuse"`
  14. UtSource string `json:"ut_source"`
  15. Elapsed float64 `json:"elapsed"`
  16. Search string `json:"search"`
  17. OrderNo string `json:"order_no"`
  18. }
  19. type ThirdpartLogWrite struct {
  20. ProviderApiId int64 `json:"provider_api_id"`
  21. RequestParams string `json:"request_params"`
  22. ResponseParams string `json:"response_params"`
  23. RawCode string `json:"raw_code"`
  24. Code int `json:"code"`
  25. Msg string `json:"msg"`
  26. State bool `json:"state"`
  27. Elapsed float64 `json:"elapsed"`
  28. ProviderCode string `json:"provider_code"`
  29. Search string `json:"search"`
  30. Timestamp int64 `json:"timestamp"`
  31. }
  32. type LogAddAccessLogReq struct {
  33. AccessLogWrite
  34. MerchantId int64 `json:"merchant_id"`
  35. ApiId int64 `json:"api_id"`
  36. RemoteAddr string `json:"remote_addr"`
  37. TimeStamp int64 `json:"time_stamp"`
  38. ThirdpartLogWrites []ThirdpartLogWrite `json:"thirdpart_log_writes"`
  39. MerchantChildApiId int64 `json:"merchant_child_api_id"`
  40. MerchantDataApiId int64 `json:"merchant_data_api_id"`
  41. ReplaceInfo MerchantReplaceInfo `json:"merchant_replace_info"`
  42. }
  43. type LogAddAccessLogReply struct {
  44. }
  45. type LogAddInvalidAccessLogReq struct {
  46. MerchantId int64 `json:"merchant_id"`
  47. ApiId int64 `json:"api_id"`
  48. RemoteAddr string `json:"remote_addr"`
  49. TimeStamp int64 `json:"time_stamp"`
  50. Code int `json:"code"`
  51. Msg string `json:"msg"`
  52. RequestParams string `json:"request_params"`
  53. Elapsed float64 `json:"elapsed"`
  54. }
  55. type LogAddInvalidAccessLogReply struct {
  56. }