feat: initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user