Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Leaderboard ¶
type Leaderboard struct {
// contains filtered or unexported fields
}
func (*Leaderboard) CheckAndPush ¶
func (l *Leaderboard) CheckAndPush(name string, target float64, extra map[string]interface{}) bool
CheckAndPush checks the target against the leaderboard, and pushes worthy entries into it. Returns true if entry was pushed to leaderboard.
func (*Leaderboard) GetPage ¶
func (l *Leaderboard) GetPage(limit int, page int) []LeaderboardEntry
GetPage gets a segment of the list for paging.
type LeaderboardEntry ¶
type LeaderboardEntry struct {
// contains filtered or unexported fields
}
LeaderboardEntry is sorted in Leaderboard entries by the target.
Click to show internal directories.
Click to hide internal directories.