log.go 6.3 KB

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