Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMatchID ¶
GenerateMatchID creates the ID of the match. The reason for this is that the IDs given by pep.py, and thus the Ripple API, can repeat themselves. This is due to the fact that on a restart of pep.py, the IDs start from one again, and so to overcome this two games are considered of the same match only if they share the same match ID and have been created at most 29 minutes and 59 seconds apart (in a "worst case scenario")
Types ¶
type DBVersion ¶
type DBVersion struct {
Version int
}
DBVersion is a table holding a single value: the version of the database.
type Game ¶
type Game struct { ID int `gorm:"primary_key"` Match Match `json:"-"` MatchID int64 `json:",string"` Name string BeatmapID int Mods int64 GameMode int Scores string `gorm:"type:text"` CreatedAt time.Time }
Game represents a game (a single playthrough of a beatmap) of a match
type MatchRedirect ¶
MatchRedirect contains what matches some match IDs are referring to. ... It's complicated.