2024-10-19 09:47:56 +00:00
|
|
|
package models
|
|
|
|
|
2024-10-30 06:37:14 +00:00
|
|
|
// Represents the data sent to the client via WebSocket
|
2024-10-20 19:59:18 +00:00
|
|
|
type ServerMessage struct {
|
2024-11-18 07:11:39 +00:00
|
|
|
Mode string `json:"mode"` // "Idle", "Focus", "ShortBreak", "LongBreak" or "End"
|
2024-10-26 07:20:29 +00:00
|
|
|
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
|
2024-10-26 07:20:29 +00:00
|
|
|
Paused bool `json:"paused"` // Is timer paused
|
2024-10-30 06:37:14 +00:00
|
|
|
ProtocolVersion string `json:"version"` // Version of the protocol
|
2024-10-19 09:47:56 +00:00
|
|
|
}
|