From c137b72495f8f29afcdda10c144a23838788256c Mon Sep 17 00:00:00 2001 From: Zak <34372536+ZakShearman@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:18:16 +0000 Subject: [PATCH] feat: add example config --- .../internal/config/leaderboards.go | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 services/leaderboard-service/internal/config/leaderboards.go diff --git a/services/leaderboard-service/internal/config/leaderboards.go b/services/leaderboard-service/internal/config/leaderboards.go new file mode 100644 index 0000000..f222ece --- /dev/null +++ b/services/leaderboard-service/internal/config/leaderboards.go @@ -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, + }, + }, +}