Documentation
¶
Overview ¶
Package model provides common data types used throughout the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct { ID int64 HostID int64 Time time.Time Source string Message string // contains filtered or unexported fields }
Record is one record from a system log.
type RecordSlice ¶
type RecordSlice []Record
RecordSlice is a slice of Records that can be sorted.
func (RecordSlice) Len ¶
func (r RecordSlice) Len() int
func (RecordSlice) Less ¶
func (r RecordSlice) Less(i, j int) bool
func (RecordSlice) Swap ¶
func (r RecordSlice) Swap(i, j int)
type SearchQuery ¶
type SearchQuery struct { Hosts []int64 `json:"hosts"` Sources []string `json:"sources"` Period []time.Time `json:"period"` Terms []*regexp.Regexp `json:"terms"` }
SearchQuery wraps the parameters for searching the log.
func (*SearchQuery) Match ¶
func (q *SearchQuery) Match(r *Record) bool
Match checks if a given Record r matches the criteria of the SearchQuery.
Click to show internal directories.
Click to hide internal directories.