Versions in this module Expand all Collapse all v1 v1.0.2 Aug 24, 2021 v1.0.1 Jun 10, 2021 v1.0.0 May 21, 2021 Changes in this version + type Member struct + LeaderboardID string + PreviousRank int + PublicID string + Rank int + Score int + type MemberList struct + Member *Member + Members []*Member + NotFound []string + type Podium struct + Config *viper.Viper + Pass string + URL string + User string + func (p *Podium) DeleteLeaderboard(ctx context.Context, leaderboard string) (*Response, error) + func (p *Podium) GetCount(ctx context.Context, leaderboard string) (int, error) + func (p *Podium) GetMember(ctx context.Context, leaderboard, memberID string) (*Member, error) + func (p *Podium) GetMemberInLeaderboards(ctx context.Context, leaderboards []string, memberID string, order ...string) (*ScoreList, error) + func (p *Podium) GetMembers(ctx context.Context, leaderboard string, memberIDs []string) (*MemberList, error) + func (p *Podium) GetMembersAroundMember(ctx context.Context, leaderboard, memberID string, pageSize int, ...) (*MemberList, error) + func (p *Podium) GetTop(ctx context.Context, leaderboard string, page, pageSize int) (*MemberList, error) + func (p *Podium) GetTopPercent(ctx context.Context, leaderboard string, percentage int) (*MemberList, error) + func (p *Podium) Healthcheck(ctx context.Context) (string, error) + func (p *Podium) IncrementScore(ctx context.Context, leaderboard, memberID string, increment, scoreTTL int) (*MemberList, error) + func (p *Podium) RemoveMemberFromLeaderboard(ctx context.Context, leaderboard, member string) (*Response, error) + func (p *Podium) UpdateMembersScore(ctx context.Context, leaderboard string, members []*Member, scoreTTL int) (*MemberList, error) + func (p *Podium) UpdateScore(ctx context.Context, leaderboard, memberID string, score, scoreTTL int) (*Member, error) + func (p *Podium) UpdateScores(ctx context.Context, leaderboards []string, memberID string, ...) (*ScoreList, error) + type PodiumInterface interface + DeleteLeaderboard func(ctx context.Context, leaderboard string) (*Response, error) + GetCount func(ctx context.Context, leaderboard string) (int, error) + GetMember func(ctx context.Context, leaderboard, memberID string) (*Member, error) + GetMemberInLeaderboards func(ctx context.Context, leaderboards []string, memberID string, order ...string) (*ScoreList, error) + GetMembers func(ctx context.Context, leaderboard string, memberIDs []string) (*MemberList, error) + GetMembersAroundMember func(ctx context.Context, leaderboard, memberID string, pageSize int, ...) (*MemberList, error) + GetTop func(ctx context.Context, leaderboard string, page, pageSize int) (*MemberList, error) + GetTopPercent func(ctx context.Context, leaderboard string, percentage int) (*MemberList, error) + Healthcheck func(ctx context.Context) (string, error) + IncrementScore func(ctx context.Context, leaderboard, memberID string, increment, scoreTTL int) (*MemberList, error) + RemoveMemberFromLeaderboard func(ctx context.Context, leaderboard, member string) (*Response, error) + UpdateMembersScore func(ctx context.Context, leaderboard string, members []*Member, scoreTTL int) (*MemberList, error) + UpdateScore func(ctx context.Context, leaderboard, memberID string, score, scoreTTL int) (*Member, error) + UpdateScores func(ctx context.Context, leaderboards []string, memberID string, ...) (*ScoreList, error) + func NewPodium(config *viper.Viper) PodiumInterface + type RequestError struct + func NewRequestError(statusCode int, body string) *RequestError + func (r *RequestError) Error() string + func (r *RequestError) Status() int + type Response struct + Reason string + Success bool + type Score struct + LeaderboardID string + PreviousRank int + PublicID string + Rank int + Score int + type ScoreList struct + Scores []*Score v1.0.0-alpha May 21, 2021