Skip to content

Commit

Permalink
feat: add example config
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Nov 5, 2024
1 parent 3ddd7d1 commit c137b72
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions services/leaderboard-service/internal/config/leaderboards.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package config

type order uint8

const (
Ascending order = iota
Descending
)

type LeaderboardConfig struct {
ID string

Order order
Personal PersonalLeaderboardConfig
}

type PersonalLeaderboardConfig struct {
enabled bool
storeLimit int
}

var Leaderboards = map[string]LeaderboardConfig{
"minesweeperTime": {
ID: "minesweeperTime",

Order: Ascending,
Personal: PersonalLeaderboardConfig{
enabled: true,
storeLimit: 10,
},
},
"marathonScore": {
ID: "marathonScore",

Order: Descending,
Personal: PersonalLeaderboardConfig{
enabled: true,
storeLimit: 10,
},
},
}

0 comments on commit c137b72

Please sign in to comment.