Documentation ¶
Index ¶
- type Leaderboard
- func (l *Leaderboard) GetAroundMe(username string) []User
- func (l *Leaderboard) GetLeaders(page int) []User
- func (l *Leaderboard) GetMember(username string) (User, error)
- func (l *Leaderboard) GetMemberByRank(position int) User
- func (l *Leaderboard) GetRank(username string) int
- func (l *Leaderboard) RankMember(username string, score int) (User, error)
- func (l *Leaderboard) RemoveMember(username string) (User, error)
- func (l *Leaderboard) TotalMembers() int
- func (l *Leaderboard) TotalPages() int
- type RedisSettings
- type Team
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Leaderboard ¶
type Leaderboard struct { Settings RedisSettings Name string PageSize int }
func NewLeaderboard ¶
func NewLeaderboard(settings RedisSettings, name string, pageSize int) Leaderboard
func (*Leaderboard) GetAroundMe ¶
func (l *Leaderboard) GetAroundMe(username string) []User
func (*Leaderboard) GetLeaders ¶
func (l *Leaderboard) GetLeaders(page int) []User
func (*Leaderboard) GetMemberByRank ¶
func (l *Leaderboard) GetMemberByRank(position int) User
func (*Leaderboard) GetRank ¶
func (l *Leaderboard) GetRank(username string) int
func (*Leaderboard) RankMember ¶
func (l *Leaderboard) RankMember(username string, score int) (User, error)
func (*Leaderboard) RemoveMember ¶
func (l *Leaderboard) RemoveMember(username string) (User, error)
func (*Leaderboard) TotalMembers ¶
func (l *Leaderboard) TotalMembers() int
func (*Leaderboard) TotalPages ¶
func (l *Leaderboard) TotalPages() int
type RedisSettings ¶
Click to show internal directories.
Click to hide internal directories.