GoTomato/pkg/models/client.go

22 lines
485 B
Go
Raw Normal View History

package models
import (
"time"
"github.com/gorilla/websocket"
)
2024-10-30 06:37:14 +00:00
// Represents a command from the client (start/stop)
type ClientCommand struct {
2024-10-30 06:37:14 +00:00
Command string `json:"command"` // Command send to the server
Password string `json:"password"` // Pomodoro control password
Settings PomodoroConfig `json:"settings"` // Pomodoro config
}
2024-10-30 06:37:14 +00:00
// Represents a single client
type WebsocketClient struct {
Conn *websocket.Conn
LastPong time.Time
RealIP string
}