Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExampleID_Next ¶
func ExampleID_Next()
Types ¶
type ConnectionReport ¶
type ConnectionReport struct { ReportBasic ConnectTime time.Time DisconnectTime time.Time // calculated ConnectionDuration time.Duration DisconnectCode int DisconnectReason string UsernameWasValidated bool RemoteAddr net.Addr `json:"-"` // not transmitted until I can figure out data minimization TwitchUsername string `json:"-"` // also not transmitted }
func (*ConnectionReport) FillReport ¶
func (report *ConnectionReport) FillReport() error
FillReport sets all the calculated fields, and calls esReportBasic.FillReport().
func (*ConnectionReport) ReportType ¶
func (report *ConnectionReport) ReportType() string
type ID ¶
ID is a 128-bit ID for an elasticsearch document. Textually, it is base64-encoded. The Next() method increments the ID.
type Report ¶
type Report interface { FillReport() error ReportType() string GetID() string GetTimestamp() time.Time }
Report is the interface presented to the Submit() function. FillReport() is satisfied by ReportBasic, but ReportType must always be specified.
type ReportBasic ¶
ReportBasic is the essential fields of any report.
func (*ReportBasic) FillReport ¶
func (report *ReportBasic) FillReport() error
FillReport sets the Host and Timestamp fields.
func (*ReportBasic) GetID ¶
func (report *ReportBasic) GetID() string
func (*ReportBasic) GetTimestamp ¶
func (report *ReportBasic) GetTimestamp() time.Time
Click to show internal directories.
Click to hide internal directories.