Sebastian Mark
9c4d43a4d3
- add `Connected()` method for client - add `LastErr` field to GoTomatoClient - replace error logging by updating `LastErr` field - modify methods to use pointer receivers for Client - add `prevMessage` variable to store the last received server message - show connect status in TUI - use EnterAltScreen instead of ClearScreen
11 lines
329 B
Go
11 lines
329 B
Go
package models
|
|
|
|
import "github.com/gorilla/websocket"
|
|
|
|
// Represents a GoTomato client
|
|
type GoTomatoClient struct {
|
|
Server string // The GoTomato server
|
|
Password string // Pomodoro password
|
|
Conn *websocket.Conn // The websocket connection of the client
|
|
LastErr error // Last client error
|
|
}
|