feat: game lobby service
This commit is contained in:
@@ -17,8 +17,11 @@ const expectedPushPayloadMappingTable = `| ` + "`notification_type`" + ` | FlatB
|
||||
| ` + "`lobby.application.submitted`" + ` | ` + "`notification.LobbyApplicationSubmittedEvent`" + ` | ` + "`game_id`" + `, ` + "`applicant_user_id`" + ` |
|
||||
| ` + "`lobby.membership.approved`" + ` | ` + "`notification.LobbyMembershipApprovedEvent`" + ` | ` + "`game_id`" + ` |
|
||||
| ` + "`lobby.membership.rejected`" + ` | ` + "`notification.LobbyMembershipRejectedEvent`" + ` | ` + "`game_id`" + ` |
|
||||
| ` + "`lobby.membership.blocked`" + ` | ` + "`notification.LobbyMembershipBlockedEvent`" + ` | ` + "`game_id`" + `, ` + "`membership_user_id`" + `, ` + "`reason`" + ` |
|
||||
| ` + "`lobby.invite.created`" + ` | ` + "`notification.LobbyInviteCreatedEvent`" + ` | ` + "`game_id`" + `, ` + "`inviter_user_id`" + ` |
|
||||
| ` + "`lobby.invite.redeemed`" + ` | ` + "`notification.LobbyInviteRedeemedEvent`" + ` | ` + "`game_id`" + `, ` + "`invitee_user_id`" + ` |`
|
||||
| ` + "`lobby.invite.redeemed`" + ` | ` + "`notification.LobbyInviteRedeemedEvent`" + ` | ` + "`game_id`" + `, ` + "`invitee_user_id`" + ` |
|
||||
| ` + "`lobby.race_name.registration_eligible`" + ` | ` + "`notification.LobbyRaceNameRegistrationEligibleEvent`" + ` | ` + "`game_id`" + `, ` + "`race_name`" + `, ` + "`eligible_until_ms`" + ` |
|
||||
| ` + "`lobby.race_name.registered`" + ` | ` + "`notification.LobbyRaceNameRegisteredEvent`" + ` | ` + "`race_name`" + ` |`
|
||||
|
||||
var expectedPushPayloadSchemaTableNames = []string{
|
||||
"GameTurnReadyEvent",
|
||||
@@ -26,8 +29,11 @@ var expectedPushPayloadSchemaTableNames = []string{
|
||||
"LobbyApplicationSubmittedEvent",
|
||||
"LobbyMembershipApprovedEvent",
|
||||
"LobbyMembershipRejectedEvent",
|
||||
"LobbyMembershipBlockedEvent",
|
||||
"LobbyInviteCreatedEvent",
|
||||
"LobbyInviteRedeemedEvent",
|
||||
"LobbyRaceNameRegistrationEligibleEvent",
|
||||
"LobbyRaceNameRegisteredEvent",
|
||||
}
|
||||
|
||||
var expectedPushPayloadSchemaFields = map[string][]string{
|
||||
@@ -49,6 +55,11 @@ var expectedPushPayloadSchemaFields = map[string][]string{
|
||||
"LobbyMembershipRejectedEvent": {
|
||||
"game_id:string;",
|
||||
},
|
||||
"LobbyMembershipBlockedEvent": {
|
||||
"game_id:string;",
|
||||
"membership_user_id:string;",
|
||||
"reason:string;",
|
||||
},
|
||||
"LobbyInviteCreatedEvent": {
|
||||
"game_id:string;",
|
||||
"inviter_user_id:string;",
|
||||
@@ -57,6 +68,14 @@ var expectedPushPayloadSchemaFields = map[string][]string{
|
||||
"game_id:string;",
|
||||
"invitee_user_id:string;",
|
||||
},
|
||||
"LobbyRaceNameRegistrationEligibleEvent": {
|
||||
"game_id:string;",
|
||||
"race_name:string;",
|
||||
"eligible_until_ms:int64;",
|
||||
},
|
||||
"LobbyRaceNameRegisteredEvent": {
|
||||
"race_name:string;",
|
||||
},
|
||||
}
|
||||
|
||||
var expectedPushPayloadGeneratedFiles = []string{
|
||||
@@ -66,12 +85,15 @@ var expectedPushPayloadGeneratedFiles = []string{
|
||||
"LobbyInviteCreatedEvent.go",
|
||||
"LobbyInviteRedeemedEvent.go",
|
||||
"LobbyMembershipApprovedEvent.go",
|
||||
"LobbyMembershipBlockedEvent.go",
|
||||
"LobbyMembershipRejectedEvent.go",
|
||||
"LobbyRaceNameRegisteredEvent.go",
|
||||
"LobbyRaceNameRegistrationEligibleEvent.go",
|
||||
}
|
||||
|
||||
var expectedPushPayloadDocumentationSnippets = []string{
|
||||
"Only the seven user-facing push notification types above are represented in `notification.fbs`.",
|
||||
"`geo.review_recommended`, `game.generation_failed`, `lobby.runtime_paused_after_start`, and `lobby.invite.expired` remain outside this schema because they are email-only in v1.",
|
||||
"Only the ten user-facing push notification types above are represented in `notification.fbs`.",
|
||||
"`geo.review_recommended`, `game.generation_failed`, `lobby.runtime_paused_after_start`, `lobby.invite.expired`, and `lobby.race_name.registration_denied` remain outside this schema because they are email-only in v1.",
|
||||
"`notification_type` alone determines the concrete FlatBuffers table.",
|
||||
"No extra envelope or FlatBuffers `union` is added in v1.",
|
||||
"The push payload must stay lightweight and must not attempt to mirror full game, lobby, or profile state.",
|
||||
|
||||
Reference in New Issue
Block a user