log.go 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. 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. RequestLength int64 `json:"requestLength"`
  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. AcceptCharset *AcceptCharset `json:"Accept-Charset,omitempty"`
  61. AcceptEncoding AcceptEncoding `json:"Accept-Encoding"`
  62. AcceptLanguage *AcceptLanguage `json:"Accept-Language,omitempty"`
  63. AdminAccess *AdminAccess `json:"Admin-Access,omitempty"`
  64. CacheControl *HeaderCacheControl `json:"Cache-Control,omitempty"`
  65. Connection *Connection `json:"Connection,omitempty"`
  66. ContentLength *HeaderContentLength `json:"Content-Length,omitempty"`
  67. ContentType *HeaderContentType `json:"Content-Type,omitempty"`
  68. Cookie *Cookie `json:"Cookie,omitempty"`
  69. Origin *Origin `json:"Origin,omitempty"`
  70. Priority *Priority `json:"Priority,omitempty"`
  71. Referer *Referer `json:"Referer,omitempty"`
  72. SECCHUA *SECCHUA `json:"Sec-CH-UA,omitempty"`
  73. SECCHUAMobile *SECCHUAMobile `json:"Sec-CH-UA-Mobile,omitempty"`
  74. SECChUaMobile *SECChUaMobile `json:"Sec-Ch-Ua-Mobile,omitempty"`
  75. SECCHUAPlatform *SECCHUAPlatform `json:"Sec-CH-UA-Platform,omitempty"`
  76. SECFetchDest *SECFetchDest `json:"Sec-Fetch-Dest,omitempty"`
  77. SECFetchMode *SECFetchMode `json:"Sec-Fetch-Mode,omitempty"`
  78. SECFetchSite *SECFetchSite `json:"Sec-Fetch-Site,omitempty"`
  79. SECFetchStorageAccess *SECFetchStorageAccess `json:"Sec-Fetch-Storage-Access,omitempty"`
  80. SECFetchUser *SECFetchUser `json:"Sec-Fetch-User,omitempty"`
  81. Token *Token `json:"Token,omitempty"`
  82. UpgradeInsecureRequests *UpgradeInsecureRequests `json:"Upgrade-Insecure-Requests,omitempty"`
  83. UserAgent UserAgent `json:"User-Agent"`
  84. XForwardedBy *XForwardedBy `json:"X-Forwarded-By,omitempty"`
  85. XForwardedFor *XForwardedFor `json:"X-Forwarded-For,omitempty"`
  86. XForwardedHost *XForwardedHost `json:"X-Forwarded-Host,omitempty"`
  87. XForwardedProto *XForwardedProto `json:"X-Forwarded-Proto,omitempty"`
  88. XRealIP *XRealIP `json:"X-Real-IP,omitempty"`
  89. }
  90. type Accept struct {
  91. Values []string `json:"values"`
  92. }
  93. type AcceptCharset struct {
  94. Values []string `json:"values"`
  95. }
  96. type AcceptEncoding struct {
  97. Values []string `json:"values"`
  98. }
  99. type AcceptLanguage struct {
  100. Values []string `json:"values"`
  101. }
  102. type AdminAccess struct {
  103. Values []string `json:"values"`
  104. }
  105. type HeaderCacheControl struct {
  106. Values []string `json:"values"`
  107. }
  108. type Connection struct {
  109. Values []string `json:"values"`
  110. }
  111. type HeaderContentLength struct {
  112. Values []string `json:"values"`
  113. }
  114. type HeaderContentType struct {
  115. Values []string `json:"values"`
  116. }
  117. type Cookie struct {
  118. Values []string `json:"values"`
  119. }
  120. type Origin struct {
  121. Values []string `json:"values"`
  122. }
  123. type Priority struct {
  124. Values []string `json:"values"`
  125. }
  126. type Referer struct {
  127. Values []string `json:"values"`
  128. }
  129. type SECCHUA struct {
  130. Values []string `json:"values"`
  131. }
  132. type SECCHUAMobile struct {
  133. Values []string `json:"values"`
  134. }
  135. type SECCHUAPlatform struct {
  136. Values []string `json:"values"`
  137. }
  138. type SECChUaMobile struct {
  139. Values []string `json:"values"`
  140. }
  141. type SECFetchDest struct {
  142. Values []string `json:"values"`
  143. }
  144. type SECFetchMode struct {
  145. Values []string `json:"values"`
  146. }
  147. type SECFetchSite struct {
  148. Values []string `json:"values"`
  149. }
  150. type SECFetchStorageAccess struct {
  151. Values []string `json:"values"`
  152. }
  153. type SECFetchUser struct {
  154. Values []string `json:"values"`
  155. }
  156. type Token struct {
  157. Values []string `json:"values"`
  158. }
  159. type UpgradeInsecureRequests struct {
  160. Values []string `json:"values"`
  161. }
  162. type UserAgent struct {
  163. Values []string `json:"values"`
  164. }
  165. type XForwardedBy struct {
  166. Values []string `json:"values"`
  167. }
  168. type XForwardedFor struct {
  169. Values []string `json:"values"`
  170. }
  171. type XForwardedHost struct {
  172. Values []string `json:"values"`
  173. }
  174. type XForwardedProto struct {
  175. Values []string `json:"values"`
  176. }
  177. type XRealIP struct {
  178. Values []string `json:"values"`
  179. }
  180. type Node struct {
  181. ID int64 `json:"id"`
  182. Name string `json:"name"`
  183. NodeCluster NodeCluster `json:"nodeCluster"`
  184. }
  185. type NodeCluster struct {
  186. ID int64 `json:"id"`
  187. Name string `json:"name"`
  188. }
  189. type SentHeader struct {
  190. AcceptRanges *AcceptRanges `json:"Accept-Ranges,omitempty"`
  191. CacheControl *SentHeaderCacheControl `json:"Cache-Control,omitempty"`
  192. ContentEncoding *ContentEncoding `json:"Content-Encoding,omitempty"`
  193. ContentLength *SentHeaderContentLength `json:"Content-Length,omitempty"`
  194. ContentType SentHeaderContentType `json:"Content-Type"`
  195. Date *Date `json:"Date,omitempty"`
  196. Etag *Etag `json:"Etag,omitempty"`
  197. Expires *Expires `json:"Expires,omitempty"`
  198. LastModified *LastModified `json:"Last-Modified,omitempty"`
  199. Location Location `json:"Location"`
  200. Server *Server `json:"Server,omitempty"`
  201. Vary *Vary `json:"Vary,omitempty"`
  202. }
  203. type AcceptRanges struct {
  204. Values []string `json:"values"`
  205. }
  206. type SentHeaderCacheControl struct {
  207. Values []string `json:"values"`
  208. }
  209. type ContentEncoding struct {
  210. Values []string `json:"values"`
  211. }
  212. type SentHeaderContentLength struct {
  213. Values []string `json:"values"`
  214. }
  215. type SentHeaderContentType struct {
  216. Values []string `json:"values"`
  217. }
  218. type Date struct {
  219. Values []string `json:"values"`
  220. }
  221. type Etag struct {
  222. Values []string `json:"values"`
  223. }
  224. type Expires struct {
  225. Values []string `json:"values"`
  226. }
  227. type LastModified struct {
  228. Values []string `json:"values"`
  229. }
  230. type Location struct {
  231. Values []string `json:"values"`
  232. }
  233. type Server struct {
  234. Values []string `json:"values"`
  235. }
  236. type Vary struct {
  237. Values []string `json:"values"`
  238. }