feat: game lobby service
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user