feat: game lobby service

This commit is contained in:
Ilia Denisov
2026-04-25 23:20:55 +02:00
committed by GitHub
parent 32dc29359a
commit 48b0056b49
336 changed files with 57074 additions and 1418 deletions
+18 -2
View File
@@ -30,6 +30,14 @@ const (
// SanctionCodeProfileUpdateBlock denies self-service profile/settings
// mutations.
SanctionCodeProfileUpdateBlock SanctionCode = "profile_update_block"
// SanctionCodePermanentBlock marks the account as permanently disabled.
// It is a terminal sanction: every `can_*` eligibility marker collapses to
// false while it is active, self-service reads and writes are rejected
// with 409 conflict, and Game Lobby performs Race Name Directory cascade
// release when it observes the corresponding `user:lifecycle_events`
// event.
SanctionCodePermanentBlock SanctionCode = "permanent_block"
)
// IsKnown reports whether SanctionCode belongs to the frozen v1 catalog.
@@ -39,7 +47,8 @@ func (code SanctionCode) IsKnown() bool {
SanctionCodePrivateGameCreateBlock,
SanctionCodePrivateGameManageBlock,
SanctionCodeGameJoinBlock,
SanctionCodeProfileUpdateBlock:
SanctionCodeProfileUpdateBlock,
SanctionCodePermanentBlock:
return true
default:
return false
@@ -63,6 +72,12 @@ const (
// LimitCodeMaxActiveGameMemberships limits how many active public-game
// memberships the user may hold at once.
LimitCodeMaxActiveGameMemberships LimitCode = "max_active_game_memberships"
// LimitCodeMaxRegisteredRaceNames overrides the tariff default quota for
// permanent race-name registrations in the Game Lobby Race Name Directory.
// The value `0` denotes an unlimited quota and is the canonical marker used
// by the `paid_lifetime` tariff default.
LimitCodeMaxRegisteredRaceNames LimitCode = "max_registered_race_names"
)
const (
@@ -91,7 +106,8 @@ func (code LimitCode) IsSupported() bool {
switch code {
case LimitCodeMaxOwnedPrivateGames,
LimitCodeMaxPendingPublicApplications,
LimitCodeMaxActiveGameMemberships:
LimitCodeMaxActiveGameMemberships,
LimitCodeMaxRegisteredRaceNames:
return true
default:
return false