feat(servers): implement saervers monitoring

This commit is contained in:
2025-06-17 12:50:50 +03:00
parent 0e2e02622d
commit 42f2b68848
7 changed files with 217 additions and 5 deletions

26
internal/models/server.go Normal file
View File

@@ -0,0 +1,26 @@
package models
import "time"
type GameServer struct {
ID int `json:"id"`
Name string `json:"name"`
Address string `json:"address"`
IsEnabled bool `json:"is_enabled"`
StatusJSON *string `json:"-"`
LastPolledAt *time.Time `json:"last_polled_at"`
Motd *string `json:"motd"`
PlayerCount *int `json:"player_count"`
MaxPlayers *int `json:"max_players"`
VersionName *string `json:"version_name"`
PingBackendServer *int `json:"ping_proxy_server"`
}
type ServerStatus struct {
StatusJSON string
Motd string
PlayerCount int
MaxPlayers int
VersionName string
Ping int64
}