doc: add and improve comments

This commit is contained in:
Sebastian Mark 2024-10-30 07:37:14 +01:00
parent d83acc77b2
commit d0b1260f62
12 changed files with 50 additions and 26 deletions

View file

@ -1,12 +1,12 @@
package models
// ServerMessage represents the data sent to the client via WebSocket.
// Represents the data sent to the client via WebSocket
type ServerMessage struct {
Mode string `json:"mode"` // "Idle", "Work", "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
Ongoing bool `json:"ongoing"` // Ongoing pomodoro
Ongoing bool `json:"ongoing"` // Pomodoro ongoing
Paused bool `json:"paused"` // Is timer paused
ProtocolVersion string `json:"version"` // Version of the server
ProtocolVersion string `json:"version"` // Version of the protocol
}