GoTomato/pkg/models/config.go
Sebastian Mark 31179d4af4 break: update terminology from "Work" to "Focus"
- change mode from "Work" to "Focus" in server messages
- modify pomodoro configuration to use "Focus" instead of "Work"
- adjust default settings to reflect new terminology
- ensure all references to work duration are updated to focus duration
- update variable names in HTML and JavaScript for clarity

🤖
2024-11-18 19:14:42 +01:00

22 lines
809 B
Go

package models
import "fmt"
// Represents the configuration of a pomodoro
type PomodoroConfig struct {
Focus int `json:"focus"` // Length of focus sessions in seconds
ShortBreak int `json:"shortBreak"` // Length of short break in seconds
LongBreak int `json:"longBreak"` // Length of long break in seconds
Sessions int `json:"sessions"` // Number of total sessions
}
// Stringer interface for the PomodocoConfig model
func (c PomodoroConfig) String() string {
return fmt.Sprintf("{focus: %d, short: %d, long: %d, sessions: %d}", c.Focus, c.ShortBreak, c.LongBreak, c.Sessions)
}
// Represents the server configuration
type ServerConfig struct {
ListenAddress string `json:"listenAddress"` // Server listen address
ListenPort int `json:"listenPort"` // Server listen port
}