2024-10-19 09:47:56 +00:00
|
|
|
package models
|
|
|
|
|
2024-10-20 19:59:18 +00:00
|
|
|
// ServerMessage represents the data sent to the client via WebSocket.
|
|
|
|
type ServerMessage struct {
|
2024-10-26 07:15:49 +00:00
|
|
|
Mode string `json:"mode"` // "Idle", "Work", "ShortBreak", "LongBreak" or "End"
|
|
|
|
Settings GoTomatoPomodoroConfig `json:"settings"` // The currrent pomodoro settings
|
|
|
|
Session int `json:"session"` // Current session number
|
|
|
|
TimeLeft int `json:"time_left"` // Remaining time in seconds
|
|
|
|
Ongoing bool `json:"ongoing"` // Ongoing pomodoro
|
|
|
|
Paused bool `json:"paused"` // Is timer paused
|
2024-10-26 07:18:09 +00:00
|
|
|
ProtocolVersion string `json:"version"` // Version of the server
|
2024-10-19 09:47:56 +00:00
|
|
|
}
|