leaderboard

package
v0.0.0-...-18c94e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareStandingsEmbed

func PrepareStandingsEmbed(params *PrepareStandingsEmbedRequest) (*discordgo.MessageEmbed, error)

Types

type Config

type Config struct {
	NamespacePrefix string
}

type PlayerScore

type PlayerScore struct {
	PlayerId string
	Score    int64
}

type PrepareStandingsEmbedRequest

type PrepareStandingsEmbedRequest struct {
	Standings *Standings
	Session   *discordgo.Session
	GuildId   string
}

type RecordScoresInput

type RecordScoresInput struct {
	Scores []*PlayerScore
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(awsCfg aws.Config, cfg *Config) (*Service, error)

func (*Service) GetStandings

func (svc *Service) GetStandings(ctx context.Context) (*Standings, error)

func (*Service) RecordScores

func (svc *Service) RecordScores(ctx context.Context, input *RecordScoresInput) error

type Standings

type Standings struct {
	SortedStandings []*PlayerScore
	LastUpdated     time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL