GoTomato/pkg/models/server.go

13 lines
669 B
Go
Raw Normal View History

package models
2024-10-30 06:37:14 +00:00
// Represents the data sent to the client via WebSocket
type ServerMessage struct {
Mode string `json:"mode"` // "Idle", "Focus", "ShortBreak", "LongBreak" or "End"
Settings PomodoroConfig `json:"settings"` // The currrent pomodoro settings
Session int `json:"session"` // Current session number
TimeLeft int `json:"time_left"` // Remaining time in seconds
2024-10-30 06:37:14 +00:00
Ongoing bool `json:"ongoing"` // Pomodoro ongoing
Paused bool `json:"paused"` // Is timer paused
2024-10-30 06:37:14 +00:00
ProtocolVersion string `json:"version"` // Version of the protocol
}