mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-15 11:40:36 +03:00
27 lines
479 B
Go
27 lines
479 B
Go
package events
|
|
|
|
import "time"
|
|
|
|
type Event interface {
|
|
EventName() string
|
|
}
|
|
|
|
type ScanStatus struct {
|
|
Scanning bool `json:"scanning"`
|
|
Count int64 `json:"count"`
|
|
}
|
|
|
|
func (s ScanStatus) EventName() string { return "scanStatus" }
|
|
|
|
type KeepAlive struct {
|
|
TS int64 `json:"ts"`
|
|
}
|
|
|
|
func (s KeepAlive) EventName() string { return "keepAlive" }
|
|
|
|
type ServerStart struct {
|
|
StartTime time.Time `json:"startTime"`
|
|
}
|
|
|
|
func (s ServerStart) EventName() string { return "serverStart" }
|