Discover Packages
github.com/GoogleCloudPlatform/golang-samples/getting-started/gopher-run
leaderboard
package
Version:
v0.0.0-...-c10c368
Opens a new window with list of versions in this module.
Published: Jan 26, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package leaderboard starts a Gopher Run leaderboard server.
AddScore adds a score to the leaderboard database and returns information about whether it updated an existing score.
type ScoreData struct {
Name string `json:"name"`
Team string `json:"team"`
Coins int `json:"coins"`
Distance float32 `json:"distance"`
Combo float32 `json:"combo"`
}
ScoreData is a player's score.
TopScores returns the top 10 scores in the leaderboard.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.