Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustUnescape ¶
MustUnescape works as the same as Unescape, but it panics instead of returning error when an error occurs.
func Unescape ¶
Unescape unescapes field value of log. This is essentially a URL unescaping like QueryUnescape of net/url, but slightly dirrerent. Because, CloudFront escapes some characters twice, for example, escaping ' ' (space) into "%2520". See CloudFront doc for the detailed specification: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html Also, please see AWS Discussion Forums for the background: https://forums.aws.amazon.com/thread.jspa?threadID=134017
Types ¶
type RTMPLog ¶
type RTMPLog struct {
Time time.Time `json:"time"`
Location string `json:"location"`
RequestIP net.IP `json:"request_ip"`
EventType string `json:"event_type"`
Bytes uint64 `json:"bytes"`
Status string `json:"status"`
ClientID string `json:"client_id"`
URI string `json:"uri"`
QueryString string `json:"query_string"`
Referrer string `json:"referrer"`
PageURL string `json:"page_url"`
UserAgent string `json:"user_agent"`
StreamName string `json:"stream_name"`
StreamQuery string `json:"stream_query"`
StreamFileExt string `json:"stream_file_ext"`
StreamID uint32 `json:"stream_id"`
}
RTMPLog represents a record of RTMP distribution log.
func ParseLineRTMP ¶
ParseLineRTMP parses a line of log for a RTMP distribution.
type WebLog ¶
type WebLog struct {
Time time.Time `json:"time"`
Location string `json:"location"`
Bytes uint64 `json:"bytes"`
RequestIP net.IP `json:"request_ip"`
Method string `json:"method"`
Host string `json:"host"`
URI string `json:"uri"`
Status uint16 `json:"status"`
Referrer string `json:"referrer"`
UserAgent string `json:"user_agent"`
QueryString string `json:"query_string"`
Cookie string `json:"cookie"`
ResultType string `json:"result_type"`
RequestID string `json:"request_id"`
HostHeader string `json:"host_header"`
RequestProtocol string `json:"request_protocol"`
RequestBytes uint64 `json:"request_bytes"`
TimeTaken float32 `json:"time_taken"`
XforwardedFor string `json:"xforwarded_for"`
SslProtocol string `json:"ssl_protocol"`
SslCipher string `json:"ssl_cipher"`
ResponseResultType string `json:"response_result_type"`
HTTPVersion string `json:"http_version"`
FleStatus string `json:"fle_status"`
FleEncryptedFields uint32 `json:"fle_encrypted_fields"`
}
WebLog represents a record of CloudFront's Web distribution log. Naming convention is borrowed from this article: https://docs.aws.amazon.com/athena/latest/ug/cloudfront-logs.html
func ParseLineWeb ¶
ParseLineWeb parses a line of log for a web distribution.