log.go 6.1 KB

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