GoTomato/pkg/models/client.go

21 lines
485 B
Go

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