log.go 6.3 KB

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