Files
root-me-api/internal/scoreboard/entry.go
T
mycroft cf961ab94f
build / test (push) Successful in 9s
build / build (push) Successful in 10s
build / build-image (push) Successful in 1m4s
feat: initial commit
2026-06-04 14:19:37 +02:00

21 lines
832 B
Go

// Package scoreboard holds the root-me scoreboard domain type and the
// in-memory store/refresher that serve it to the transports.
package scoreboard
// Entry is a single row of the root-me scoreboard.
//
// Rank is the canonical 1-based position in score-descending order, assigned by
// the scraper. (root-me's own displayed rank is noisy around ties, so we don't
// rely on it.)
type Entry struct {
Rank int `json:"rank"`
Username string `json:"username"`
// ProfilePath is the site-relative profile path, e.g. "/skav".
ProfilePath string `json:"profile_path,omitempty"`
// Country is the two-letter country code from the flag icon, e.g. "fr".
Country string `json:"country,omitempty"`
// Grade is the root-me rank/grade name, e.g. "legend".
Grade string `json:"grade,omitempty"`
Score int `json:"score"`
}