log.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. package cdn
  2. type Request struct {
  3. Day string `json:"day" form:"day"`
  4. ServerID int64 `json:"serverId" form:"serverId"`
  5. Size int64 `json:"size" form:"size"`
  6. UserID int64 `json:"userId" form:"userId"`
  7. HasError *bool `json:"hasError" form:"hasError"`
  8. Ip string `json:"ip" form:"ip"`
  9. Domain string `json:"domain" form:"domain"`
  10. HourFrom string `json:"hourFrom" form:"hourFrom"`
  11. HourTo string `json:"hourTo" form:"hourTo"`
  12. Reverse bool `json:"reverse" form:"reverse" default:"false"`
  13. }
  14. type Data struct {
  15. HasMore bool `json:"hasMore"`
  16. HTTPAccessLogs []HTTPAccessLog `json:"httpAccessLogs"`
  17. RequestID string `json:"requestId"`
  18. }
  19. type HTTPAccessLog struct {
  20. BodyBytesSent int64 `json:"bodyBytesSent"`
  21. BytesSent int64 `json:"bytesSent"`
  22. ContentType string `json:"contentType"`
  23. Header Header `json:"header"`
  24. Host string `json:"host"`
  25. Hostname string `json:"hostname"`
  26. Msec float64 `json:"msec"`
  27. Node Node `json:"node"`
  28. NodeID int64 `json:"nodeId"`
  29. OriginAddress string `json:"originAddress"`
  30. OriginHeaderResponseTime float64 `json:"originHeaderResponseTime"`
  31. OriginID int64 `json:"originId"`
  32. OriginStatus int64 `json:"originStatus"`
  33. Proto string `json:"proto"`
  34. RawRemoteAddr string `json:"rawRemoteAddr"`
  35. Referer string `json:"referer"`
  36. RemoteAddr string `json:"remoteAddr"`
  37. RemotePort int64 `json:"remotePort"`
  38. Request string `json:"request"`
  39. RequestID string `json:"requestId"`
  40. RequestMethod string `json:"requestMethod"`
  41. RequestPath string `json:"requestPath"`
  42. RequestTime float64 `json:"requestTime"`
  43. RequestURI string `json:"requestURI"`
  44. Scheme string `json:"scheme"`
  45. SentHeader SentHeader `json:"sentHeader"`
  46. ServerID int64 `json:"serverId"`
  47. ServerName string `json:"serverName"`
  48. ServerPort int64 `json:"serverPort"`
  49. ServerProtocol string `json:"serverProtocol"`
  50. Status int64 `json:"status"`
  51. Tags []string `json:"tags,omitempty"`
  52. TimeISO8601 string `json:"timeISO8601"`
  53. TimeLocal string `json:"timeLocal"`
  54. Timestamp int64 `json:"timestamp"`
  55. UserAgent string `json:"userAgent"`
  56. }
  57. type Header struct {
  58. Accept Accept `json:"Accept"`
  59. AcceptEncoding AcceptEncoding `json:"Accept-Encoding"`
  60. AcceptLanguage AcceptLanguage `json:"Accept-Language"`
  61. CacheControl *HeaderCacheControl `json:"Cache-Control,omitempty"`
  62. Connection Connection `json:"Connection"`
  63. IfModifiedSince *IfModifiedSince `json:"If-Modified-Since,omitempty"`
  64. IfNoneMatch *IfNoneMatch `json:"If-None-Match,omitempty"`
  65. Referer Referer `json:"Referer"`
  66. UpgradeInsecureRequests *UpgradeInsecureRequests `json:"Upgrade-Insecure-Requests,omitempty"`
  67. UserAgent UserAgent `json:"User-Agent"`
  68. XForwardedBy XForwardedBy `json:"X-Forwarded-By"`
  69. XForwardedFor XForwardedFor `json:"X-Forwarded-For"`
  70. XForwardedHost XForwardedHost `json:"X-Forwarded-Host"`
  71. XForwardedProto XForwardedProto `json:"X-Forwarded-Proto"`
  72. XRealIP XRealIP `json:"X-Real-IP"`
  73. }
  74. type Accept struct {
  75. Values []string `json:"values"`
  76. }
  77. type AcceptEncoding struct {
  78. Values []string `json:"values"`
  79. }
  80. type AcceptLanguage struct {
  81. Values []string `json:"values"`
  82. }
  83. type HeaderCacheControl struct {
  84. Values []string `json:"values"`
  85. }
  86. type Connection struct {
  87. Values []string `json:"values"`
  88. }
  89. type IfModifiedSince struct {
  90. Values []string `json:"values"`
  91. }
  92. type IfNoneMatch struct {
  93. Values []string `json:"values"`
  94. }
  95. type Referer struct {
  96. Values []string `json:"values"`
  97. }
  98. type UpgradeInsecureRequests struct {
  99. Values []string `json:"values"`
  100. }
  101. type UserAgent struct {
  102. Values []string `json:"values"`
  103. }
  104. type XForwardedBy struct {
  105. Values []string `json:"values"`
  106. }
  107. type XForwardedFor struct {
  108. Values []string `json:"values"`
  109. }
  110. type XForwardedHost struct {
  111. Values []string `json:"values"`
  112. }
  113. type XForwardedProto struct {
  114. Values []string `json:"values"`
  115. }
  116. type XRealIP struct {
  117. Values []string `json:"values"`
  118. }
  119. type Node struct {
  120. ID int64 `json:"id"`
  121. Name string `json:"name"`
  122. NodeCluster NodeCluster `json:"nodeCluster"`
  123. }
  124. type NodeCluster struct {
  125. ID int64 `json:"id"`
  126. Name string `json:"name"`
  127. }
  128. type SentHeader struct {
  129. AcceptRanges AcceptRanges `json:"Accept-Ranges"`
  130. CacheControl SentHeaderCacheControl `json:"Cache-Control"`
  131. ContentLength ContentLength `json:"Content-Length"`
  132. ContentType ContentType `json:"Content-Type"`
  133. Date Date `json:"Date"`
  134. Etag Etag `json:"Etag"`
  135. Expires Expires `json:"Expires"`
  136. LastModified LastModified `json:"Last-Modified"`
  137. Location *Location `json:"Location,omitempty"`
  138. Server Server `json:"Server"`
  139. }
  140. type AcceptRanges struct {
  141. Values []string `json:"values"`
  142. }
  143. type SentHeaderCacheControl struct {
  144. Values []string `json:"values"`
  145. }
  146. type ContentLength struct {
  147. Values []string `json:"values"`
  148. }
  149. type ContentType struct {
  150. Values []string `json:"values"`
  151. }
  152. type Date struct {
  153. Values []string `json:"values"`
  154. }
  155. type Etag struct {
  156. Values []string `json:"values"`
  157. }
  158. type Expires struct {
  159. Values []string `json:"values"`
  160. }
  161. type LastModified struct {
  162. Values []string `json:"values"`
  163. }
  164. type Location struct {
  165. Values []string `json:"values"`
  166. }
  167. type Server struct {
  168. Values []string `json:"values"`
  169. }