Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Date ¶
Date is a simple year, month, and day representation. Go's "time" package has only a datetime representation (which could be truncated to serve as a date) and I desired a simple implementation.
type DateCounter ¶
DateCounter is used to count views for a given date.
func (DateCounter) Range ¶
func (dc DateCounter) Range() (counts []DateCount)
Range returns the ordered dates in the date counter, including any missing dates.
type Dates ¶
type Dates []Date
Dates implements the sort.Sort interface. By default it will sort dates in ascending order.
type Logs ¶
func ReadDirectory ¶
type Record ¶
type Record struct {
IP string
User string // index 2
Timestamp time.Time
Request string
Method string
URL string
Version string
Status int
Bytes int
Referer string
Agent string // index 8
}
The default configuration for nginx access logs: $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" Skip index 1, it's just a dash
func OpenAndParseFile ¶
func OpenAndParseZipFile ¶
Click to show internal directories.
Click to hide internal directories.