Files
galaxy-game/pkg/model/report/messages.go
T
2026-05-07 00:58:53 +03:00

23 lines
851 B
Go

package report
import "github.com/google/uuid"
// MessageTypeUserGamesReport is the authenticated gateway message type
// used to fetch a per-player turn report through
// `GET /api/v1/user/games/{game_id}/reports/{turn}`. The signed payload
// is a FlatBuffers `GameReportRequest`; the response is a FlatBuffers
// `Report`.
const MessageTypeUserGamesReport = "user.games.report"
// GameReportRequest is the typed payload of MessageTypeUserGamesReport.
// `GameID` selects the target game (the message_type alone is not
// enough; this scope is per-game) and `Turn` selects the requested
// turn number. Both fields are required.
type GameReportRequest struct {
// GameID identifies the game whose report is fetched.
GameID uuid.UUID `json:"game_id"`
// Turn is the zero-based turn number whose report is requested.
Turn uint `json:"turn"`
}