You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
856 B
Go
16 lines
856 B
Go
package http
|
|
|
|
// UpdateLeaderboardRequest is POST /leaderboard/update payload.
|
|
type UpdateLeaderboardRequest struct {
|
|
SessionID string `json:"session_id" validate:"required,min=1,max=64"`
|
|
PlayerID string `json:"player_id" validate:"required,min=1,max=128"`
|
|
PlayerName string `json:"player_name" validate:"required,player_name"`
|
|
TotalScore int `json:"total_score" validate:"min=0"`
|
|
QuestionsAsked int `json:"questions_asked" validate:"min=0"`
|
|
QuestionsCorrect int `json:"questions_correct" validate:"min=0"`
|
|
HintsUsed int `json:"hints_used" validate:"min=0"`
|
|
DurationSeconds int `json:"duration_seconds" validate:"min=0"`
|
|
CompletedAt string `json:"completed_at" validate:"required"`
|
|
CompletionType string `json:"completion_type" validate:"required,oneof=completed timed_out abandoned"`
|
|
}
|