quintodrome/server/events/events.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
525 B
Go
Raw Normal View History

package events
2020-11-13 14:40:33 -09:00
import "time"
type Event interface {
EventName() string
}
type ScanStatus struct {
Scanning bool `json:"scanning"`
Count int64 `json:"count"`
FolderCount int64 `json:"folderCount"`
}
func (s ScanStatus) EventName() string { return "scanStatus" }
type KeepAlive struct {
TS int64 `json:"ts"`
}
func (s KeepAlive) EventName() string { return "keepAlive" }
2020-11-13 14:40:33 -09:00
type ServerStart struct {
StartTime time.Time `json:"startTime"`
}
func (s ServerStart) EventName() string { return "serverStart" }