log.go 8.9 KB

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