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
@@ -130,6 +130,15 @@ func compatibleProducerIntents(t *testing.T) []notificationintent.Intent {
GameName: "Nebula Clash",
})
},
func() (notificationintent.Intent, error) {
return notificationintent.NewLobbyMembershipBlockedIntent(metadata, "owner-1", notificationintent.LobbyMembershipBlockedPayload{
GameID: "game-1",
GameName: "Nebula Clash",
MembershipUserID: "user-2",
MembershipUserName: "player-aabbccdd",
Reason: "permanent_blocked",
})
},
func() (notificationintent.Intent, error) {
return notificationintent.NewLobbyInviteCreatedIntent(metadata, "invited-1", notificationintent.LobbyInviteCreatedPayload{
GameID: "game-1",
@@ -154,6 +163,27 @@ func compatibleProducerIntents(t *testing.T) []notificationintent.Intent {
InviteeName: "Nova Pilot",
})
},
func() (notificationintent.Intent, error) {
return notificationintent.NewLobbyRaceNameRegistrationEligibleIntent(metadata, "user-7", notificationintent.LobbyRaceNameRegistrationEligiblePayload{
GameID: "game-1",
GameName: "Nebula Clash",
RaceName: "Skylancer",
EligibleUntilMs: 1775208100000,
})
},
func() (notificationintent.Intent, error) {
return notificationintent.NewLobbyRaceNameRegisteredIntent(metadata, "user-8", notificationintent.LobbyRaceNameRegisteredPayload{
RaceName: "Skylancer",
})
},
func() (notificationintent.Intent, error) {
return notificationintent.NewLobbyRaceNameRegistrationDeniedIntent(metadata, "user-9", notificationintent.LobbyRaceNameRegistrationDeniedPayload{
GameID: "game-1",
GameName: "Nebula Clash",
RaceName: "Skylancer",
Reason: "capability_not_met",
})
},
}
intents := make([]notificationintent.Intent, 0, len(builders))