log.go 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. 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. AdminAccess *AdminAccess `json:"Admin-Access,omitempty"`
  63. CacheControl HeaderCacheControl `json:"Cache-Control"`
  64. Cookie Cookie `json:"Cookie"`
  65. Priority Priority `json:"Priority"`
  66. Referer Referer `json:"Referer"`
  67. SECCHUA SECCHUA `json:"Sec-CH-UA"`
  68. SECCHUAMobile SECCHUAMobile `json:"Sec-CH-UA-Mobile"`
  69. SECCHUAPlatform SECCHUAPlatform `json:"Sec-CH-UA-Platform"`
  70. SECFetchDest SECFetchDest `json:"Sec-Fetch-Dest"`
  71. SECFetchMode SECFetchMode `json:"Sec-Fetch-Mode"`
  72. SECFetchSite SECFetchSite `json:"Sec-Fetch-Site"`
  73. Token *Token `json:"Token,omitempty"`
  74. UserAgent UserAgent `json:"User-Agent"`
  75. XForwardedBy XForwardedBy `json:"X-Forwarded-By"`
  76. XForwardedFor XForwardedFor `json:"X-Forwarded-For"`
  77. XForwardedHost XForwardedHost `json:"X-Forwarded-Host"`
  78. XForwardedProto XForwardedProto `json:"X-Forwarded-Proto"`
  79. XRealIP XRealIP `json:"X-Real-IP"`
  80. }
  81. type Accept struct {
  82. Values []string `json:"values"`
  83. }
  84. type AcceptEncoding struct {
  85. Values []string `json:"values"`
  86. }
  87. type AcceptLanguage struct {
  88. Values []string `json:"values"`
  89. }
  90. type AdminAccess struct {
  91. Values []string `json:"values"`
  92. }
  93. type HeaderCacheControl struct {
  94. Values []string `json:"values"`
  95. }
  96. type Cookie struct {
  97. Values []string `json:"values"`
  98. }
  99. type Priority struct {
  100. Values []string `json:"values"`
  101. }
  102. type Referer struct {
  103. Values []string `json:"values"`
  104. }
  105. type SECCHUA struct {
  106. Values []string `json:"values"`
  107. }
  108. type SECCHUAMobile struct {
  109. Values []string `json:"values"`
  110. }
  111. type SECCHUAPlatform struct {
  112. Values []string `json:"values"`
  113. }
  114. type SECFetchDest struct {
  115. Values []string `json:"values"`
  116. }
  117. type SECFetchMode struct {
  118. Values []string `json:"values"`
  119. }
  120. type SECFetchSite struct {
  121. Values []string `json:"values"`
  122. }
  123. type Token struct {
  124. Values []string `json:"values"`
  125. }
  126. type UserAgent struct {
  127. Values []string `json:"values"`
  128. }
  129. type XForwardedBy struct {
  130. Values []string `json:"values"`
  131. }
  132. type XForwardedFor struct {
  133. Values []string `json:"values"`
  134. }
  135. type XForwardedHost struct {
  136. Values []string `json:"values"`
  137. }
  138. type XForwardedProto struct {
  139. Values []string `json:"values"`
  140. }
  141. type XRealIP struct {
  142. Values []string `json:"values"`
  143. }
  144. type Node struct {
  145. ID int64 `json:"id"`
  146. Name string `json:"name"`
  147. NodeCluster NodeCluster `json:"nodeCluster"`
  148. }
  149. type NodeCluster struct {
  150. ID int64 `json:"id"`
  151. Name string `json:"name"`
  152. }
  153. type SentHeader struct {
  154. CacheControl SentHeaderCacheControl `json:"Cache-Control"`
  155. ContentEncoding *ContentEncoding `json:"Content-Encoding,omitempty"`
  156. ContentType ContentType `json:"Content-Type"`
  157. Date Date `json:"Date"`
  158. Etag *Etag `json:"Etag,omitempty"`
  159. LastModified *LastModified `json:"Last-Modified,omitempty"`
  160. Location *Location `json:"Location,omitempty"`
  161. Server Server `json:"Server"`
  162. Vary *Vary `json:"Vary,omitempty"`
  163. }
  164. type SentHeaderCacheControl struct {
  165. Values []string `json:"values"`
  166. }
  167. type ContentEncoding struct {
  168. Values []string `json:"values"`
  169. }
  170. type ContentType struct {
  171. Values []string `json:"values"`
  172. }
  173. type Date struct {
  174. Values []string `json:"values"`
  175. }
  176. type Etag struct {
  177. Values []string `json:"values"`
  178. }
  179. type LastModified struct {
  180. Values []string `json:"values"`
  181. }
  182. type Location struct {
  183. Values []string `json:"values"`
  184. }
  185. type Server struct {
  186. Values []string `json:"values"`
  187. }
  188. type Vary struct {
  189. Values []string `json:"values"`
  190. }