Documentation
¶
Index ¶
- type APIKey
- type AdvanceLeaderboardPeriodParams
- type AllocationStatus
- type ApproveTenantChangeRequestParams
- type ApproveTenantSignupRequestParams
- type ArchiveLeaderboardPeriodParams
- type AreAccountsFriendsAcceptedParams
- type AuditLog
- type BindPlayerLinkedEmailParams
- type BumpAccountPlayerEpochsInTenantParams
- type BumpControlPanelLoginFailureParams
- type BumpControlPanelLoginFailureRow
- type CancelMatchmakingTicketParams
- type CancelPlayerDeleteByAccountParams
- type CancelPlayerDeleteInProjectParams
- type CasbinRule
- type ClaimMatchmakerBucketParams
- type ClaimMatchmakerBucketRow
- type ClaimVerifiedPlayerAccountParams
- type CommitMatchmakerTicketsParams
- type CompletePlayerPasswordResetParams
- type ConfirmControlPanelTOTPParams
- type ConfirmPlayerAccountTOTPParams
- type ConnectionLimitOverride
- type ConsumeControlPanelTOTPBackupCodeParams
- type ConsumePlayerAccountTOTPBackupCodeParams
- type ControlPanelCreateTenantBareParams
- type ControlPanelCreateTenantParams
- type ControlPanelCreateTenantRow
- type ControlPanelInvitation
- type ControlPanelMembership
- type ControlPanelPasswordReset
- type ControlPanelSession
- type ControlPanelTrustedDevice
- type ControlPanelUser
- type ControlPanelUserConnection
- type ControlPanelUserTotp
- type ControlPanelUserTotpBackupCode
- type CountActiveGameSessionPeersParams
- type CountActiveSignalMembersParams
- type CountAllocationsForProjectParams
- type CountMatchmakerMatchesByModeRow
- type CountPendingGameInviteForSessionPlayerParams
- type CountPlayersForProjectParams
- type CountQueuedTicketsLikeParams
- type CountRecentGameSessionSignalsParams
- type CreateAPIKeyParams
- type CreateAPIKeyRow
- type CreateAnonymousPlayerParams
- type CreateAnonymousPlayerRow
- type CreateControlPanelAPIKeyParams
- type CreateControlPanelAPIKeyRow
- type CreateControlPanelInvitationParams
- type CreateControlPanelInvitationRow
- type CreateControlPanelMembershipParams
- type CreateControlPanelPasswordResetParams
- type CreateControlPanelSessionParams
- type CreateControlPanelSessionRow
- type CreateControlPanelTrustedDeviceParams
- type CreateControlPanelUserParams
- type CreateControlPanelUserRow
- type CreateEmailPlayerParams
- type CreateFirstControlPanelAdminParams
- type CreateFirstControlPanelAdminRow
- type CreateFleetParams
- type CreateGameInviteParams
- type CreateGameSessionParams
- type CreateGameSessionRow
- type CreateLeaderboardParams
- type CreateLinkedPlayerParams
- type CreateMCPTokenParams
- type CreatePendingAllocationParams
- type CreatePendingAllocationRow
- type CreatePlayerAccountParams
- type CreatePlayerAccountPasswordResetParams
- type CreatePlayerAccountRow
- type CreatePlayerAccountSessionParams
- type CreatePlayerAccountTrustedDeviceParams
- type CreatePlayerInvitationParams
- type CreatePlayerInvitationRow
- type CreatePlayerParams
- type CreatePlayerRow
- type CreatePlayerSessionParams
- type CreateProjectForTenantRow
- type CreateRealtimeTicketParams
- type CreateRelayNodeParams
- type CreateSessionParams
- type CreateSessionRow
- type CreateTenantChangeRequestParams
- type CreateTenantPlayerBanParams
- type CreateTenantSignupRequestParams
- type CreateTenantSignupRequestRow
- type CreateVerifiedControlPanelUserParams
- type CreateVerifiedControlPanelUserRow
- type CreateVerifiedPlayerAccountParams
- type DBTX
- type DeleteControlPanelMembershipParams
- type DeleteControlPanelMembershipUnlessSelfParams
- type DeleteControlPanelUserConnectionParams
- type DeleteFriendEdgeByAccountParams
- type DeleteFriendEdgeDirectedParams
- type DeleteGameInviteParams
- type DeleteGameSessionPeerParams
- type DeletePlayerAccountConnectionParams
- type DeleteQuotaOverrideParams
- type DeleteRateLimitOverrideParams
- type DeleteTenantPlayerBanParams
- type DenyTenantChangeRequestParams
- type DenyTenantSignupRequestParams
- type DisableTenantFeatureGrantParams
- type EmailSuppression
- type ExpirePlayerQueuedTicketParams
- type ExtendGameSessionExpiryOnHeartbeatParams
- type ExtendGameSessionExpiryParams
- type FeatureGrant
- type FindAccountIDsByDisplayNameRow
- type Fleet
- type FleetAllocationEvent
- type FriendEdge
- type GameInvite
- type GameServerAllocation
- type GameSession
- type GameSessionPeer
- type GameSessionSignal
- type GetAPIKeyByHashRow
- type GetAPIKeyScopesRow
- type GetAPIRateLimitOverrideRow
- type GetAllocationRow
- type GetConnectionLimitOverrideRow
- type GetControlPanelInvitationByCodeHashRow
- type GetControlPanelInvitationByIDRow
- type GetControlPanelMembershipParams
- type GetControlPanelMembershipRow
- type GetControlPanelSessionByRefreshHashRow
- type GetControlPanelTOTPRow
- type GetControlPanelTrustedDeviceParams
- type GetControlPanelUserAnyStatusByEmailRow
- type GetControlPanelUserByConnectionParams
- type GetControlPanelUserByConnectionRow
- type GetControlPanelUserByEmailRow
- type GetControlPanelUserByIDRow
- type GetControlPanelUserVerificationStateRow
- type GetFleetByNameParams
- type GetFriendEdgeByAccountParams
- type GetFriendEdgeByAccountRow
- type GetGameSessionByJoinCodeParams
- type GetGameSessionByJoinCodeRow
- type GetGameSessionForUpdateParams
- type GetGameSessionForUpdateRow
- type GetGameSessionParams
- type GetGameSessionRow
- type GetInviteRateLimitOverrideParams
- type GetInviteRateLimitOverrideRow
- type GetLeaderboardForControlPanelParams
- type GetLeaderboardForControlPanelRow
- type GetLeaderboardForSubmitParams
- type GetLeaderboardForSubmitRow
- type GetLeaderboardForUpdateParams
- type GetLeaderboardForUpdateRow
- type GetLeaderboardParams
- type GetLeaderboardRow
- type GetMCPTokenByHashRow
- type GetMCPTokenCreatorParams
- type GetMatchmakingTicketForTraceParams
- type GetMatchmakingTicketForTraceRow
- type GetMatchmakingTicketParams
- type GetMatchmakingTicketRow
- type GetPlayerAccountByConnectionParams
- type GetPlayerAccountByConnectionRow
- type GetPlayerAccountByEmailRow
- type GetPlayerAccountByIDRow
- type GetPlayerAccountForProjectReadParams
- type GetPlayerAccountRemoteAddrsRow
- type GetPlayerAccountSessionRow
- type GetPlayerAccountTOTPRow
- type GetPlayerAccountTrustedDeviceParams
- type GetPlayerAccountVerificationStateRow
- type GetPlayerAuthCredentialsRow
- type GetPlayerByEmailParams
- type GetPlayerByEmailProjectParams
- type GetPlayerByEmailProjectRow
- type GetPlayerByEmailRow
- type GetPlayerByExternalIDParams
- type GetPlayerByExternalIDRow
- type GetPlayerDeleteRequestedByAccountParams
- type GetPlayerForAccountLinkParams
- type GetPlayerForAccountLinkRow
- type GetPlayerForProjectParams
- type GetPlayerForProjectRow
- type GetPlayerForVerifyRow
- type GetPlayerIDByEmailParams
- type GetPlayerInvitationByCodeHashRow
- type GetPlayerModerationStateParams
- type GetPlayerModerationStateRow
- type GetPlayerPasswordResetStateParams
- type GetPlayerPasswordResetStateRow
- type GetPlayerPendingDeleteByEmailParams
- type GetPlayerPendingDeleteByEmailRow
- type GetPlayerSessionRow
- type GetPlayerVerificationStateByIDRow
- type GetPlayerVerificationStateParams
- type GetPlayerVerificationStateRow
- type GetPresenceRow
- type GetProfileEmailStateRow
- type GetProfileRow
- type GetProjectSteamAuthConfigForControlPanelParams
- type GetProjectSteamAuthConfigForControlPanelRow
- type GetProjectSteamAuthConfigRow
- type GetProjectTenantRow
- type GetPublicPlayerByFriendCodeParams
- type GetPublicPlayerByFriendCodeRow
- type GetPublicPlayerParams
- type GetPublicPlayerRow
- type GetQueuedTicketForPlayerParams
- type GetRemoteConfigForControlPanelParams
- type GetSessionByRefreshHashParams
- type GetSessionByRefreshHashRow
- type GetSettingsRevisionParams
- type GetStorageObjectParams
- type GetStorageObjectRow
- type GetTenantChangeRequestByIDRow
- type GetTenantDisabledStateRow
- type GetTenantFactsRow
- type GetTenantQuotaContextLockedRow
- type GetTenantQuotaContextRow
- type GetTenantSignupRequestByCodeHashRow
- type GetTenantSignupRequestByIDRow
- type IncrementRelaySessionsParams
- type InsertAllocationEventParams
- type InsertControlPanelTOTPBackupCodesParams
- type InsertControlPanelUserConnectionParams
- type InsertGameSessionSignalParams
- type InsertMatchmakerMatchParams
- type InsertMatchmakingTicketParams
- type InsertMatchmakingTicketRow
- type InsertPlayerAccountConnectionParams
- type InsertPlayerAccountTOTPBackupCodesParams
- type InsertServerSecretParams
- type InsertSettingsRevisionParams
- type IsAccountBannedInTenantParams
- type IsBlockedBetweenAccountsParams
- type IsGameSessionMemberParams
- type LatestSettingsRevisionParams
- type Leaderboard
- type LeaderboardEntriesForPlayersParams
- type LeaderboardEntriesForPlayersRow
- type LeaderboardEntry
- type LeaderboardPeriod
- type LeaderboardRangeByRankParams
- type LeaderboardRangeByRankRow
- type LeaderboardUserRankParams
- type LinkPlayerEmailCredentialsParams
- type LinkPlayerToAccountParams
- type ListAPIKeysRow
- type ListAccountIdentitiesRow
- type ListActiveAllocationsParams
- type ListActiveAllocationsRow
- type ListAllRateLimitOverridesForTenantRow
- type ListAllocationBackendsForTenantRow
- type ListAllocationEventsParams
- type ListAllocationEventsRow
- type ListAllocationsForProjectParams
- type ListAllocationsForProjectRow
- type ListControlPanelInvitationsForTenantRow
- type ListControlPanelMembersForTenantRow
- type ListControlPanelTenantsForPlatformAdminRow
- type ListControlPanelTenantsForUserRow
- type ListControlPanelUserConnectionsRow
- type ListControlPanelUsersForPlatformAdminParams
- type ListControlPanelUsersForPlatformAdminRow
- type ListDeletedLeaderboardsForProjectRow
- type ListDueLeaderboardResetsRow
- type ListEnforcedTenantStorageRow
- type ListExpiredUnclaimedMatchmakerAllocationsRow
- type ListFriendsByStatusForAccountParams
- type ListGameSessionPeersRow
- type ListGameSessionSignalsForRecipientParams
- type ListGameSessionSignalsForRecipientRow
- type ListLeaderboardPeriodsParams
- type ListLeaderboardPeriodsRow
- type ListLeaderboardsForProjectRow
- type ListMCPTokensForProjectRow
- type ListMatchmakerBucketsForProjectRow
- type ListPendingGameInvitesRow
- type ListPendingTenantChangeRequestsRow
- type ListPendingTenantSignupRequestsRow
- type ListPlatformAdminInvitationsRow
- type ListPlatformAdminsRow
- type ListPlayerAccountConnectionsRow
- type ListPlayerInvitationsForProjectRow
- type ListPlayerSessionEpochsRow
- type ListPlayersDueForPurgeParams
- type ListPlayersDueForPurgeRow
- type ListPlayersForProjectParams
- type ListPlayersForProjectRow
- type ListPresenceForUsersRow
- type ListProjectsForTenantRow
- type ListPublicOpenGameSessionsParams
- type ListPublicOpenGameSessionsRow
- type ListPublicPlayersParams
- type ListPublicPlayersRow
- type ListQuotaOverridesForTenantRow
- type ListReadyMatchmakerBucketsRow
- type ListRelayNodesRow
- type ListSettingsRevisionsParams
- type ListSettingsRevisionsRow
- type ListStorageObjectsParams
- type ListStorageObjectsRow
- type ListTenantChangeRequestsRow
- type ListTenantCustomTokenSecretsRow
- type ListTenantPlayerBansRow
- type LockControlPanelUserVerificationParams
- type LockPlayerAccountVerificationParams
- type LockPlayerPasswordResetParams
- type LockPlayerVerificationParams
- type LockStorageObjectForWriteParams
- type MarkAllocationReadyParams
- type MarkTenantSignupAcceptedParams
- type MatchmakerMatch
- type MatchmakerQueueStatsRow
- type MatchmakingEntry
- type MatchmakingResolution
- type MatchmakingTicket
- type McpToken
- type NullAllocationStatus
- type NullRiverJobState
- type NullTicketStatus
- type Party
- type PartyCodeAttempt
- type PartyCodeIpAttempt
- type PartyInvite
- type PartyInviteCode
- type PartyMember
- type PlatformAuditLog
- type PlatformSignupConfig
- type PlayerAccount
- type PlayerAccountConnection
- type PlayerAccountPasswordReset
- type PlayerAccountSession
- type PlayerAccountTotp
- type PlayerAccountTotpBackupCode
- type PlayerAccountTrustedDevice
- type PlayerInvitation
- type PlayerInviteLookupRow
- type Presence
- type Project
- type ProjectPlayer
- type PruneSettingsRevisionsParams
- type PutStorageObjectIfMatchParams
- type PutStorageObjectIfMatchRow
- type PutStorageObjectParams
- type PutStorageObjectRow
- type Querier
- type Queries
- func (q *Queries) AdvanceLeaderboardPeriod(ctx context.Context, arg AdvanceLeaderboardPeriodParams) (int64, error)
- func (q *Queries) ApplyTenantStorageDelta(ctx context.Context, delta int64) error
- func (q *Queries) ApproveTenantChangeRequest(ctx context.Context, arg ApproveTenantChangeRequestParams) (int64, error)
- func (q *Queries) ApproveTenantSignupRequest(ctx context.Context, arg ApproveTenantSignupRequestParams) (int64, error)
- func (q *Queries) ArchiveLeaderboardPeriod(ctx context.Context, arg ArchiveLeaderboardPeriodParams) error
- func (q *Queries) AreAccountsFriendsAccepted(ctx context.Context, arg AreAccountsFriendsAcceptedParams) (int64, error)
- func (q *Queries) BindPlayerLinkedEmail(ctx context.Context, arg BindPlayerLinkedEmailParams) (int64, error)
- func (q *Queries) BumpAccountPlayerEpochsInTenant(ctx context.Context, arg BumpAccountPlayerEpochsInTenantParams) error
- func (q *Queries) BumpControlPanelLoginFailure(ctx context.Context, arg BumpControlPanelLoginFailureParams) (BumpControlPanelLoginFailureRow, error)
- func (q *Queries) BumpPlayerSessionEpoch(ctx context.Context, id int64) error
- func (q *Queries) CancelMatchmakingTicket(ctx context.Context, arg CancelMatchmakingTicketParams) (int64, error)
- func (q *Queries) CancelPlayerDeleteByAccount(ctx context.Context, arg CancelPlayerDeleteByAccountParams) (int64, error)
- func (q *Queries) CancelPlayerDeleteInProject(ctx context.Context, arg CancelPlayerDeleteInProjectParams) (int64, error)
- func (q *Queries) CancelPlayerDeleteSelf(ctx context.Context, id int64) (int64, error)
- func (q *Queries) ClaimMatchmakerBucket(ctx context.Context, arg ClaimMatchmakerBucketParams) ([]ClaimMatchmakerBucketRow, error)
- func (q *Queries) ClaimMatchmakerMatch(ctx context.Context, id string) (MatchmakerMatch, error)
- func (q *Queries) ClaimVerifiedPlayerAccount(ctx context.Context, arg ClaimVerifiedPlayerAccountParams) error
- func (q *Queries) ClearControlPanelVerificationCode(ctx context.Context, id int64) error
- func (q *Queries) ClearPlayerPasswordResetLock(ctx context.Context, id int64) error
- func (q *Queries) ClearPlayerVerificationCode(ctx context.Context, id int64) error
- func (q *Queries) ClearPlayerVerificationLock(ctx context.Context, id int64) error
- func (q *Queries) ClearProjectSteamAuthConfig(ctx context.Context, projectID int64) (int64, error)
- func (q *Queries) CommitMatchmakerTickets(ctx context.Context, arg CommitMatchmakerTicketsParams) (int64, error)
- func (q *Queries) CompletePlayerPasswordReset(ctx context.Context, arg CompletePlayerPasswordResetParams) (int64, error)
- func (q *Queries) ConfirmControlPanelTOTP(ctx context.Context, arg ConfirmControlPanelTOTPParams) (int64, error)
- func (q *Queries) ConfirmPlayerAccountTOTP(ctx context.Context, arg ConfirmPlayerAccountTOTPParams) (int64, error)
- func (q *Queries) ConsumeControlPanelPasswordReset(ctx context.Context, tokenHash []byte) (int64, error)
- func (q *Queries) ConsumeControlPanelTOTPBackupCode(ctx context.Context, arg ConsumeControlPanelTOTPBackupCodeParams) (int64, error)
- func (q *Queries) ConsumePlayerAccountPasswordReset(ctx context.Context, tokenHash []byte) (pgtype.UUID, error)
- func (q *Queries) ConsumePlayerAccountTOTPBackupCode(ctx context.Context, arg ConsumePlayerAccountTOTPBackupCodeParams) (int64, error)
- func (q *Queries) ControlPanelCreateTenant(ctx context.Context, arg ControlPanelCreateTenantParams) (ControlPanelCreateTenantRow, error)
- func (q *Queries) ControlPanelCreateTenantBare(ctx context.Context, arg ControlPanelCreateTenantBareParams) (int64, error)
- func (q *Queries) CountActiveAPIKeysForProject(ctx context.Context, projectID *int64) (int64, error)
- func (q *Queries) CountActiveGameSessionPeers(ctx context.Context, arg CountActiveGameSessionPeersParams) (int64, error)
- func (q *Queries) CountActiveMCPTokens(ctx context.Context, projectID int64) (int64, error)
- func (q *Queries) CountActiveSignalMembers(ctx context.Context, arg CountActiveSignalMembersParams) (int64, error)
- func (q *Queries) CountAllocationsForProject(ctx context.Context, arg CountAllocationsForProjectParams) (int64, error)
- func (q *Queries) CountControlPanelTOTPBackupCodesRemaining(ctx context.Context, controlPanelUserID int64) (int64, error)
- func (q *Queries) CountControlPanelUserConnections(ctx context.Context, controlPanelUserID int64) (int64, error)
- func (q *Queries) CountControlPanelUsers(ctx context.Context) (int64, error)
- func (q *Queries) CountControlPanelUsersForPlatformAdmin(ctx context.Context, emailFilter *string) (int64, error)
- func (q *Queries) CountEnabledPlatformAdmins(ctx context.Context) (int64, error)
- func (q *Queries) CountMatchmakerMatchesByMode(ctx context.Context, projectID int64) ([]CountMatchmakerMatchesByModeRow, error)
- func (q *Queries) CountOpenGameSessionsForProject(ctx context.Context, projectID int64) (int64, error)
- func (q *Queries) CountPendingGameInviteForSessionPlayer(ctx context.Context, arg CountPendingGameInviteForSessionPlayerParams) (int64, error)
- func (q *Queries) CountPlayerAccountConnections(ctx context.Context, playerAccountID pgtype.UUID) (int64, error)
- func (q *Queries) CountPlayerAccountTOTPBackupCodesRemaining(ctx context.Context, playerAccountID pgtype.UUID) (int64, error)
- func (q *Queries) CountPlayerLiveFleetAllocations(ctx context.Context, playerID int64) (int64, error)
- func (q *Queries) CountPlayersForProject(ctx context.Context, arg CountPlayersForProjectParams) (int64, error)
- func (q *Queries) CountProjectsForTenant(ctx context.Context) (int64, error)
- func (q *Queries) CountQueuedTicketsLike(ctx context.Context, arg CountQueuedTicketsLikeParams) (int64, error)
- func (q *Queries) CountRecentGameSessionSignals(ctx context.Context, arg CountRecentGameSessionSignalsParams) (int64, error)
- func (q *Queries) CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (CreateAPIKeyRow, error)
- func (q *Queries) CreateAnonymousPlayer(ctx context.Context, arg CreateAnonymousPlayerParams) (CreateAnonymousPlayerRow, error)
- func (q *Queries) CreateControlPanelAPIKey(ctx context.Context, arg CreateControlPanelAPIKeyParams) (CreateControlPanelAPIKeyRow, error)
- func (q *Queries) CreateControlPanelInvitation(ctx context.Context, arg CreateControlPanelInvitationParams) (CreateControlPanelInvitationRow, error)
- func (q *Queries) CreateControlPanelMembership(ctx context.Context, arg CreateControlPanelMembershipParams) (int64, error)
- func (q *Queries) CreateControlPanelPasswordReset(ctx context.Context, arg CreateControlPanelPasswordResetParams) error
- func (q *Queries) CreateControlPanelSession(ctx context.Context, arg CreateControlPanelSessionParams) (CreateControlPanelSessionRow, error)
- func (q *Queries) CreateControlPanelTrustedDevice(ctx context.Context, arg CreateControlPanelTrustedDeviceParams) error
- func (q *Queries) CreateControlPanelUser(ctx context.Context, arg CreateControlPanelUserParams) (CreateControlPanelUserRow, error)
- func (q *Queries) CreateEmailPlayer(ctx context.Context, arg CreateEmailPlayerParams) (int64, error)
- func (q *Queries) CreateFirstControlPanelAdmin(ctx context.Context, arg CreateFirstControlPanelAdminParams) (CreateFirstControlPanelAdminRow, error)
- func (q *Queries) CreateFleet(ctx context.Context, arg CreateFleetParams) (Fleet, error)
- func (q *Queries) CreateGameInvite(ctx context.Context, arg CreateGameInviteParams) (int64, error)
- func (q *Queries) CreateGameSession(ctx context.Context, arg CreateGameSessionParams) (CreateGameSessionRow, error)
- func (q *Queries) CreateLeaderboard(ctx context.Context, arg CreateLeaderboardParams) (int64, error)
- func (q *Queries) CreateLinkedPlayer(ctx context.Context, arg CreateLinkedPlayerParams) (int64, error)
- func (q *Queries) CreateMCPToken(ctx context.Context, arg CreateMCPTokenParams) (int64, error)
- func (q *Queries) CreatePendingAllocation(ctx context.Context, arg CreatePendingAllocationParams) (CreatePendingAllocationRow, error)
- func (q *Queries) CreatePlayer(ctx context.Context, arg CreatePlayerParams) (CreatePlayerRow, error)
- func (q *Queries) CreatePlayerAccount(ctx context.Context, arg CreatePlayerAccountParams) (CreatePlayerAccountRow, error)
- func (q *Queries) CreatePlayerAccountPasswordReset(ctx context.Context, arg CreatePlayerAccountPasswordResetParams) error
- func (q *Queries) CreatePlayerAccountSession(ctx context.Context, arg CreatePlayerAccountSessionParams) (int64, error)
- func (q *Queries) CreatePlayerAccountTrustedDevice(ctx context.Context, arg CreatePlayerAccountTrustedDeviceParams) error
- func (q *Queries) CreatePlayerInvitation(ctx context.Context, arg CreatePlayerInvitationParams) (CreatePlayerInvitationRow, error)
- func (q *Queries) CreatePlayerSession(ctx context.Context, arg CreatePlayerSessionParams) (int64, error)
- func (q *Queries) CreateProjectForTenant(ctx context.Context, name string) (CreateProjectForTenantRow, error)
- func (q *Queries) CreateRealtimeTicket(ctx context.Context, arg CreateRealtimeTicketParams) error
- func (q *Queries) CreateRelayNode(ctx context.Context, arg CreateRelayNodeParams) (RelayNode, error)
- func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (CreateSessionRow, error)
- func (q *Queries) CreateTenantChangeRequest(ctx context.Context, arg CreateTenantChangeRequestParams) (int64, error)
- func (q *Queries) CreateTenantPlayerBan(ctx context.Context, arg CreateTenantPlayerBanParams) error
- func (q *Queries) CreateTenantSignupRequest(ctx context.Context, arg CreateTenantSignupRequestParams) (CreateTenantSignupRequestRow, error)
- func (q *Queries) CreateVerifiedControlPanelUser(ctx context.Context, arg CreateVerifiedControlPanelUserParams) (CreateVerifiedControlPanelUserRow, error)
- func (q *Queries) CreateVerifiedPlayerAccount(ctx context.Context, arg CreateVerifiedPlayerAccountParams) (pgtype.UUID, error)
- func (q *Queries) DeleteAllGameSessionPeers(ctx context.Context, sessionID string) error
- func (q *Queries) DeleteClosedParties(ctx context.Context, retention pgtype.Interval) (int64, error)
- func (q *Queries) DeleteConnectionLimitOverride(ctx context.Context, tenantID int64) (int64, error)
- func (q *Queries) DeleteControlPanelMembership(ctx context.Context, arg DeleteControlPanelMembershipParams) error
- func (q *Queries) DeleteControlPanelMembershipUnlessSelf(ctx context.Context, arg DeleteControlPanelMembershipUnlessSelfParams) (int64, error)
- func (q *Queries) DeleteControlPanelTOTP(ctx context.Context, controlPanelUserID int64) error
- func (q *Queries) DeleteControlPanelTOTPBackupCodes(ctx context.Context, controlPanelUserID int64) error
- func (q *Queries) DeleteControlPanelTrustedDevicesForUser(ctx context.Context, controlPanelUserID int64) error
- func (q *Queries) DeleteControlPanelUserConnection(ctx context.Context, arg DeleteControlPanelUserConnectionParams) (int64, error)
- func (q *Queries) DeleteExpiredControlPanelPasswordResets(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredControlPanelTrustedDevices(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredGameInvitesForTenant(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredGameSessionSignalsForTenant(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredGameSessionsForTenant(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredMatchmakerMatches(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredPlayerAccountPasswordResets(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredPlayerAccountTrustedDevices(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredRealtimeTickets(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredTenantSignupApprovals(ctx context.Context) (int64, error)
- func (q *Queries) DeleteExpiredUnclaimedMatchmakerMatch(ctx context.Context, id string) (int64, error)
- func (q *Queries) DeleteFriendEdgeByAccount(ctx context.Context, arg DeleteFriendEdgeByAccountParams) (int64, error)
- func (q *Queries) DeleteFriendEdgeDirected(ctx context.Context, arg DeleteFriendEdgeDirectedParams) (int64, error)
- func (q *Queries) DeleteGameInvite(ctx context.Context, arg DeleteGameInviteParams) (int64, error)
- func (q *Queries) DeleteGameSession(ctx context.Context, id string) error
- func (q *Queries) DeleteGameSessionPeer(ctx context.Context, arg DeleteGameSessionPeerParams) error
- func (q *Queries) DeletePlayerAccountConnection(ctx context.Context, arg DeletePlayerAccountConnectionParams) (int64, error)
- func (q *Queries) DeletePlayerAccountTOTP(ctx context.Context, playerAccountID pgtype.UUID) error
- func (q *Queries) DeletePlayerAccountTOTPBackupCodes(ctx context.Context, playerAccountID pgtype.UUID) error
- func (q *Queries) DeletePlayerAccountTrustedDevicesForAccount(ctx context.Context, playerAccountID pgtype.UUID) error
- func (q *Queries) DeletePlayerGameSessionSignals(ctx context.Context, ids []int64) error
- func (q *Queries) DeleteQuotaOverride(ctx context.Context, arg DeleteQuotaOverrideParams) error
- func (q *Queries) DeleteRateLimitOverride(ctx context.Context, arg DeleteRateLimitOverrideParams) error
- func (q *Queries) DeleteTenantPlayerBan(ctx context.Context, arg DeleteTenantPlayerBanParams) (int64, error)
- func (q *Queries) DeleteTerminalMatchmakerTickets(ctx context.Context, retention pgtype.Interval) (int64, error)
- func (q *Queries) DeleteTerminalMatchmakingEntries(ctx context.Context, retention pgtype.Interval) (int64, error)
- func (q *Queries) DeleteUnclaimedMatchmakerMatch(ctx context.Context, id string) (int64, error)
- func (q *Queries) DenyTenantChangeRequest(ctx context.Context, arg DenyTenantChangeRequestParams) (int64, error)
- func (q *Queries) DenyTenantSignupRequest(ctx context.Context, arg DenyTenantSignupRequestParams) (int64, error)
- func (q *Queries) DisableTenantByPlatformAdmin(ctx context.Context, id int64) (int64, error)
- func (q *Queries) DisableTenantBySelf(ctx context.Context, id int64) (int64, error)
- func (q *Queries) DisableTenantFeatureGrant(ctx context.Context, arg DisableTenantFeatureGrantParams) (int64, error)
- func (q *Queries) EnableTenantByPlatformAdmin(ctx context.Context, id int64) (int64, error)
- func (q *Queries) EnableTenantByTenantAdmin(ctx context.Context, id int64) (int64, error)
- func (q *Queries) ExpireMatchmakerTickets(ctx context.Context) (int64, error)
- func (q *Queries) ExpirePlayerQueuedTicket(ctx context.Context, arg ExpirePlayerQueuedTicketParams) (int64, error)
- func (q *Queries) ExtendGameSessionExpiry(ctx context.Context, arg ExtendGameSessionExpiryParams) error
- func (q *Queries) ExtendGameSessionExpiryOnHeartbeat(ctx context.Context, arg ExtendGameSessionExpiryOnHeartbeatParams) (int64, error)
- func (q *Queries) FindAccountIDByEmail(ctx context.Context, email string) (pgtype.UUID, error)
- func (q *Queries) FindAccountIDsByDisplayName(ctx context.Context, displayName *string) ([]FindAccountIDsByDisplayNameRow, error)
- func (q *Queries) FindVerifiedAccountIDByEmail(ctx context.Context, email string) (pgtype.UUID, error)
- func (q *Queries) GetAPIKeyByHash(ctx context.Context, keyHash []byte) (GetAPIKeyByHashRow, error)
- func (q *Queries) GetAPIKeyScopes(ctx context.Context, id int64) (GetAPIKeyScopesRow, error)
- func (q *Queries) GetAPIKeyType(ctx context.Context, id int64) (string, error)
- func (q *Queries) GetAPIRateLimitOverride(ctx context.Context, tenantID int64) (GetAPIRateLimitOverrideRow, error)
- func (q *Queries) GetAllocation(ctx context.Context, id int64) (GetAllocationRow, error)
- func (q *Queries) GetAllowedOrigins(ctx context.Context, projectID int64) ([]string, error)
- func (q *Queries) GetAllowedOriginsForUpdate(ctx context.Context, projectID int64) ([]string, error)
- func (q *Queries) GetConnectionLimitOverride(ctx context.Context, tenantID int64) (GetConnectionLimitOverrideRow, error)
- func (q *Queries) GetControlPanelInvitationByCodeHash(ctx context.Context, codeHash []byte) (GetControlPanelInvitationByCodeHashRow, error)
- func (q *Queries) GetControlPanelInvitationByID(ctx context.Context, id int64) (GetControlPanelInvitationByIDRow, error)
- func (q *Queries) GetControlPanelMembership(ctx context.Context, arg GetControlPanelMembershipParams) (GetControlPanelMembershipRow, error)
- func (q *Queries) GetControlPanelSessionByRefreshHash(ctx context.Context, refreshHash []byte) (GetControlPanelSessionByRefreshHashRow, error)
- func (q *Queries) GetControlPanelTOTP(ctx context.Context, controlPanelUserID int64) (GetControlPanelTOTPRow, error)
- func (q *Queries) GetControlPanelTrustedDevice(ctx context.Context, arg GetControlPanelTrustedDeviceParams) (int64, error)
- func (q *Queries) GetControlPanelUserAnyStatusByEmail(ctx context.Context, email string) (GetControlPanelUserAnyStatusByEmailRow, error)
- func (q *Queries) GetControlPanelUserByConnection(ctx context.Context, arg GetControlPanelUserByConnectionParams) (GetControlPanelUserByConnectionRow, error)
- func (q *Queries) GetControlPanelUserByEmail(ctx context.Context, email string) (GetControlPanelUserByEmailRow, error)
- func (q *Queries) GetControlPanelUserByID(ctx context.Context, id int64) (GetControlPanelUserByIDRow, error)
- func (q *Queries) GetControlPanelUserVerificationState(ctx context.Context, id int64) (GetControlPanelUserVerificationStateRow, error)
- func (q *Queries) GetFleetByID(ctx context.Context, id int64) (Fleet, error)
- func (q *Queries) GetFleetByName(ctx context.Context, arg GetFleetByNameParams) (Fleet, error)
- func (q *Queries) GetFriendEdgeByAccount(ctx context.Context, arg GetFriendEdgeByAccountParams) (GetFriendEdgeByAccountRow, error)
- func (q *Queries) GetGameSession(ctx context.Context, arg GetGameSessionParams) (GetGameSessionRow, error)
- func (q *Queries) GetGameSessionByJoinCode(ctx context.Context, arg GetGameSessionByJoinCodeParams) (GetGameSessionByJoinCodeRow, error)
- func (q *Queries) GetGameSessionForUpdate(ctx context.Context, arg GetGameSessionForUpdateParams) (GetGameSessionForUpdateRow, error)
- func (q *Queries) GetInviteRateLimitOverride(ctx context.Context, arg GetInviteRateLimitOverrideParams) (GetInviteRateLimitOverrideRow, error)
- func (q *Queries) GetLeaderboard(ctx context.Context, arg GetLeaderboardParams) (GetLeaderboardRow, error)
- func (q *Queries) GetLeaderboardForControlPanel(ctx context.Context, arg GetLeaderboardForControlPanelParams) (GetLeaderboardForControlPanelRow, error)
- func (q *Queries) GetLeaderboardForSubmit(ctx context.Context, arg GetLeaderboardForSubmitParams) (GetLeaderboardForSubmitRow, error)
- func (q *Queries) GetLeaderboardForUpdate(ctx context.Context, arg GetLeaderboardForUpdateParams) (GetLeaderboardForUpdateRow, error)
- func (q *Queries) GetMCPTokenByHash(ctx context.Context, tokenHash []byte) (GetMCPTokenByHashRow, error)
- func (q *Queries) GetMCPTokenCreator(ctx context.Context, arg GetMCPTokenCreatorParams) (int64, error)
- func (q *Queries) GetMatchmakerMatch(ctx context.Context, id string) (MatchmakerMatch, error)
- func (q *Queries) GetMatchmakingTicket(ctx context.Context, arg GetMatchmakingTicketParams) (GetMatchmakingTicketRow, error)
- func (q *Queries) GetMatchmakingTicketForTrace(ctx context.Context, arg GetMatchmakingTicketForTraceParams) (GetMatchmakingTicketForTraceRow, error)
- func (q *Queries) GetPlayerAccountByConnection(ctx context.Context, arg GetPlayerAccountByConnectionParams) (GetPlayerAccountByConnectionRow, error)
- func (q *Queries) GetPlayerAccountByEmail(ctx context.Context, email string) (GetPlayerAccountByEmailRow, error)
- func (q *Queries) GetPlayerAccountByID(ctx context.Context, id pgtype.UUID) (GetPlayerAccountByIDRow, error)
- func (q *Queries) GetPlayerAccountForProjectRead(ctx context.Context, arg GetPlayerAccountForProjectReadParams) (pgtype.UUID, error)
- func (q *Queries) GetPlayerAccountRemoteAddrs(ctx context.Context, id pgtype.UUID) (GetPlayerAccountRemoteAddrsRow, error)
- func (q *Queries) GetPlayerAccountSession(ctx context.Context, refreshHash []byte) (GetPlayerAccountSessionRow, error)
- func (q *Queries) GetPlayerAccountTOTP(ctx context.Context, playerAccountID pgtype.UUID) (GetPlayerAccountTOTPRow, error)
- func (q *Queries) GetPlayerAccountTrustedDevice(ctx context.Context, arg GetPlayerAccountTrustedDeviceParams) (int64, error)
- func (q *Queries) GetPlayerAccountVerificationState(ctx context.Context, id pgtype.UUID) (GetPlayerAccountVerificationStateRow, error)
- func (q *Queries) GetPlayerAuthCredentials(ctx context.Context, id int64) (GetPlayerAuthCredentialsRow, error)
- func (q *Queries) GetPlayerByEmail(ctx context.Context, arg GetPlayerByEmailParams) (GetPlayerByEmailRow, error)
- func (q *Queries) GetPlayerByEmailProject(ctx context.Context, arg GetPlayerByEmailProjectParams) (GetPlayerByEmailProjectRow, error)
- func (q *Queries) GetPlayerByExternalID(ctx context.Context, arg GetPlayerByExternalIDParams) (GetPlayerByExternalIDRow, error)
- func (q *Queries) GetPlayerDeleteRequestedByAccount(ctx context.Context, arg GetPlayerDeleteRequestedByAccountParams) (pgtype.Timestamptz, error)
- func (q *Queries) GetPlayerForAccountLink(ctx context.Context, arg GetPlayerForAccountLinkParams) (GetPlayerForAccountLinkRow, error)
- func (q *Queries) GetPlayerForProject(ctx context.Context, arg GetPlayerForProjectParams) (GetPlayerForProjectRow, error)
- func (q *Queries) GetPlayerForVerify(ctx context.Context, id int64) (GetPlayerForVerifyRow, error)
- func (q *Queries) GetPlayerIDByEmail(ctx context.Context, arg GetPlayerIDByEmailParams) (int64, error)
- func (q *Queries) GetPlayerInvitationByCodeHash(ctx context.Context, codeHash []byte) (GetPlayerInvitationByCodeHashRow, error)
- func (q *Queries) GetPlayerLinkedAccountID(ctx context.Context, id int64) (pgtype.UUID, error)
- func (q *Queries) GetPlayerModerationState(ctx context.Context, arg GetPlayerModerationStateParams) (GetPlayerModerationStateRow, error)
- func (q *Queries) GetPlayerPasswordResetState(ctx context.Context, arg GetPlayerPasswordResetStateParams) (GetPlayerPasswordResetStateRow, error)
- func (q *Queries) GetPlayerPendingDeleteByEmail(ctx context.Context, arg GetPlayerPendingDeleteByEmailParams) (GetPlayerPendingDeleteByEmailRow, error)
- func (q *Queries) GetPlayerSession(ctx context.Context, refreshHash []byte) (GetPlayerSessionRow, error)
- func (q *Queries) GetPlayerSessionEpoch(ctx context.Context, id int64) (int32, error)
- func (q *Queries) GetPlayerVerificationState(ctx context.Context, arg GetPlayerVerificationStateParams) (GetPlayerVerificationStateRow, error)
- func (q *Queries) GetPlayerVerificationStateByID(ctx context.Context, id int64) (GetPlayerVerificationStateByIDRow, error)
- func (q *Queries) GetPresence(ctx context.Context, playerID int64) (GetPresenceRow, error)
- func (q *Queries) GetProfile(ctx context.Context, id int64) (GetProfileRow, error)
- func (q *Queries) GetProfileEmailState(ctx context.Context, id int64) (GetProfileEmailStateRow, error)
- func (q *Queries) GetProjectSteamAuthConfig(ctx context.Context, projectID int64) (GetProjectSteamAuthConfigRow, error)
- func (q *Queries) GetProjectSteamAuthConfigForControlPanel(ctx context.Context, arg GetProjectSteamAuthConfigForControlPanelParams) (GetProjectSteamAuthConfigForControlPanelRow, error)
- func (q *Queries) GetProjectTenant(ctx context.Context, id int64) (GetProjectTenantRow, error)
- func (q *Queries) GetPublicPlayer(ctx context.Context, arg GetPublicPlayerParams) (GetPublicPlayerRow, error)
- func (q *Queries) GetPublicPlayerByFriendCode(ctx context.Context, arg GetPublicPlayerByFriendCodeParams) (GetPublicPlayerByFriendCodeRow, error)
- func (q *Queries) GetPublicSignupEnabled(ctx context.Context) (bool, error)
- func (q *Queries) GetQueuedTicketForPlayer(ctx context.Context, arg GetQueuedTicketForPlayerParams) (int64, error)
- func (q *Queries) GetRelaySessionUsage(ctx context.Context, month pgtype.Date) (int64, error)
- func (q *Queries) GetRemoteConfig(ctx context.Context, projectID int64) ([]byte, error)
- func (q *Queries) GetRemoteConfigForControlPanel(ctx context.Context, arg GetRemoteConfigForControlPanelParams) ([]byte, error)
- func (q *Queries) GetRemoteConfigForUpdate(ctx context.Context, projectID int64) ([]byte, error)
- func (q *Queries) GetServerSecret(ctx context.Context, name string) ([]byte, error)
- func (q *Queries) GetSessionByRefreshHash(ctx context.Context, arg GetSessionByRefreshHashParams) (GetSessionByRefreshHashRow, error)
- func (q *Queries) GetSettingsRevision(ctx context.Context, arg GetSettingsRevisionParams) ([]byte, error)
- func (q *Queries) GetStorageObject(ctx context.Context, arg GetStorageObjectParams) (GetStorageObjectRow, error)
- func (q *Queries) GetTenantChangeRequestByID(ctx context.Context, id int64) (GetTenantChangeRequestByIDRow, error)
- func (q *Queries) GetTenantCustomTokenPublicKey(ctx context.Context) (string, error)
- func (q *Queries) GetTenantCustomTokenPublicKeyForControlPanel(ctx context.Context, tenantID int64) (string, error)
- func (q *Queries) GetTenantDisabledState(ctx context.Context, id int64) (GetTenantDisabledStateRow, error)
- func (q *Queries) GetTenantFacts(ctx context.Context, id int64) (GetTenantFactsRow, error)
- func (q *Queries) GetTenantQuotaContext(ctx context.Context) (GetTenantQuotaContextRow, error)
- func (q *Queries) GetTenantQuotaContextLocked(ctx context.Context) (GetTenantQuotaContextLockedRow, error)
- func (q *Queries) GetTenantSignupRequestByCodeHash(ctx context.Context, codeHash []byte) (GetTenantSignupRequestByCodeHashRow, error)
- func (q *Queries) GetTenantSignupRequestByID(ctx context.Context, id int64) (GetTenantSignupRequestByIDRow, error)
- func (q *Queries) GetTenantStorageUsageByID(ctx context.Context, tenantID int64) (int64, error)
- func (q *Queries) GetTenantTier(ctx context.Context, id int64) (int16, error)
- func (q *Queries) HardDeletePlayers(ctx context.Context, ids []int64) (int64, error)
- func (q *Queries) IncrementControlPanelVerificationAttempts(ctx context.Context, id int64) (int32, error)
- func (q *Queries) IncrementPlayerVerificationAttempts(ctx context.Context, id int64) (int32, error)
- func (q *Queries) IncrementPlayerVerificationAttemptsByID(ctx context.Context, id int64) (int32, error)
- func (q *Queries) IncrementRelaySessions(ctx context.Context, arg IncrementRelaySessionsParams) (int64, error)
- func (q *Queries) InsertAllocationEvent(ctx context.Context, arg InsertAllocationEventParams) error
- func (q *Queries) InsertControlPanelTOTPBackupCodes(ctx context.Context, arg []InsertControlPanelTOTPBackupCodesParams) (int64, error)
- func (q *Queries) InsertControlPanelUserConnection(ctx context.Context, arg InsertControlPanelUserConnectionParams) error
- func (q *Queries) InsertGameSessionSignal(ctx context.Context, arg InsertGameSessionSignalParams) (int64, error)
- func (q *Queries) InsertMatchmakerMatch(ctx context.Context, arg InsertMatchmakerMatchParams) error
- func (q *Queries) InsertMatchmakingTicket(ctx context.Context, arg InsertMatchmakingTicketParams) (InsertMatchmakingTicketRow, error)
- func (q *Queries) InsertPlayerAccountConnection(ctx context.Context, arg InsertPlayerAccountConnectionParams) error
- func (q *Queries) InsertPlayerAccountTOTPBackupCodes(ctx context.Context, arg []InsertPlayerAccountTOTPBackupCodesParams) (int64, error)
- func (q *Queries) InsertServerSecret(ctx context.Context, arg InsertServerSecretParams) (int64, error)
- func (q *Queries) InsertSettingsRevision(ctx context.Context, arg InsertSettingsRevisionParams) error
- func (q *Queries) InvalidateControlPanelPasswordResets(ctx context.Context, controlPanelUserID int64) error
- func (q *Queries) InvalidatePlayerAccountPasswordResets(ctx context.Context, playerAccountID pgtype.UUID) error
- func (q *Queries) IsAccountBannedInTenant(ctx context.Context, arg IsAccountBannedInTenantParams) (int64, error)
- func (q *Queries) IsBlockedBetweenAccounts(ctx context.Context, arg IsBlockedBetweenAccountsParams) (int64, error)
- func (q *Queries) IsEmailSuppressed(ctx context.Context, email string) (bool, error)
- func (q *Queries) IsGameSessionMember(ctx context.Context, arg IsGameSessionMemberParams) (bool, error)
- func (q *Queries) IsPlayerBannedByTenant(ctx context.Context, playerID int64) (int64, error)
- func (q *Queries) LatestSettingsRevision(ctx context.Context, arg LatestSettingsRevisionParams) (int64, error)
- func (q *Queries) LeaderboardEntriesForPlayers(ctx context.Context, arg LeaderboardEntriesForPlayersParams) ([]LeaderboardEntriesForPlayersRow, error)
- func (q *Queries) LeaderboardHasEntries(ctx context.Context, leaderboardID int64) (bool, error)
- func (q *Queries) LeaderboardRangeByRank(ctx context.Context, arg LeaderboardRangeByRankParams) ([]LeaderboardRangeByRankRow, error)
- func (q *Queries) LeaderboardUserRank(ctx context.Context, arg LeaderboardUserRankParams) (int64, error)
- func (q *Queries) LinkPlayerEmailCredentials(ctx context.Context, arg LinkPlayerEmailCredentialsParams) (int64, error)
- func (q *Queries) LinkPlayerToAccount(ctx context.Context, arg LinkPlayerToAccountParams) error
- func (q *Queries) ListAPIKeys(ctx context.Context) ([]ListAPIKeysRow, error)
- func (q *Queries) ListAcceptedFriendAccountIDs(ctx context.Context, me pgtype.UUID) ([]pgtype.UUID, error)
- func (q *Queries) ListAccountIdentities(ctx context.Context, accountIds []pgtype.UUID) ([]ListAccountIdentitiesRow, error)
- func (q *Queries) ListActiveAllocations(ctx context.Context, arg ListActiveAllocationsParams) ([]ListActiveAllocationsRow, error)
- func (q *Queries) ListAllProjectAllowedOrigins(ctx context.Context) ([]string, error)
- func (q *Queries) ListAllRateLimitOverridesForTenant(ctx context.Context, tenantID int64) ([]ListAllRateLimitOverridesForTenantRow, error)
- func (q *Queries) ListAllocationBackendsForTenant(ctx context.Context) ([]ListAllocationBackendsForTenantRow, error)
- func (q *Queries) ListAllocationEvents(ctx context.Context, arg ListAllocationEventsParams) ([]ListAllocationEventsRow, error)
- func (q *Queries) ListAllocationsForProject(ctx context.Context, arg ListAllocationsForProjectParams) ([]ListAllocationsForProjectRow, error)
- func (q *Queries) ListControlPanelInvitationsForTenant(ctx context.Context, tenantID *int64) ([]ListControlPanelInvitationsForTenantRow, error)
- func (q *Queries) ListControlPanelMembersForTenant(ctx context.Context, tenantID int64) ([]ListControlPanelMembersForTenantRow, error)
- func (q *Queries) ListControlPanelTenantsForPlatformAdmin(ctx context.Context) ([]ListControlPanelTenantsForPlatformAdminRow, error)
- func (q *Queries) ListControlPanelTenantsForUser(ctx context.Context, controlPanelUserID int64) ([]ListControlPanelTenantsForUserRow, error)
- func (q *Queries) ListControlPanelUserConnections(ctx context.Context, controlPanelUserID int64) ([]ListControlPanelUserConnectionsRow, error)
- func (q *Queries) ListControlPanelUsersForPlatformAdmin(ctx context.Context, arg ListControlPanelUsersForPlatformAdminParams) ([]ListControlPanelUsersForPlatformAdminRow, error)
- func (q *Queries) ListDeletedLeaderboardsForProject(ctx context.Context, projectID int64) ([]ListDeletedLeaderboardsForProjectRow, error)
- func (q *Queries) ListDueLeaderboardResets(ctx context.Context, asOf pgtype.Timestamptz) ([]ListDueLeaderboardResetsRow, error)
- func (q *Queries) ListEligibleRelayNodes(ctx context.Context, maxAgeSeconds float64) ([]RelayNode, error)
- func (q *Queries) ListEnforcedTenantStorage(ctx context.Context) ([]ListEnforcedTenantStorageRow, error)
- func (q *Queries) ListExpiredUnclaimedMatchmakerAllocations(ctx context.Context) ([]ListExpiredUnclaimedMatchmakerAllocationsRow, error)
- func (q *Queries) ListFleetsForProject(ctx context.Context, projectID int64) ([]Fleet, error)
- func (q *Queries) ListFriendsByStatusForAccount(ctx context.Context, arg ListFriendsByStatusForAccountParams) ([]FriendEdge, error)
- func (q *Queries) ListGameSessionPeers(ctx context.Context, sessionID string) ([]ListGameSessionPeersRow, error)
- func (q *Queries) ListGameSessionSignalsForRecipient(ctx context.Context, arg ListGameSessionSignalsForRecipientParams) ([]ListGameSessionSignalsForRecipientRow, error)
- func (q *Queries) ListKnownRelayNodes(ctx context.Context) ([]RelayNode, error)
- func (q *Queries) ListLeaderboardPeriods(ctx context.Context, arg ListLeaderboardPeriodsParams) ([]ListLeaderboardPeriodsRow, error)
- func (q *Queries) ListLeaderboardsForProject(ctx context.Context, projectID int64) ([]ListLeaderboardsForProjectRow, error)
- func (q *Queries) ListMCPTokensForProject(ctx context.Context, projectID int64) ([]ListMCPTokensForProjectRow, error)
- func (q *Queries) ListMatchmakerBucketsForProject(ctx context.Context, projectID int64) ([]ListMatchmakerBucketsForProjectRow, error)
- func (q *Queries) ListOpenInvitationTargetsForProject(ctx context.Context, projectID int64) ([]*int64, error)
- func (q *Queries) ListPendingGameInvites(ctx context.Context, toPlayerID int64) ([]ListPendingGameInvitesRow, error)
- func (q *Queries) ListPendingTenantChangeRequests(ctx context.Context) ([]ListPendingTenantChangeRequestsRow, error)
- func (q *Queries) ListPendingTenantSignupRequests(ctx context.Context) ([]ListPendingTenantSignupRequestsRow, error)
- func (q *Queries) ListPlatformAdminInvitations(ctx context.Context) ([]ListPlatformAdminInvitationsRow, error)
- func (q *Queries) ListPlatformAdmins(ctx context.Context) ([]ListPlatformAdminsRow, error)
- func (q *Queries) ListPlayerAccountConnections(ctx context.Context, playerAccountID pgtype.UUID) ([]ListPlayerAccountConnectionsRow, error)
- func (q *Queries) ListPlayerInvitationsForProject(ctx context.Context, projectID int64) ([]ListPlayerInvitationsForProjectRow, error)
- func (q *Queries) ListPlayerSessionEpochs(ctx context.Context, ids []int64) ([]ListPlayerSessionEpochsRow, error)
- func (q *Queries) ListPlayersDueForPurge(ctx context.Context, arg ListPlayersDueForPurgeParams) ([]ListPlayersDueForPurgeRow, error)
- func (q *Queries) ListPlayersForProject(ctx context.Context, arg ListPlayersForProjectParams) ([]ListPlayersForProjectRow, error)
- func (q *Queries) ListPresenceForUsers(ctx context.Context, playerIds []int64) ([]ListPresenceForUsersRow, error)
- func (q *Queries) ListProjectsForTenant(ctx context.Context) ([]ListProjectsForTenantRow, error)
- func (q *Queries) ListPublicOpenGameSessions(ctx context.Context, arg ListPublicOpenGameSessionsParams) ([]ListPublicOpenGameSessionsRow, error)
- func (q *Queries) ListPublicPlayers(ctx context.Context, arg ListPublicPlayersParams) ([]ListPublicPlayersRow, error)
- func (q *Queries) ListQuotaOverridesForTenant(ctx context.Context, tenantID int64) ([]ListQuotaOverridesForTenantRow, error)
- func (q *Queries) ListReadyMatchmakerBuckets(ctx context.Context) ([]ListReadyMatchmakerBucketsRow, error)
- func (q *Queries) ListRelayNodes(ctx context.Context, maxAgeSeconds float64) ([]ListRelayNodesRow, error)
- func (q *Queries) ListSettingsRevisions(ctx context.Context, arg ListSettingsRevisionsParams) ([]ListSettingsRevisionsRow, error)
- func (q *Queries) ListStorageObjects(ctx context.Context, arg ListStorageObjectsParams) ([]ListStorageObjectsRow, error)
- func (q *Queries) ListTenantAdminEmails(ctx context.Context, tenantID int64) ([]string, error)
- func (q *Queries) ListTenantChangeRequests(ctx context.Context, tenantID int64) ([]ListTenantChangeRequestsRow, error)
- func (q *Queries) ListTenantCustomTokenSecrets(ctx context.Context) ([]ListTenantCustomTokenSecretsRow, error)
- func (q *Queries) ListTenantEnabledFeatures(ctx context.Context) ([]string, error)
- func (q *Queries) ListTenantPlayerBans(ctx context.Context, tenantID int64) ([]ListTenantPlayerBansRow, error)
- func (q *Queries) LockControlPanelUserSignInMethods(ctx context.Context, id int64) (bool, error)
- func (q *Queries) LockControlPanelUserVerification(ctx context.Context, arg LockControlPanelUserVerificationParams) error
- func (q *Queries) LockEnabledPlatformAdmins(ctx context.Context) ([]int64, error)
- func (q *Queries) LockLiveProject(ctx context.Context, projectID int64) (int64, error)
- func (q *Queries) LockPlayerAccountSignInMethods(ctx context.Context, id pgtype.UUID) (bool, error)
- func (q *Queries) LockPlayerAccountVerification(ctx context.Context, arg LockPlayerAccountVerificationParams) error
- func (q *Queries) LockPlayerForFleetAllocation(ctx context.Context, playerID int64) error
- func (q *Queries) LockPlayerPasswordReset(ctx context.Context, arg LockPlayerPasswordResetParams) error
- func (q *Queries) LockPlayerVerification(ctx context.Context, arg LockPlayerVerificationParams) error
- func (q *Queries) LockProjectForGameSessionCreate(ctx context.Context, projectID int64) error
- func (q *Queries) LockSignalRate(ctx context.Context, fromPlayerID int64) error
- func (q *Queries) LockStorageObjectForWrite(ctx context.Context, arg LockStorageObjectForWriteParams) error
- func (q *Queries) MarkAllocationFailed(ctx context.Context, id int64) error
- func (q *Queries) MarkAllocationReady(ctx context.Context, arg MarkAllocationReadyParams) (int64, error)
- func (q *Queries) MarkControlPanelInvitationAccepted(ctx context.Context, id int64) (int64, error)
- func (q *Queries) MarkControlPanelUserVerified(ctx context.Context, id int64) error
- func (q *Queries) MarkPlayerAccountVerified(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) MarkPlayerInvitationAccepted(ctx context.Context, id int64) (int64, error)
- func (q *Queries) MarkPlayerVerified(ctx context.Context, id int64) error
- func (q *Queries) MarkPlayerVerifiedByID(ctx context.Context, id int64) error
- func (q *Queries) MarkRelayUsageWarned80(ctx context.Context, month pgtype.Date) (int64, error)
- func (q *Queries) MarkRelayUsageWarned100(ctx context.Context, month pgtype.Date) (int64, error)
- func (q *Queries) MarkTenantSignupAccepted(ctx context.Context, arg MarkTenantSignupAcceptedParams) (int64, error)
- func (q *Queries) MatchmakerQueueStats(ctx context.Context) ([]MatchmakerQueueStatsRow, error)
- func (q *Queries) PeekControlPanelPasswordReset(ctx context.Context, tokenHash []byte) (int64, error)
- func (q *Queries) PeekPlayerAccountPasswordReset(ctx context.Context, tokenHash []byte) (pgtype.UUID, error)
- func (q *Queries) PlayerInviteLookup(ctx context.Context, codeHash []byte) (PlayerInviteLookupRow, error)
- func (q *Queries) PlayerLinkTargetExists(ctx context.Context, id int64) (bool, error)
- func (q *Queries) ProjectIsLive(ctx context.Context, projectID int64) (bool, error)
- func (q *Queries) PromoteControlPanelUserToPlatformAdmin(ctx context.Context, id int64) error
- func (q *Queries) PruneSettingsRevisions(ctx context.Context, arg PruneSettingsRevisionsParams) error
- func (q *Queries) PruneStaleGameSessionPeers(ctx context.Context, sessionID string) (int64, error)
- func (q *Queries) PutStorageObject(ctx context.Context, arg PutStorageObjectParams) (PutStorageObjectRow, error)
- func (q *Queries) PutStorageObjectIfMatch(ctx context.Context, arg PutStorageObjectIfMatchParams) (PutStorageObjectIfMatchRow, error)
- func (q *Queries) RecordControlPanelLoginSuccess(ctx context.Context, id int64) error
- func (q *Queries) RecordRelayNodeProbe(ctx context.Context, arg RecordRelayNodeProbeParams) (RecordRelayNodeProbeRow, error)
- func (q *Queries) RedeemRealtimeTicket(ctx context.Context, ticketHash []byte) (RedeemRealtimeTicketRow, error)
- func (q *Queries) ReleaseAllocation(ctx context.Context, id int64) error
- func (q *Queries) ReleaseMatchmakerTickets(ctx context.Context, arg ReleaseMatchmakerTicketsParams) (int64, error)
- func (q *Queries) ReleaseTenantPlayerSlots(ctx context.Context, n int64) error
- func (q *Queries) ReplacePlayerExternalID(ctx context.Context, arg ReplacePlayerExternalIDParams) (int64, error)
- func (q *Queries) RequestFriendByAccount(ctx context.Context, arg RequestFriendByAccountParams) (RequestFriendByAccountRow, error)
- func (q *Queries) RequestPlayerDeleteByAccount(ctx context.Context, arg RequestPlayerDeleteByAccountParams) (pgtype.Timestamptz, error)
- func (q *Queries) RequestPlayerDeleteInProject(ctx context.Context, arg RequestPlayerDeleteInProjectParams) (pgtype.Timestamptz, error)
- func (q *Queries) RequestPlayerDeleteSelf(ctx context.Context, id int64) (pgtype.Timestamptz, error)
- func (q *Queries) ReserveControlPanelTOTPAttempt(ctx context.Context, arg ReserveControlPanelTOTPAttemptParams) (ReserveControlPanelTOTPAttemptRow, error)
- func (q *Queries) ReserveControlPanelVerifyAttempt(ctx context.Context, arg ReserveControlPanelVerifyAttemptParams) (ReserveControlPanelVerifyAttemptRow, error)
- func (q *Queries) ReservePlayerAccountTOTPAttempt(ctx context.Context, arg ReservePlayerAccountTOTPAttemptParams) (ReservePlayerAccountTOTPAttemptRow, error)
- func (q *Queries) ReservePlayerAccountVerifyAttempt(ctx context.Context, arg ReservePlayerAccountVerifyAttemptParams) (ReservePlayerAccountVerifyAttemptRow, error)
- func (q *Queries) ReservePlayerPasswordResetAttempt(ctx context.Context, arg ReservePlayerPasswordResetAttemptParams) (ReservePlayerPasswordResetAttemptRow, error)
- func (q *Queries) ReservePlayerVerifyAttempt(ctx context.Context, arg ReservePlayerVerifyAttemptParams) (ReservePlayerVerifyAttemptRow, error)
- func (q *Queries) ReserveTenantPlayerSlot(ctx context.Context, playerLimit int64) (int64, error)
- func (q *Queries) ResetControlPanelTOTPAttempts(ctx context.Context, controlPanelUserID int64) error
- func (q *Queries) ResetPlayerAccountTOTPAttempts(ctx context.Context, playerAccountID pgtype.UUID) error
- func (q *Queries) ResolvePendingFriendEdge(ctx context.Context, arg ResolvePendingFriendEdgeParams) (int64, error)
- func (q *Queries) ResolvePlayersForAccountsInProject(ctx context.Context, arg ResolvePlayersForAccountsInProjectParams) ([]ResolvePlayersForAccountsInProjectRow, error)
- func (q *Queries) RestoreControlPanelUserVerificationCode(ctx context.Context, arg RestoreControlPanelUserVerificationCodeParams) error
- func (q *Queries) RestoreLeaderboard(ctx context.Context, arg RestoreLeaderboardParams) (int64, error)
- func (q *Queries) RestorePlayerAccountVerificationCode(ctx context.Context, arg RestorePlayerAccountVerificationCodeParams) error
- func (q *Queries) RetireRelayNode(ctx context.Context, id int64) (RelayNode, error)
- func (q *Queries) ReturnMatchmakerClaim(ctx context.Context, claimID pgtype.UUID) (int64, error)
- func (q *Queries) ReturnMatchmakerTicketsByID(ctx context.Context, arg ReturnMatchmakerTicketsByIDParams) (int64, error)
- func (q *Queries) RevokeAPIKey(ctx context.Context, id int64) error
- func (q *Queries) RevokeActivePlayerSessions(ctx context.Context, arg RevokeActivePlayerSessionsParams) (int64, error)
- func (q *Queries) RevokeAllControlPanelSessionsForUser(ctx context.Context, controlPanelUserID int64) error
- func (q *Queries) RevokeAllPlayerAccountSessions(ctx context.Context, playerAccountID pgtype.UUID) error
- func (q *Queries) RevokeControlPanelInvitation(ctx context.Context, arg RevokeControlPanelInvitationParams) error
- func (q *Queries) RevokeControlPanelSession(ctx context.Context, id int64) error
- func (q *Queries) RevokeMCPToken(ctx context.Context, arg RevokeMCPTokenParams) (int64, error)
- func (q *Queries) RevokeOpenInvitationsByInviter(ctx context.Context, invitedByUserID int64) error
- func (q *Queries) RevokeOtherControlPanelSessionsForUser(ctx context.Context, arg RevokeOtherControlPanelSessionsForUserParams) error
- func (q *Queries) RevokeOtherPlayerAccountSessions(ctx context.Context, arg RevokeOtherPlayerAccountSessionsParams) error
- func (q *Queries) RevokePlayerAccountSession(ctx context.Context, refreshHash []byte) error
- func (q *Queries) RevokePlayerInvitation(ctx context.Context, id int64) error
- func (q *Queries) RevokePlayerSession(ctx context.Context, refreshHash []byte) error
- func (q *Queries) RevokeSession(ctx context.Context, id int64) (int64, error)
- func (q *Queries) RevokeSessionByRefreshHash(ctx context.Context, refreshHash []byte) (int64, error)
- func (q *Queries) RevokeSupersededPlayerInvitations(ctx context.Context, arg RevokeSupersededPlayerInvitationsParams) error
- func (q *Queries) SealTenantCustomTokenSecret(ctx context.Context, arg SealTenantCustomTokenSecretParams) (int64, error)
- func (q *Queries) SearchPlayerAccounts(ctx context.Context, arg SearchPlayerAccountsParams) ([]SearchPlayerAccountsRow, error)
- func (q *Queries) SetAPIKeyScopes(ctx context.Context, arg SetAPIKeyScopesParams) error
- func (q *Queries) SetAllocationStatus(ctx context.Context, arg SetAllocationStatusParams) error
- func (q *Queries) SetAllowedOrigins(ctx context.Context, arg SetAllowedOriginsParams) error
- func (q *Queries) SetControlPanelTOTPLastUsedStep(ctx context.Context, arg SetControlPanelTOTPLastUsedStepParams) (int64, error)
- func (q *Queries) SetControlPanelUserDisabled(ctx context.Context, arg SetControlPanelUserDisabledParams) error
- func (q *Queries) SetControlPanelUserVerificationCode(ctx context.Context, arg SetControlPanelUserVerificationCodeParams) error
- func (q *Queries) SetPlayerAccountDisabled(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) SetPlayerAccountDisplayName(ctx context.Context, arg SetPlayerAccountDisplayNameParams) error
- func (q *Queries) SetPlayerAccountEnabled(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) SetPlayerAccountPassword(ctx context.Context, arg SetPlayerAccountPasswordParams) error
- func (q *Queries) SetPlayerAccountRemoteAddrs(ctx context.Context, arg SetPlayerAccountRemoteAddrsParams) error
- func (q *Queries) SetPlayerAccountTOTPLastUsedStep(ctx context.Context, arg SetPlayerAccountTOTPLastUsedStepParams) (int64, error)
- func (q *Queries) SetPlayerAccountVerificationCode(ctx context.Context, arg SetPlayerAccountVerificationCodeParams) error
- func (q *Queries) SetPlayerDisabled(ctx context.Context, arg SetPlayerDisabledParams) error
- func (q *Queries) SetPlayerDisabledInProject(ctx context.Context, arg SetPlayerDisabledInProjectParams) (int64, error)
- func (q *Queries) SetPlayerDisabledSelf(ctx context.Context, id int64) (int64, error)
- func (q *Queries) SetPlayerFriendCode(ctx context.Context, arg SetPlayerFriendCodeParams) (int64, error)
- func (q *Queries) SetPlayerFriendCodeIfAbsent(ctx context.Context, arg SetPlayerFriendCodeIfAbsentParams) (int64, error)
- func (q *Queries) SetPlayerPasswordResetChallenge(ctx context.Context, arg SetPlayerPasswordResetChallengeParams) error
- func (q *Queries) SetPlayerVerificationCode(ctx context.Context, arg SetPlayerVerificationCodeParams) error
- func (q *Queries) SetPlayerVerificationCodeByID(ctx context.Context, arg SetPlayerVerificationCodeByIDParams) error
- func (q *Queries) SetProjectPublicJoining(ctx context.Context, arg SetProjectPublicJoiningParams) error
- func (q *Queries) SetPublicSignupEnabled(ctx context.Context, arg SetPublicSignupEnabledParams) error
- func (q *Queries) SetTenantEnforceQuotas(ctx context.Context, arg SetTenantEnforceQuotasParams) error
- func (q *Queries) SetTenantPublicJoining(ctx context.Context, enabled bool) error
- func (q *Queries) SetTenantStorageNotifiedThreshold(ctx context.Context, arg SetTenantStorageNotifiedThresholdParams) error
- func (q *Queries) SetTenantTierByID(ctx context.Context, arg SetTenantTierByIDParams) (SetTenantTierByIDRow, error)
- func (q *Queries) SetTenantTierExact(ctx context.Context, tier int16) (int64, error)
- func (q *Queries) SetTenantTierIfUpgrade(ctx context.Context, tier int16) (int64, error)
- func (q *Queries) SoftDeleteFleet(ctx context.Context, id int64) error
- func (q *Queries) SoftDeleteLeaderboard(ctx context.Context, arg SoftDeleteLeaderboardParams) (int64, error)
- func (q *Queries) SoftDeleteStorageObject(ctx context.Context, arg SoftDeleteStorageObjectParams) (int64, error)
- func (q *Queries) StorageUsageForWrite(ctx context.Context, arg StorageUsageForWriteParams) (StorageUsageForWriteRow, error)
- func (q *Queries) SubmitScore(ctx context.Context, arg SubmitScoreParams) (int64, error)
- func (q *Queries) SuppressEmail(ctx context.Context, email string) error
- func (q *Queries) SweepStaleMatchmakerClaims(ctx context.Context, maxAttempts int32) (SweepStaleMatchmakerClaimsRow, error)
- func (q *Queries) TenantNameTaken(ctx context.Context, arg TenantNameTakenParams) (bool, error)
- func (q *Queries) TopN(ctx context.Context, arg TopNParams) ([]TopNRow, error)
- func (q *Queries) TouchControlPanelSession(ctx context.Context, arg TouchControlPanelSessionParams) error
- func (q *Queries) TouchControlPanelUserConnection(ctx context.Context, arg TouchControlPanelUserConnectionParams) error
- func (q *Queries) TouchGameSessionPeer(ctx context.Context, arg TouchGameSessionPeerParams) (int64, error)
- func (q *Queries) TouchMCPTokenLastUsed(ctx context.Context, id int64) error
- func (q *Queries) TouchPlayerAccountConnection(ctx context.Context, arg TouchPlayerAccountConnectionParams) error
- func (q *Queries) UnlinkPlayerFromAccount(ctx context.Context, arg UnlinkPlayerFromAccountParams) (int64, error)
- func (q *Queries) UpdateAPIKeyLabel(ctx context.Context, arg UpdateAPIKeyLabelParams) error
- func (q *Queries) UpdateControlPanelPassword(ctx context.Context, arg UpdateControlPanelPasswordParams) error
- func (q *Queries) UpdateFleet(ctx context.Context, arg UpdateFleetParams) error
- func (q *Queries) UpdateGameSessionState(ctx context.Context, arg UpdateGameSessionStateParams) error
- func (q *Queries) UpdateLeaderboard(ctx context.Context, arg UpdateLeaderboardParams) (int64, error)
- func (q *Queries) UpdatePlayerPassword(ctx context.Context, arg UpdatePlayerPasswordParams) error
- func (q *Queries) UpdateProfileEmail(ctx context.Context, arg UpdateProfileEmailParams) error
- func (q *Queries) UpdateProfileXuid(ctx context.Context, arg UpdateProfileXuidParams) error
- func (q *Queries) UpdateProjectSteamAuthConfig(ctx context.Context, arg UpdateProjectSteamAuthConfigParams) (int64, error)
- func (q *Queries) UpdateRemoteConfig(ctx context.Context, arg UpdateRemoteConfigParams) (int64, error)
- func (q *Queries) UpdateTenantCustomTokenPublicKey(ctx context.Context, arg UpdateTenantCustomTokenPublicKeyParams) (int64, error)
- func (q *Queries) UpsertConnectionLimitOverride(ctx context.Context, arg UpsertConnectionLimitOverrideParams) error
- func (q *Queries) UpsertControlPanelTOTPPending(ctx context.Context, arg UpsertControlPanelTOTPPendingParams) (int64, error)
- func (q *Queries) UpsertFriendEdgeStatusByAccount(ctx context.Context, arg UpsertFriendEdgeStatusByAccountParams) error
- func (q *Queries) UpsertGameSessionPeer(ctx context.Context, arg UpsertGameSessionPeerParams) error
- func (q *Queries) UpsertPlayerAccountTOTPPending(ctx context.Context, arg UpsertPlayerAccountTOTPPendingParams) (pgtype.UUID, error)
- func (q *Queries) UpsertPlayerByExternalID(ctx context.Context, arg UpsertPlayerByExternalIDParams) (int64, error)
- func (q *Queries) UpsertPresence(ctx context.Context, arg UpsertPresenceParams) error
- func (q *Queries) UpsertQuotaOverride(ctx context.Context, arg UpsertQuotaOverrideParams) error
- func (q *Queries) UpsertRateLimitOverride(ctx context.Context, arg UpsertRateLimitOverrideParams) error
- func (q *Queries) UpsertTenantFeatureGrant(ctx context.Context, arg UpsertTenantFeatureGrantParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- func (q *Queries) WriteAudit(ctx context.Context, arg WriteAuditParams) error
- func (q *Queries) WritePlatformAudit(ctx context.Context, arg WritePlatformAuditParams) error
- type RateLimitOverride
- type RealtimeConnectionCapState
- type RealtimeConnectionGrant
- type RealtimeTicket
- type RecordRelayNodeProbeParams
- type RecordRelayNodeProbeRow
- type RedeemRealtimeTicketRow
- type RelayNode
- type RelaySessionUsage
- type ReleaseMatchmakerTicketsParams
- type ReplacePlayerExternalIDParams
- type RequestFriendByAccountParams
- type RequestFriendByAccountRow
- type RequestPlayerDeleteByAccountParams
- type RequestPlayerDeleteInProjectParams
- type ReserveControlPanelTOTPAttemptParams
- type ReserveControlPanelTOTPAttemptRow
- type ReserveControlPanelVerifyAttemptParams
- type ReserveControlPanelVerifyAttemptRow
- type ReservePlayerAccountTOTPAttemptParams
- type ReservePlayerAccountTOTPAttemptRow
- type ReservePlayerAccountVerifyAttemptParams
- type ReservePlayerAccountVerifyAttemptRow
- type ReservePlayerPasswordResetAttemptParams
- type ReservePlayerPasswordResetAttemptRow
- type ReservePlayerVerifyAttemptParams
- type ReservePlayerVerifyAttemptRow
- type ResolvePendingFriendEdgeParams
- type ResolvePlayersForAccountsInProjectParams
- type ResolvePlayersForAccountsInProjectRow
- type RestoreControlPanelUserVerificationCodeParams
- type RestoreLeaderboardParams
- type RestorePlayerAccountVerificationCodeParams
- type ReturnMatchmakerTicketsByIDParams
- type RevokeActivePlayerSessionsParams
- type RevokeControlPanelInvitationParams
- type RevokeMCPTokenParams
- type RevokeOtherControlPanelSessionsForUserParams
- type RevokeOtherPlayerAccountSessionsParams
- type RevokeSupersededPlayerInvitationsParams
- type RiverClient
- type RiverClientQueue
- type RiverJob
- type RiverJobState
- type RiverLeader
- type RiverQueue
- type SealTenantCustomTokenSecretParams
- type SearchPlayerAccountsParams
- type SearchPlayerAccountsRow
- type ServerSecret
- type Session
- type SetAPIKeyScopesParams
- type SetAllocationStatusParams
- type SetAllowedOriginsParams
- type SetControlPanelTOTPLastUsedStepParams
- type SetControlPanelUserDisabledParams
- type SetControlPanelUserVerificationCodeParams
- type SetPlayerAccountDisplayNameParams
- type SetPlayerAccountPasswordParams
- type SetPlayerAccountRemoteAddrsParams
- type SetPlayerAccountTOTPLastUsedStepParams
- type SetPlayerAccountVerificationCodeParams
- type SetPlayerDisabledInProjectParams
- type SetPlayerDisabledParams
- type SetPlayerFriendCodeIfAbsentParams
- type SetPlayerFriendCodeParams
- type SetPlayerPasswordResetChallengeParams
- type SetPlayerVerificationCodeByIDParams
- type SetPlayerVerificationCodeParams
- type SetProjectPublicJoiningParams
- type SetPublicSignupEnabledParams
- type SetTenantEnforceQuotasParams
- type SetTenantStorageNotifiedThresholdParams
- type SetTenantTierByIDParams
- type SetTenantTierByIDRow
- type SettingsRevision
- type SoftDeleteLeaderboardParams
- type SoftDeleteStorageObjectParams
- type StorageLimit
- type StorageObject
- type StorageUsageForWriteParams
- type StorageUsageForWriteRow
- type SubmitScoreParams
- type SweepStaleMatchmakerClaimsRow
- type Tenant
- type TenantChangeRequest
- type TenantNameTakenParams
- type TenantPlayerBan
- type TenantQuotaOverride
- type TenantSignupRequest
- type TenantStorageUsage
- type TicketStatus
- type TopNParams
- type TopNRow
- type TouchControlPanelSessionParams
- type TouchControlPanelUserConnectionParams
- type TouchGameSessionPeerParams
- type TouchPlayerAccountConnectionParams
- type UnlinkPlayerFromAccountParams
- type UpdateAPIKeyLabelParams
- type UpdateControlPanelPasswordParams
- type UpdateFleetParams
- type UpdateGameSessionStateParams
- type UpdateLeaderboardParams
- type UpdatePlayerPasswordParams
- type UpdateProfileEmailParams
- type UpdateProfileXuidParams
- type UpdateProjectSteamAuthConfigParams
- type UpdateRemoteConfigParams
- type UpdateTenantCustomTokenPublicKeyParams
- type UpsertConnectionLimitOverrideParams
- type UpsertControlPanelTOTPPendingParams
- type UpsertFriendEdgeStatusByAccountParams
- type UpsertGameSessionPeerParams
- type UpsertPlayerAccountTOTPPendingParams
- type UpsertPlayerByExternalIDParams
- type UpsertPresenceParams
- type UpsertQuotaOverrideParams
- type UpsertRateLimitOverrideParams
- type UpsertTenantFeatureGrantParams
- type UsageSample
- type UsageSamples202607
- type UsageSamples202608
- type UsageSamples202609
- type UsageSamples202610
- type UsageSamples202611
- type UsageSamples202612
- type UsageSamples202701
- type UsageSamples202702
- type UsageSamples202703
- type UsageSamples202704
- type UsageSamples202705
- type UsageSamples202706
- type UsageSamplesDefault
- type WriteAuditParams
- type WritePlatformAuditParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvanceLeaderboardPeriodParams ¶
type AdvanceLeaderboardPeriodParams struct {
PeriodStartedAt pgtype.Timestamptz
NextResetAt pgtype.Timestamptz
ID int64
}
type AllocationStatus ¶
type AllocationStatus string
const ( AllocationStatusPending AllocationStatus = "pending" AllocationStatusAllocating AllocationStatus = "allocating" AllocationStatusReady AllocationStatus = "ready" AllocationStatusAllocated AllocationStatus = "allocated" AllocationStatusDraining AllocationStatus = "draining" AllocationStatusShutdown AllocationStatus = "shutdown" AllocationStatusFailed AllocationStatus = "failed" )
func (*AllocationStatus) Scan ¶
func (e *AllocationStatus) Scan(src interface{}) error
type ArchiveLeaderboardPeriodParams ¶
type ArchiveLeaderboardPeriodParams struct {
LeaderboardID int64
Period int32
StartedAt pgtype.Timestamptz
EndedAt pgtype.Timestamptz
}
type BumpControlPanelLoginFailureParams ¶
type BumpControlPanelLoginFailureParams struct {
FailureLimit int32
LockoutUntil pgtype.Timestamptz
ID int64
}
type BumpControlPanelLoginFailureRow ¶
type BumpControlPanelLoginFailureRow struct {
LoginFailures int32
LockedUntil pgtype.Timestamptz
}
type CasbinRule ¶
type ClaimMatchmakerBucketRow ¶
type ClaimMatchmakerBucketRow struct {
ID int64
EntryID int64
PartyID *int64
TenantID int64
ProjectID int64
FleetID *int64
PlayerID int64
Region string
GameMode string
Attributes []byte
Status string
MatchAddress string
MatchProtocol string
Mode string
MinCount int32
MaxCount int32
CountMultiple int32
AllowCrossRegion bool
Query string
StringProperties []byte
NumericProperties []byte
CreatedAt pgtype.Timestamptz
MatchedAt pgtype.Timestamptz
}
type ConnectionLimitOverride ¶
type ControlPanelInvitation ¶
type ControlPanelInvitation struct {
ID int64
Email string
TenantID *int64
Role string
CodeHash []byte
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
}
type ControlPanelMembership ¶
type ControlPanelPasswordReset ¶
type ControlPanelPasswordReset struct {
ID int64
ControlPanelUserID int64
TokenHash []byte
ExpiresAt pgtype.Timestamptz
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ControlPanelSession ¶
type ControlPanelSession struct {
ID int64
ControlPanelUserID int64
RefreshHash []byte
CsrfSecret []byte
ExpiresAt pgtype.Timestamptz
LastSeenAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
Ip *string
UserAgent *string
CreatedAt pgtype.Timestamptz
}
type ControlPanelTrustedDevice ¶
type ControlPanelTrustedDevice struct {
ID int64
ControlPanelUserID int64
TokenHash []byte
ExpiresAt pgtype.Timestamptz
Ip *string
UserAgent *string
CreatedAt pgtype.Timestamptz
}
type ControlPanelUser ¶
type ControlPanelUser struct {
ID int64
Email string
PasswordHash []byte
IsPlatformAdmin bool
LoginFailures int32
LockedUntil pgtype.Timestamptz
LastLoginAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLastSentAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
}
type ControlPanelUserConnection ¶
type ControlPanelUserConnection struct {
ID int64
ControlPanelUserID int64
Provider string
Subject string
CreatedAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
}
type ControlPanelUserTotp ¶
type ControlPanelUserTotp struct {
ControlPanelUserID int64
SecretEnc []byte
ConfirmedAt pgtype.Timestamptz
LastUsedStep int64
Attempts int32
LockedUntil pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ControlPanelUserTotpBackupCode ¶
type ControlPanelUserTotpBackupCode struct {
ID int64
ControlPanelUserID int64
CodeHash []byte
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type CreateAPIKeyParams ¶
type CreateAPIKeyRow ¶
type CreateAPIKeyRow struct {
ID int64
CreatedAt pgtype.Timestamptz
}
type CreateAnonymousPlayerRow ¶
type CreateAnonymousPlayerRow struct {
ID int64
ExternalID string
CreatedAt pgtype.Timestamptz
}
type CreateControlPanelAPIKeyRow ¶
type CreateControlPanelAPIKeyRow struct {
ID int64
CreatedAt pgtype.Timestamptz
}
type CreateControlPanelInvitationRow ¶
type CreateControlPanelInvitationRow struct {
ID int64
CreatedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
}
type CreateControlPanelPasswordResetParams ¶
type CreateControlPanelPasswordResetParams struct {
ControlPanelUserID int64
TokenHash []byte
ExpiresAt pgtype.Timestamptz
}
type CreateControlPanelSessionRow ¶
type CreateControlPanelSessionRow struct {
ID int64
ExpiresAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type CreateControlPanelUserRow ¶
type CreateControlPanelUserRow struct {
ID int64
Email string
IsPlatformAdmin bool
CreatedAt pgtype.Timestamptz
}
type CreateEmailPlayerParams ¶
type CreateFirstControlPanelAdminRow ¶
type CreateFirstControlPanelAdminRow struct {
ID int64
Email string
IsPlatformAdmin bool
CreatedAt pgtype.Timestamptz
}
type CreateFleetParams ¶
type CreateGameInviteParams ¶
type CreateGameSessionParams ¶
type CreateGameSessionRow ¶
type CreateGameSessionRow struct {
ID string
JoinCode string
State string
CreatedAt pgtype.Timestamptz
}
type CreateLeaderboardParams ¶
type CreateMCPTokenParams ¶
type CreatePendingAllocationRow ¶
type CreatePendingAllocationRow struct {
ID int64
RequestedAt pgtype.Timestamptz
}
type CreatePlayerAccountPasswordResetParams ¶
type CreatePlayerAccountPasswordResetParams struct {
PlayerAccountID pgtype.UUID
TokenHash []byte
ExpiresAt pgtype.Timestamptz
}
type CreatePlayerAccountRow ¶
type CreatePlayerAccountRow struct {
ID pgtype.UUID
Email string
CreatedAt pgtype.Timestamptz
}
type CreatePlayerAccountTrustedDeviceParams ¶
type CreatePlayerAccountTrustedDeviceParams struct {
PlayerAccountID pgtype.UUID
TokenHash []byte
ExpiresAt pgtype.Timestamptz
}
type CreatePlayerInvitationRow ¶
type CreatePlayerInvitationRow struct {
ID int64
CreatedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
}
type CreatePlayerParams ¶
type CreatePlayerRow ¶
type CreatePlayerSessionParams ¶
type CreatePlayerSessionParams struct {
PlayerID int64
RefreshHash []byte
ExpiresAt pgtype.Timestamptz
}
type CreateProjectForTenantRow ¶
type CreateProjectForTenantRow struct {
ID int64
Name string
CreatedAt pgtype.Timestamptz
}
type CreateRelayNodeParams ¶
type CreateSessionParams ¶
type CreateSessionParams struct {
ProjectID int64
PlayerID int64
RefreshHash []byte
ExpiresAt pgtype.Timestamptz
}
type CreateSessionRow ¶
type CreateSessionRow struct {
ID int64
CreatedAt pgtype.Timestamptz
}
type CreateVerifiedControlPanelUserRow ¶
type CreateVerifiedControlPanelUserRow struct {
ID int64
Email string
IsPlatformAdmin bool
CreatedAt pgtype.Timestamptz
}
type DBTX ¶
type DBTX interface {
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
QueryRow(context.Context, string, ...interface{}) pgx.Row
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type DeleteGameInviteParams ¶
type EmailSuppression ¶
type EmailSuppression struct {
Email string
CreatedAt pgtype.Timestamptz
}
type ExtendGameSessionExpiryOnHeartbeatParams ¶
type ExtendGameSessionExpiryOnHeartbeatParams struct {
ExpiresAt pgtype.Timestamptz
ID string
Threshold pgtype.Timestamptz
}
type ExtendGameSessionExpiryParams ¶
type ExtendGameSessionExpiryParams struct {
ExpiresAt pgtype.Timestamptz
ProjectID int64
ID string
}
type FeatureGrant ¶
type Fleet ¶
type Fleet struct {
ID int64
TenantID int64
ProjectID int64
Name string
Backend string
Config []byte
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
}
type FleetAllocationEvent ¶
type FleetAllocationEvent struct {
ID int64
TenantID int64
AllocationID int64
Status AllocationStatus
Address string
ErrMessage string
CreatedAt pgtype.Timestamptz
}
type FriendEdge ¶
type FriendEdge struct {
ID int64
FromAccountID pgtype.UUID
ToAccountID pgtype.UUID
Status string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type GameInvite ¶
type GameServerAllocation ¶
type GameServerAllocation struct {
ID int64
TenantID int64
ProjectID int64
Backend string
BackendRef string
Region string
Address string
Status AllocationStatus
Metadata []byte
RequestedAt pgtype.Timestamptz
ReadyAt pgtype.Timestamptz
ReleasedAt pgtype.Timestamptz
FleetID *int64
}
type GameSession ¶
type GameSessionPeer ¶
type GameSessionSignal ¶
type GetAPIKeyByHashRow ¶
type GetAPIKeyScopesRow ¶
type GetAllocationRow ¶
type GetControlPanelInvitationByCodeHashRow ¶
type GetControlPanelInvitationByCodeHashRow struct {
ID int64
Email string
TenantID *int64
Role string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
TenantName *string
}
type GetControlPanelInvitationByIDRow ¶
type GetControlPanelInvitationByIDRow struct {
ID int64
Email string
TenantID *int64
Role string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
}
type GetControlPanelSessionByRefreshHashRow ¶
type GetControlPanelSessionByRefreshHashRow struct {
ID int64
ControlPanelUserID int64
CsrfSecret []byte
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
Email string
IsPlatformAdmin bool
HasPassword bool
}
type GetControlPanelTOTPRow ¶
type GetControlPanelTOTPRow struct {
ControlPanelUserID int64
SecretEnc []byte
ConfirmedAt pgtype.Timestamptz
LastUsedStep int64
Attempts int32
LockedUntil pgtype.Timestamptz
}
type GetControlPanelUserByConnectionRow ¶
type GetControlPanelUserByConnectionRow struct {
ID int64
Email string
IsPlatformAdmin bool
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
}
type GetControlPanelUserByEmailRow ¶
type GetControlPanelUserByEmailRow struct {
ID int64
Email string
PasswordHash []byte
IsPlatformAdmin bool
LoginFailures int32
LockedUntil pgtype.Timestamptz
LastLoginAt pgtype.Timestamptz
EmailVerifiedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type GetControlPanelUserByIDRow ¶
type GetControlPanelUserByIDRow struct {
ID int64
Email string
IsPlatformAdmin bool
CreatedAt pgtype.Timestamptz
}
type GetControlPanelUserVerificationStateRow ¶
type GetControlPanelUserVerificationStateRow struct {
ID int64
Email string
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
EmailVerificationLastSentAt pgtype.Timestamptz
}
type GetFleetByNameParams ¶
type GetGameSessionParams ¶
type GetGameSessionRow ¶
type GetLeaderboardForControlPanelRow ¶
type GetLeaderboardForControlPanelRow struct {
ID int64
ProjectID int64
Name string
SortOrder string
ScoreOperator string
Metadata []byte
ClientSubmissions bool
ScoreMin *int64
ScoreMax *int64
ResetSchedule string
AttemptCap *int32
CurrentPeriod int32
PeriodStartedAt pgtype.Timestamptz
NextResetAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type GetLeaderboardParams ¶
type GetLeaderboardRow ¶
type GetMCPTokenByHashRow ¶
type GetMCPTokenByHashRow struct {
ID int64
TenantID int64
ProjectID int64
CreatedByUserID int64
Label string
Scopes []string
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
TenantDisabled bool
CreatorDisabled bool
}
type GetMatchmakingTicketForTraceRow ¶
type GetMatchmakingTicketForTraceRow struct {
ID int64
PartyID *int64
PlayerID int64
FleetID *int64
Region string
GameMode string
AttributesBytes int32
Status string
Mode string
MinCount int32
MaxCount int32
CountMultiple int32
AllowCrossRegion bool
Query string
StringProperties []byte
NumericProperties []byte
CreatedAt pgtype.Timestamptz
MatchedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
FailureReason *string
Claimed bool
}
type GetMatchmakingTicketRow ¶
type GetMatchmakingTicketRow struct {
ID int64
EntryID int64
PartyID *int64
TenantID int64
ProjectID int64
FleetID *int64
PlayerID int64
Region string
GameMode string
Attributes []byte
Status string
MatchAddress string
MatchProtocol string
Mode string
MatchID string
MinCount int32
MaxCount int32
CountMultiple int32
AllowCrossRegion bool
Query string
StringProperties []byte
NumericProperties []byte
CreatedAt pgtype.Timestamptz
MatchedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
FailureReason *string
}
type GetPlayerAccountByEmailRow ¶
type GetPlayerAccountByEmailRow struct {
ID pgtype.UUID
Email string
PasswordHash []byte
DisplayName *string
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
SessionEpoch int32
}
type GetPlayerAccountByIDRow ¶
type GetPlayerAccountByIDRow struct {
ID pgtype.UUID
Email string
DisplayName *string
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
SessionEpoch int32
CreatedAt pgtype.Timestamptz
}
type GetPlayerAccountSessionRow ¶
type GetPlayerAccountSessionRow struct {
ID int64
PlayerAccountID pgtype.UUID
SnapshotEpoch int32
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
Email string
DisplayName *string
DisabledAt pgtype.Timestamptz
AccountEpoch int32
HasPassword bool
}
type GetPlayerAccountTOTPRow ¶
type GetPlayerAccountTOTPRow struct {
PlayerAccountID pgtype.UUID
SecretEnc []byte
ConfirmedAt pgtype.Timestamptz
LastUsedStep int64
Attempts int32
LockedUntil pgtype.Timestamptz
}
type GetPlayerAccountVerificationStateRow ¶
type GetPlayerAccountVerificationStateRow struct {
ID pgtype.UUID
Email string
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
EmailVerificationLastSentAt pgtype.Timestamptz
}
type GetPlayerAuthCredentialsRow ¶
type GetPlayerAuthCredentialsRow struct {
ID int64
PasswordHash []byte
Email *string
DisabledAt pgtype.Timestamptz
}
type GetPlayerByEmailParams ¶
type GetPlayerByEmailProjectRow ¶
type GetPlayerByEmailProjectRow struct {
ID int64
TenantID int64
ProjectID int64
PasswordHash []byte
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLastSentAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
}
type GetPlayerByEmailRow ¶
type GetPlayerByEmailRow struct {
ID int64
ProjectID int64
PasswordHash []byte
EmailVerifiedAt pgtype.Timestamptz
}
type GetPlayerByExternalIDRow ¶
type GetPlayerByExternalIDRow struct {
ID int64
ProjectID int64
EmailVerifiedAt pgtype.Timestamptz
}
type GetPlayerForProjectRow ¶
type GetPlayerForProjectRow struct {
ID int64
ExternalID string
Email string
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
DeleteRequestedAt pgtype.Timestamptz
DeleteRequestedByAdmin bool
CreatedAt pgtype.Timestamptz
TenantID int64
ProjectID int64
PlayerAccountID pgtype.UUID
RemoteAddrIpLan *string
RemoteAddrIpPublic *string
RemoteAddrDns *string
RemoteAddrIroh *string
TenantBanned bool
}
type GetPlayerForVerifyRow ¶
type GetPlayerInvitationByCodeHashRow ¶
type GetPlayerInvitationByCodeHashRow struct {
ID int64
TenantID int64
ProjectID int64
Email string
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
ProjectPlayerID *int64
ProjectName string
}
type GetPlayerModerationStateRow ¶
type GetPlayerModerationStateRow struct {
ID int64
DisabledAt pgtype.Timestamptz
}
type GetPlayerPasswordResetStateRow ¶
type GetPlayerPasswordResetStateRow struct {
ID int64
PasswordHash []byte
PasswordResetCodeHash []byte
PasswordResetSalt []byte
PasswordResetExpiresAt pgtype.Timestamptz
PasswordResetAttempts int32
PasswordResetLifetimeAttempts int32
PasswordResetLockedUntil pgtype.Timestamptz
PasswordResetLastSentAt pgtype.Timestamptz
}
type GetPlayerSessionRow ¶
type GetPlayerSessionRow struct {
ID int64
PlayerID int64
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
Email *string
ProjectID int64
TenantID int64
DisabledAt pgtype.Timestamptz
}
type GetPlayerVerificationStateByIDRow ¶
type GetPlayerVerificationStateByIDRow struct {
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
EmailVerificationLastSentAt pgtype.Timestamptz
}
type GetPlayerVerificationStateRow ¶
type GetPlayerVerificationStateRow struct {
ID int64
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
EmailVerificationLastSentAt pgtype.Timestamptz
}
type GetPresenceRow ¶
type GetPresenceRow struct {
Status string
SessionID *string
UpdatedAt pgtype.Timestamptz
}
type GetProfileEmailStateRow ¶
type GetProfileEmailStateRow struct {
Email *string
EmailVerifiedAt pgtype.Timestamptz
EmailVerificationLastSentAt pgtype.Timestamptz
}
type GetProfileRow ¶
type GetProjectTenantRow ¶
type GetPublicPlayerByFriendCodeRow ¶
type GetPublicPlayerByFriendCodeRow struct {
ID int64
DisplayName *string
CreatedAt pgtype.Timestamptz
}
type GetPublicPlayerParams ¶
type GetPublicPlayerRow ¶
type GetPublicPlayerRow struct {
ID int64
DisplayName *string
CreatedAt pgtype.Timestamptz
}
type GetSessionByRefreshHashRow ¶
type GetSessionByRefreshHashRow struct {
ID int64
PlayerID int64
ProjectID int64
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
RevokedReason *string
}
type GetStorageObjectParams ¶
type GetStorageObjectRow ¶
type GetStorageObjectRow struct {
ID int64
Value []byte
Version int64
UpdatedAt pgtype.Timestamptz
}
type GetTenantDisabledStateRow ¶
type GetTenantDisabledStateRow struct {
DisabledAt pgtype.Timestamptz
DisabledBy *string
}
type GetTenantFactsRow ¶
type GetTenantSignupRequestByCodeHashRow ¶
type GetTenantSignupRequestByCodeHashRow struct {
ID int64
Email string
RequestedTenantName string
FinalTenantName *string
ProjectDescription string
StudioName *string
Status string
CodeHash []byte
CodeExpiresAt pgtype.Timestamptz
ReviewedByUserID *int64
ReviewedAt pgtype.Timestamptz
ReviewReason *string
TenantID *int64
AcceptedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type GetTenantSignupRequestByIDRow ¶
type GetTenantSignupRequestByIDRow struct {
ID int64
Email string
RequestedTenantName string
FinalTenantName *string
ProjectDescription string
StudioName *string
Status string
CodeHash []byte
CodeExpiresAt pgtype.Timestamptz
ReviewedByUserID *int64
ReviewedAt pgtype.Timestamptz
ReviewReason *string
TenantID *int64
AcceptedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type InsertAllocationEventParams ¶
type InsertAllocationEventParams struct {
AllocationID int64
Status AllocationStatus
Address string
ErrMessage string
}
type InsertMatchmakingTicketParams ¶
type InsertMatchmakingTicketParams struct {
ProjectID int64
FleetID *int64
PlayerID int64
Region string
GameMode string
Attributes []byte
Mode string
MinCount int32
MaxCount int32
CountMultiple int32
AllowCrossRegion bool
Query string
StringProperties []byte
NumericProperties []byte
ExpiresAt pgtype.Timestamptz
}
type InsertMatchmakingTicketRow ¶
type InsertMatchmakingTicketRow struct {
ID int64
EntryID int64
Status string
CreatedAt pgtype.Timestamptz
}
type Leaderboard ¶
type Leaderboard struct {
ID int64
TenantID int64
ProjectID int64
Name string
SortOrder string
CreatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ScoreOperator string
Metadata []byte
ClientSubmissions bool
ScoreMin *int64
ScoreMax *int64
ResetSchedule string
AttemptCap *int32
CurrentPeriod int32
PeriodStartedAt pgtype.Timestamptz
NextResetAt pgtype.Timestamptz
}
type LeaderboardEntry ¶
type LeaderboardPeriod ¶
type LeaderboardPeriod struct {
ID int64
TenantID int64
LeaderboardID int64
Period int32
StartedAt pgtype.Timestamptz
EndedAt pgtype.Timestamptz
}
type ListAPIKeysRow ¶
type ListAPIKeysRow struct {
ID int64
ProjectID *int64
ProjectName *string
Label *string
KeyType string
Scopes []string
CreatedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
}
type ListAllocationEventsRow ¶
type ListControlPanelInvitationsForTenantRow ¶
type ListControlPanelInvitationsForTenantRow struct {
ID int64
Email string
Role string
ExpiresAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
}
type ListControlPanelMembersForTenantRow ¶
type ListControlPanelMembersForTenantRow struct {
MembershipID int64
UserID int64
Email string
Role string
IsPlatformAdmin bool
LastLoginAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ListControlPanelTenantsForPlatformAdminRow ¶
type ListControlPanelTenantsForPlatformAdminRow struct {
ID int64
Name string
Role string
CreatedAt pgtype.Timestamptz
}
type ListControlPanelTenantsForUserRow ¶
type ListControlPanelTenantsForUserRow struct {
ID int64
Name string
Role string
CreatedAt pgtype.Timestamptz
}
type ListControlPanelUserConnectionsRow ¶
type ListControlPanelUserConnectionsRow struct {
Provider string
CreatedAt pgtype.Timestamptz
}
type ListControlPanelUsersForPlatformAdminRow ¶
type ListControlPanelUsersForPlatformAdminRow struct {
ID int64
Email string
IsPlatformAdmin bool
DisabledAt pgtype.Timestamptz
LastLoginAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
TenantCount int64
}
type ListDeletedLeaderboardsForProjectRow ¶
type ListDeletedLeaderboardsForProjectRow struct {
ID int64
Name string
DeletedAt pgtype.Timestamptz
}
type ListDueLeaderboardResetsRow ¶
type ListDueLeaderboardResetsRow struct {
ID int64
CurrentPeriod int32
PeriodStartedAt pgtype.Timestamptz
NextResetAt pgtype.Timestamptz
ResetSchedule string
CreatedAt pgtype.Timestamptz
}
type ListGameSessionPeersRow ¶
type ListLeaderboardPeriodsRow ¶
type ListLeaderboardPeriodsRow struct {
Period int32
StartedAt pgtype.Timestamptz
EndedAt pgtype.Timestamptz
}
type ListLeaderboardsForProjectRow ¶
type ListLeaderboardsForProjectRow struct {
ID int64
Name string
SortOrder string
ScoreOperator string
Metadata []byte
ClientSubmissions bool
ScoreMin *int64
ScoreMax *int64
ResetSchedule string
AttemptCap *int32
CurrentPeriod int32
PeriodStartedAt pgtype.Timestamptz
NextResetAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ListMCPTokensForProjectRow ¶
type ListMCPTokensForProjectRow struct {
ID int64
Label string
TokenHint string
Scopes []string
CreatedByUserID int64
CreatorEmail string
ExpiresAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ListPlatformAdminInvitationsRow ¶
type ListPlatformAdminInvitationsRow struct {
ID int64
Email string
Role string
ExpiresAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
}
type ListPlatformAdminsRow ¶
type ListPlatformAdminsRow struct {
UserID int64
Email string
LastLoginAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ListPlayerAccountConnectionsRow ¶
type ListPlayerAccountConnectionsRow struct {
Provider string
CreatedAt pgtype.Timestamptz
}
type ListPlayerInvitationsForProjectRow ¶
type ListPlayerInvitationsForProjectRow struct {
ID int64
Email string
ExpiresAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
}
type ListPlayersDueForPurgeParams ¶
type ListPlayersDueForPurgeParams struct {
Cutoff pgtype.Timestamptz
Batch int32
}
type ListPlayersDueForPurgeRow ¶
type ListPlayersDueForPurgeRow struct {
ID int64
ProjectID int64
ExternalID string
DeleteRequestedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
}
type ListPlayersForProjectRow ¶
type ListPlayersForProjectRow struct {
ID int64
ExternalID string
Email string
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
DeleteRequestedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ListPresenceForUsersRow ¶
type ListProjectsForTenantRow ¶
type ListProjectsForTenantRow struct {
ID int64
Name string
CreatedAt pgtype.Timestamptz
PublicJoiningEnabled bool
}
type ListPublicPlayersParams ¶
type ListPublicPlayersRow ¶
type ListPublicPlayersRow struct {
ID int64
DisplayName *string
CreatedAt pgtype.Timestamptz
}
type ListQuotaOverridesForTenantRow ¶
type ListQuotaOverridesForTenantRow struct {
Axis string
Limit int64
UpdatedAt pgtype.Timestamptz
}
type ListRelayNodesRow ¶
type ListStorageObjectsRow ¶
type ListTenantPlayerBansRow ¶
type LockControlPanelUserVerificationParams ¶
type LockControlPanelUserVerificationParams struct {
LockedUntil pgtype.Timestamptz
ID int64
}
type LockPlayerAccountVerificationParams ¶
type LockPlayerAccountVerificationParams struct {
LockedUntil pgtype.Timestamptz
ID pgtype.UUID
}
type LockPlayerPasswordResetParams ¶
type LockPlayerPasswordResetParams struct {
LockedUntil pgtype.Timestamptz
ID int64
}
type LockPlayerVerificationParams ¶
type LockPlayerVerificationParams struct {
LockedUntil pgtype.Timestamptz
ID int64
}
type MatchmakerMatch ¶
type MatchmakerMatch struct {
ID string
TenantID int64
ProjectID int64
Mode string
FleetID *int64
Address string
Protocol string
SessionID string
JoinCode string
Roster []byte
CreatedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
AllocationID *int64
ClaimedAt pgtype.Timestamptz
HostPlayerID *int64
}
type MatchmakerQueueStatsRow ¶
type MatchmakingEntry ¶
type MatchmakingEntry struct {
ID int64
TenantID int64
ProjectID int64
PartyID *int64
Status TicketStatus
IdempotencyKey *string
PreviousMatchID string
CreatedAt pgtype.Timestamptz
}
type MatchmakingResolution ¶
type MatchmakingResolution struct {
ID string
TenantID int64
ProjectID int64
ExpiresAt pgtype.Timestamptz
NextAttemptAt pgtype.Timestamptz
}
type MatchmakingTicket ¶
type MatchmakingTicket struct {
ID int64
TenantID int64
ProjectID int64
PlayerID int64
Region string
GameMode string
Attributes []byte
Status TicketStatus
MatchAddress string
CreatedAt pgtype.Timestamptz
MatchedAt pgtype.Timestamptz
FleetID *int64
ClaimID pgtype.UUID
ClaimedAt pgtype.Timestamptz
ClaimExpiresAt pgtype.Timestamptz
AllocationAttempts int32
MatchProtocol string
Mode string
MatchID string
MinCount int32
MaxCount int32
CountMultiple int32
AllowCrossRegion bool
Query string
StringProperties []byte
NumericProperties []byte
ExpiresAt pgtype.Timestamptz
FailureReason *string
EntryID int64
PartyID *int64
}
type McpToken ¶
type McpToken struct {
ID int64
TenantID int64
ProjectID int64
CreatedByUserID int64
Label string
TokenHash []byte
TokenHint string
Scopes []string
ExpiresAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
}
type NullAllocationStatus ¶
type NullAllocationStatus struct {
AllocationStatus AllocationStatus
Valid bool // Valid is true if AllocationStatus is not NULL
}
func (*NullAllocationStatus) Scan ¶
func (ns *NullAllocationStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullRiverJobState ¶
type NullRiverJobState struct {
RiverJobState RiverJobState
Valid bool // Valid is true if RiverJobState is not NULL
}
func (*NullRiverJobState) Scan ¶
func (ns *NullRiverJobState) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullTicketStatus ¶
type NullTicketStatus struct {
TicketStatus TicketStatus
Valid bool // Valid is true if TicketStatus is not NULL
}
func (*NullTicketStatus) Scan ¶
func (ns *NullTicketStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type PartyCodeAttempt ¶
type PartyCodeAttempt struct {
TenantID int64
ProjectID int64
Subject string
Failures int32
WindowStart pgtype.Timestamptz
BlockedUntil pgtype.Timestamptz
}
type PartyCodeIpAttempt ¶
type PartyCodeIpAttempt struct {
Ip string
Failures int32
WindowStart pgtype.Timestamptz
BlockedUntil pgtype.Timestamptz
}
type PartyInvite ¶
type PartyInviteCode ¶
type PartyMember ¶
type PartyMember struct {
TenantID int64
ProjectID int64
PartyID int64
PlayerID int64
ReadyVersion int64
StringProperties []byte
NumericProperties []byte
Attributes []byte
JoinedAt pgtype.Timestamptz
LastSeenAt pgtype.Timestamptz
DisconnectDeadline pgtype.Timestamptz
}
type PlatformAuditLog ¶
type PlatformSignupConfig ¶
type PlatformSignupConfig struct {
ID int16
PublicTenantSignupEnabled bool
UpdatedBy *int64
UpdatedAt pgtype.Timestamptz
}
type PlayerAccount ¶
type PlayerAccount struct {
ID pgtype.UUID
Email string
PasswordHash []byte
DisplayName *string
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
SessionEpoch int32
EmailVerificationCodeHash []byte
EmailVerificationSalt []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationAttempts int32
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
EmailVerificationLastSentAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
RemoteAddrIpLan *string
RemoteAddrIpPublic *string
RemoteAddrDns *string
RemoteAddrIroh *string
}
type PlayerAccountConnection ¶
type PlayerAccountConnection struct {
ID int64
PlayerAccountID pgtype.UUID
Provider string
Subject string
CreatedAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
}
type PlayerAccountPasswordReset ¶
type PlayerAccountPasswordReset struct {
ID int64
PlayerAccountID pgtype.UUID
TokenHash []byte
ExpiresAt pgtype.Timestamptz
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type PlayerAccountSession ¶
type PlayerAccountSession struct {
ID int64
PlayerAccountID pgtype.UUID
RefreshHash []byte
SessionEpoch int32
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type PlayerAccountTotp ¶
type PlayerAccountTotp struct {
PlayerAccountID pgtype.UUID
SecretEnc []byte
ConfirmedAt pgtype.Timestamptz
LastUsedStep int64
Attempts int32
LockedUntil pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type PlayerAccountTotpBackupCode ¶
type PlayerAccountTotpBackupCode struct {
ID int64
PlayerAccountID pgtype.UUID
CodeHash []byte
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type PlayerAccountTrustedDevice ¶
type PlayerAccountTrustedDevice struct {
ID int64
PlayerAccountID pgtype.UUID
TokenHash []byte
ExpiresAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type PlayerInvitation ¶
type PlayerInvitation struct {
ID int64
TenantID int64
ProjectID int64
Email string
CodeHash []byte
ExpiresAt pgtype.Timestamptz
AcceptedAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
InvitedByUserID int64
CreatedAt pgtype.Timestamptz
ProjectPlayerID *int64
}
type PlayerInviteLookupRow ¶
type ProjectPlayer ¶
type ProjectPlayer struct {
ID int64
TenantID int64
ProjectID int64
ExternalID string
Email *string
EmailVerifiedAt pgtype.Timestamptz
PasswordHash []byte
CreatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
EmailVerificationCodeHash []byte
EmailVerificationExpiresAt pgtype.Timestamptz
EmailVerificationSalt []byte
EmailVerificationAttempts int32
EmailVerificationLastSentAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
EmailVerificationLifetimeAttempts int32
EmailVerificationLockedUntil pgtype.Timestamptz
Xuid *string
PlayerAccountID pgtype.UUID
SessionEpoch int32
UnlinkedAt pgtype.Timestamptz
FriendCode *string
PasswordResetCodeHash []byte
PasswordResetSalt []byte
PasswordResetExpiresAt pgtype.Timestamptz
PasswordResetAttempts int32
PasswordResetLifetimeAttempts int32
PasswordResetLockedUntil pgtype.Timestamptz
PasswordResetLastSentAt pgtype.Timestamptz
DeleteRequestedAt pgtype.Timestamptz
DeleteRequestedByAdmin bool
}
type PutStorageObjectIfMatchRow ¶
type PutStorageObjectIfMatchRow struct {
ID int64
Version int64
UpdatedAt pgtype.Timestamptz
}
type PutStorageObjectParams ¶
type PutStorageObjectRow ¶
type PutStorageObjectRow struct {
ID int64
Version int64
UpdatedAt pgtype.Timestamptz
}
type Querier ¶
type Querier interface {
AdvanceLeaderboardPeriod(ctx context.Context, arg AdvanceLeaderboardPeriodParams) (int64, error)
// Adjust the current tenant's storage counter by delta (bytes; negative on
// delete/shrink), clamped at zero. Called in the write tx after a successful
// object write so the counter stays in lockstep. Runs in tenant context.
ApplyTenantStorageDelta(ctx context.Context, delta int64) error
ApproveTenantChangeRequest(ctx context.Context, arg ApproveTenantChangeRequestParams) (int64, error)
ApproveTenantSignupRequest(ctx context.Context, arg ApproveTenantSignupRequestParams) (int64, error)
ArchiveLeaderboardPeriod(ctx context.Context, arg ArchiveLeaderboardPeriodParams) error
// Edge id if an accepted friendship exists in either direction.
AreAccountsFriendsAccepted(ctx context.Context, arg AreAccountsFriendsAcceptedParams) (int64, error)
// Tenant-scoped: admin "link player" accept binds a proven email + global
// account onto an existing (external-id) row, marking it verified. Guards, any
// of which affecting 0 rows makes the caller treat the accept as a conflict:
// * the email unique index may reject if another player already owns the
// address;
// * the account guard prevents clobbering a row already linked to a
// different account;
// * the verified-email guard refuses to overwrite an address the player has
// already verified under a different email — so a link invite accepted
// after the player self-verifies a different address can't silently
// replace (and re-mark verified) their real email.
BindPlayerLinkedEmail(ctx context.Context, arg BindPlayerLinkedEmailParams) (int64, error)
// Bump every player of an account within a tenant (tenant-ban path), so all
// their live JWTs are rejected at server-verify immediately.
BumpAccountPlayerEpochsInTenant(ctx context.Context, arg BumpAccountPlayerEpochsInTenantParams) error
// Atomic increment + conditional lockout. The previous read-then-write
// pattern was TOCTOU-racy: N parallel failed logins all read the same value
// and wrote N+1, so 10 simultaneous wrong passwords landed at login_failures=1
// and the lockout never fired. UPDATE...RETURNING serialises under the row
// lock pgx already takes.
BumpControlPanelLoginFailure(ctx context.Context, arg BumpControlPanelLoginFailureParams) (BumpControlPanelLoginFailureRow, error)
// Single player (project disable path).
BumpPlayerSessionEpoch(ctx context.Context, id int64) error
// Cancelling a claimed-but-not-yet-committed ticket is allowed: the worker's
// CommitClaim will find zero rows and deallocate the orphan server.
CancelMatchmakingTicket(ctx context.Context, arg CancelMatchmakingTicketParams) (int64, error)
// Clears the pending request; lifts the disable only when the request created
// it (disabled_at = delete_requested_at), so a pre-existing admin suspension
// survives the cancel. An admin's request is not the player's to cancel.
// 0 rows = no pending player request (or already purged).
CancelPlayerDeleteByAccount(ctx context.Context, arg CancelPlayerDeleteByAccountParams) (int64, error)
// Clears the pending request; lifts the disable only when the request created
// it (disabled_at = delete_requested_at), so a pre-existing admin suspension
// survives the cancel. SET expressions read pre-update values, so the CASE
// sees delete_requested_at before it is cleared.
CancelPlayerDeleteInProject(ctx context.Context, arg CancelPlayerDeleteInProjectParams) (int64, error)
// Clears the pending request; lifts the disable only when the request created
// it (disabled_at = delete_requested_at), so a suspension that predates the
// request survives the cancel. An admin's request is not the player's to
// cancel. 0 rows = no pending player request (or purged).
CancelPlayerDeleteSelf(ctx context.Context, id int64) (int64, error)
// Bound the player count without splitting entries. The oldest entry can
// exceed a small budget so it is never starved. Their tickets
// stay 'queued'; only claim_id/claimed_at/claim_expires_at are set, so a
// subsequent ClaimBucket (different worker) skips them. The caller commits
// via CommitMatchmakerTickets (success) or ReleaseMatchmakerTickets (failure);
// a crashed caller's claim is released by the sweeper once
// claim_expires_at < now(). fleet_id is NULL for non-fleet modes, hence
// IS NOT DISTINCT FROM.
ClaimMatchmakerBucket(ctx context.Context, arg ClaimMatchmakerBucketParams) ([]ClaimMatchmakerBucketRow, error)
// Poll/realtime delivery claims only live matches. The expiry guard prevents a
// late poll from reviving an allocation after the GC lease has elapsed.
ClaimMatchmakerMatch(ctx context.Context, id string) (MatchmakerMatch, error)
// Race-safe half of find-or-create for a proven email (the caller re-reads
// after this, so a concurrent creator's row is picked up); ON CONFLICT never
// aborts the surrounding transaction. An unverified row is claimed: whoever
// created it never proved the email, so the proven owner's password replaces
// theirs and the row's pending code and display name are cleared. A verified
// row is left alone.
ClaimVerifiedPlayerAccount(ctx context.Context, arg ClaimVerifiedPlayerAccountParams) error
ClearControlPanelVerificationCode(ctx context.Context, id int64) error
// Runs when a confirm attempt arrives after the lockout expired: the lockout
// window is over, so the lifetime budget restarts with it.
ClearPlayerPasswordResetLock(ctx context.Context, id int64) error
ClearPlayerVerificationCode(ctx context.Context, id int64) error
// The ClearPlayerPasswordResetLock twin for email verification.
ClearPlayerVerificationLock(ctx context.Context, id int64) error
ClearProjectSteamAuthConfig(ctx context.Context, projectID int64) (int64, error)
// Flip the given still-queued tickets holding this claim_id to 'matched'
// and stamp the match id, address + protocol. Rows that drifted (cancelled,
// swept) won't match the WHERE and are excluded — the caller compares
// rows-affected and deallocates the orphan server when 0.
CommitMatchmakerTickets(ctx context.Context, arg CommitMatchmakerTicketsParams) (int64, error)
// Sets the new password, clears the challenge, and bumps the session epoch so
// every outstanding access token (possibly an attacker's) dies immediately.
// A proven reset also restarts the lifetime budget and drops any lockout:
// the caller just demonstrated control of the inbox. The code_hash condition
// pins completion to the exact challenge the caller validated — 0 rows means
// a concurrent re-request replaced it and the code no longer counts.
CompletePlayerPasswordReset(ctx context.Context, arg CompletePlayerPasswordResetParams) (int64, error)
// last_used_step records the enrollment code's timestep so the same code
// cannot be replayed at the first login challenge.
ConfirmControlPanelTOTP(ctx context.Context, arg ConfirmControlPanelTOTPParams) (int64, error)
ConfirmPlayerAccountTOTP(ctx context.Context, arg ConfirmPlayerAccountTOTPParams) (int64, error)
// Atomic single-use consume: 0 rows means unknown, expired, or already used.
ConsumeControlPanelPasswordReset(ctx context.Context, tokenHash []byte) (int64, error)
// Single-use enforced by the used_at IS NULL guard in the same statement
// that marks it used. 0 rows = unknown or already-spent code.
ConsumeControlPanelTOTPBackupCode(ctx context.Context, arg ConsumeControlPanelTOTPBackupCodeParams) (int64, error)
// Atomic single-use consume: 0 rows means unknown, expired, or already used.
ConsumePlayerAccountPasswordReset(ctx context.Context, tokenHash []byte) (pgtype.UUID, error)
ConsumePlayerAccountTOTPBackupCode(ctx context.Context, arg ConsumePlayerAccountTOTPBackupCodeParams) (int64, error)
ControlPanelCreateTenant(ctx context.Context, arg ControlPanelCreateTenantParams) (ControlPanelCreateTenantRow, error)
ControlPanelCreateTenantBare(ctx context.Context, arg ControlPanelCreateTenantBareParams) (int64, error)
CountActiveAPIKeysForProject(ctx context.Context, projectID *int64) (int64, error)
// Counts peers seen within the activity window, excluding a given user so a
// re-joining member doesn't count against the session's capacity.
CountActiveGameSessionPeers(ctx context.Context, arg CountActiveGameSessionPeersParams) (int64, error)
CountActiveMCPTokens(ctx context.Context, projectID int64) (int64, error)
// Counts how many of the given players are ACTIVE members (last_seen within
// 30 s, matching ListGameSessionPeers/CountActiveGameSessionPeers) of an
// open, unexpired session in this project. The signal handlers pass both
// endpoints for a send (expecting 2) or just the caller for a poll
// (expecting 1), so the count defines "both peers are in the same live
// session" without diverging from the roster the clients themselves see.
CountActiveSignalMembers(ctx context.Context, arg CountActiveSignalMembersParams) (int64, error)
CountAllocationsForProject(ctx context.Context, arg CountAllocationsForProjectParams) (int64, error)
CountControlPanelTOTPBackupCodesRemaining(ctx context.Context, controlPanelUserID int64) (int64, error)
CountControlPanelUserConnections(ctx context.Context, controlPanelUserID int64) (int64, error)
CountControlPanelUsers(ctx context.Context) (int64, error)
CountControlPanelUsersForPlatformAdmin(ctx context.Context, emailFilter *string) (int64, error)
CountEnabledPlatformAdmins(ctx context.Context) (int64, error)
// Control panel matchmaker page: matches formed per mode within the retention
// window (rows are GC'd after MatchTTL, so this reads as "recent matches").
CountMatchmakerMatchesByMode(ctx context.Context, projectID int64) ([]CountMatchmakerMatchesByModeRow, error)
// Counts non-ended, non-expired sessions for the project. Used in the
// create handler to enforce a per-project session cap.
CountOpenGameSessionsForProject(ctx context.Context, projectID int64) (int64, error)
// Whether an unexpired invite exists for (session, recipient) in the caller's
// tenant. Gates joining/resolving a private session by a non-member.
CountPendingGameInviteForSessionPlayer(ctx context.Context, arg CountPendingGameInviteForSessionPlayerParams) (int64, error)
CountPlayerAccountConnections(ctx context.Context, playerAccountID pgtype.UUID) (int64, error)
CountPlayerAccountTOTPBackupCodesRemaining(ctx context.Context, playerAccountID pgtype.UUID) (int64, error)
// Unclaimed, unexpired fleet-allocation matches this player still holds. The
// per-player cap counts these at enqueue time so a player can't loop
// enqueue -> matched -> abandon to hoard dedicated servers until the 24h GC.
// Fleet matches carry no host, so the player is found via the roster.
CountPlayerLiveFleetAllocations(ctx context.Context, playerID int64) (int64, error)
CountPlayersForProject(ctx context.Context, arg CountPlayersForProjectParams) (int64, error)
// Live (non-soft-deleted) project count for the current tenant.
CountProjectsForTenant(ctx context.Context) (int64, error)
// Queued, unclaimed, unexpired tickets in the same bucket as a ticket. Uses
// matchmaking_tickets_queued_idx.
CountQueuedTicketsLike(ctx context.Context, arg CountQueuedTicketsLikeParams) (int64, error)
// Signals this player has sent into this session in the trailing minute; the
// handler rejects once it reaches the per-minute cap.
CountRecentGameSessionSignals(ctx context.Context, arg CountRecentGameSessionSignalsParams) (int64, error)
// key_type is a security boundary (the token-route per-IP limiter exempts
// secret keys), so it is an explicit parameter — never the column default.
CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (CreateAPIKeyRow, error)
CreateAnonymousPlayer(ctx context.Context, arg CreateAnonymousPlayerParams) (CreateAnonymousPlayerRow, error)
// The caller passes the scopes; projectadmin.CreateAPIKey always includes
// matchmaker, a zero-config feature.
CreateControlPanelAPIKey(ctx context.Context, arg CreateControlPanelAPIKeyParams) (CreateControlPanelAPIKeyRow, error)
// Control panel team invitations (operator-side: platform / tenant admins).
CreateControlPanelInvitation(ctx context.Context, arg CreateControlPanelInvitationParams) (CreateControlPanelInvitationRow, error)
CreateControlPanelMembership(ctx context.Context, arg CreateControlPanelMembershipParams) (int64, error)
CreateControlPanelPasswordReset(ctx context.Context, arg CreateControlPanelPasswordResetParams) error
CreateControlPanelSession(ctx context.Context, arg CreateControlPanelSessionParams) (CreateControlPanelSessionRow, error)
CreateControlPanelTrustedDevice(ctx context.Context, arg CreateControlPanelTrustedDeviceParams) error
CreateControlPanelUser(ctx context.Context, arg CreateControlPanelUserParams) (CreateControlPanelUserRow, error)
CreateEmailPlayer(ctx context.Context, arg CreateEmailPlayerParams) (int64, error)
CreateFirstControlPanelAdmin(ctx context.Context, arg CreateFirstControlPanelAdminParams) (CreateFirstControlPanelAdminRow, error)
// Fleet templates: operator-defined recipes that allocations are drawn from.
// Lookup is by project-scoped name (the public identifier used by the SDK,
// matchmaker API, and control panel URLs). Soft delete keeps historical
// allocations referenceable in the UI.
CreateFleet(ctx context.Context, arg CreateFleetParams) (Fleet, error)
CreateGameInvite(ctx context.Context, arg CreateGameInviteParams) (int64, error)
CreateGameSession(ctx context.Context, arg CreateGameSessionParams) (CreateGameSessionRow, error)
CreateLeaderboard(ctx context.Context, arg CreateLeaderboardParams) (int64, error)
// Tenant-scoped: creates a verified player already linked to a global
// account (public-join / invite-accept). The account's email ownership is
// already proven, so email_verified_at is set.
CreateLinkedPlayer(ctx context.Context, arg CreateLinkedPlayerParams) (int64, error)
CreateMCPToken(ctx context.Context, arg CreateMCPTokenParams) (int64, error)
CreatePendingAllocation(ctx context.Context, arg CreatePendingAllocationParams) (CreatePendingAllocationRow, error)
// Used by the player UI signup flow; takes project_id explicitly because
// the player site doesn't have an api_key bearer.
CreatePlayer(ctx context.Context, arg CreatePlayerParams) (CreatePlayerRow, error)
// Global player accounts. Platform-global (no tenant RLS): every query here is
// run through db.Pool.BootstrapQ.
// Creates an unverified account with its first verification code inlined
// (mirrors CreatePlayer). Fails on the UNIQUE email constraint if an
// account already exists.
CreatePlayerAccount(ctx context.Context, arg CreatePlayerAccountParams) (CreatePlayerAccountRow, error)
CreatePlayerAccountPasswordReset(ctx context.Context, arg CreatePlayerAccountPasswordResetParams) error
CreatePlayerAccountSession(ctx context.Context, arg CreatePlayerAccountSessionParams) (int64, error)
CreatePlayerAccountTrustedDevice(ctx context.Context, arg CreatePlayerAccountTrustedDeviceParams) error
// Player invitations.
// project_player_id is set only for admin "link player" invites, which bind the
// proven email onto that existing row on accept; NULL keeps find-or-create-by-email.
CreatePlayerInvitation(ctx context.Context, arg CreatePlayerInvitationParams) (CreatePlayerInvitationRow, error)
CreatePlayerSession(ctx context.Context, arg CreatePlayerSessionParams) (int64, error)
CreateProjectForTenant(ctx context.Context, name string) (CreateProjectForTenantRow, error)
CreateRealtimeTicket(ctx context.Context, arg CreateRealtimeTicketParams) error
CreateRelayNode(ctx context.Context, arg CreateRelayNodeParams) (RelayNode, error)
CreateSession(ctx context.Context, arg CreateSessionParams) (CreateSessionRow, error)
// Submit a tenant change request. The pending-unique index rejects a second
// open request of the same kind/feature (surfaced as a friendly message).
CreateTenantChangeRequest(ctx context.Context, arg CreateTenantChangeRequestParams) (int64, error)
// Tenant-wide player bans. tenant_player_bans has no RLS, so every query
// filters tenant_id explicitly. Enforcement runs in both tenant Pool.Q and
// account BootstrapQ contexts.
CreateTenantPlayerBan(ctx context.Context, arg CreateTenantPlayerBanParams) error
CreateTenantSignupRequest(ctx context.Context, arg CreateTenantSignupRequestParams) (CreateTenantSignupRequestRow, error)
// Used by invite acceptance: creates a new user who is verified by
// definition (they had to click the invite link in their inbox).
CreateVerifiedControlPanelUser(ctx context.Context, arg CreateVerifiedControlPanelUserParams) (CreateVerifiedControlPanelUserRow, error)
// Creates an already-verified account (used by invite acceptance, where the
// magic link delivered to the invited inbox proves email ownership).
CreateVerifiedPlayerAccount(ctx context.Context, arg CreateVerifiedPlayerAccountParams) (pgtype.UUID, error)
// Used when the host ends the session so peer rows don't linger until GC.
DeleteAllGameSessionPeers(ctx context.Context, sessionID string) error
// Invite rows cascade only after all roster and matchmaking references are gone.
DeleteClosedParties(ctx context.Context, retention pgtype.Interval) (int64, error)
DeleteConnectionLimitOverride(ctx context.Context, tenantID int64) (int64, error)
DeleteControlPanelMembership(ctx context.Context, arg DeleteControlPanelMembershipParams) error
// Removes a membership row but refuses to delete the actor's own row. The
// previous approach loaded every member to do this check client-side; this
// predicate folds it into one statement.
DeleteControlPanelMembershipUnlessSelf(ctx context.Context, arg DeleteControlPanelMembershipUnlessSelfParams) (int64, error)
// Backup codes cascade with the credential row.
DeleteControlPanelTOTP(ctx context.Context, controlPanelUserID int64) error
DeleteControlPanelTOTPBackupCodes(ctx context.Context, controlPanelUserID int64) error
DeleteControlPanelTrustedDevicesForUser(ctx context.Context, controlPanelUserID int64) error
DeleteControlPanelUserConnection(ctx context.Context, arg DeleteControlPanelUserConnectionParams) (int64, error)
// Retention sweep (password_reset_gc): rows are inert once expired — every
// lookup filters expires_at — so deleting them a day later is pure hygiene.
DeleteExpiredControlPanelPasswordResets(ctx context.Context) (int64, error)
DeleteExpiredControlPanelTrustedDevices(ctx context.Context) (int64, error)
// Removes invites past their expiry for the current tenant. Called per
// tenant by the GC goroutine.
DeleteExpiredGameInvitesForTenant(ctx context.Context) (int64, error)
// Removes signals past their two-minute expiry for the current tenant. Called
// per tenant by the game-session GC sweep so long-lived sessions don't
// accumulate expired rows (session/tenant deletion already cascades the rest).
DeleteExpiredGameSessionSignalsForTenant(ctx context.Context) (int64, error)
// Removes sessions past their expiry for the current tenant. Called once
// per tenant by the GC goroutine.
DeleteExpiredGameSessionsForTenant(ctx context.Context) (int64, error)
// Drop expired matches that do not need allocation cleanup. Unclaimed fleet
// matches stay until the backend deallocation above succeeds.
DeleteExpiredMatchmakerMatches(ctx context.Context) (int64, error)
// Retention sweep (password_reset_gc): rows are inert once expired — every
// lookup filters expires_at — so deleting them a day later is pure hygiene.
DeleteExpiredPlayerAccountPasswordResets(ctx context.Context) (int64, error)
DeleteExpiredPlayerAccountTrustedDevices(ctx context.Context) (int64, error)
DeleteExpiredRealtimeTickets(ctx context.Context) (int64, error)
// An expired approval can never be accepted, so it must not hold its tenant name
// or its email slot. The person can apply again. The audit log keeps the approval.
DeleteExpiredTenantSignupApprovals(ctx context.Context) (int64, error)
// Delete only after its allocation has been successfully deallocated. The
// guards make retries and a concurrent cleanup safe.
DeleteExpiredUnclaimedMatchmakerMatch(ctx context.Context, id string) (int64, error)
// Symmetric unfriend: caller can be on either side. Never removes a 'blocked'
// edge — a block is cleared only via the directed unblock path
// (DeleteFriendEdgeDirected), so a blockee cannot delete the blocker's block.
DeleteFriendEdgeByAccount(ctx context.Context, arg DeleteFriendEdgeByAccountParams) (int64, error)
// Directed delete (unblock: only remove the edge the caller initiated).
DeleteFriendEdgeDirected(ctx context.Context, arg DeleteFriendEdgeDirectedParams) (int64, error)
// Either sender (cancel) or recipient (decline/dismiss) may delete an invite.
DeleteGameInvite(ctx context.Context, arg DeleteGameInviteParams) (int64, error)
DeleteGameSession(ctx context.Context, id string) error
DeleteGameSessionPeer(ctx context.Context, arg DeleteGameSessionPeerParams) error
DeletePlayerAccountConnection(ctx context.Context, arg DeletePlayerAccountConnectionParams) (int64, error)
DeletePlayerAccountTOTP(ctx context.Context, playerAccountID pgtype.UUID) error
DeletePlayerAccountTOTPBackupCodes(ctx context.Context, playerAccountID pgtype.UUID) error
DeletePlayerAccountTrustedDevicesForAccount(ctx context.Context, playerAccountID pgtype.UUID) error
// from/to player columns carry no foreign keys, and signals in a surviving
// session outlive the player-row cascade. Remove every signal the purged
// players sent or were addressed by, so no player IDs or SDP payloads remain
// after the purge (the 2-minute TTL GC is not guaranteed to have run).
DeletePlayerGameSessionSignals(ctx context.Context, ids []int64) error
// Clear one axis override so the class ladder applies again.
DeleteQuotaOverride(ctx context.Context, arg DeleteQuotaOverrideParams) error
DeleteRateLimitOverride(ctx context.Context, arg DeleteRateLimitOverrideParams) error
DeleteTenantPlayerBan(ctx context.Context, arg DeleteTenantPlayerBanParams) (int64, error)
// GC (River job, leader-elected): drop matched/cancelled/failed tickets
// older than the retention interval. Privileged — runs without a tenant GUC.
// Anchored on when the ticket became terminal (matched_at for matched
// tickets, created_at otherwise) so a matched ticket isn't purged before its
// paired match row's retention window — otherwise a poll would 404 while the
// match is still recoverable.
DeleteTerminalMatchmakerTickets(ctx context.Context, retention pgtype.Interval) (int64, error)
// Keep entries while a retained ticket or current party still references them.
DeleteTerminalMatchmakingEntries(ctx context.Context, retention pgtype.Interval) (int64, error)
// Drop a match whose tickets never committed, once its backend server has been
// released. Same guards as the GC delete above minus the expiry, because this
// runs immediately rather than waiting out the match TTL: until the row is
// gone it still counts against the player's live-allocation cap.
DeleteUnclaimedMatchmakerMatch(ctx context.Context, id string) (int64, error)
DenyTenantChangeRequest(ctx context.Context, arg DenyTenantChangeRequestParams) (int64, error)
DenyTenantSignupRequest(ctx context.Context, arg DenyTenantSignupRequestParams) (int64, error)
// A platform disable supersedes an existing self-disable: it promotes
// disabled_by to 'platform' in place, with no re-enable window. The original
// disabled_at is kept. 0 rows only when already platform-disabled or gone.
DisableTenantByPlatformAdmin(ctx context.Context, id int64) (int64, error)
// Tenant self-disable; 0 rows means already disabled or gone.
DisableTenantBySelf(ctx context.Context, id int64) (int64, error)
// Declarative entitlement apply: switch a tenant-level grant off in place so
// the row survives (audit trail, later re-enable). Runs in tenant RLS context.
DisableTenantFeatureGrant(ctx context.Context, arg DisableTenantFeatureGrantParams) (int64, error)
EnableTenantByPlatformAdmin(ctx context.Context, id int64) (int64, error)
// A tenant admin can only undo a self-disable; 0 rows on a platform disable.
EnableTenantByTenantAdmin(ctx context.Context, id int64) (int64, error)
// TTL enforcement: unclaimed queued tickets past expires_at flip to 'failed'
// with the structured reason 'expired'. Claimed tickets are left alone — the
// claim path settles them.
ExpireMatchmakerTickets(ctx context.Context) (int64, error)
// TTL-expire this player's stale queued ticket ahead of a re-enqueue. An
// expired-but-unswept ticket still occupies the one-active unique index (the
// index predicate can't be time-aware), so without this the player is locked
// out of re-queuing until the periodic sweeper runs. Mirrors
// ExpireMatchmakerTickets but scoped to the one player; claimed tickets are
// left for the claim path to settle.
ExpirePlayerQueuedTicket(ctx context.Context, arg ExpirePlayerQueuedTicketParams) (int64, error)
// Pushes a session's expiry out to the given time when that is later. The
// join handler uses it to promote a short-lived pending matchmade session
// to its full lifetime once a player actually joins.
ExtendGameSessionExpiry(ctx context.Context, arg ExtendGameSessionExpiryParams) error
// Sliding-window extension for member heartbeats: push the expiry out only
// when less than the threshold remains, so steady heartbeats don't rewrite
// the row every few seconds (self-gating, single statement — deliberately
// NOT the greatest-wins ExtendGameSessionExpiry, which writes on every
// call). Never revives an ended or already-expired session.
ExtendGameSessionExpiryOnHeartbeat(ctx context.Context, arg ExtendGameSessionExpiryOnHeartbeatParams) (int64, error)
FindAccountIDByEmail(ctx context.Context, email string) (pgtype.UUID, error)
// Exact display-name match. LIMIT 2 lets the caller detect ambiguity (display
// names are not unique) and refuse rather than friend the wrong person.
FindAccountIDsByDisplayName(ctx context.Context, displayName *string) ([]FindAccountIDsByDisplayNameRow, error)
FindVerifiedAccountIDByEmail(ctx context.Context, email string) (pgtype.UUID, error)
// Bootstrap query used by the tenant middleware to resolve a Bearer token
// to its tenant_id + project_id + tenant tier + key_type + optional realtime
// connection envelope. Resolving them in one authoritative query prevents a
// second per-process cache from admitting against a stale raised or lowered
// envelope. Runs without an app.tenant_id GUC set; the api_keys_bootstrap
// policy in 0010 lets it
// through. Note: this query does NOT filter by tenants table RLS because
// tenants.id = current_setting GUC is unset at bootstrap; if/when we add
// a bootstrap policy on tenants, the JOIN keeps working.
GetAPIKeyByHash(ctx context.Context, keyHash []byte) (GetAPIKeyByHashRow, error)
GetAPIKeyScopes(ctx context.Context, id int64) (GetAPIKeyScopesRow, error)
GetAPIKeyType(ctx context.Context, id int64) (string, error)
// Tenant-level HTTP API override (project_id NULL, kind 'api'). Read by the
// rate-limit middleware; falls back to compiled tier defaults when absent.
GetAPIRateLimitOverride(ctx context.Context, tenantID int64) (GetAPIRateLimitOverrideRow, error)
GetAllocation(ctx context.Context, id int64) (GetAllocationRow, error)
GetAllowedOrigins(ctx context.Context, projectID int64) ([]string, error)
GetAllowedOriginsForUpdate(ctx context.Context, projectID int64) ([]string, error)
// Tenant-level realtime admission envelope. The WebSocket admission path falls
// back to compiled tier defaults when no row exists.
GetConnectionLimitOverride(ctx context.Context, tenantID int64) (GetConnectionLimitOverrideRow, error)
GetControlPanelInvitationByCodeHash(ctx context.Context, codeHash []byte) (GetControlPanelInvitationByCodeHashRow, error)
GetControlPanelInvitationByID(ctx context.Context, id int64) (GetControlPanelInvitationByIDRow, error)
GetControlPanelMembership(ctx context.Context, arg GetControlPanelMembershipParams) (GetControlPanelMembershipRow, error)
// Joined to control_panel_users so the session dies as soon as a platform
// admin sets disabled_at, without needing a separate session-purge step
// on every request path. requireSession maps ErrNoRows to a redirect to
// /login, which is what we want for disabled accounts.
GetControlPanelSessionByRefreshHash(ctx context.Context, refreshHash []byte) (GetControlPanelSessionByRefreshHashRow, error)
GetControlPanelTOTP(ctx context.Context, controlPanelUserID int64) (GetControlPanelTOTPRow, error)
// Keyed by user AND token so a token minted for one account can never
// satisfy another's challenge.
GetControlPanelTrustedDevice(ctx context.Context, arg GetControlPanelTrustedDeviceParams) (int64, error)
// Status-blind variant used ONLY by the invite-accept code path so we
// can distinguish "no row" (truly new email — create user) from "row
// exists but disabled" (refuse with errInviteForDisabledAccount).
// DO NOT use this for authentication.
GetControlPanelUserAnyStatusByEmail(ctx context.Context, email string) (GetControlPanelUserAnyStatusByEmailRow, error)
// Status-blind like GetControlPanelUserAnyStatusByEmail: the caller refuses a
// disabled user with the same answer as an unknown connection.
GetControlPanelUserByConnection(ctx context.Context, arg GetControlPanelUserByConnectionParams) (GetControlPanelUserByConnectionRow, error)
// Disabled accounts (disabled_at IS NOT NULL) are filtered out here so
// /v1/control-panel/login behaves identically to an unknown email — same
// dummy bcrypt + invalid_credentials response.
GetControlPanelUserByEmail(ctx context.Context, email string) (GetControlPanelUserByEmailRow, error)
GetControlPanelUserByID(ctx context.Context, id int64) (GetControlPanelUserByIDRow, error)
GetControlPanelUserVerificationState(ctx context.Context, id int64) (GetControlPanelUserVerificationStateRow, error)
GetFleetByID(ctx context.Context, id int64) (Fleet, error)
// Resolves a project-scoped name to a fleet row. Soft-deleted rows are
// excluded so a retired fleet doesn't collide with a freshly created one
// under the same name.
GetFleetByName(ctx context.Context, arg GetFleetByNameParams) (Fleet, error)
GetFriendEdgeByAccount(ctx context.Context, arg GetFriendEdgeByAccountParams) (GetFriendEdgeByAccountRow, error)
// Scoped by project as well as tenant: the caller's key is project-pinned, so a
// player in project A must not read a session belonging to project B of the same
// tenant (which would leak peers' public IP:port across projects).
GetGameSession(ctx context.Context, arg GetGameSessionParams) (GetGameSessionRow, error)
// Open, unexpired sessions only — an expired session lingering before GC
// must not be resolvable by join code. Returns private + host so the handler
// can withhold a private session from a non-member/non-invitee. Project-scoped
// so a join code can't resolve a session in another project of the same tenant.
GetGameSessionByJoinCode(ctx context.Context, arg GetGameSessionByJoinCodeParams) (GetGameSessionByJoinCodeRow, error)
// Row-locking variant used by the join handler so concurrent joins for the
// same session serialize on the session row and max_players is enforced
// without a TOCTOU race. Project-scoped (see GetGameSession).
GetGameSessionForUpdate(ctx context.Context, arg GetGameSessionForUpdateParams) (GetGameSessionForUpdateRow, error)
// Most-specific-wins: a project-scoped row overrides a tenant-wide row for the
// same kind. Used by the invite throttle.
GetInviteRateLimitOverride(ctx context.Context, arg GetInviteRateLimitOverrideParams) (GetInviteRateLimitOverrideRow, error)
// Leaderboard entries hold ONE row per (leaderboard, player, period). The
// board's score operator is applied at write time by the SubmitScore upsert,
// so every read is a plain ORDER BY score. Scheduled boards bump
// leaderboards.current_period on reset; old entries stay in place under
// their period number.
GetLeaderboard(ctx context.Context, arg GetLeaderboardParams) (GetLeaderboardRow, error)
GetLeaderboardForControlPanel(ctx context.Context, arg GetLeaderboardForControlPanelParams) (GetLeaderboardForControlPanelRow, error)
// The submit-path twin of GetLeaderboard. FOR KEY SHARE conflicts with the
// reset job's FOR UPDATE (ListDueLeaderboardResets), so a submission blocks
// on an in-flight reset and re-reads the advanced period instead of writing
// into the just-archived one. Concurrent submissions do not block each other.
GetLeaderboardForSubmit(ctx context.Context, arg GetLeaderboardForSubmitParams) (GetLeaderboardForSubmitRow, error)
// Locks the board so concurrent writers take revision numbers in order.
GetLeaderboardForUpdate(ctx context.Context, arg GetLeaderboardForUpdateParams) (GetLeaderboardForUpdateRow, error)
// Runs with no tenant set (mcp_tokens_bootstrap and tenants_bootstrap allow
// it). projects has no bootstrap policy, so the project check is a second
// query in the tenant scope.
GetMCPTokenByHash(ctx context.Context, tokenHash []byte) (GetMCPTokenByHashRow, error)
GetMCPTokenCreator(ctx context.Context, arg GetMCPTokenCreatorParams) (int64, error)
GetMatchmakerMatch(ctx context.Context, id string) (MatchmakerMatch, error)
GetMatchmakingTicket(ctx context.Context, arg GetMatchmakingTicketParams) (GetMatchmakingTicketRow, error)
// Diagnostic read by primary key, scoped to one project.
GetMatchmakingTicketForTrace(ctx context.Context, arg GetMatchmakingTicketForTraceParams) (GetMatchmakingTicketForTraceRow, error)
// Single sign-on connections. Both tables are platform-global (no tenant
// RLS): every query here runs through db.Pool.BootstrapQ. The subject always
// comes from a verified provider round trip, never from client input.
GetPlayerAccountByConnection(ctx context.Context, arg GetPlayerAccountByConnectionParams) (GetPlayerAccountByConnectionRow, error)
GetPlayerAccountByEmail(ctx context.Context, email string) (GetPlayerAccountByEmailRow, error)
GetPlayerAccountByID(ctx context.Context, id pgtype.UUID) (GetPlayerAccountByIDRow, error)
// Tenant-scoped: resolve a player (in a project the caller's secret key is
// pinned to) to its linked account id, for the server-side remote-address
// read path. NULL account => unlinked player, no address.
GetPlayerAccountForProjectRead(ctx context.Context, arg GetPlayerAccountForProjectReadParams) (pgtype.UUID, error)
GetPlayerAccountRemoteAddrs(ctx context.Context, id pgtype.UUID) (GetPlayerAccountRemoteAddrsRow, error)
// Session lookup joins the account so the caller can enforce epoch match and
// the disabled gate in one round-trip.
GetPlayerAccountSession(ctx context.Context, refreshHash []byte) (GetPlayerAccountSessionRow, error)
GetPlayerAccountTOTP(ctx context.Context, playerAccountID pgtype.UUID) (GetPlayerAccountTOTPRow, error)
GetPlayerAccountTrustedDevice(ctx context.Context, arg GetPlayerAccountTrustedDeviceParams) (int64, error)
GetPlayerAccountVerificationState(ctx context.Context, id pgtype.UUID) (GetPlayerAccountVerificationStateRow, error)
// Change-password / self-disable state read for the authenticated caller.
GetPlayerAuthCredentials(ctx context.Context, id int64) (GetPlayerAuthCredentialsRow, error)
// Disabled accounts (disabled_at IS NOT NULL) are filtered out here so
// /v1/auth/login behaves identically to an unknown email — same dummy
// bcrypt + invalid_credentials response. Same for players who unlinked
// themselves from the project (unlinked_at): blocked until re-invited.
GetPlayerByEmail(ctx context.Context, arg GetPlayerByEmailParams) (GetPlayerByEmailRow, error)
// Privileged variant of GetPlayerByEmail used by the player UI before
// the tenant context is set; the caller already knows the project_id from
// the URL and looks up tenant + verification state in one shot.
GetPlayerByEmailProject(ctx context.Context, arg GetPlayerByEmailProjectParams) (GetPlayerByEmailProjectRow, error)
GetPlayerByExternalID(ctx context.Context, arg GetPlayerByExternalIDParams) (GetPlayerByExternalIDRow, error)
// Race repair for the idempotent portal request: when the guarded UPDATE
// matched no rows because another surface scheduled the deletion first, this
// reads the timestamp that request stored.
GetPlayerDeleteRequestedByAccount(ctx context.Context, arg GetPlayerDeleteRequestedByAccountParams) (pgtype.Timestamptz, error)
// Tenant-scoped: finds an existing (possibly unlinked) player by project +
// email so a public-join / invite can link it instead of creating a duplicate.
GetPlayerForAccountLink(ctx context.Context, arg GetPlayerForAccountLinkParams) (GetPlayerForAccountLinkRow, error)
// Enriched with the linked global account: remote addresses (project admins
// may read them; publishable keys never) and tenant-ban status. player_accounts
// and tenant_player_bans are global (no RLS), so the LEFT JOINs resolve under
// the tenant Pool.Q used by the control panel.
GetPlayerForProject(ctx context.Context, arg GetPlayerForProjectParams) (GetPlayerForProjectRow, error)
// Lookup a player by ID for the POST /v1/server/player-sessions/verify endpoint
// (gameserver session-token verification). Filters deleted/disabled
// accounts so a forged token claiming a stale id rejects with 401.
// The explicit tenant_id predicate matches the project's RLS-via-GUC
// convention (Pool.Q sets app.tenant_id) and survives a hypothetical
// RLS disable; the JOINs against tenants/projects enforce the
// soft-delete kill-switch — a wound-down project can't continue to
// verify sessions.
GetPlayerForVerify(ctx context.Context, id int64) (GetPlayerForVerifyRow, error)
// Resolves an invite recipient by email within the caller's project.
GetPlayerIDByEmail(ctx context.Context, arg GetPlayerIDByEmailParams) (int64, error)
GetPlayerInvitationByCodeHash(ctx context.Context, codeHash []byte) (GetPlayerInvitationByCodeHashRow, error)
// Tenant-scoped: the global account a player is linked to (NULL if the
// player is anonymous / unlinked).
GetPlayerLinkedAccountID(ctx context.Context, id int64) (pgtype.UUID, error)
// Server-tier gate: does the named player exist in the caller's project, and
// may a game server act for them? The tenants/projects JOINs mirror
// GetPlayerForVerify so a wound-down project can't keep taking writes.
GetPlayerModerationState(ctx context.Context, arg GetPlayerModerationStateParams) (GetPlayerModerationStateRow, error)
// Reset-request/confirm state read, keyed like login. Filters mirror
// GetPlayerByEmail: disabled/unlinked players read as unknown.
GetPlayerPasswordResetState(ctx context.Context, arg GetPlayerPasswordResetStateParams) (GetPlayerPasswordResetStateRow, error)
// Credential lookup for the pre-session delete-cancel endpoint: the request
// revoked every session and login filters disabled players, so cancel
// re-authenticates with email + password against the pending row directly.
GetPlayerPendingDeleteByEmail(ctx context.Context, arg GetPlayerPendingDeleteByEmailParams) (GetPlayerPendingDeleteByEmailRow, error)
GetPlayerSession(ctx context.Context, refreshHash []byte) (GetPlayerSessionRow, error)
// PK lookup used at token issuance to snapshot the current epoch into the JWT.
GetPlayerSessionEpoch(ctx context.Context, id int64) (int32, error)
GetPlayerVerificationState(ctx context.Context, arg GetPlayerVerificationStateParams) (GetPlayerVerificationStateRow, error)
GetPlayerVerificationStateByID(ctx context.Context, id int64) (GetPlayerVerificationStateByIDRow, error)
GetPresence(ctx context.Context, playerID int64) (GetPresenceRow, error)
// display_name lives on the linked global account; NULL for anonymous /
// unlinked players.
GetProfile(ctx context.Context, id int64) (GetProfileRow, error)
// Feeds the PATCH /v1/profile email guard: is the address changing, is it
// already verified, and when did the last code go out (resend cooldown).
GetProfileEmailState(ctx context.Context, id int64) (GetProfileEmailStateRow, error)
// Runtime read for the Steam sign-in endpoint, tenant-scoped via RLS GUC.
GetProjectSteamAuthConfig(ctx context.Context, projectID int64) (GetProjectSteamAuthConfigRow, error)
// Control-panel read: reports whether a key is stored, never its value.
GetProjectSteamAuthConfigForControlPanel(ctx context.Context, arg GetProjectSteamAuthConfigForControlPanelParams) (GetProjectSteamAuthConfigForControlPanelRow, error)
// Project → tenant lookup (privileged; used by the player UI which knows
// the project from the URL but has no tenant context yet).
GetProjectTenant(ctx context.Context, id int64) (GetProjectTenantRow, error)
// Public player lookup. Project-scoped: an id from a sibling project resolves
// to no rows (the handler 404s). Only public fields are selected — never the
// account email.
GetPublicPlayer(ctx context.Context, arg GetPublicPlayerParams) (GetPublicPlayerRow, error)
// Friend-code resolve: same public shape and project scoping as GetPublicPlayer.
// Disabled (including pending-delete) players and a block in either direction
// with the caller look the same as an unknown code.
GetPublicPlayerByFriendCode(ctx context.Context, arg GetPublicPlayerByFriendCodeParams) (GetPublicPlayerByFriendCodeRow, error)
GetPublicSignupEnabled(ctx context.Context) (bool, error)
// The player's current queued ticket in the project, if any. Used to surface
// the active ticket id in the 409 when a second create hits the one-active
// unique index.
GetQueuedTicketForPlayer(ctx context.Context, arg GetQueuedTicketForPlayerParams) (int64, error)
GetRelaySessionUsage(ctx context.Context, month pgtype.Date) (int64, error)
GetRemoteConfig(ctx context.Context, projectID int64) ([]byte, error)
GetRemoteConfigForControlPanel(ctx context.Context, arg GetRemoteConfigForControlPanelParams) ([]byte, error)
// Locks the project row so concurrent writers take revision numbers in order.
GetRemoteConfigForUpdate(ctx context.Context, projectID int64) ([]byte, error)
GetServerSecret(ctx context.Context, name string) ([]byte, error)
// Joined to project_players so refresh fails for disabled / deleted accounts
// even if the refresh token is still otherwise valid. revoked_reason lets the
// refresh handler tell a replayed *rotated* token (theft) from a logged-out one.
GetSessionByRefreshHash(ctx context.Context, arg GetSessionByRefreshHashParams) (GetSessionByRefreshHashRow, error)
GetSettingsRevision(ctx context.Context, arg GetSettingsRevisionParams) ([]byte, error)
GetStorageObject(ctx context.Context, arg GetStorageObjectParams) (GetStorageObjectRow, error)
GetTenantChangeRequestByID(ctx context.Context, id int64) (GetTenantChangeRequestByIDRow, error)
GetTenantCustomTokenPublicKey(ctx context.Context) (string, error)
GetTenantCustomTokenPublicKeyForControlPanel(ctx context.Context, tenantID int64) (string, error)
// Lean per-request probe used by the control panel's tenant-access gate:
// a platform-disabled tenant locks its tenant admins out.
GetTenantDisabledState(ctx context.Context, id int64) (GetTenantDisabledStateRow, error)
GetTenantFacts(ctx context.Context, id int64) (GetTenantFactsRow, error)
// Lock-free snapshot of the current tenant's class, enforcement flag,
// registered-player count, and quota overrides (axis→limit jsonb; NULL when
// none). Read inside an RLS-scoped tx (app.tenant_id set) before a
// quota-gated growth operation. Deliberately NOT FOR UPDATE: the
// authoritative player gate is ReserveTenantPlayerSlot, so this read must
// never serialize concurrent creates on the tenant row.
GetTenantQuotaContext(ctx context.Context) (GetTenantQuotaContextRow, error)
// FOR UPDATE variant for rare growth paths (project create, storage writes)
// whose check-then-apply exactness relies on tenant-row serialization. Never
// use it on the player-create path — that gate is ReserveTenantPlayerSlot,
// and the whole point of the split is that creates don't serialize.
GetTenantQuotaContextLocked(ctx context.Context) (GetTenantQuotaContextLockedRow, error)
// Acceptance lookup: only an approved request with a live code is acceptable.
GetTenantSignupRequestByCodeHash(ctx context.Context, codeHash []byte) (GetTenantSignupRequestByCodeHashRow, error)
GetTenantSignupRequestByID(ctx context.Context, id int64) (GetTenantSignupRequestByIDRow, error)
// Metered storage total for a tenant by id (0 if never written). Read in a
// bootstrap tx by the control-panel settings page for the used/limit display.
GetTenantStorageUsageByID(ctx context.Context, tenantID int64) (int64, error)
// The tenant's billing tier, used to show the correct compiled default on the
// rate-limits page (enforcement keys off the same tier via the API key).
GetTenantTier(ctx context.Context, id int64) (int16, error)
// The point of no return: FK cascades remove sessions, presence, leaderboard
// entries, storage objects, matchmaking tickets, invites, and hosted game
// sessions; audit_log rows survive with actor_user_id set NULL.
HardDeletePlayers(ctx context.Context, ids []int64) (int64, error)
IncrementControlPanelVerificationAttempts(ctx context.Context, id int64) (int32, error)
IncrementPlayerVerificationAttempts(ctx context.Context, id int64) (int32, error)
IncrementPlayerVerificationAttemptsByID(ctx context.Context, id int64) (int32, error)
// Counts one managed-relay credential issuance for the tenant month. The
// allowance check and the increment are one atomic statement: past the
// allowance the conflict-update WHERE fails and no row returns (refuse new
// issuance). A negative allowance means unmetered. Runs in tenant RLS context.
IncrementRelaySessions(ctx context.Context, arg IncrementRelaySessionsParams) (int64, error)
// Append an event for the watch stream. The trim trigger keeps history
// bounded per allocation_id; callers can fire-and-forget.
InsertAllocationEvent(ctx context.Context, arg InsertAllocationEventParams) error
// Bulk-inserts a fresh backup-code set in one round-trip (pgx COPY).
InsertControlPanelTOTPBackupCodes(ctx context.Context, arg []InsertControlPanelTOTPBackupCodesParams) (int64, error)
InsertControlPanelUserConnection(ctx context.Context, arg InsertControlPanelUserConnectionParams) error
InsertGameSessionSignal(ctx context.Context, arg InsertGameSessionSignalParams) (int64, error)
InsertMatchmakerMatch(ctx context.Context, arg InsertMatchmakerMatchParams) error
InsertMatchmakingTicket(ctx context.Context, arg InsertMatchmakingTicketParams) (InsertMatchmakingTicketRow, error)
InsertPlayerAccountConnection(ctx context.Context, arg InsertPlayerAccountConnectionParams) error
// Bulk-inserts a fresh backup-code set in one round-trip (pgx COPY).
InsertPlayerAccountTOTPBackupCodes(ctx context.Context, arg []InsertPlayerAccountTOTPBackupCodesParams) (int64, error)
// ON CONFLICT DO NOTHING makes first-boot generation race-safe: concurrent
// instances all insert, one wins, and everyone reads the winner back.
InsertServerSecret(ctx context.Context, arg InsertServerSecretParams) (int64, error)
InsertSettingsRevision(ctx context.Context, arg InsertSettingsRevisionParams) error
// Burns every outstanding reset link for the user. Run in the same
// transaction as any password change so an older emailed link cannot reset
// the password again afterwards.
InvalidateControlPanelPasswordResets(ctx context.Context, controlPanelUserID int64) error
// Burns every outstanding reset link for the account. Run in the same
// transaction as any password change so an older emailed link cannot reset
// the password again afterwards.
InvalidatePlayerAccountPasswordResets(ctx context.Context, playerAccountID pgtype.UUID) error
IsAccountBannedInTenant(ctx context.Context, arg IsAccountBannedInTenantParams) (int64, error)
// Edge id if EITHER account has blocked the other. Defense-in-depth gate on
// every interaction path (friend request, game invite, presence).
IsBlockedBetweenAccounts(ctx context.Context, arg IsBlockedBetweenAccountsParams) (int64, error)
IsEmailSuppressed(ctx context.Context, email string) (bool, error)
IsGameSessionMember(ctx context.Context, arg IsGameSessionMemberParams) (bool, error)
// Enforcement helper: is the given player's linked account tenant-banned in
// the player's own tenant? Runs in a tenant Pool.Q (project_players RLS-filtered).
// Returns pgx.ErrNoRows when not banned (or the player is unlinked).
IsPlayerBannedByTenant(ctx context.Context, playerID int64) (int64, error)
LatestSettingsRevision(ctx context.Context, arg LatestSettingsRevisionParams) (int64, error)
// Friends view: current-period entries for an explicit player set, in rank
// order. The caller re-ranks 0-based within the returned set.
LeaderboardEntriesForPlayers(ctx context.Context, arg LeaderboardEntriesForPlayersParams) ([]LeaderboardEntriesForPlayersRow, error)
// Any period counts: past-period entries are ranked under the board's
// current sort order too, so history alone locks it.
LeaderboardHasEntries(ctx context.Context, leaderboardID int64) (bool, error)
LeaderboardRangeByRank(ctx context.Context, arg LeaderboardRangeByRankParams) ([]LeaderboardRangeByRankRow, error)
LeaderboardUserRank(ctx context.Context, arg LeaderboardUserRankParams) (int64, error)
// POST /v1/auth/link: attach email + password sign-in to a player that has
// none, minting the verification challenge in the same write. The email IS
// NULL guard makes 0 rows mean "already has credentials"; the per-project
// email unique index rejects an address another player uses.
LinkPlayerEmailCredentials(ctx context.Context, arg LinkPlayerEmailCredentialsParams) (int64, error)
// ListPlayerAccountLinkedProjects is intentionally NOT a sqlc query: it reads
// the SECURITY DEFINER player_account_linked_projects(uuid) table-function,
// which sqlc's analyzer can't resolve column types for. It is called via raw
// tx.Query in internal/players (same approach as project_player_tenant).
// Tenant-scoped (run under Pool.Q with app.tenant_id set): attaches a
// per-project player to a global account. Guarded by RLS on project_players.
// Clears unlinked_at: a re-invite restores an unlinked player's access.
LinkPlayerToAccount(ctx context.Context, arg LinkPlayerToAccountParams) error
ListAPIKeys(ctx context.Context) ([]ListAPIKeysRow, error)
// Every account the caller has an accepted friendship with, either direction.
// Used by views that need the full friend set at once (friends leaderboard).
ListAcceptedFriendAccountIDs(ctx context.Context, me pgtype.UUID) ([]pgtype.UUID, error)
// Bulk-fetch email + display_name for a set of accounts (friend-list enrich).
ListAccountIdentities(ctx context.Context, accountIds []pgtype.UUID) ([]ListAccountIdentitiesRow, error)
ListActiveAllocations(ctx context.Context, arg ListActiveAllocationsParams) ([]ListActiveAllocationsRow, error)
// Runs with no tenant set; see all_project_allowed_origins().
ListAllProjectAllowedOrigins(ctx context.Context) ([]string, error)
// Every override for a tenant — tenant-wide (project_id NULL) and per-project —
// in one query. The rate-limits page groups these in Go rather than issuing one
// ListRateLimitOverridesForProject per project (an N+1 over the project list).
ListAllRateLimitOverridesForTenant(ctx context.Context, tenantID int64) ([]ListAllRateLimitOverridesForTenantRow, error)
// Distinct backends seen across this tenant's recent allocations. Drives
// the backends-health page so operators see which backends actually serve
// traffic, not just the one currently configured.
ListAllocationBackendsForTenant(ctx context.Context) ([]ListAllocationBackendsForTenantRow, error)
ListAllocationEvents(ctx context.Context, arg ListAllocationEventsParams) ([]ListAllocationEventsRow, error)
// Control panel fleet list: optionally include terminal rows (shutdown/failed)
// and paginate. include_terminal=false keeps the page focused on live
// allocations; the UI toggles it via a query param.
ListAllocationsForProject(ctx context.Context, arg ListAllocationsForProjectParams) ([]ListAllocationsForProjectRow, error)
ListControlPanelInvitationsForTenant(ctx context.Context, tenantID *int64) ([]ListControlPanelInvitationsForTenantRow, error)
ListControlPanelMembersForTenant(ctx context.Context, tenantID int64) ([]ListControlPanelMembersForTenantRow, error)
ListControlPanelTenantsForPlatformAdmin(ctx context.Context) ([]ListControlPanelTenantsForPlatformAdminRow, error)
ListControlPanelTenantsForUser(ctx context.Context, controlPanelUserID int64) ([]ListControlPanelTenantsForUserRow, error)
ListControlPanelUserConnections(ctx context.Context, controlPanelUserID int64) ([]ListControlPanelUserConnectionsRow, error)
// Powers the /v1/control-panel/admin/users page. tenant_count is a
// correlated subquery so users with zero memberships still appear.
ListControlPanelUsersForPlatformAdmin(ctx context.Context, arg ListControlPanelUsersForPlatformAdminParams) ([]ListControlPanelUsersForPlatformAdminRow, error)
ListDeletedLeaderboardsForProject(ctx context.Context, projectID int64) ([]ListDeletedLeaderboardsForProjectRow, error)
// Boards whose scheduled reset boundary has passed, locked for the reset
// transaction so two job runs can never double-archive a period. as_of is the
// job's clock — the same instant it computes the next boundary from, so the
// due filter and the new boundary can never disagree.
ListDueLeaderboardResets(ctx context.Context, asOf pgtype.Timestamptz) ([]ListDueLeaderboardResetsRow, error)
// Eligible: known, last probe succeeded, reported active, and probed within
// the freshness window.
ListEligibleRelayNodes(ctx context.Context, maxAgeSeconds float64) ([]RelayNode, error)
// Name, usage, class, quota overrides, and last-notified threshold for every
// quota-enforced tenant. Read cross-tenant by the storage-warn River job
// (bootstrap tx).
ListEnforcedTenantStorage(ctx context.Context) ([]ListEnforcedTenantStorageRow, error)
// GC candidates whose allocation lease elapsed without a poll or realtime
// delivery. Privileged — runs without a tenant GUC.
ListExpiredUnclaimedMatchmakerAllocations(ctx context.Context) ([]ListExpiredUnclaimedMatchmakerAllocationsRow, error)
// Control panel list. Soft-deleted rows are excluded; include_deleted is reserved
// for a future "archive" view but not wired through the UI yet.
ListFleetsForProject(ctx context.Context, projectID int64) ([]Fleet, error)
// Caller-aware. For 'blocked', only rows the caller initiated are returned —
// never rows where the caller is the blockee (which would let a blocked user
// learn who blocked them).
ListFriendsByStatusForAccount(ctx context.Context, arg ListFriendsByStatusForAccountParams) ([]FriendEdge, error)
// Returns active peers (last_seen within 30 s) with each peer's optional
// xuid and display name (from the linked global account, when present).
// RLS on game_session_peer scopes rows to the current tenant.
ListGameSessionPeers(ctx context.Context, sessionID string) ([]ListGameSessionPeersRow, error)
// Recipient-scoped, cursor-ordered, unexpired signals. The to_player_id filter
// plus RLS ensure a player only ever reads signals addressed to them, and the
// id > after_id cursor makes repeat polls return only new signals.
ListGameSessionSignalsForRecipient(ctx context.Context, arg ListGameSessionSignalsForRecipientParams) ([]ListGameSessionSignalsForRecipientRow, error)
ListKnownRelayNodes(ctx context.Context) ([]RelayNode, error)
// Finished periods, newest first, keyset-paginated on the period number.
ListLeaderboardPeriods(ctx context.Context, arg ListLeaderboardPeriodsParams) ([]ListLeaderboardPeriodsRow, error)
ListLeaderboardsForProject(ctx context.Context, projectID int64) ([]ListLeaderboardsForProjectRow, error)
// Unexpired tokens, plus tokens that expired in the last 30 days so a person
// can see why an agent stopped. Older expired tokens leave the list, so they
// cannot push active tokens past the LIMIT.
ListMCPTokensForProject(ctx context.Context, projectID int64) ([]ListMCPTokensForProjectRow, error)
// Control panel matchmaker page: queue depth per (mode, region, game_mode)
// bucket for the current tenant's project, plus oldest queued ticket and
// the min/max count spread so operators can spot stuck buckets at a glance.
ListMatchmakerBucketsForProject(ctx context.Context, projectID int64) ([]ListMatchmakerBucketsForProjectRow, error)
// Target player IDs of open, unexpired invitations, for the "invite pending"
// list badge. Expired-but-unswept invites are excluded so the badge matches
// what the accept flow would actually honor.
ListOpenInvitationTargetsForProject(ctx context.Context, projectID int64) ([]*int64, error)
// Returns unexpired invites for the target user, enriched with the sender's
// email and optional xuid for display.
ListPendingGameInvites(ctx context.Context, toPlayerID int64) ([]ListPendingGameInvitesRow, error)
// Platform-admin review queue: pending requests with tenant name + current
// class. Read cross-tenant (bootstrap tx).
ListPendingTenantChangeRequests(ctx context.Context) ([]ListPendingTenantChangeRequestsRow, error)
ListPendingTenantSignupRequests(ctx context.Context) ([]ListPendingTenantSignupRequestsRow, error)
ListPlatformAdminInvitations(ctx context.Context) ([]ListPlatformAdminInvitationsRow, error)
ListPlatformAdmins(ctx context.Context) ([]ListPlatformAdminsRow, error)
ListPlayerAccountConnections(ctx context.Context, playerAccountID pgtype.UUID) ([]ListPlayerAccountConnectionsRow, error)
ListPlayerInvitationsForProject(ctx context.Context, projectID int64) ([]ListPlayerInvitationsForProjectRow, error)
// Batched lifecycle sweep for live WebSockets: one query per tenant with
// open sockets per sweep interval (O(tenants), not O(sockets)). A player
// missing from the result (deleted) reads as revoked.
ListPlayerSessionEpochs(ctx context.Context, ids []int64) ([]ListPlayerSessionEpochsRow, error)
// One purge batch for the current tenant. FOR UPDATE serializes against a
// racing cancel: the cancel either lands first (the row drops out of the
// result) or blocks until the delete commits and reports "no pending
// deletion". deleted_at is returned so the caller only releases quota slots
// for rows that ever held one.
ListPlayersDueForPurge(ctx context.Context, arg ListPlayersDueForPurgeParams) ([]ListPlayersDueForPurgeRow, error)
// Control-panel-side player management queries. Privileged: the control panel
// runs them as platform/tenant admin via BootstrapQ, so we filter by
// tenant_id explicitly rather than relying on RLS.
ListPlayersForProject(ctx context.Context, arg ListPlayersForProjectParams) ([]ListPlayersForProjectRow, error)
ListPresenceForUsers(ctx context.Context, playerIds []int64) ([]ListPresenceForUsersRow, error)
ListProjectsForTenant(ctx context.Context) ([]ListProjectsForTenantRow, error)
// The public session browser: open, public, unexpired sessions in the
// caller's project that still have room. Player counts come from the peer
// heartbeat window (last_seen within 30 s, matching ListGameSessionPeers), and
// a session with no live peer is a ghost lobby nobody can play in, so it is
// excluded too. Keyset-paginated on the session id.
ListPublicOpenGameSessions(ctx context.Context, arg ListPublicOpenGameSessionsParams) ([]ListPublicOpenGameSessionsRow, error)
// Unknown and out-of-project ids drop out of the result set silently.
ListPublicPlayers(ctx context.Context, arg ListPublicPlayersParams) ([]ListPublicPlayersRow, error)
// Per-axis overrides for one tenant, for the control-panel views and the
// platform-admin editor. Hot paths never call this — they get the same rows
// aggregated into the quota-context snapshot above.
ListQuotaOverridesForTenant(ctx context.Context, tenantID int64) ([]ListQuotaOverridesForTenantRow, error)
// Region is a bucket dimension only for fleet_allocation (the server must
// be placed in a concrete region); non-fleet modes mix regions inside one
// bucket and the worker applies the soft-region grouping rules in Go.
ListReadyMatchmakerBuckets(ctx context.Context) ([]ListReadyMatchmakerBucketsRow, error)
// eligible uses the same rule and clock as ListEligibleRelayNodes, so the
// admin list agrees with what credentials serve.
ListRelayNodes(ctx context.Context, maxAgeSeconds float64) ([]ListRelayNodesRow, error)
ListSettingsRevisions(ctx context.Context, arg ListSettingsRevisionsParams) ([]ListSettingsRevisionsRow, error)
ListStorageObjects(ctx context.Context, arg ListStorageObjectsParams) ([]ListStorageObjectsRow, error)
// Verified emails of a tenant's owner/admin members, for operational notices
// (e.g. storage-quota warnings). Read cross-tenant by background jobs.
ListTenantAdminEmails(ctx context.Context, tenantID int64) ([]string, error)
// The tenant's own requests (any status) for the settings page. Filters by
// explicit tenant_id (the table has no RLS).
ListTenantChangeRequests(ctx context.Context, tenantID int64) ([]ListTenantChangeRequestsRow, error)
// Tenant-level features the tenant already holds, to exclude from the request
// dropdown. Reads feature_grants in tenant RLS context.
ListTenantEnabledFeatures(ctx context.Context) ([]string, error)
// Control panel list for a tenant, enriched with the banned account's email.
ListTenantPlayerBans(ctx context.Context, tenantID int64) ([]ListTenantPlayerBansRow, error)
// Same row lock as LockPlayerAccountSignInMethods.
LockControlPanelUserSignInMethods(ctx context.Context, id int64) (bool, error)
// Set the lockout window on an account that just tipped over
// MaxLifetimeAttempts. The Go side computes the timestamp so the lockout
// duration stays a single source of truth.
LockControlPanelUserVerification(ctx context.Context, arg LockControlPanelUserVerificationParams) error
// Serializes last-admin checks by locking the currently enabled platform
// admin rows before counting them in the surrounding transaction.
LockEnabledPlatformAdmins(ctx context.Context) ([]int64, error)
// Serializes creates that check a per-project limit.
LockLiveProject(ctx context.Context, projectID int64) (int64, error)
// Row lock for the last-sign-in-method rule: two concurrent unlink requests
// serialize here, so they cannot both pass the count and remove the last
// two methods.
LockPlayerAccountSignInMethods(ctx context.Context, id pgtype.UUID) (bool, error)
LockPlayerAccountVerification(ctx context.Context, arg LockPlayerAccountVerificationParams) error
// Transaction-scoped advisory lock serializing the per-player fleet-allocation
// cap. The enqueue check and the worker's match insert are separate
// transactions, so without it a ticket enqueued while an earlier one is still
// allocating counts a stale total and both commit. Released on commit/rollback.
LockPlayerForFleetAllocation(ctx context.Context, playerID int64) error
LockPlayerPasswordReset(ctx context.Context, arg LockPlayerPasswordResetParams) error
LockPlayerVerification(ctx context.Context, arg LockPlayerVerificationParams) error
// Transaction-scoped advisory lock serializing session creation per project
// so the open-session cap can't be raced past. Released on commit/rollback.
LockProjectForGameSessionCreate(ctx context.Context, projectID int64) error
// Serializes a player's concurrent signal sends within the transaction so the
// per-minute count+insert below can't be raced past the cap under READ
// COMMITTED. player_id (project_players.id) is globally unique, so the lock
// key never collides across tenants. Released on commit/rollback.
LockSignalRate(ctx context.Context, fromPlayerID int64) error
// Transaction-scoped advisory lock serializing concurrent writes (put/delete)
// to a single storage object so the read-modify-write of the tenant byte
// counter can't be raced past. Released on commit/rollback.
LockStorageObjectForWrite(ctx context.Context, arg LockStorageObjectForWriteParams) error
// A released row stays 'shutdown'. A 'ready' row can still fail, because the
// commit of MarkAllocationReady can succeed and report an error.
MarkAllocationFailed(ctx context.Context, id int64) error
// 0 rows = the row left 'pending' during the backend call, so the caller must
// free the server that the call created.
MarkAllocationReady(ctx context.Context, arg MarkAllocationReadyParams) (int64, error)
MarkControlPanelInvitationAccepted(ctx context.Context, id int64) (int64, error)
MarkControlPanelUserVerified(ctx context.Context, id int64) error
MarkPlayerAccountVerified(ctx context.Context, id pgtype.UUID) error
MarkPlayerInvitationAccepted(ctx context.Context, id int64) (int64, error)
// A proven verification also restarts the lifetime budget and drops any
// lockout, mirroring CompletePlayerPasswordReset.
MarkPlayerVerified(ctx context.Context, id int64) error
MarkPlayerVerifiedByID(ctx context.Context, id int64) error
// Claims the right to send the single 100% warning email for this month.
MarkRelayUsageWarned100(ctx context.Context, month pgtype.Date) (int64, error)
// Claims the right to send the single 80% warning email for this month
// (0 rows = another request already sent it).
MarkRelayUsageWarned80(ctx context.Context, month pgtype.Date) (int64, error)
// Clears the code hash so the magic link can't be replayed after acceptance.
MarkTenantSignupAccepted(ctx context.Context, arg MarkTenantSignupAcceptedParams) (int64, error)
// Cross-tenant queue-depth + oldest-queued-ticket age, sampled by the
// observability collector for the queue gauges. Privileged: runs over the
// bootstrap role (no tenant GUC), mirroring the sweeper's scan. Region is a
// bucket dimension only for fleet_allocation; blanked for other modes so the
// gauge label set matches the worker's buckets. Deliberately does NOT group by
// game_mode: that column is developer-supplied free text, so labelling the
// Prometheus gauges with it would make the series count unbounded.
MatchmakerQueueStats(ctx context.Context) ([]MatchmakerQueueStatsRow, error)
// Read-only validity probe for the GET form page; ConsumeControlPanelPasswordReset
// is the single-use gate on the actual POST.
PeekControlPanelPasswordReset(ctx context.Context, tokenHash []byte) (int64, error)
// Read-only validity probe for the GET form page; ConsumePlayerAccountPasswordReset
// is the single-use gate on the actual POST.
PeekPlayerAccountPasswordReset(ctx context.Context, tokenHash []byte) (pgtype.UUID, error)
// Privileged (SECURITY DEFINER) lookup used by the player invite-accept
// page. Returns the tenant_id so the caller can SET app.tenant_id and
// continue under normal RLS enforcement.
//
// The per-column casts give sqlc concrete types: it cannot introspect
// SECURITY DEFINER table functions, so it would otherwise fall back to
// interface{} for every column.
PlayerInviteLookup(ctx context.Context, codeHash []byte) (PlayerInviteLookupRow, error)
// Tenant-scoped existence probe used by the link-player accept path to tell a
// vanished/soft-deleted target row (the invite is dead) apart from a genuine
// conflict when BindPlayerLinkedEmail affects 0 rows.
PlayerLinkTargetExists(ctx context.Context, id int64) (bool, error)
ProjectIsLive(ctx context.Context, projectID int64) (bool, error)
PromoteControlPanelUserToPlatformAdmin(ctx context.Context, id int64) error
PruneSettingsRevisions(ctx context.Context, arg PruneSettingsRevisionsParams) error
PruneStaleGameSessionPeers(ctx context.Context, sessionID string) (int64, error)
// Upsert; bumps version. Caller may pass If-Match via expected_version param.
PutStorageObject(ctx context.Context, arg PutStorageObjectParams) (PutStorageObjectRow, error)
// Optimistic concurrency variant — only updates if the row's current
// version matches expected. RETURNING NULL row on mismatch.
PutStorageObjectIfMatch(ctx context.Context, arg PutStorageObjectIfMatchParams) (PutStorageObjectIfMatchRow, error)
RecordControlPanelLoginSuccess(ctx context.Context, id int64) error
// Stores what the probe read; a probe that read nothing clears the lifecycle
// columns. It returns the previous probe result, read under a row lock, so
// concurrent probers each see the result the other wrote and a change is
// logged once. No row when the node was retired since it was listed.
RecordRelayNodeProbe(ctx context.Context, arg RecordRelayNodeProbeParams) (RecordRelayNodeProbeRow, error)
// Single use: the row is deleted as it is read. Runs with no tenant set.
RedeemRealtimeTicket(ctx context.Context, ticketHash []byte) (RedeemRealtimeTicketRow, error)
ReleaseAllocation(ctx context.Context, id int64) error
// Worker-driven release of one failed group: the resolver (allocator,
// session creator) failed. Bump allocation_attempts; flip to 'failed' on
// the Nth attempt, stamping the structured reason. Returns how many tickets
// flipped to 'failed' this call so the caller can meter the
// attempts_exhausted failure counter without re-reading the rows.
ReleaseMatchmakerTickets(ctx context.Context, arg ReleaseMatchmakerTicketsParams) (int64, error)
// Counter mirror of ReserveTenantPlayerSlot for the delete-purge path: the
// caller passes how many non-soft-deleted players it hard-deleted in the same
// transaction (soft-deleted rows never held a slot). GREATEST guards against
// drift from out-of-band writes ever pushing the counter negative.
ReleaseTenantPlayerSlots(ctx context.Context, n int64) error
// Steam linking: swap a generated identity for the platform identity.
// Compare-and-swap on the old value so a concurrent change loses cleanly;
// the per-project external_id unique index rejects an identity another
// player already holds.
ReplacePlayerExternalID(ctx context.Context, arg ReplacePlayerExternalIDParams) (int64, error)
// Friend edges between GLOBAL player_accounts. friend_edges has no tenant_id
// and no RLS, so these run in either a tenant Pool.Q or a BootstrapQ
// transaction. Account ids are UUIDs.
// One current row per directed pair. Re-requests after rejection update in
// place; pending/accepted are idempotent (WHERE filters them, DO UPDATE
// no-ops); blocked is terminal (WHERE omits it).
RequestFriendByAccount(ctx context.Context, arg RequestFriendByAccountParams) (RequestFriendByAccountRow, error)
// Per-project player deletion: account-portal request/cancel plus the purge
// sweep. The portal queries run under BootstrapQ with app.tenant_id set for
// the link's tenant (same pattern as UnlinkPlayerFromAccount); the sweep runs
// per tenant under Pool.Q. The account guard stops one account from deleting
// another account's player.
// Portal-side delete request: disables the player (keeping an earlier
// suspension timestamp intact) and stamps delete_requested_at with the same
// now() so cancel can tell the two apart. 0 rows = not this account's player
// or already pending.
RequestPlayerDeleteByAccount(ctx context.Context, arg RequestPlayerDeleteByAccountParams) (pgtype.Timestamptz, error)
// Admin-side delete request: disables the player (keeping an earlier
// suspension timestamp intact) and stamps delete_requested_at with the same
// now() so cancel can tell the two apart. Marks the request as the admin's,
// so the player cannot cancel it. A pending player request becomes the admin's
// and keeps its time stamp, so the purge time does not move. 0 rows = gone or
// already the admin's.
RequestPlayerDeleteInProject(ctx context.Context, arg RequestPlayerDeleteInProjectParams) (pgtype.Timestamptz, error)
// Self-service delete request: disables the player (keeping an earlier
// suspension timestamp intact) and stamps delete_requested_at with the same
// now() so cancel can tell the two apart. The purge sweep hard-deletes the
// row once the grace window passes. 0 rows = gone or already pending.
RequestPlayerDeleteSelf(ctx context.Context, id int64) (pgtype.Timestamptz, error)
// Atomic check-and-bump, same shape as ReserveControlPanelVerifyAttempt: the
// cap lives in the WHERE so parallel wrong codes cannot overshoot it.
// Returns 0 rows when already at cap (caller treats as locked).
ReserveControlPanelTOTPAttempt(ctx context.Context, arg ReserveControlPanelTOTPAttemptParams) (ReserveControlPanelTOTPAttemptRow, error)
// Atomic check-and-bump used in place of the previous fetch-then-increment
// pattern: two parallel wrong codes used to both pass the cap check before
// either incremented, so the lockout could be overshot. The WHERE clause
// now folds the bound into the same statement that mutates the counter.
// Returns 0 rows when already at cap (caller treats as errVerifyLocked).
ReserveControlPanelVerifyAttempt(ctx context.Context, arg ReserveControlPanelVerifyAttemptParams) (ReserveControlPanelVerifyAttemptRow, error)
ReservePlayerAccountTOTPAttempt(ctx context.Context, arg ReservePlayerAccountTOTPAttemptParams) (ReservePlayerAccountTOTPAttemptRow, error)
// Atomic check-and-bump; returns 0 rows when already at the per-code cap.
ReservePlayerAccountVerifyAttempt(ctx context.Context, arg ReservePlayerAccountVerifyAttemptParams) (ReservePlayerAccountVerifyAttemptRow, error)
// Atomic check-and-bump, the ReservePlayerVerifyAttempt twin for resets.
ReservePlayerPasswordResetAttempt(ctx context.Context, arg ReservePlayerPasswordResetAttemptParams) (ReservePlayerPasswordResetAttemptRow, error)
// Atomic check-and-bump (see ReserveControlPanelVerifyAttempt for the
// TOCTOU explanation). Returns 0 rows when already at cap.
ReservePlayerVerifyAttempt(ctx context.Context, arg ReservePlayerVerifyAttemptParams) (ReservePlayerVerifyAttemptRow, error)
// Authoritative player-quota gate: atomically claims one registered-player
// slot by bumping player_count, refusing at the class cap (0 rows affected).
// Run it as the LAST statement before commit so the tenant-row lock is held
// for a single round trip instead of across the whole create transaction.
// player_limit is quota.Limits.Players; -1 is quota.Unlimited. The
// NOT enforce_quotas arm admits unenforced tenants while still counting
// them, so player_count stays exact for every tenant and flipping
// enforce_quotas on later needs no recompute. Out-of-band player writes
// (bulk seeds, imports) must maintain the counter themselves.
ReserveTenantPlayerSlot(ctx context.Context, playerLimit int64) (int64, error)
ResetControlPanelTOTPAttempts(ctx context.Context, controlPanelUserID int64) error
ResetPlayerAccountTOTPAttempts(ctx context.Context, playerAccountID pgtype.UUID) error
// Accept or reject. Only a pending edge can move, so a block or an unfriend that
// commits first wins: the row lock makes this re-check status, and it returns 0.
ResolvePendingFriendEdge(ctx context.Context, arg ResolvePendingFriendEdgeParams) (int64, error)
// Tenant-scoped: maps a set of accounts back to their player in a specific
// project, for presence sharing and JSON-API user_id mapping.
ResolvePlayersForAccountsInProject(ctx context.Context, arg ResolvePlayersForAccountsInProjectParams) ([]ResolvePlayersForAccountsInProjectRow, error)
// Undo a code reservation only when it is still the code whose delivery
// failed. A concurrent request that installed a newer code must win.
RestoreControlPanelUserVerificationCode(ctx context.Context, arg RestoreControlPanelUserVerificationCodeParams) error
RestoreLeaderboard(ctx context.Context, arg RestoreLeaderboardParams) (int64, error)
// Undo a code reservation only when it is still the code whose delivery
// failed. A concurrent request that installed a newer code must win.
RestorePlayerAccountVerificationCode(ctx context.Context, arg RestorePlayerAccountVerificationCodeParams) error
// Retiring is idempotent and keeps the row. A retired node is never probed
// or advertised again.
RetireRelayNode(ctx context.Context, id int64) (RelayNode, error)
// Un-claim whatever the claim still holds without penalty: tickets that
// didn't fit a group this pass simply go back to waiting.
ReturnMatchmakerClaim(ctx context.Context, claimID pgtype.UUID) (int64, error)
// Penalty-free un-claim of specific still-queued tickets holding this claim:
// the survivors of a short commit go back to waiting without an attempt bump.
// Drifted tickets (cancelled/failed) are no longer 'queued' and are skipped.
ReturnMatchmakerTicketsByID(ctx context.Context, arg ReturnMatchmakerTicketsByIDParams) (int64, error)
RevokeAPIKey(ctx context.Context, id int64) error
// Reuse-detection response: nuke every live session for the player in this
// project. Paired with BumpPlayerSessionEpoch so outstanding access tokens die
// at the epoch gate immediately, not just at TTL.
RevokeActivePlayerSessions(ctx context.Context, arg RevokeActivePlayerSessionsParams) (int64, error)
RevokeAllControlPanelSessionsForUser(ctx context.Context, controlPanelUserID int64) error
RevokeAllPlayerAccountSessions(ctx context.Context, playerAccountID pgtype.UUID) error
// Runs under the RLS-bypassing bootstrap role, so scope to the tenant in SQL
// rather than relying solely on the caller's precheck.
RevokeControlPanelInvitation(ctx context.Context, arg RevokeControlPanelInvitationParams) error
RevokeControlPanelSession(ctx context.Context, id int64) error
RevokeMCPToken(ctx context.Context, arg RevokeMCPTokenParams) (int64, error)
// Bulk-revoke the outgoing invitations a (now-disabled) user created.
// Re-enabling does NOT un-revoke these; the platform admin can re-issue.
RevokeOpenInvitationsByInviter(ctx context.Context, invitedByUserID int64) error
// 2FA enable/disable revokes every session except the one doing the change;
// the RevokeAll variant would log the acting user out mid-flow.
RevokeOtherControlPanelSessionsForUser(ctx context.Context, arg RevokeOtherControlPanelSessionsForUserParams) error
RevokeOtherPlayerAccountSessions(ctx context.Context, arg RevokeOtherPlayerAccountSessionsParams) error
RevokePlayerAccountSession(ctx context.Context, refreshHash []byte) error
RevokePlayerInvitation(ctx context.Context, id int64) error
RevokePlayerSession(ctx context.Context, refreshHash []byte) error
// Rotation path: the token is being superseded by a freshly-issued one, so a
// later replay of this hash is a reuse (theft) signal.
RevokeSession(ctx context.Context, id int64) (int64, error)
// Logout path: a later replay of this hash is a benign stale-client retry, not
// reuse, so it must NOT trip the family kill.
RevokeSessionByRefreshHash(ctx context.Context, refreshHash []byte) (int64, error)
// Link-player resend path: clear any open invite that would collide with the
// fresh one before it is inserted — either a prior invite for the same target
// row, or any open invite (targeted or plain) to the same (project_id, email).
// The open-invite unique index is keyed on (project_id, email) alone, so a
// pre-existing plain invite to the same address must be superseded too or the
// insert 409s.
RevokeSupersededPlayerInvitations(ctx context.Context, arg RevokeSupersededPlayerInvitationsParams) error
// Platform-admin search by email prefix. Bounded LIMIT keeps the scan cheap.
SearchPlayerAccounts(ctx context.Context, arg SearchPlayerAccountsParams) ([]SearchPlayerAccountsRow, error)
SetAPIKeyScopes(ctx context.Context, arg SetAPIKeyScopesParams) error
SetAllocationStatus(ctx context.Context, arg SetAllocationStatusParams) error
SetAllowedOrigins(ctx context.Context, arg SetAllowedOriginsParams) error
// The monotonic guard in the WHERE makes replay detection atomic: 0 rows
// means another request already consumed this timestep.
SetControlPanelTOTPLastUsedStep(ctx context.Context, arg SetControlPanelTOTPLastUsedStepParams) (int64, error)
// Nullable timestamptz so the same query handles disable (now()) and
// enable (NULL).
SetControlPanelUserDisabled(ctx context.Context, arg SetControlPanelUserDisabledParams) error
SetControlPanelUserVerificationCode(ctx context.Context, arg SetControlPanelUserVerificationCodeParams) error
// Platform-level disable. Bumps session_epoch to kill live sessions.
SetPlayerAccountDisabled(ctx context.Context, id pgtype.UUID) error
// Player-set display name (PATCH /v1/profile). NULL clears it.
SetPlayerAccountDisplayName(ctx context.Context, arg SetPlayerAccountDisplayNameParams) error
SetPlayerAccountEnabled(ctx context.Context, id pgtype.UUID) error
// Password change bumps session_epoch so every outstanding account session is
// invalidated on its next request.
SetPlayerAccountPassword(ctx context.Context, arg SetPlayerAccountPasswordParams) error
SetPlayerAccountRemoteAddrs(ctx context.Context, arg SetPlayerAccountRemoteAddrsParams) error
SetPlayerAccountTOTPLastUsedStep(ctx context.Context, arg SetPlayerAccountTOTPLastUsedStepParams) (int64, error)
SetPlayerAccountVerificationCode(ctx context.Context, arg SetPlayerAccountVerificationCodeParams) error
SetPlayerDisabled(ctx context.Context, arg SetPlayerDisabledParams) error
// Project-level disable (NOT tenant-wide — a tenant-wide ban lives in
// tenant_player_bans). Bumps session_epoch so live JWTs are rejected at
// server-verify immediately. A pending delete request owns the disabled
// state: 0 rows on an existing player means "cancel the deletion first".
SetPlayerDisabledInProject(ctx context.Context, arg SetPlayerDisabledInProjectParams) (int64, error)
// Self-service disable: the epoch bump revokes live access tokens through the
// middleware gate. 0 rows = already disabled or gone.
SetPlayerDisabledSelf(ctx context.Context, id int64) (int64, error)
// Regenerate: overwrites unconditionally, invalidating the old code.
// 0 rows = soft-deleted or missing caller.
SetPlayerFriendCode(ctx context.Context, arg SetPlayerFriendCodeParams) (int64, error)
// Lazy first-read initialization: 0 rows means a concurrent reader won the
// race (re-read) or the caller already has a code.
SetPlayerFriendCodeIfAbsent(ctx context.Context, arg SetPlayerFriendCodeIfAbsentParams) (int64, error)
// Mints a fresh reset code: per-code attempts restart, lifetime attempts and
// the lockout survive so re-requesting codes never grants extra guesses.
SetPlayerPasswordResetChallenge(ctx context.Context, arg SetPlayerPasswordResetChallengeParams) error
SetPlayerVerificationCode(ctx context.Context, arg SetPlayerVerificationCodeParams) error
SetPlayerVerificationCodeByID(ctx context.Context, arg SetPlayerVerificationCodeByIDParams) error
SetProjectPublicJoining(ctx context.Context, arg SetProjectPublicJoiningParams) error
SetPublicSignupEnabled(ctx context.Context, arg SetPublicSignupEnabledParams) error
// Flip the per-tenant enforcement flag. Used by provisioning when the operator
// has enabled quota enforcement for new tenants. player_count is maintained
// for unenforced tenants too, so flipping this on later is safe as long as
// players were only ever created through the app's create paths.
SetTenantEnforceQuotas(ctx context.Context, arg SetTenantEnforceQuotasParams) error
SetTenantPublicJoining(ctx context.Context, enabled bool) error
SetTenantStorageNotifiedThreshold(ctx context.Context, arg SetTenantStorageNotifiedThresholdParams) error
// Platform-admin direct tier changes may move in either direction. Capture the
// prior tier under the same row lock so the audit record cannot race another
// administrator's update.
SetTenantTierByID(ctx context.Context, arg SetTenantTierByIDParams) (SetTenantTierByIDRow, error)
// Declarative entitlement apply: converge on an exact class in either
// direction (downgrades rely on the existing grace path). 0 rows = no-op.
// Runs in tenant RLS context.
SetTenantTierExact(ctx context.Context, tier int16) (int64, error)
// Auto-applied on tier-upgrade approval. The direction check and write are one
// atomic operation so a stale request can never lower the current tier.
SetTenantTierIfUpgrade(ctx context.Context, tier int16) (int64, error)
SoftDeleteFleet(ctx context.Context, id int64) error
SoftDeleteLeaderboard(ctx context.Context, arg SoftDeleteLeaderboardParams) (int64, error)
// Soft-deletes and returns the freed byte count (octet_length(value::text)) so
// the caller can decrement the tenant storage counter in the same tx. Returns
// no rows when the object is already absent (delete is idempotent).
SoftDeleteStorageObject(ctx context.Context, arg SoftDeleteStorageObjectParams) (int64, error)
// One-shot inputs for the pre-write storage-quota check: the tenant's current
// metered total, the existing object's size (0 if new), and the incoming
// value's size — all measured as octet_length(value::text) so they match the
// counter maintained by ApplyTenantStorageDelta. Runs in the write tx
// (app.tenant_id set), serialized per object by LockStorageObjectForWrite.
StorageUsageForWrite(ctx context.Context, arg StorageUsageForWriteParams) (StorageUsageForWriteRow, error)
// Operator-aware upsert. 'best' keeps the better score by sort order, 'set'
// replaces, 'incr' adds. clamp_min/clamp_max bound the ACCUMULATED 'incr'
// total (the request-level bounds check only sees the delta, so without this
// a client could stack in-bounds deltas past score_max); callers pass NULL to
// leave the total unclamped. Metadata follows the standing score on 'best'
// (a worse run must not overwrite the record run's metadata) and the latest
// submission otherwise. Zero rows means the attempt cap blocked the write —
// the arbiter matched but the DO UPDATE WHERE refused it.
SubmitScore(ctx context.Context, arg SubmitScoreParams) (int64, error)
// Idempotent: repeated unsubscribes are a no-op.
SuppressEmail(ctx context.Context, email string) error
// Release every claim whose lease has expired. Same accounting as
// ReleaseMatchmakerClaim (bump attempts, fail at the cap). Runs out of a
// detached context so it isn't tied to any request lifetime. Returns the
// number of claims released and, of those, how many flipped to 'failed' at
// the cap so the caller can meter the attempts_exhausted failure counter.
SweepStaleMatchmakerClaims(ctx context.Context, maxAttempts int32) (SweepStaleMatchmakerClaimsRow, error)
// A name is taken if an active tenant has it, or another live (pending/approved)
// signup request claims it. exclude_request_id lets the approve re-check ignore
// the request being approved; pass 0 at submit time.
TenantNameTaken(ctx context.Context, arg TenantNameTakenParams) (bool, error)
// display_name rides along from the entry's linked global account (NULL for
// anonymous players); joining pp/a cannot fan out because pp.id is unique.
TopN(ctx context.Context, arg TopNParams) ([]TopNRow, error)
TouchControlPanelSession(ctx context.Context, arg TouchControlPanelSessionParams) error
TouchControlPanelUserConnection(ctx context.Context, arg TouchControlPanelUserConnectionParams) error
// Returns rows affected (0 when the caller isn't a member of the session)
// so the heartbeat handler can reject non-members instead of leaking the
// roster.
TouchGameSessionPeer(ctx context.Context, arg TouchGameSessionPeerParams) (int64, error)
// At most one write per minute for each token.
TouchMCPTokenLastUsed(ctx context.Context, id int64) error
TouchPlayerAccountConnection(ctx context.Context, arg TouchPlayerAccountConnectionParams) error
// Player-initiated, non-destructive unlink. The row and its game data stay;
// the account link goes inactive and player-credential auth is blocked
// (unlinked_at filters on the auth queries). The epoch bump kills live access
// tokens immediately; the caller also revokes the player's sessions. The
// account guard stops one account from unlinking another account's player.
// A pending deletion blocks the unlink: severing the link would remove the
// portal's only cancellation path while the purge stays scheduled.
UnlinkPlayerFromAccount(ctx context.Context, arg UnlinkPlayerFromAccountParams) (int64, error)
UpdateAPIKeyLabel(ctx context.Context, arg UpdateAPIKeyLabelParams) error
UpdateControlPanelPassword(ctx context.Context, arg UpdateControlPanelPasswordParams) error
UpdateFleet(ctx context.Context, arg UpdateFleetParams) error
UpdateGameSessionState(ctx context.Context, arg UpdateGameSessionStateParams) error
// score_operator and current_period are deliberately absent: the operator is
// fixed at creation and the period only moves via AdvanceLeaderboardPeriod.
UpdateLeaderboard(ctx context.Context, arg UpdateLeaderboardParams) (int64, error)
UpdatePlayerPassword(ctx context.Context, arg UpdatePlayerPasswordParams) error
// Profile updates are deliberately narrow — only fields explicitly
// enumerated server-side may change. PATCHing email re-triggers the
// verify flow (handler clears email_verified_at).
UpdateProfileEmail(ctx context.Context, arg UpdateProfileEmailParams) error
// Self-set secondary identifier. NULL clears it. The unique partial index
// on (project_id, xuid) rejects collisions with a constraint violation.
UpdateProfileXuid(ctx context.Context, arg UpdateProfileXuidParams) error
// A NULL key keeps the stored one, so the settings form can update the app id
// without re-entering the secret (replace-on-write).
UpdateProjectSteamAuthConfig(ctx context.Context, arg UpdateProjectSteamAuthConfigParams) (int64, error)
UpdateRemoteConfig(ctx context.Context, arg UpdateRemoteConfigParams) (int64, error)
UpdateTenantCustomTokenPublicKey(ctx context.Context, arg UpdateTenantCustomTokenPublicKeyParams) (int64, error)
UpsertConnectionLimitOverride(ctx context.Context, arg UpsertConnectionLimitOverrideParams) error
// Starts (or restarts) enrollment. The WHERE guard makes this a no-op for a
// confirmed credential — zero rows means "already enabled", so a stray setup
// POST can never silently replace a live secret.
UpsertControlPanelTOTPPending(ctx context.Context, arg UpsertControlPanelTOTPPendingParams) (int64, error)
// Used for block: create-or-overwrite the directed edge to a terminal status
// regardless of the prior state (blocking a stranger, a pending, or a friend).
UpsertFriendEdgeStatusByAccount(ctx context.Context, arg UpsertFriendEdgeStatusByAccountParams) error
UpsertGameSessionPeer(ctx context.Context, arg UpsertGameSessionPeerParams) error
// Player-account mirrors of control_panel_totp.sql; see the comments there for
// the atomicity rationale on each statement.
UpsertPlayerAccountTOTPPending(ctx context.Context, arg UpsertPlayerAccountTOTPPendingParams) (pgtype.UUID, error)
// Custom-token flow: find existing player with this external_id under
// (tenant, project) or create one. Idempotent across repeated calls.
UpsertPlayerByExternalID(ctx context.Context, arg UpsertPlayerByExternalIDParams) (int64, error)
UpsertPresence(ctx context.Context, arg UpsertPresenceParams) error
// Write one axis override. Platform-admin only (directly or via an approved
// change request); the axis CHECK constraint rejects unknown axes.
UpsertQuotaOverride(ctx context.Context, arg UpsertQuotaOverrideParams) error
UpsertRateLimitOverride(ctx context.Context, arg UpsertRateLimitOverrideParams) error
// Auto-applied on feature-request approval. Tenant-level grant (project_id
// NULL); runs in tenant RLS context.
UpsertTenantFeatureGrant(ctx context.Context, arg UpsertTenantFeatureGrantParams) error
WriteAudit(ctx context.Context, arg WriteAuditParams) error
WritePlatformAudit(ctx context.Context, arg WritePlatformAuditParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AdvanceLeaderboardPeriod ¶
func (*Queries) ApplyTenantStorageDelta ¶
Adjust the current tenant's storage counter by delta (bytes; negative on delete/shrink), clamped at zero. Called in the write tx after a successful object write so the counter stays in lockstep. Runs in tenant context.
func (*Queries) ApproveTenantChangeRequest ¶
func (*Queries) ApproveTenantSignupRequest ¶
func (*Queries) ArchiveLeaderboardPeriod ¶
func (q *Queries) ArchiveLeaderboardPeriod(ctx context.Context, arg ArchiveLeaderboardPeriodParams) error
func (*Queries) AreAccountsFriendsAccepted ¶
func (q *Queries) AreAccountsFriendsAccepted(ctx context.Context, arg AreAccountsFriendsAcceptedParams) (int64, error)
Edge id if an accepted friendship exists in either direction.
func (*Queries) BindPlayerLinkedEmail ¶
func (q *Queries) BindPlayerLinkedEmail(ctx context.Context, arg BindPlayerLinkedEmailParams) (int64, error)
Tenant-scoped: admin "link player" accept binds a proven email + global account onto an existing (external-id) row, marking it verified. Guards, any of which affecting 0 rows makes the caller treat the accept as a conflict:
- the email unique index may reject if another player already owns the address;
- the account guard prevents clobbering a row already linked to a different account;
- the verified-email guard refuses to overwrite an address the player has already verified under a different email — so a link invite accepted after the player self-verifies a different address can't silently replace (and re-mark verified) their real email.
func (*Queries) BumpAccountPlayerEpochsInTenant ¶
func (q *Queries) BumpAccountPlayerEpochsInTenant(ctx context.Context, arg BumpAccountPlayerEpochsInTenantParams) error
Bump every player of an account within a tenant (tenant-ban path), so all their live JWTs are rejected at server-verify immediately.
func (*Queries) BumpControlPanelLoginFailure ¶
func (q *Queries) BumpControlPanelLoginFailure(ctx context.Context, arg BumpControlPanelLoginFailureParams) (BumpControlPanelLoginFailureRow, error)
Atomic increment + conditional lockout. The previous read-then-write pattern was TOCTOU-racy: N parallel failed logins all read the same value and wrote N+1, so 10 simultaneous wrong passwords landed at login_failures=1 and the lockout never fired. UPDATE...RETURNING serialises under the row lock pgx already takes.
func (*Queries) BumpPlayerSessionEpoch ¶
Single player (project disable path).
func (*Queries) CancelMatchmakingTicket ¶
func (q *Queries) CancelMatchmakingTicket(ctx context.Context, arg CancelMatchmakingTicketParams) (int64, error)
Cancelling a claimed-but-not-yet-committed ticket is allowed: the worker's CommitClaim will find zero rows and deallocate the orphan server.
func (*Queries) CancelPlayerDeleteByAccount ¶
func (q *Queries) CancelPlayerDeleteByAccount(ctx context.Context, arg CancelPlayerDeleteByAccountParams) (int64, error)
Clears the pending request; lifts the disable only when the request created it (disabled_at = delete_requested_at), so a pre-existing admin suspension survives the cancel. An admin's request is not the player's to cancel. 0 rows = no pending player request (or already purged).
func (*Queries) CancelPlayerDeleteInProject ¶
func (q *Queries) CancelPlayerDeleteInProject(ctx context.Context, arg CancelPlayerDeleteInProjectParams) (int64, error)
Clears the pending request; lifts the disable only when the request created it (disabled_at = delete_requested_at), so a pre-existing admin suspension survives the cancel. SET expressions read pre-update values, so the CASE sees delete_requested_at before it is cleared.
func (*Queries) CancelPlayerDeleteSelf ¶
Clears the pending request; lifts the disable only when the request created it (disabled_at = delete_requested_at), so a suspension that predates the request survives the cancel. An admin's request is not the player's to cancel. 0 rows = no pending player request (or purged).
func (*Queries) ClaimMatchmakerBucket ¶
func (q *Queries) ClaimMatchmakerBucket(ctx context.Context, arg ClaimMatchmakerBucketParams) ([]ClaimMatchmakerBucketRow, error)
Bound the player count without splitting entries. The oldest entry can exceed a small budget so it is never starved. Their tickets stay 'queued'; only claim_id/claimed_at/claim_expires_at are set, so a subsequent ClaimBucket (different worker) skips them. The caller commits via CommitMatchmakerTickets (success) or ReleaseMatchmakerTickets (failure); a crashed caller's claim is released by the sweeper once claim_expires_at < now(). fleet_id is NULL for non-fleet modes, hence IS NOT DISTINCT FROM.
func (*Queries) ClaimMatchmakerMatch ¶
Poll/realtime delivery claims only live matches. The expiry guard prevents a late poll from reviving an allocation after the GC lease has elapsed.
func (*Queries) ClaimVerifiedPlayerAccount ¶
func (q *Queries) ClaimVerifiedPlayerAccount(ctx context.Context, arg ClaimVerifiedPlayerAccountParams) error
Race-safe half of find-or-create for a proven email (the caller re-reads after this, so a concurrent creator's row is picked up); ON CONFLICT never aborts the surrounding transaction. An unverified row is claimed: whoever created it never proved the email, so the proven owner's password replaces theirs and the row's pending code and display name are cleared. A verified row is left alone.
func (*Queries) ClearControlPanelVerificationCode ¶
func (*Queries) ClearPlayerPasswordResetLock ¶
Runs when a confirm attempt arrives after the lockout expired: the lockout window is over, so the lifetime budget restarts with it.
func (*Queries) ClearPlayerVerificationCode ¶
func (*Queries) ClearPlayerVerificationLock ¶
The ClearPlayerPasswordResetLock twin for email verification.
func (*Queries) ClearProjectSteamAuthConfig ¶
func (*Queries) CommitMatchmakerTickets ¶
func (q *Queries) CommitMatchmakerTickets(ctx context.Context, arg CommitMatchmakerTicketsParams) (int64, error)
Flip the given still-queued tickets holding this claim_id to 'matched' and stamp the match id, address + protocol. Rows that drifted (cancelled, swept) won't match the WHERE and are excluded — the caller compares rows-affected and deallocates the orphan server when 0.
func (*Queries) CompletePlayerPasswordReset ¶
func (q *Queries) CompletePlayerPasswordReset(ctx context.Context, arg CompletePlayerPasswordResetParams) (int64, error)
Sets the new password, clears the challenge, and bumps the session epoch so every outstanding access token (possibly an attacker's) dies immediately. A proven reset also restarts the lifetime budget and drops any lockout: the caller just demonstrated control of the inbox. The code_hash condition pins completion to the exact challenge the caller validated — 0 rows means a concurrent re-request replaced it and the code no longer counts.
func (*Queries) ConfirmControlPanelTOTP ¶
func (q *Queries) ConfirmControlPanelTOTP(ctx context.Context, arg ConfirmControlPanelTOTPParams) (int64, error)
last_used_step records the enrollment code's timestep so the same code cannot be replayed at the first login challenge.
func (*Queries) ConfirmPlayerAccountTOTP ¶
func (*Queries) ConsumeControlPanelPasswordReset ¶
func (q *Queries) ConsumeControlPanelPasswordReset(ctx context.Context, tokenHash []byte) (int64, error)
Atomic single-use consume: 0 rows means unknown, expired, or already used.
func (*Queries) ConsumeControlPanelTOTPBackupCode ¶
func (q *Queries) ConsumeControlPanelTOTPBackupCode(ctx context.Context, arg ConsumeControlPanelTOTPBackupCodeParams) (int64, error)
Single-use enforced by the used_at IS NULL guard in the same statement that marks it used. 0 rows = unknown or already-spent code.
func (*Queries) ConsumePlayerAccountPasswordReset ¶
func (q *Queries) ConsumePlayerAccountPasswordReset(ctx context.Context, tokenHash []byte) (pgtype.UUID, error)
Atomic single-use consume: 0 rows means unknown, expired, or already used.
func (*Queries) ConsumePlayerAccountTOTPBackupCode ¶
func (*Queries) ControlPanelCreateTenant ¶
func (q *Queries) ControlPanelCreateTenant(ctx context.Context, arg ControlPanelCreateTenantParams) (ControlPanelCreateTenantRow, error)
func (*Queries) ControlPanelCreateTenantBare ¶
func (*Queries) CountActiveAPIKeysForProject ¶
func (*Queries) CountActiveGameSessionPeers ¶
func (q *Queries) CountActiveGameSessionPeers(ctx context.Context, arg CountActiveGameSessionPeersParams) (int64, error)
Counts peers seen within the activity window, excluding a given user so a re-joining member doesn't count against the session's capacity.
func (*Queries) CountActiveMCPTokens ¶
func (*Queries) CountActiveSignalMembers ¶
func (q *Queries) CountActiveSignalMembers(ctx context.Context, arg CountActiveSignalMembersParams) (int64, error)
Counts how many of the given players are ACTIVE members (last_seen within 30 s, matching ListGameSessionPeers/CountActiveGameSessionPeers) of an open, unexpired session in this project. The signal handlers pass both endpoints for a send (expecting 2) or just the caller for a poll (expecting 1), so the count defines "both peers are in the same live session" without diverging from the roster the clients themselves see.
func (*Queries) CountAllocationsForProject ¶
func (*Queries) CountControlPanelTOTPBackupCodesRemaining ¶
func (*Queries) CountControlPanelUserConnections ¶
func (*Queries) CountControlPanelUsers ¶
func (*Queries) CountControlPanelUsersForPlatformAdmin ¶
func (*Queries) CountEnabledPlatformAdmins ¶
func (*Queries) CountMatchmakerMatchesByMode ¶
func (q *Queries) CountMatchmakerMatchesByMode(ctx context.Context, projectID int64) ([]CountMatchmakerMatchesByModeRow, error)
Control panel matchmaker page: matches formed per mode within the retention window (rows are GC'd after MatchTTL, so this reads as "recent matches").
func (*Queries) CountOpenGameSessionsForProject ¶
func (q *Queries) CountOpenGameSessionsForProject(ctx context.Context, projectID int64) (int64, error)
Counts non-ended, non-expired sessions for the project. Used in the create handler to enforce a per-project session cap.
func (*Queries) CountPendingGameInviteForSessionPlayer ¶
func (q *Queries) CountPendingGameInviteForSessionPlayer(ctx context.Context, arg CountPendingGameInviteForSessionPlayerParams) (int64, error)
Whether an unexpired invite exists for (session, recipient) in the caller's tenant. Gates joining/resolving a private session by a non-member.
func (*Queries) CountPlayerAccountConnections ¶
func (*Queries) CountPlayerAccountTOTPBackupCodesRemaining ¶
func (*Queries) CountPlayerLiveFleetAllocations ¶
func (q *Queries) CountPlayerLiveFleetAllocations(ctx context.Context, playerID int64) (int64, error)
Unclaimed, unexpired fleet-allocation matches this player still holds. The per-player cap counts these at enqueue time so a player can't loop enqueue -> matched -> abandon to hoard dedicated servers until the 24h GC. Fleet matches carry no host, so the player is found via the roster.
func (*Queries) CountPlayersForProject ¶
func (*Queries) CountProjectsForTenant ¶
Live (non-soft-deleted) project count for the current tenant.
func (*Queries) CountQueuedTicketsLike ¶
func (q *Queries) CountQueuedTicketsLike(ctx context.Context, arg CountQueuedTicketsLikeParams) (int64, error)
Queued, unclaimed, unexpired tickets in the same bucket as a ticket. Uses matchmaking_tickets_queued_idx.
func (*Queries) CountRecentGameSessionSignals ¶
func (q *Queries) CountRecentGameSessionSignals(ctx context.Context, arg CountRecentGameSessionSignalsParams) (int64, error)
Signals this player has sent into this session in the trailing minute; the handler rejects once it reaches the per-minute cap.
func (*Queries) CreateAPIKey ¶
func (q *Queries) CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (CreateAPIKeyRow, error)
key_type is a security boundary (the token-route per-IP limiter exempts secret keys), so it is an explicit parameter — never the column default.
func (*Queries) CreateAnonymousPlayer ¶
func (q *Queries) CreateAnonymousPlayer(ctx context.Context, arg CreateAnonymousPlayerParams) (CreateAnonymousPlayerRow, error)
func (*Queries) CreateControlPanelAPIKey ¶
func (q *Queries) CreateControlPanelAPIKey(ctx context.Context, arg CreateControlPanelAPIKeyParams) (CreateControlPanelAPIKeyRow, error)
The caller passes the scopes; projectadmin.CreateAPIKey always includes matchmaker, a zero-config feature.
func (*Queries) CreateControlPanelInvitation ¶
func (q *Queries) CreateControlPanelInvitation(ctx context.Context, arg CreateControlPanelInvitationParams) (CreateControlPanelInvitationRow, error)
Control panel team invitations (operator-side: platform / tenant admins).
func (*Queries) CreateControlPanelMembership ¶
func (*Queries) CreateControlPanelPasswordReset ¶
func (q *Queries) CreateControlPanelPasswordReset(ctx context.Context, arg CreateControlPanelPasswordResetParams) error
func (*Queries) CreateControlPanelSession ¶
func (q *Queries) CreateControlPanelSession(ctx context.Context, arg CreateControlPanelSessionParams) (CreateControlPanelSessionRow, error)
func (*Queries) CreateControlPanelTrustedDevice ¶
func (q *Queries) CreateControlPanelTrustedDevice(ctx context.Context, arg CreateControlPanelTrustedDeviceParams) error
func (*Queries) CreateControlPanelUser ¶
func (q *Queries) CreateControlPanelUser(ctx context.Context, arg CreateControlPanelUserParams) (CreateControlPanelUserRow, error)
func (*Queries) CreateEmailPlayer ¶
func (*Queries) CreateFirstControlPanelAdmin ¶
func (q *Queries) CreateFirstControlPanelAdmin(ctx context.Context, arg CreateFirstControlPanelAdminParams) (CreateFirstControlPanelAdminRow, error)
func (*Queries) CreateFleet ¶
Fleet templates: operator-defined recipes that allocations are drawn from. Lookup is by project-scoped name (the public identifier used by the SDK, matchmaker API, and control panel URLs). Soft delete keeps historical allocations referenceable in the UI.
func (*Queries) CreateGameInvite ¶
func (*Queries) CreateGameSession ¶
func (q *Queries) CreateGameSession(ctx context.Context, arg CreateGameSessionParams) (CreateGameSessionRow, error)
func (*Queries) CreateLeaderboard ¶
func (*Queries) CreateLinkedPlayer ¶
func (q *Queries) CreateLinkedPlayer(ctx context.Context, arg CreateLinkedPlayerParams) (int64, error)
Tenant-scoped: creates a verified player already linked to a global account (public-join / invite-accept). The account's email ownership is already proven, so email_verified_at is set.
func (*Queries) CreateMCPToken ¶
func (*Queries) CreatePendingAllocation ¶
func (q *Queries) CreatePendingAllocation(ctx context.Context, arg CreatePendingAllocationParams) (CreatePendingAllocationRow, error)
func (*Queries) CreatePlayer ¶
func (q *Queries) CreatePlayer(ctx context.Context, arg CreatePlayerParams) (CreatePlayerRow, error)
Used by the player UI signup flow; takes project_id explicitly because the player site doesn't have an api_key bearer.
func (*Queries) CreatePlayerAccount ¶
func (q *Queries) CreatePlayerAccount(ctx context.Context, arg CreatePlayerAccountParams) (CreatePlayerAccountRow, error)
Global player accounts. Platform-global (no tenant RLS): every query here is run through db.Pool.BootstrapQ. Creates an unverified account with its first verification code inlined (mirrors CreatePlayer). Fails on the UNIQUE email constraint if an account already exists.
func (*Queries) CreatePlayerAccountPasswordReset ¶
func (q *Queries) CreatePlayerAccountPasswordReset(ctx context.Context, arg CreatePlayerAccountPasswordResetParams) error
func (*Queries) CreatePlayerAccountSession ¶
func (*Queries) CreatePlayerAccountTrustedDevice ¶
func (q *Queries) CreatePlayerAccountTrustedDevice(ctx context.Context, arg CreatePlayerAccountTrustedDeviceParams) error
func (*Queries) CreatePlayerInvitation ¶
func (q *Queries) CreatePlayerInvitation(ctx context.Context, arg CreatePlayerInvitationParams) (CreatePlayerInvitationRow, error)
Player invitations. project_player_id is set only for admin "link player" invites, which bind the proven email onto that existing row on accept; NULL keeps find-or-create-by-email.
func (*Queries) CreatePlayerSession ¶
func (*Queries) CreateProjectForTenant ¶
func (*Queries) CreateRealtimeTicket ¶
func (q *Queries) CreateRealtimeTicket(ctx context.Context, arg CreateRealtimeTicketParams) error
func (*Queries) CreateRelayNode ¶
func (*Queries) CreateSession ¶
func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (CreateSessionRow, error)
func (*Queries) CreateTenantChangeRequest ¶
func (q *Queries) CreateTenantChangeRequest(ctx context.Context, arg CreateTenantChangeRequestParams) (int64, error)
Submit a tenant change request. The pending-unique index rejects a second open request of the same kind/feature (surfaced as a friendly message).
func (*Queries) CreateTenantPlayerBan ¶
func (q *Queries) CreateTenantPlayerBan(ctx context.Context, arg CreateTenantPlayerBanParams) error
Tenant-wide player bans. tenant_player_bans has no RLS, so every query filters tenant_id explicitly. Enforcement runs in both tenant Pool.Q and account BootstrapQ contexts.
func (*Queries) CreateTenantSignupRequest ¶
func (q *Queries) CreateTenantSignupRequest(ctx context.Context, arg CreateTenantSignupRequestParams) (CreateTenantSignupRequestRow, error)
func (*Queries) CreateVerifiedControlPanelUser ¶
func (q *Queries) CreateVerifiedControlPanelUser(ctx context.Context, arg CreateVerifiedControlPanelUserParams) (CreateVerifiedControlPanelUserRow, error)
Used by invite acceptance: creates a new user who is verified by definition (they had to click the invite link in their inbox).
func (*Queries) CreateVerifiedPlayerAccount ¶
func (q *Queries) CreateVerifiedPlayerAccount(ctx context.Context, arg CreateVerifiedPlayerAccountParams) (pgtype.UUID, error)
Creates an already-verified account (used by invite acceptance, where the magic link delivered to the invited inbox proves email ownership).
func (*Queries) DeleteAllGameSessionPeers ¶
Used when the host ends the session so peer rows don't linger until GC.
func (*Queries) DeleteClosedParties ¶
func (q *Queries) DeleteClosedParties(ctx context.Context, retention pgtype.Interval) (int64, error)
Invite rows cascade only after all roster and matchmaking references are gone.
func (*Queries) DeleteConnectionLimitOverride ¶
func (*Queries) DeleteControlPanelMembership ¶
func (q *Queries) DeleteControlPanelMembership(ctx context.Context, arg DeleteControlPanelMembershipParams) error
func (*Queries) DeleteControlPanelMembershipUnlessSelf ¶
func (q *Queries) DeleteControlPanelMembershipUnlessSelf(ctx context.Context, arg DeleteControlPanelMembershipUnlessSelfParams) (int64, error)
Removes a membership row but refuses to delete the actor's own row. The previous approach loaded every member to do this check client-side; this predicate folds it into one statement.
func (*Queries) DeleteControlPanelTOTP ¶
Backup codes cascade with the credential row.
func (*Queries) DeleteControlPanelTOTPBackupCodes ¶
func (*Queries) DeleteControlPanelTrustedDevicesForUser ¶
func (*Queries) DeleteControlPanelUserConnection ¶
func (*Queries) DeleteExpiredControlPanelPasswordResets ¶
Retention sweep (password_reset_gc): rows are inert once expired — every lookup filters expires_at — so deleting them a day later is pure hygiene.
func (*Queries) DeleteExpiredControlPanelTrustedDevices ¶
func (*Queries) DeleteExpiredGameInvitesForTenant ¶
Removes invites past their expiry for the current tenant. Called per tenant by the GC goroutine.
func (*Queries) DeleteExpiredGameSessionSignalsForTenant ¶
Removes signals past their two-minute expiry for the current tenant. Called per tenant by the game-session GC sweep so long-lived sessions don't accumulate expired rows (session/tenant deletion already cascades the rest).
func (*Queries) DeleteExpiredGameSessionsForTenant ¶
Removes sessions past their expiry for the current tenant. Called once per tenant by the GC goroutine.
func (*Queries) DeleteExpiredMatchmakerMatches ¶
Drop expired matches that do not need allocation cleanup. Unclaimed fleet matches stay until the backend deallocation above succeeds.
func (*Queries) DeleteExpiredPlayerAccountPasswordResets ¶
Retention sweep (password_reset_gc): rows are inert once expired — every lookup filters expires_at — so deleting them a day later is pure hygiene.
func (*Queries) DeleteExpiredPlayerAccountTrustedDevices ¶
func (*Queries) DeleteExpiredRealtimeTickets ¶
func (*Queries) DeleteExpiredTenantSignupApprovals ¶
An expired approval can never be accepted, so it must not hold its tenant name or its email slot. The person can apply again. The audit log keeps the approval.
func (*Queries) DeleteExpiredUnclaimedMatchmakerMatch ¶
func (q *Queries) DeleteExpiredUnclaimedMatchmakerMatch(ctx context.Context, id string) (int64, error)
Delete only after its allocation has been successfully deallocated. The guards make retries and a concurrent cleanup safe.
func (*Queries) DeleteFriendEdgeByAccount ¶
func (q *Queries) DeleteFriendEdgeByAccount(ctx context.Context, arg DeleteFriendEdgeByAccountParams) (int64, error)
Symmetric unfriend: caller can be on either side. Never removes a 'blocked' edge — a block is cleared only via the directed unblock path (DeleteFriendEdgeDirected), so a blockee cannot delete the blocker's block.
func (*Queries) DeleteFriendEdgeDirected ¶
func (q *Queries) DeleteFriendEdgeDirected(ctx context.Context, arg DeleteFriendEdgeDirectedParams) (int64, error)
Directed delete (unblock: only remove the edge the caller initiated).
func (*Queries) DeleteGameInvite ¶
Either sender (cancel) or recipient (decline/dismiss) may delete an invite.
func (*Queries) DeleteGameSession ¶
func (*Queries) DeleteGameSessionPeer ¶
func (q *Queries) DeleteGameSessionPeer(ctx context.Context, arg DeleteGameSessionPeerParams) error
func (*Queries) DeletePlayerAccountConnection ¶
func (*Queries) DeletePlayerAccountTOTP ¶
func (*Queries) DeletePlayerAccountTOTPBackupCodes ¶
func (*Queries) DeletePlayerAccountTrustedDevicesForAccount ¶
func (*Queries) DeletePlayerGameSessionSignals ¶
from/to player columns carry no foreign keys, and signals in a surviving session outlive the player-row cascade. Remove every signal the purged players sent or were addressed by, so no player IDs or SDP payloads remain after the purge (the 2-minute TTL GC is not guaranteed to have run).
func (*Queries) DeleteQuotaOverride ¶
func (q *Queries) DeleteQuotaOverride(ctx context.Context, arg DeleteQuotaOverrideParams) error
Clear one axis override so the class ladder applies again.
func (*Queries) DeleteRateLimitOverride ¶
func (q *Queries) DeleteRateLimitOverride(ctx context.Context, arg DeleteRateLimitOverrideParams) error
func (*Queries) DeleteTenantPlayerBan ¶
func (*Queries) DeleteTerminalMatchmakerTickets ¶
func (q *Queries) DeleteTerminalMatchmakerTickets(ctx context.Context, retention pgtype.Interval) (int64, error)
GC (River job, leader-elected): drop matched/cancelled/failed tickets older than the retention interval. Privileged — runs without a tenant GUC. Anchored on when the ticket became terminal (matched_at for matched tickets, created_at otherwise) so a matched ticket isn't purged before its paired match row's retention window — otherwise a poll would 404 while the match is still recoverable.
func (*Queries) DeleteTerminalMatchmakingEntries ¶
func (q *Queries) DeleteTerminalMatchmakingEntries(ctx context.Context, retention pgtype.Interval) (int64, error)
Keep entries while a retained ticket or current party still references them.
func (*Queries) DeleteUnclaimedMatchmakerMatch ¶
Drop a match whose tickets never committed, once its backend server has been released. Same guards as the GC delete above minus the expiry, because this runs immediately rather than waiting out the match TTL: until the row is gone it still counts against the player's live-allocation cap.
func (*Queries) DenyTenantChangeRequest ¶
func (*Queries) DenyTenantSignupRequest ¶
func (*Queries) DisableTenantByPlatformAdmin ¶
A platform disable supersedes an existing self-disable: it promotes disabled_by to 'platform' in place, with no re-enable window. The original disabled_at is kept. 0 rows only when already platform-disabled or gone.
func (*Queries) DisableTenantBySelf ¶
Tenant self-disable; 0 rows means already disabled or gone.
func (*Queries) DisableTenantFeatureGrant ¶
func (q *Queries) DisableTenantFeatureGrant(ctx context.Context, arg DisableTenantFeatureGrantParams) (int64, error)
Declarative entitlement apply: switch a tenant-level grant off in place so the row survives (audit trail, later re-enable). Runs in tenant RLS context.
func (*Queries) EnableTenantByPlatformAdmin ¶
func (*Queries) EnableTenantByTenantAdmin ¶
A tenant admin can only undo a self-disable; 0 rows on a platform disable.
func (*Queries) ExpireMatchmakerTickets ¶
TTL enforcement: unclaimed queued tickets past expires_at flip to 'failed' with the structured reason 'expired'. Claimed tickets are left alone — the claim path settles them.
func (*Queries) ExpirePlayerQueuedTicket ¶
func (q *Queries) ExpirePlayerQueuedTicket(ctx context.Context, arg ExpirePlayerQueuedTicketParams) (int64, error)
TTL-expire this player's stale queued ticket ahead of a re-enqueue. An expired-but-unswept ticket still occupies the one-active unique index (the index predicate can't be time-aware), so without this the player is locked out of re-queuing until the periodic sweeper runs. Mirrors ExpireMatchmakerTickets but scoped to the one player; claimed tickets are left for the claim path to settle.
func (*Queries) ExtendGameSessionExpiry ¶
func (q *Queries) ExtendGameSessionExpiry(ctx context.Context, arg ExtendGameSessionExpiryParams) error
Pushes a session's expiry out to the given time when that is later. The join handler uses it to promote a short-lived pending matchmade session to its full lifetime once a player actually joins.
func (*Queries) ExtendGameSessionExpiryOnHeartbeat ¶
func (q *Queries) ExtendGameSessionExpiryOnHeartbeat(ctx context.Context, arg ExtendGameSessionExpiryOnHeartbeatParams) (int64, error)
Sliding-window extension for member heartbeats: push the expiry out only when less than the threshold remains, so steady heartbeats don't rewrite the row every few seconds (self-gating, single statement — deliberately NOT the greatest-wins ExtendGameSessionExpiry, which writes on every call). Never revives an ended or already-expired session.
func (*Queries) FindAccountIDByEmail ¶
func (*Queries) FindAccountIDsByDisplayName ¶
func (q *Queries) FindAccountIDsByDisplayName(ctx context.Context, displayName *string) ([]FindAccountIDsByDisplayNameRow, error)
Exact display-name match. LIMIT 2 lets the caller detect ambiguity (display names are not unique) and refuse rather than friend the wrong person.
func (*Queries) FindVerifiedAccountIDByEmail ¶
func (*Queries) GetAPIKeyByHash ¶
Bootstrap query used by the tenant middleware to resolve a Bearer token to its tenant_id + project_id + tenant tier + key_type + optional realtime connection envelope. Resolving them in one authoritative query prevents a second per-process cache from admitting against a stale raised or lowered envelope. Runs without an app.tenant_id GUC set; the api_keys_bootstrap policy in 0010 lets it through. Note: this query does NOT filter by tenants table RLS because tenants.id = current_setting GUC is unset at bootstrap; if/when we add a bootstrap policy on tenants, the JOIN keeps working.
func (*Queries) GetAPIKeyScopes ¶
func (*Queries) GetAPIKeyType ¶
func (*Queries) GetAPIRateLimitOverride ¶
func (q *Queries) GetAPIRateLimitOverride(ctx context.Context, tenantID int64) (GetAPIRateLimitOverrideRow, error)
Tenant-level HTTP API override (project_id NULL, kind 'api'). Read by the rate-limit middleware; falls back to compiled tier defaults when absent.
func (*Queries) GetAllocation ¶
func (*Queries) GetAllowedOrigins ¶
func (*Queries) GetAllowedOriginsForUpdate ¶
func (*Queries) GetConnectionLimitOverride ¶
func (q *Queries) GetConnectionLimitOverride(ctx context.Context, tenantID int64) (GetConnectionLimitOverrideRow, error)
Tenant-level realtime admission envelope. The WebSocket admission path falls back to compiled tier defaults when no row exists.
func (*Queries) GetControlPanelInvitationByCodeHash ¶
func (*Queries) GetControlPanelInvitationByID ¶
func (*Queries) GetControlPanelMembership ¶
func (q *Queries) GetControlPanelMembership(ctx context.Context, arg GetControlPanelMembershipParams) (GetControlPanelMembershipRow, error)
func (*Queries) GetControlPanelSessionByRefreshHash ¶
func (q *Queries) GetControlPanelSessionByRefreshHash(ctx context.Context, refreshHash []byte) (GetControlPanelSessionByRefreshHashRow, error)
Joined to control_panel_users so the session dies as soon as a platform admin sets disabled_at, without needing a separate session-purge step on every request path. requireSession maps ErrNoRows to a redirect to /login, which is what we want for disabled accounts.
func (*Queries) GetControlPanelTOTP ¶
func (*Queries) GetControlPanelTrustedDevice ¶
func (q *Queries) GetControlPanelTrustedDevice(ctx context.Context, arg GetControlPanelTrustedDeviceParams) (int64, error)
Keyed by user AND token so a token minted for one account can never satisfy another's challenge.
func (*Queries) GetControlPanelUserAnyStatusByEmail ¶
func (q *Queries) GetControlPanelUserAnyStatusByEmail(ctx context.Context, email string) (GetControlPanelUserAnyStatusByEmailRow, error)
Status-blind variant used ONLY by the invite-accept code path so we can distinguish "no row" (truly new email — create user) from "row exists but disabled" (refuse with errInviteForDisabledAccount). DO NOT use this for authentication.
func (*Queries) GetControlPanelUserByConnection ¶
func (q *Queries) GetControlPanelUserByConnection(ctx context.Context, arg GetControlPanelUserByConnectionParams) (GetControlPanelUserByConnectionRow, error)
Status-blind like GetControlPanelUserAnyStatusByEmail: the caller refuses a disabled user with the same answer as an unknown connection.
func (*Queries) GetControlPanelUserByEmail ¶
func (q *Queries) GetControlPanelUserByEmail(ctx context.Context, email string) (GetControlPanelUserByEmailRow, error)
Disabled accounts (disabled_at IS NOT NULL) are filtered out here so /v1/control-panel/login behaves identically to an unknown email — same dummy bcrypt + invalid_credentials response.
func (*Queries) GetControlPanelUserByID ¶
func (*Queries) GetControlPanelUserVerificationState ¶
func (*Queries) GetFleetByID ¶
func (*Queries) GetFleetByName ¶
Resolves a project-scoped name to a fleet row. Soft-deleted rows are excluded so a retired fleet doesn't collide with a freshly created one under the same name.
func (*Queries) GetFriendEdgeByAccount ¶
func (q *Queries) GetFriendEdgeByAccount(ctx context.Context, arg GetFriendEdgeByAccountParams) (GetFriendEdgeByAccountRow, error)
func (*Queries) GetGameSession ¶
func (q *Queries) GetGameSession(ctx context.Context, arg GetGameSessionParams) (GetGameSessionRow, error)
Scoped by project as well as tenant: the caller's key is project-pinned, so a player in project A must not read a session belonging to project B of the same tenant (which would leak peers' public IP:port across projects).
func (*Queries) GetGameSessionByJoinCode ¶
func (q *Queries) GetGameSessionByJoinCode(ctx context.Context, arg GetGameSessionByJoinCodeParams) (GetGameSessionByJoinCodeRow, error)
Open, unexpired sessions only — an expired session lingering before GC must not be resolvable by join code. Returns private + host so the handler can withhold a private session from a non-member/non-invitee. Project-scoped so a join code can't resolve a session in another project of the same tenant.
func (*Queries) GetGameSessionForUpdate ¶
func (q *Queries) GetGameSessionForUpdate(ctx context.Context, arg GetGameSessionForUpdateParams) (GetGameSessionForUpdateRow, error)
Row-locking variant used by the join handler so concurrent joins for the same session serialize on the session row and max_players is enforced without a TOCTOU race. Project-scoped (see GetGameSession).
func (*Queries) GetInviteRateLimitOverride ¶
func (q *Queries) GetInviteRateLimitOverride(ctx context.Context, arg GetInviteRateLimitOverrideParams) (GetInviteRateLimitOverrideRow, error)
Most-specific-wins: a project-scoped row overrides a tenant-wide row for the same kind. Used by the invite throttle.
func (*Queries) GetLeaderboard ¶
func (q *Queries) GetLeaderboard(ctx context.Context, arg GetLeaderboardParams) (GetLeaderboardRow, error)
Leaderboard entries hold ONE row per (leaderboard, player, period). The board's score operator is applied at write time by the SubmitScore upsert, so every read is a plain ORDER BY score. Scheduled boards bump leaderboards.current_period on reset; old entries stay in place under their period number.
func (*Queries) GetLeaderboardForControlPanel ¶
func (q *Queries) GetLeaderboardForControlPanel(ctx context.Context, arg GetLeaderboardForControlPanelParams) (GetLeaderboardForControlPanelRow, error)
func (*Queries) GetLeaderboardForSubmit ¶
func (q *Queries) GetLeaderboardForSubmit(ctx context.Context, arg GetLeaderboardForSubmitParams) (GetLeaderboardForSubmitRow, error)
The submit-path twin of GetLeaderboard. FOR KEY SHARE conflicts with the reset job's FOR UPDATE (ListDueLeaderboardResets), so a submission blocks on an in-flight reset and re-reads the advanced period instead of writing into the just-archived one. Concurrent submissions do not block each other.
func (*Queries) GetLeaderboardForUpdate ¶
func (q *Queries) GetLeaderboardForUpdate(ctx context.Context, arg GetLeaderboardForUpdateParams) (GetLeaderboardForUpdateRow, error)
Locks the board so concurrent writers take revision numbers in order.
func (*Queries) GetMCPTokenByHash ¶
func (q *Queries) GetMCPTokenByHash(ctx context.Context, tokenHash []byte) (GetMCPTokenByHashRow, error)
Runs with no tenant set (mcp_tokens_bootstrap and tenants_bootstrap allow it). projects has no bootstrap policy, so the project check is a second query in the tenant scope.
func (*Queries) GetMCPTokenCreator ¶
func (*Queries) GetMatchmakerMatch ¶
func (*Queries) GetMatchmakingTicket ¶
func (q *Queries) GetMatchmakingTicket(ctx context.Context, arg GetMatchmakingTicketParams) (GetMatchmakingTicketRow, error)
func (*Queries) GetMatchmakingTicketForTrace ¶
func (q *Queries) GetMatchmakingTicketForTrace(ctx context.Context, arg GetMatchmakingTicketForTraceParams) (GetMatchmakingTicketForTraceRow, error)
Diagnostic read by primary key, scoped to one project.
func (*Queries) GetPlayerAccountByConnection ¶
func (q *Queries) GetPlayerAccountByConnection(ctx context.Context, arg GetPlayerAccountByConnectionParams) (GetPlayerAccountByConnectionRow, error)
Single sign-on connections. Both tables are platform-global (no tenant RLS): every query here runs through db.Pool.BootstrapQ. The subject always comes from a verified provider round trip, never from client input.
func (*Queries) GetPlayerAccountByEmail ¶
func (*Queries) GetPlayerAccountByID ¶
func (*Queries) GetPlayerAccountForProjectRead ¶
func (q *Queries) GetPlayerAccountForProjectRead(ctx context.Context, arg GetPlayerAccountForProjectReadParams) (pgtype.UUID, error)
Tenant-scoped: resolve a player (in a project the caller's secret key is pinned to) to its linked account id, for the server-side remote-address read path. NULL account => unlinked player, no address.
func (*Queries) GetPlayerAccountRemoteAddrs ¶
func (*Queries) GetPlayerAccountSession ¶
func (q *Queries) GetPlayerAccountSession(ctx context.Context, refreshHash []byte) (GetPlayerAccountSessionRow, error)
Session lookup joins the account so the caller can enforce epoch match and the disabled gate in one round-trip.
func (*Queries) GetPlayerAccountTOTP ¶
func (*Queries) GetPlayerAccountTrustedDevice ¶
func (*Queries) GetPlayerAccountVerificationState ¶
func (*Queries) GetPlayerAuthCredentials ¶
func (q *Queries) GetPlayerAuthCredentials(ctx context.Context, id int64) (GetPlayerAuthCredentialsRow, error)
Change-password / self-disable state read for the authenticated caller.
func (*Queries) GetPlayerByEmail ¶
func (q *Queries) GetPlayerByEmail(ctx context.Context, arg GetPlayerByEmailParams) (GetPlayerByEmailRow, error)
Disabled accounts (disabled_at IS NOT NULL) are filtered out here so /v1/auth/login behaves identically to an unknown email — same dummy bcrypt + invalid_credentials response. Same for players who unlinked themselves from the project (unlinked_at): blocked until re-invited.
func (*Queries) GetPlayerByEmailProject ¶
func (q *Queries) GetPlayerByEmailProject(ctx context.Context, arg GetPlayerByEmailProjectParams) (GetPlayerByEmailProjectRow, error)
Privileged variant of GetPlayerByEmail used by the player UI before the tenant context is set; the caller already knows the project_id from the URL and looks up tenant + verification state in one shot.
func (*Queries) GetPlayerByExternalID ¶
func (q *Queries) GetPlayerByExternalID(ctx context.Context, arg GetPlayerByExternalIDParams) (GetPlayerByExternalIDRow, error)
func (*Queries) GetPlayerDeleteRequestedByAccount ¶
func (q *Queries) GetPlayerDeleteRequestedByAccount(ctx context.Context, arg GetPlayerDeleteRequestedByAccountParams) (pgtype.Timestamptz, error)
Race repair for the idempotent portal request: when the guarded UPDATE matched no rows because another surface scheduled the deletion first, this reads the timestamp that request stored.
func (*Queries) GetPlayerForAccountLink ¶
func (q *Queries) GetPlayerForAccountLink(ctx context.Context, arg GetPlayerForAccountLinkParams) (GetPlayerForAccountLinkRow, error)
Tenant-scoped: finds an existing (possibly unlinked) player by project + email so a public-join / invite can link it instead of creating a duplicate.
func (*Queries) GetPlayerForProject ¶
func (q *Queries) GetPlayerForProject(ctx context.Context, arg GetPlayerForProjectParams) (GetPlayerForProjectRow, error)
Enriched with the linked global account: remote addresses (project admins may read them; publishable keys never) and tenant-ban status. player_accounts and tenant_player_bans are global (no RLS), so the LEFT JOINs resolve under the tenant Pool.Q used by the control panel.
func (*Queries) GetPlayerForVerify ¶
Lookup a player by ID for the POST /v1/server/player-sessions/verify endpoint (gameserver session-token verification). Filters deleted/disabled accounts so a forged token claiming a stale id rejects with 401. The explicit tenant_id predicate matches the project's RLS-via-GUC convention (Pool.Q sets app.tenant_id) and survives a hypothetical RLS disable; the JOINs against tenants/projects enforce the soft-delete kill-switch — a wound-down project can't continue to verify sessions.
func (*Queries) GetPlayerIDByEmail ¶
func (q *Queries) GetPlayerIDByEmail(ctx context.Context, arg GetPlayerIDByEmailParams) (int64, error)
Resolves an invite recipient by email within the caller's project.
func (*Queries) GetPlayerInvitationByCodeHash ¶
func (*Queries) GetPlayerLinkedAccountID ¶
Tenant-scoped: the global account a player is linked to (NULL if the player is anonymous / unlinked).
func (*Queries) GetPlayerModerationState ¶
func (q *Queries) GetPlayerModerationState(ctx context.Context, arg GetPlayerModerationStateParams) (GetPlayerModerationStateRow, error)
Server-tier gate: does the named player exist in the caller's project, and may a game server act for them? The tenants/projects JOINs mirror GetPlayerForVerify so a wound-down project can't keep taking writes.
func (*Queries) GetPlayerPasswordResetState ¶
func (q *Queries) GetPlayerPasswordResetState(ctx context.Context, arg GetPlayerPasswordResetStateParams) (GetPlayerPasswordResetStateRow, error)
Reset-request/confirm state read, keyed like login. Filters mirror GetPlayerByEmail: disabled/unlinked players read as unknown.
func (*Queries) GetPlayerPendingDeleteByEmail ¶
func (q *Queries) GetPlayerPendingDeleteByEmail(ctx context.Context, arg GetPlayerPendingDeleteByEmailParams) (GetPlayerPendingDeleteByEmailRow, error)
Credential lookup for the pre-session delete-cancel endpoint: the request revoked every session and login filters disabled players, so cancel re-authenticates with email + password against the pending row directly.
func (*Queries) GetPlayerSession ¶
func (*Queries) GetPlayerSessionEpoch ¶
PK lookup used at token issuance to snapshot the current epoch into the JWT.
func (*Queries) GetPlayerVerificationState ¶
func (q *Queries) GetPlayerVerificationState(ctx context.Context, arg GetPlayerVerificationStateParams) (GetPlayerVerificationStateRow, error)
func (*Queries) GetPlayerVerificationStateByID ¶
func (*Queries) GetPresence ¶
func (*Queries) GetProfile ¶
display_name lives on the linked global account; NULL for anonymous / unlinked players.
func (*Queries) GetProfileEmailState ¶
func (q *Queries) GetProfileEmailState(ctx context.Context, id int64) (GetProfileEmailStateRow, error)
Feeds the PATCH /v1/profile email guard: is the address changing, is it already verified, and when did the last code go out (resend cooldown).
func (*Queries) GetProjectSteamAuthConfig ¶
func (q *Queries) GetProjectSteamAuthConfig(ctx context.Context, projectID int64) (GetProjectSteamAuthConfigRow, error)
Runtime read for the Steam sign-in endpoint, tenant-scoped via RLS GUC.
func (*Queries) GetProjectSteamAuthConfigForControlPanel ¶
func (q *Queries) GetProjectSteamAuthConfigForControlPanel(ctx context.Context, arg GetProjectSteamAuthConfigForControlPanelParams) (GetProjectSteamAuthConfigForControlPanelRow, error)
Control-panel read: reports whether a key is stored, never its value.
func (*Queries) GetProjectTenant ¶
Project → tenant lookup (privileged; used by the player UI which knows the project from the URL but has no tenant context yet).
func (*Queries) GetPublicPlayer ¶
func (q *Queries) GetPublicPlayer(ctx context.Context, arg GetPublicPlayerParams) (GetPublicPlayerRow, error)
Public player lookup. Project-scoped: an id from a sibling project resolves to no rows (the handler 404s). Only public fields are selected — never the account email.
func (*Queries) GetPublicPlayerByFriendCode ¶
func (q *Queries) GetPublicPlayerByFriendCode(ctx context.Context, arg GetPublicPlayerByFriendCodeParams) (GetPublicPlayerByFriendCodeRow, error)
Friend-code resolve: same public shape and project scoping as GetPublicPlayer. Disabled (including pending-delete) players and a block in either direction with the caller look the same as an unknown code.
func (*Queries) GetPublicSignupEnabled ¶
func (*Queries) GetQueuedTicketForPlayer ¶
func (q *Queries) GetQueuedTicketForPlayer(ctx context.Context, arg GetQueuedTicketForPlayerParams) (int64, error)
The player's current queued ticket in the project, if any. Used to surface the active ticket id in the 409 when a second create hits the one-active unique index.
func (*Queries) GetRelaySessionUsage ¶
func (*Queries) GetRemoteConfig ¶
func (*Queries) GetRemoteConfigForControlPanel ¶
func (*Queries) GetRemoteConfigForUpdate ¶
Locks the project row so concurrent writers take revision numbers in order.
func (*Queries) GetServerSecret ¶
func (*Queries) GetSessionByRefreshHash ¶
func (q *Queries) GetSessionByRefreshHash(ctx context.Context, arg GetSessionByRefreshHashParams) (GetSessionByRefreshHashRow, error)
Joined to project_players so refresh fails for disabled / deleted accounts even if the refresh token is still otherwise valid. revoked_reason lets the refresh handler tell a replayed *rotated* token (theft) from a logged-out one.
func (*Queries) GetSettingsRevision ¶
func (*Queries) GetStorageObject ¶
func (q *Queries) GetStorageObject(ctx context.Context, arg GetStorageObjectParams) (GetStorageObjectRow, error)
func (*Queries) GetTenantChangeRequestByID ¶
func (*Queries) GetTenantCustomTokenPublicKey ¶
func (*Queries) GetTenantCustomTokenPublicKeyForControlPanel ¶
func (*Queries) GetTenantDisabledState ¶
func (q *Queries) GetTenantDisabledState(ctx context.Context, id int64) (GetTenantDisabledStateRow, error)
Lean per-request probe used by the control panel's tenant-access gate: a platform-disabled tenant locks its tenant admins out.
func (*Queries) GetTenantFacts ¶
func (*Queries) GetTenantQuotaContext ¶
func (q *Queries) GetTenantQuotaContext(ctx context.Context) (GetTenantQuotaContextRow, error)
Lock-free snapshot of the current tenant's class, enforcement flag, registered-player count, and quota overrides (axis→limit jsonb; NULL when none). Read inside an RLS-scoped tx (app.tenant_id set) before a quota-gated growth operation. Deliberately NOT FOR UPDATE: the authoritative player gate is ReserveTenantPlayerSlot, so this read must never serialize concurrent creates on the tenant row.
func (*Queries) GetTenantQuotaContextLocked ¶
func (q *Queries) GetTenantQuotaContextLocked(ctx context.Context) (GetTenantQuotaContextLockedRow, error)
FOR UPDATE variant for rare growth paths (project create, storage writes) whose check-then-apply exactness relies on tenant-row serialization. Never use it on the player-create path — that gate is ReserveTenantPlayerSlot, and the whole point of the split is that creates don't serialize.
func (*Queries) GetTenantSignupRequestByCodeHash ¶
func (q *Queries) GetTenantSignupRequestByCodeHash(ctx context.Context, codeHash []byte) (GetTenantSignupRequestByCodeHashRow, error)
Acceptance lookup: only an approved request with a live code is acceptable.
func (*Queries) GetTenantSignupRequestByID ¶
func (*Queries) GetTenantStorageUsageByID ¶
Metered storage total for a tenant by id (0 if never written). Read in a bootstrap tx by the control-panel settings page for the used/limit display.
func (*Queries) GetTenantTier ¶
The tenant's billing tier, used to show the correct compiled default on the rate-limits page (enforcement keys off the same tier via the API key).
func (*Queries) HardDeletePlayers ¶
The point of no return: FK cascades remove sessions, presence, leaderboard entries, storage objects, matchmaking tickets, invites, and hosted game sessions; audit_log rows survive with actor_user_id set NULL.
func (*Queries) IncrementControlPanelVerificationAttempts ¶
func (*Queries) IncrementPlayerVerificationAttempts ¶
func (*Queries) IncrementPlayerVerificationAttemptsByID ¶
func (*Queries) IncrementRelaySessions ¶
func (q *Queries) IncrementRelaySessions(ctx context.Context, arg IncrementRelaySessionsParams) (int64, error)
Counts one managed-relay credential issuance for the tenant month. The allowance check and the increment are one atomic statement: past the allowance the conflict-update WHERE fails and no row returns (refuse new issuance). A negative allowance means unmetered. Runs in tenant RLS context.
func (*Queries) InsertAllocationEvent ¶
func (q *Queries) InsertAllocationEvent(ctx context.Context, arg InsertAllocationEventParams) error
Append an event for the watch stream. The trim trigger keeps history bounded per allocation_id; callers can fire-and-forget.
func (*Queries) InsertControlPanelTOTPBackupCodes ¶
func (q *Queries) InsertControlPanelTOTPBackupCodes(ctx context.Context, arg []InsertControlPanelTOTPBackupCodesParams) (int64, error)
Bulk-inserts a fresh backup-code set in one round-trip (pgx COPY).
func (*Queries) InsertControlPanelUserConnection ¶
func (q *Queries) InsertControlPanelUserConnection(ctx context.Context, arg InsertControlPanelUserConnectionParams) error
func (*Queries) InsertGameSessionSignal ¶
func (*Queries) InsertMatchmakerMatch ¶
func (q *Queries) InsertMatchmakerMatch(ctx context.Context, arg InsertMatchmakerMatchParams) error
func (*Queries) InsertMatchmakingTicket ¶
func (q *Queries) InsertMatchmakingTicket(ctx context.Context, arg InsertMatchmakingTicketParams) (InsertMatchmakingTicketRow, error)
func (*Queries) InsertPlayerAccountConnection ¶
func (q *Queries) InsertPlayerAccountConnection(ctx context.Context, arg InsertPlayerAccountConnectionParams) error
func (*Queries) InsertPlayerAccountTOTPBackupCodes ¶
func (q *Queries) InsertPlayerAccountTOTPBackupCodes(ctx context.Context, arg []InsertPlayerAccountTOTPBackupCodesParams) (int64, error)
Bulk-inserts a fresh backup-code set in one round-trip (pgx COPY).
func (*Queries) InsertServerSecret ¶
func (q *Queries) InsertServerSecret(ctx context.Context, arg InsertServerSecretParams) (int64, error)
ON CONFLICT DO NOTHING makes first-boot generation race-safe: concurrent instances all insert, one wins, and everyone reads the winner back.
func (*Queries) InsertSettingsRevision ¶
func (q *Queries) InsertSettingsRevision(ctx context.Context, arg InsertSettingsRevisionParams) error
func (*Queries) InvalidateControlPanelPasswordResets ¶
func (q *Queries) InvalidateControlPanelPasswordResets(ctx context.Context, controlPanelUserID int64) error
Burns every outstanding reset link for the user. Run in the same transaction as any password change so an older emailed link cannot reset the password again afterwards.
func (*Queries) InvalidatePlayerAccountPasswordResets ¶
func (q *Queries) InvalidatePlayerAccountPasswordResets(ctx context.Context, playerAccountID pgtype.UUID) error
Burns every outstanding reset link for the account. Run in the same transaction as any password change so an older emailed link cannot reset the password again afterwards.
func (*Queries) IsAccountBannedInTenant ¶
func (*Queries) IsBlockedBetweenAccounts ¶
func (q *Queries) IsBlockedBetweenAccounts(ctx context.Context, arg IsBlockedBetweenAccountsParams) (int64, error)
Edge id if EITHER account has blocked the other. Defense-in-depth gate on every interaction path (friend request, game invite, presence).
func (*Queries) IsEmailSuppressed ¶
func (*Queries) IsGameSessionMember ¶
func (*Queries) IsPlayerBannedByTenant ¶
Enforcement helper: is the given player's linked account tenant-banned in the player's own tenant? Runs in a tenant Pool.Q (project_players RLS-filtered). Returns pgx.ErrNoRows when not banned (or the player is unlinked).
func (*Queries) LatestSettingsRevision ¶
func (*Queries) LeaderboardEntriesForPlayers ¶
func (q *Queries) LeaderboardEntriesForPlayers(ctx context.Context, arg LeaderboardEntriesForPlayersParams) ([]LeaderboardEntriesForPlayersRow, error)
Friends view: current-period entries for an explicit player set, in rank order. The caller re-ranks 0-based within the returned set.
func (*Queries) LeaderboardHasEntries ¶
Any period counts: past-period entries are ranked under the board's current sort order too, so history alone locks it.
func (*Queries) LeaderboardRangeByRank ¶
func (q *Queries) LeaderboardRangeByRank(ctx context.Context, arg LeaderboardRangeByRankParams) ([]LeaderboardRangeByRankRow, error)
func (*Queries) LeaderboardUserRank ¶
func (*Queries) LinkPlayerEmailCredentials ¶
func (q *Queries) LinkPlayerEmailCredentials(ctx context.Context, arg LinkPlayerEmailCredentialsParams) (int64, error)
POST /v1/auth/link: attach email + password sign-in to a player that has none, minting the verification challenge in the same write. The email IS NULL guard makes 0 rows mean "already has credentials"; the per-project email unique index rejects an address another player uses.
func (*Queries) LinkPlayerToAccount ¶
func (q *Queries) LinkPlayerToAccount(ctx context.Context, arg LinkPlayerToAccountParams) error
ListPlayerAccountLinkedProjects is intentionally NOT a sqlc query: it reads the SECURITY DEFINER player_account_linked_projects(uuid) table-function, which sqlc's analyzer can't resolve column types for. It is called via raw tx.Query in internal/players (same approach as project_player_tenant). Tenant-scoped (run under Pool.Q with app.tenant_id set): attaches a per-project player to a global account. Guarded by RLS on project_players. Clears unlinked_at: a re-invite restores an unlinked player's access.
func (*Queries) ListAPIKeys ¶
func (q *Queries) ListAPIKeys(ctx context.Context) ([]ListAPIKeysRow, error)
func (*Queries) ListAcceptedFriendAccountIDs ¶
func (q *Queries) ListAcceptedFriendAccountIDs(ctx context.Context, me pgtype.UUID) ([]pgtype.UUID, error)
Every account the caller has an accepted friendship with, either direction. Used by views that need the full friend set at once (friends leaderboard).
func (*Queries) ListAccountIdentities ¶
func (q *Queries) ListAccountIdentities(ctx context.Context, accountIds []pgtype.UUID) ([]ListAccountIdentitiesRow, error)
Bulk-fetch email + display_name for a set of accounts (friend-list enrich).
func (*Queries) ListActiveAllocations ¶
func (q *Queries) ListActiveAllocations(ctx context.Context, arg ListActiveAllocationsParams) ([]ListActiveAllocationsRow, error)
func (*Queries) ListAllProjectAllowedOrigins ¶
Runs with no tenant set; see all_project_allowed_origins().
func (*Queries) ListAllRateLimitOverridesForTenant ¶
func (q *Queries) ListAllRateLimitOverridesForTenant(ctx context.Context, tenantID int64) ([]ListAllRateLimitOverridesForTenantRow, error)
Every override for a tenant — tenant-wide (project_id NULL) and per-project — in one query. The rate-limits page groups these in Go rather than issuing one ListRateLimitOverridesForProject per project (an N+1 over the project list).
func (*Queries) ListAllocationBackendsForTenant ¶
func (q *Queries) ListAllocationBackendsForTenant(ctx context.Context) ([]ListAllocationBackendsForTenantRow, error)
Distinct backends seen across this tenant's recent allocations. Drives the backends-health page so operators see which backends actually serve traffic, not just the one currently configured.
func (*Queries) ListAllocationEvents ¶
func (q *Queries) ListAllocationEvents(ctx context.Context, arg ListAllocationEventsParams) ([]ListAllocationEventsRow, error)
func (*Queries) ListAllocationsForProject ¶
func (q *Queries) ListAllocationsForProject(ctx context.Context, arg ListAllocationsForProjectParams) ([]ListAllocationsForProjectRow, error)
Control panel fleet list: optionally include terminal rows (shutdown/failed) and paginate. include_terminal=false keeps the page focused on live allocations; the UI toggles it via a query param.
func (*Queries) ListControlPanelInvitationsForTenant ¶
func (*Queries) ListControlPanelMembersForTenant ¶
func (*Queries) ListControlPanelTenantsForPlatformAdmin ¶
func (q *Queries) ListControlPanelTenantsForPlatformAdmin(ctx context.Context) ([]ListControlPanelTenantsForPlatformAdminRow, error)
func (*Queries) ListControlPanelTenantsForUser ¶
func (*Queries) ListControlPanelUserConnections ¶
func (*Queries) ListControlPanelUsersForPlatformAdmin ¶
func (q *Queries) ListControlPanelUsersForPlatformAdmin(ctx context.Context, arg ListControlPanelUsersForPlatformAdminParams) ([]ListControlPanelUsersForPlatformAdminRow, error)
Powers the /v1/control-panel/admin/users page. tenant_count is a correlated subquery so users with zero memberships still appear.
func (*Queries) ListDeletedLeaderboardsForProject ¶
func (*Queries) ListDueLeaderboardResets ¶
func (q *Queries) ListDueLeaderboardResets(ctx context.Context, asOf pgtype.Timestamptz) ([]ListDueLeaderboardResetsRow, error)
Boards whose scheduled reset boundary has passed, locked for the reset transaction so two job runs can never double-archive a period. as_of is the job's clock — the same instant it computes the next boundary from, so the due filter and the new boundary can never disagree.
func (*Queries) ListEligibleRelayNodes ¶
func (q *Queries) ListEligibleRelayNodes(ctx context.Context, maxAgeSeconds float64) ([]RelayNode, error)
Eligible: known, last probe succeeded, reported active, and probed within the freshness window.
func (*Queries) ListEnforcedTenantStorage ¶
func (q *Queries) ListEnforcedTenantStorage(ctx context.Context) ([]ListEnforcedTenantStorageRow, error)
Name, usage, class, quota overrides, and last-notified threshold for every quota-enforced tenant. Read cross-tenant by the storage-warn River job (bootstrap tx).
func (*Queries) ListExpiredUnclaimedMatchmakerAllocations ¶
func (q *Queries) ListExpiredUnclaimedMatchmakerAllocations(ctx context.Context) ([]ListExpiredUnclaimedMatchmakerAllocationsRow, error)
GC candidates whose allocation lease elapsed without a poll or realtime delivery. Privileged — runs without a tenant GUC.
func (*Queries) ListFleetsForProject ¶
Control panel list. Soft-deleted rows are excluded; include_deleted is reserved for a future "archive" view but not wired through the UI yet.
func (*Queries) ListFriendsByStatusForAccount ¶
func (q *Queries) ListFriendsByStatusForAccount(ctx context.Context, arg ListFriendsByStatusForAccountParams) ([]FriendEdge, error)
Caller-aware. For 'blocked', only rows the caller initiated are returned — never rows where the caller is the blockee (which would let a blocked user learn who blocked them).
func (*Queries) ListGameSessionPeers ¶
func (q *Queries) ListGameSessionPeers(ctx context.Context, sessionID string) ([]ListGameSessionPeersRow, error)
Returns active peers (last_seen within 30 s) with each peer's optional xuid and display name (from the linked global account, when present). RLS on game_session_peer scopes rows to the current tenant.
func (*Queries) ListGameSessionSignalsForRecipient ¶
func (q *Queries) ListGameSessionSignalsForRecipient(ctx context.Context, arg ListGameSessionSignalsForRecipientParams) ([]ListGameSessionSignalsForRecipientRow, error)
Recipient-scoped, cursor-ordered, unexpired signals. The to_player_id filter plus RLS ensure a player only ever reads signals addressed to them, and the id > after_id cursor makes repeat polls return only new signals.
func (*Queries) ListKnownRelayNodes ¶
func (*Queries) ListLeaderboardPeriods ¶
func (q *Queries) ListLeaderboardPeriods(ctx context.Context, arg ListLeaderboardPeriodsParams) ([]ListLeaderboardPeriodsRow, error)
Finished periods, newest first, keyset-paginated on the period number.
func (*Queries) ListLeaderboardsForProject ¶
func (*Queries) ListMCPTokensForProject ¶
func (q *Queries) ListMCPTokensForProject(ctx context.Context, projectID int64) ([]ListMCPTokensForProjectRow, error)
Unexpired tokens, plus tokens that expired in the last 30 days so a person can see why an agent stopped. Older expired tokens leave the list, so they cannot push active tokens past the LIMIT.
func (*Queries) ListMatchmakerBucketsForProject ¶
func (q *Queries) ListMatchmakerBucketsForProject(ctx context.Context, projectID int64) ([]ListMatchmakerBucketsForProjectRow, error)
Control panel matchmaker page: queue depth per (mode, region, game_mode) bucket for the current tenant's project, plus oldest queued ticket and the min/max count spread so operators can spot stuck buckets at a glance.
func (*Queries) ListOpenInvitationTargetsForProject ¶
func (q *Queries) ListOpenInvitationTargetsForProject(ctx context.Context, projectID int64) ([]*int64, error)
Target player IDs of open, unexpired invitations, for the "invite pending" list badge. Expired-but-unswept invites are excluded so the badge matches what the accept flow would actually honor.
func (*Queries) ListPendingGameInvites ¶
func (q *Queries) ListPendingGameInvites(ctx context.Context, toPlayerID int64) ([]ListPendingGameInvitesRow, error)
Returns unexpired invites for the target user, enriched with the sender's email and optional xuid for display.
func (*Queries) ListPendingTenantChangeRequests ¶
func (q *Queries) ListPendingTenantChangeRequests(ctx context.Context) ([]ListPendingTenantChangeRequestsRow, error)
Platform-admin review queue: pending requests with tenant name + current class. Read cross-tenant (bootstrap tx).
func (*Queries) ListPendingTenantSignupRequests ¶
func (q *Queries) ListPendingTenantSignupRequests(ctx context.Context) ([]ListPendingTenantSignupRequestsRow, error)
func (*Queries) ListPlatformAdminInvitations ¶
func (q *Queries) ListPlatformAdminInvitations(ctx context.Context) ([]ListPlatformAdminInvitationsRow, error)
func (*Queries) ListPlatformAdmins ¶
func (q *Queries) ListPlatformAdmins(ctx context.Context) ([]ListPlatformAdminsRow, error)
func (*Queries) ListPlayerAccountConnections ¶
func (*Queries) ListPlayerInvitationsForProject ¶
func (*Queries) ListPlayerSessionEpochs ¶
func (q *Queries) ListPlayerSessionEpochs(ctx context.Context, ids []int64) ([]ListPlayerSessionEpochsRow, error)
Batched lifecycle sweep for live WebSockets: one query per tenant with open sockets per sweep interval (O(tenants), not O(sockets)). A player missing from the result (deleted) reads as revoked.
func (*Queries) ListPlayersDueForPurge ¶
func (q *Queries) ListPlayersDueForPurge(ctx context.Context, arg ListPlayersDueForPurgeParams) ([]ListPlayersDueForPurgeRow, error)
One purge batch for the current tenant. FOR UPDATE serializes against a racing cancel: the cancel either lands first (the row drops out of the result) or blocks until the delete commits and reports "no pending deletion". deleted_at is returned so the caller only releases quota slots for rows that ever held one.
func (*Queries) ListPlayersForProject ¶
func (q *Queries) ListPlayersForProject(ctx context.Context, arg ListPlayersForProjectParams) ([]ListPlayersForProjectRow, error)
Control-panel-side player management queries. Privileged: the control panel runs them as platform/tenant admin via BootstrapQ, so we filter by tenant_id explicitly rather than relying on RLS.
func (*Queries) ListPresenceForUsers ¶
func (*Queries) ListProjectsForTenant ¶
func (q *Queries) ListProjectsForTenant(ctx context.Context) ([]ListProjectsForTenantRow, error)
func (*Queries) ListPublicOpenGameSessions ¶
func (q *Queries) ListPublicOpenGameSessions(ctx context.Context, arg ListPublicOpenGameSessionsParams) ([]ListPublicOpenGameSessionsRow, error)
The public session browser: open, public, unexpired sessions in the caller's project that still have room. Player counts come from the peer heartbeat window (last_seen within 30 s, matching ListGameSessionPeers), and a session with no live peer is a ghost lobby nobody can play in, so it is excluded too. Keyset-paginated on the session id.
func (*Queries) ListPublicPlayers ¶
func (q *Queries) ListPublicPlayers(ctx context.Context, arg ListPublicPlayersParams) ([]ListPublicPlayersRow, error)
Unknown and out-of-project ids drop out of the result set silently.
func (*Queries) ListQuotaOverridesForTenant ¶
func (q *Queries) ListQuotaOverridesForTenant(ctx context.Context, tenantID int64) ([]ListQuotaOverridesForTenantRow, error)
Per-axis overrides for one tenant, for the control-panel views and the platform-admin editor. Hot paths never call this — they get the same rows aggregated into the quota-context snapshot above.
func (*Queries) ListReadyMatchmakerBuckets ¶
func (q *Queries) ListReadyMatchmakerBuckets(ctx context.Context) ([]ListReadyMatchmakerBucketsRow, error)
Region is a bucket dimension only for fleet_allocation (the server must be placed in a concrete region); non-fleet modes mix regions inside one bucket and the worker applies the soft-region grouping rules in Go.
func (*Queries) ListRelayNodes ¶
func (q *Queries) ListRelayNodes(ctx context.Context, maxAgeSeconds float64) ([]ListRelayNodesRow, error)
eligible uses the same rule and clock as ListEligibleRelayNodes, so the admin list agrees with what credentials serve.
func (*Queries) ListSettingsRevisions ¶
func (q *Queries) ListSettingsRevisions(ctx context.Context, arg ListSettingsRevisionsParams) ([]ListSettingsRevisionsRow, error)
func (*Queries) ListStorageObjects ¶
func (q *Queries) ListStorageObjects(ctx context.Context, arg ListStorageObjectsParams) ([]ListStorageObjectsRow, error)
func (*Queries) ListTenantAdminEmails ¶
Verified emails of a tenant's owner/admin members, for operational notices (e.g. storage-quota warnings). Read cross-tenant by background jobs.
func (*Queries) ListTenantChangeRequests ¶
func (q *Queries) ListTenantChangeRequests(ctx context.Context, tenantID int64) ([]ListTenantChangeRequestsRow, error)
The tenant's own requests (any status) for the settings page. Filters by explicit tenant_id (the table has no RLS).
func (*Queries) ListTenantCustomTokenSecrets ¶
func (q *Queries) ListTenantCustomTokenSecrets(ctx context.Context) ([]ListTenantCustomTokenSecretsRow, error)
Boot-time backfill input: every tenant holding a custom-token secret. Cross-tenant by design (BootstrapQ).
func (*Queries) ListTenantEnabledFeatures ¶
Tenant-level features the tenant already holds, to exclude from the request dropdown. Reads feature_grants in tenant RLS context.
func (*Queries) ListTenantPlayerBans ¶
func (q *Queries) ListTenantPlayerBans(ctx context.Context, tenantID int64) ([]ListTenantPlayerBansRow, error)
Control panel list for a tenant, enriched with the banned account's email.
func (*Queries) LockControlPanelUserSignInMethods ¶
Same row lock as LockPlayerAccountSignInMethods.
func (*Queries) LockControlPanelUserVerification ¶
func (q *Queries) LockControlPanelUserVerification(ctx context.Context, arg LockControlPanelUserVerificationParams) error
Set the lockout window on an account that just tipped over MaxLifetimeAttempts. The Go side computes the timestamp so the lockout duration stays a single source of truth.
func (*Queries) LockEnabledPlatformAdmins ¶
Serializes last-admin checks by locking the currently enabled platform admin rows before counting them in the surrounding transaction.
func (*Queries) LockLiveProject ¶
Serializes creates that check a per-project limit.
func (*Queries) LockPlayerAccountSignInMethods ¶
Row lock for the last-sign-in-method rule: two concurrent unlink requests serialize here, so they cannot both pass the count and remove the last two methods.
func (*Queries) LockPlayerAccountVerification ¶
func (q *Queries) LockPlayerAccountVerification(ctx context.Context, arg LockPlayerAccountVerificationParams) error
func (*Queries) LockPlayerForFleetAllocation ¶
Transaction-scoped advisory lock serializing the per-player fleet-allocation cap. The enqueue check and the worker's match insert are separate transactions, so without it a ticket enqueued while an earlier one is still allocating counts a stale total and both commit. Released on commit/rollback.
func (*Queries) LockPlayerPasswordReset ¶
func (q *Queries) LockPlayerPasswordReset(ctx context.Context, arg LockPlayerPasswordResetParams) error
func (*Queries) LockPlayerVerification ¶
func (q *Queries) LockPlayerVerification(ctx context.Context, arg LockPlayerVerificationParams) error
func (*Queries) LockProjectForGameSessionCreate ¶
Transaction-scoped advisory lock serializing session creation per project so the open-session cap can't be raced past. Released on commit/rollback.
func (*Queries) LockSignalRate ¶
Serializes a player's concurrent signal sends within the transaction so the per-minute count+insert below can't be raced past the cap under READ COMMITTED. player_id (project_players.id) is globally unique, so the lock key never collides across tenants. Released on commit/rollback.
func (*Queries) LockStorageObjectForWrite ¶
func (q *Queries) LockStorageObjectForWrite(ctx context.Context, arg LockStorageObjectForWriteParams) error
Transaction-scoped advisory lock serializing concurrent writes (put/delete) to a single storage object so the read-modify-write of the tenant byte counter can't be raced past. Released on commit/rollback.
func (*Queries) MarkAllocationFailed ¶
A released row stays 'shutdown'. A 'ready' row can still fail, because the commit of MarkAllocationReady can succeed and report an error.
func (*Queries) MarkAllocationReady ¶
func (q *Queries) MarkAllocationReady(ctx context.Context, arg MarkAllocationReadyParams) (int64, error)
0 rows = the row left 'pending' during the backend call, so the caller must free the server that the call created.
func (*Queries) MarkControlPanelInvitationAccepted ¶
func (*Queries) MarkControlPanelUserVerified ¶
func (*Queries) MarkPlayerAccountVerified ¶
func (*Queries) MarkPlayerInvitationAccepted ¶
func (*Queries) MarkPlayerVerified ¶
A proven verification also restarts the lifetime budget and drops any lockout, mirroring CompletePlayerPasswordReset.
func (*Queries) MarkPlayerVerifiedByID ¶
func (*Queries) MarkRelayUsageWarned80 ¶
Claims the right to send the single 80% warning email for this month (0 rows = another request already sent it).
func (*Queries) MarkRelayUsageWarned100 ¶
Claims the right to send the single 100% warning email for this month.
func (*Queries) MarkTenantSignupAccepted ¶
func (q *Queries) MarkTenantSignupAccepted(ctx context.Context, arg MarkTenantSignupAcceptedParams) (int64, error)
Clears the code hash so the magic link can't be replayed after acceptance.
func (*Queries) MatchmakerQueueStats ¶
func (q *Queries) MatchmakerQueueStats(ctx context.Context) ([]MatchmakerQueueStatsRow, error)
Cross-tenant queue-depth + oldest-queued-ticket age, sampled by the observability collector for the queue gauges. Privileged: runs over the bootstrap role (no tenant GUC), mirroring the sweeper's scan. Region is a bucket dimension only for fleet_allocation; blanked for other modes so the gauge label set matches the worker's buckets. Deliberately does NOT group by game_mode: that column is developer-supplied free text, so labelling the Prometheus gauges with it would make the series count unbounded.
func (*Queries) PeekControlPanelPasswordReset ¶
func (q *Queries) PeekControlPanelPasswordReset(ctx context.Context, tokenHash []byte) (int64, error)
Read-only validity probe for the GET form page; ConsumeControlPanelPasswordReset is the single-use gate on the actual POST.
func (*Queries) PeekPlayerAccountPasswordReset ¶
func (q *Queries) PeekPlayerAccountPasswordReset(ctx context.Context, tokenHash []byte) (pgtype.UUID, error)
Read-only validity probe for the GET form page; ConsumePlayerAccountPasswordReset is the single-use gate on the actual POST.
func (*Queries) PlayerInviteLookup ¶
func (q *Queries) PlayerInviteLookup(ctx context.Context, codeHash []byte) (PlayerInviteLookupRow, error)
Privileged (SECURITY DEFINER) lookup used by the player invite-accept page. Returns the tenant_id so the caller can SET app.tenant_id and continue under normal RLS enforcement.
The per-column casts give sqlc concrete types: it cannot introspect SECURITY DEFINER table functions, so it would otherwise fall back to interface{} for every column.
func (*Queries) PlayerLinkTargetExists ¶
Tenant-scoped existence probe used by the link-player accept path to tell a vanished/soft-deleted target row (the invite is dead) apart from a genuine conflict when BindPlayerLinkedEmail affects 0 rows.
func (*Queries) ProjectIsLive ¶
func (*Queries) PromoteControlPanelUserToPlatformAdmin ¶
func (*Queries) PruneSettingsRevisions ¶
func (q *Queries) PruneSettingsRevisions(ctx context.Context, arg PruneSettingsRevisionsParams) error
func (*Queries) PruneStaleGameSessionPeers ¶
func (*Queries) PutStorageObject ¶
func (q *Queries) PutStorageObject(ctx context.Context, arg PutStorageObjectParams) (PutStorageObjectRow, error)
Upsert; bumps version. Caller may pass If-Match via expected_version param.
func (*Queries) PutStorageObjectIfMatch ¶
func (q *Queries) PutStorageObjectIfMatch(ctx context.Context, arg PutStorageObjectIfMatchParams) (PutStorageObjectIfMatchRow, error)
Optimistic concurrency variant — only updates if the row's current version matches expected. RETURNING NULL row on mismatch.
func (*Queries) RecordControlPanelLoginSuccess ¶
func (*Queries) RecordRelayNodeProbe ¶
func (q *Queries) RecordRelayNodeProbe(ctx context.Context, arg RecordRelayNodeProbeParams) (RecordRelayNodeProbeRow, error)
Stores what the probe read; a probe that read nothing clears the lifecycle columns. It returns the previous probe result, read under a row lock, so concurrent probers each see the result the other wrote and a change is logged once. No row when the node was retired since it was listed.
func (*Queries) RedeemRealtimeTicket ¶
func (q *Queries) RedeemRealtimeTicket(ctx context.Context, ticketHash []byte) (RedeemRealtimeTicketRow, error)
Single use: the row is deleted as it is read. Runs with no tenant set.
func (*Queries) ReleaseAllocation ¶
func (*Queries) ReleaseMatchmakerTickets ¶
func (q *Queries) ReleaseMatchmakerTickets(ctx context.Context, arg ReleaseMatchmakerTicketsParams) (int64, error)
Worker-driven release of one failed group: the resolver (allocator, session creator) failed. Bump allocation_attempts; flip to 'failed' on the Nth attempt, stamping the structured reason. Returns how many tickets flipped to 'failed' this call so the caller can meter the attempts_exhausted failure counter without re-reading the rows.
func (*Queries) ReleaseTenantPlayerSlots ¶
Counter mirror of ReserveTenantPlayerSlot for the delete-purge path: the caller passes how many non-soft-deleted players it hard-deleted in the same transaction (soft-deleted rows never held a slot). GREATEST guards against drift from out-of-band writes ever pushing the counter negative.
func (*Queries) ReplacePlayerExternalID ¶
func (q *Queries) ReplacePlayerExternalID(ctx context.Context, arg ReplacePlayerExternalIDParams) (int64, error)
Steam linking: swap a generated identity for the platform identity. Compare-and-swap on the old value so a concurrent change loses cleanly; the per-project external_id unique index rejects an identity another player already holds.
func (*Queries) RequestFriendByAccount ¶
func (q *Queries) RequestFriendByAccount(ctx context.Context, arg RequestFriendByAccountParams) (RequestFriendByAccountRow, error)
Friend edges between GLOBAL player_accounts. friend_edges has no tenant_id and no RLS, so these run in either a tenant Pool.Q or a BootstrapQ transaction. Account ids are UUIDs. One current row per directed pair. Re-requests after rejection update in place; pending/accepted are idempotent (WHERE filters them, DO UPDATE no-ops); blocked is terminal (WHERE omits it).
func (*Queries) RequestPlayerDeleteByAccount ¶
func (q *Queries) RequestPlayerDeleteByAccount(ctx context.Context, arg RequestPlayerDeleteByAccountParams) (pgtype.Timestamptz, error)
Per-project player deletion: account-portal request/cancel plus the purge sweep. The portal queries run under BootstrapQ with app.tenant_id set for the link's tenant (same pattern as UnlinkPlayerFromAccount); the sweep runs per tenant under Pool.Q. The account guard stops one account from deleting another account's player. Portal-side delete request: disables the player (keeping an earlier suspension timestamp intact) and stamps delete_requested_at with the same now() so cancel can tell the two apart. 0 rows = not this account's player or already pending.
func (*Queries) RequestPlayerDeleteInProject ¶
func (q *Queries) RequestPlayerDeleteInProject(ctx context.Context, arg RequestPlayerDeleteInProjectParams) (pgtype.Timestamptz, error)
Admin-side delete request: disables the player (keeping an earlier suspension timestamp intact) and stamps delete_requested_at with the same now() so cancel can tell the two apart. Marks the request as the admin's, so the player cannot cancel it. A pending player request becomes the admin's and keeps its time stamp, so the purge time does not move. 0 rows = gone or already the admin's.
func (*Queries) RequestPlayerDeleteSelf ¶
func (q *Queries) RequestPlayerDeleteSelf(ctx context.Context, id int64) (pgtype.Timestamptz, error)
Self-service delete request: disables the player (keeping an earlier suspension timestamp intact) and stamps delete_requested_at with the same now() so cancel can tell the two apart. The purge sweep hard-deletes the row once the grace window passes. 0 rows = gone or already pending.
func (*Queries) ReserveControlPanelTOTPAttempt ¶
func (q *Queries) ReserveControlPanelTOTPAttempt(ctx context.Context, arg ReserveControlPanelTOTPAttemptParams) (ReserveControlPanelTOTPAttemptRow, error)
Atomic check-and-bump, same shape as ReserveControlPanelVerifyAttempt: the cap lives in the WHERE so parallel wrong codes cannot overshoot it. Returns 0 rows when already at cap (caller treats as locked).
func (*Queries) ReserveControlPanelVerifyAttempt ¶
func (q *Queries) ReserveControlPanelVerifyAttempt(ctx context.Context, arg ReserveControlPanelVerifyAttemptParams) (ReserveControlPanelVerifyAttemptRow, error)
Atomic check-and-bump used in place of the previous fetch-then-increment pattern: two parallel wrong codes used to both pass the cap check before either incremented, so the lockout could be overshot. The WHERE clause now folds the bound into the same statement that mutates the counter. Returns 0 rows when already at cap (caller treats as errVerifyLocked).
func (*Queries) ReservePlayerAccountTOTPAttempt ¶
func (q *Queries) ReservePlayerAccountTOTPAttempt(ctx context.Context, arg ReservePlayerAccountTOTPAttemptParams) (ReservePlayerAccountTOTPAttemptRow, error)
func (*Queries) ReservePlayerAccountVerifyAttempt ¶
func (q *Queries) ReservePlayerAccountVerifyAttempt(ctx context.Context, arg ReservePlayerAccountVerifyAttemptParams) (ReservePlayerAccountVerifyAttemptRow, error)
Atomic check-and-bump; returns 0 rows when already at the per-code cap.
func (*Queries) ReservePlayerPasswordResetAttempt ¶
func (q *Queries) ReservePlayerPasswordResetAttempt(ctx context.Context, arg ReservePlayerPasswordResetAttemptParams) (ReservePlayerPasswordResetAttemptRow, error)
Atomic check-and-bump, the ReservePlayerVerifyAttempt twin for resets.
func (*Queries) ReservePlayerVerifyAttempt ¶
func (q *Queries) ReservePlayerVerifyAttempt(ctx context.Context, arg ReservePlayerVerifyAttemptParams) (ReservePlayerVerifyAttemptRow, error)
Atomic check-and-bump (see ReserveControlPanelVerifyAttempt for the TOCTOU explanation). Returns 0 rows when already at cap.
func (*Queries) ReserveTenantPlayerSlot ¶
Authoritative player-quota gate: atomically claims one registered-player slot by bumping player_count, refusing at the class cap (0 rows affected). Run it as the LAST statement before commit so the tenant-row lock is held for a single round trip instead of across the whole create transaction. player_limit is quota.Limits.Players; -1 is quota.Unlimited. The NOT enforce_quotas arm admits unenforced tenants while still counting them, so player_count stays exact for every tenant and flipping enforce_quotas on later needs no recompute. Out-of-band player writes (bulk seeds, imports) must maintain the counter themselves.
func (*Queries) ResetControlPanelTOTPAttempts ¶
func (*Queries) ResetPlayerAccountTOTPAttempts ¶
func (*Queries) ResolvePendingFriendEdge ¶
func (q *Queries) ResolvePendingFriendEdge(ctx context.Context, arg ResolvePendingFriendEdgeParams) (int64, error)
Accept or reject. Only a pending edge can move, so a block or an unfriend that commits first wins: the row lock makes this re-check status, and it returns 0.
func (*Queries) ResolvePlayersForAccountsInProject ¶
func (q *Queries) ResolvePlayersForAccountsInProject(ctx context.Context, arg ResolvePlayersForAccountsInProjectParams) ([]ResolvePlayersForAccountsInProjectRow, error)
Tenant-scoped: maps a set of accounts back to their player in a specific project, for presence sharing and JSON-API user_id mapping.
func (*Queries) RestoreControlPanelUserVerificationCode ¶
func (q *Queries) RestoreControlPanelUserVerificationCode(ctx context.Context, arg RestoreControlPanelUserVerificationCodeParams) error
Undo a code reservation only when it is still the code whose delivery failed. A concurrent request that installed a newer code must win.
func (*Queries) RestoreLeaderboard ¶
func (*Queries) RestorePlayerAccountVerificationCode ¶
func (q *Queries) RestorePlayerAccountVerificationCode(ctx context.Context, arg RestorePlayerAccountVerificationCodeParams) error
Undo a code reservation only when it is still the code whose delivery failed. A concurrent request that installed a newer code must win.
func (*Queries) RetireRelayNode ¶
Retiring is idempotent and keeps the row. A retired node is never probed or advertised again.
func (*Queries) ReturnMatchmakerClaim ¶
Un-claim whatever the claim still holds without penalty: tickets that didn't fit a group this pass simply go back to waiting.
func (*Queries) ReturnMatchmakerTicketsByID ¶
func (q *Queries) ReturnMatchmakerTicketsByID(ctx context.Context, arg ReturnMatchmakerTicketsByIDParams) (int64, error)
Penalty-free un-claim of specific still-queued tickets holding this claim: the survivors of a short commit go back to waiting without an attempt bump. Drifted tickets (cancelled/failed) are no longer 'queued' and are skipped.
func (*Queries) RevokeActivePlayerSessions ¶
func (q *Queries) RevokeActivePlayerSessions(ctx context.Context, arg RevokeActivePlayerSessionsParams) (int64, error)
Reuse-detection response: nuke every live session for the player in this project. Paired with BumpPlayerSessionEpoch so outstanding access tokens die at the epoch gate immediately, not just at TTL.
func (*Queries) RevokeAllControlPanelSessionsForUser ¶
func (*Queries) RevokeAllPlayerAccountSessions ¶
func (*Queries) RevokeControlPanelInvitation ¶
func (q *Queries) RevokeControlPanelInvitation(ctx context.Context, arg RevokeControlPanelInvitationParams) error
Runs under the RLS-bypassing bootstrap role, so scope to the tenant in SQL rather than relying solely on the caller's precheck.
func (*Queries) RevokeControlPanelSession ¶
func (*Queries) RevokeMCPToken ¶
func (*Queries) RevokeOpenInvitationsByInviter ¶
Bulk-revoke the outgoing invitations a (now-disabled) user created. Re-enabling does NOT un-revoke these; the platform admin can re-issue.
func (*Queries) RevokeOtherControlPanelSessionsForUser ¶
func (q *Queries) RevokeOtherControlPanelSessionsForUser(ctx context.Context, arg RevokeOtherControlPanelSessionsForUserParams) error
2FA enable/disable revokes every session except the one doing the change; the RevokeAll variant would log the acting user out mid-flow.
func (*Queries) RevokeOtherPlayerAccountSessions ¶
func (q *Queries) RevokeOtherPlayerAccountSessions(ctx context.Context, arg RevokeOtherPlayerAccountSessionsParams) error
func (*Queries) RevokePlayerAccountSession ¶
func (*Queries) RevokePlayerInvitation ¶
func (*Queries) RevokePlayerSession ¶
func (*Queries) RevokeSession ¶
Rotation path: the token is being superseded by a freshly-issued one, so a later replay of this hash is a reuse (theft) signal.
func (*Queries) RevokeSessionByRefreshHash ¶
func (q *Queries) RevokeSessionByRefreshHash(ctx context.Context, refreshHash []byte) (int64, error)
Logout path: a later replay of this hash is a benign stale-client retry, not reuse, so it must NOT trip the family kill.
func (*Queries) RevokeSupersededPlayerInvitations ¶
func (q *Queries) RevokeSupersededPlayerInvitations(ctx context.Context, arg RevokeSupersededPlayerInvitationsParams) error
Link-player resend path: clear any open invite that would collide with the fresh one before it is inserted — either a prior invite for the same target row, or any open invite (targeted or plain) to the same (project_id, email). The open-invite unique index is keyed on (project_id, email) alone, so a pre-existing plain invite to the same address must be superseded too or the insert 409s.
func (*Queries) SealTenantCustomTokenSecret ¶
func (q *Queries) SealTenantCustomTokenSecret(ctx context.Context, arg SealTenantCustomTokenSecretParams) (int64, error)
Compare-and-swap so the backfill never clobbers a concurrent update.
func (*Queries) SearchPlayerAccounts ¶
func (q *Queries) SearchPlayerAccounts(ctx context.Context, arg SearchPlayerAccountsParams) ([]SearchPlayerAccountsRow, error)
Platform-admin search by email prefix. Bounded LIMIT keeps the scan cheap.
func (*Queries) SetAPIKeyScopes ¶
func (q *Queries) SetAPIKeyScopes(ctx context.Context, arg SetAPIKeyScopesParams) error
func (*Queries) SetAllocationStatus ¶
func (q *Queries) SetAllocationStatus(ctx context.Context, arg SetAllocationStatusParams) error
func (*Queries) SetAllowedOrigins ¶
func (q *Queries) SetAllowedOrigins(ctx context.Context, arg SetAllowedOriginsParams) error
func (*Queries) SetControlPanelTOTPLastUsedStep ¶
func (q *Queries) SetControlPanelTOTPLastUsedStep(ctx context.Context, arg SetControlPanelTOTPLastUsedStepParams) (int64, error)
The monotonic guard in the WHERE makes replay detection atomic: 0 rows means another request already consumed this timestep.
func (*Queries) SetControlPanelUserDisabled ¶
func (q *Queries) SetControlPanelUserDisabled(ctx context.Context, arg SetControlPanelUserDisabledParams) error
Nullable timestamptz so the same query handles disable (now()) and enable (NULL).
func (*Queries) SetControlPanelUserVerificationCode ¶
func (q *Queries) SetControlPanelUserVerificationCode(ctx context.Context, arg SetControlPanelUserVerificationCodeParams) error
func (*Queries) SetPlayerAccountDisabled ¶
Platform-level disable. Bumps session_epoch to kill live sessions.
func (*Queries) SetPlayerAccountDisplayName ¶
func (q *Queries) SetPlayerAccountDisplayName(ctx context.Context, arg SetPlayerAccountDisplayNameParams) error
Player-set display name (PATCH /v1/profile). NULL clears it.
func (*Queries) SetPlayerAccountEnabled ¶
func (*Queries) SetPlayerAccountPassword ¶
func (q *Queries) SetPlayerAccountPassword(ctx context.Context, arg SetPlayerAccountPasswordParams) error
Password change bumps session_epoch so every outstanding account session is invalidated on its next request.
func (*Queries) SetPlayerAccountRemoteAddrs ¶
func (q *Queries) SetPlayerAccountRemoteAddrs(ctx context.Context, arg SetPlayerAccountRemoteAddrsParams) error
func (*Queries) SetPlayerAccountTOTPLastUsedStep ¶
func (*Queries) SetPlayerAccountVerificationCode ¶
func (q *Queries) SetPlayerAccountVerificationCode(ctx context.Context, arg SetPlayerAccountVerificationCodeParams) error
func (*Queries) SetPlayerDisabled ¶
func (q *Queries) SetPlayerDisabled(ctx context.Context, arg SetPlayerDisabledParams) error
func (*Queries) SetPlayerDisabledInProject ¶
func (q *Queries) SetPlayerDisabledInProject(ctx context.Context, arg SetPlayerDisabledInProjectParams) (int64, error)
Project-level disable (NOT tenant-wide — a tenant-wide ban lives in tenant_player_bans). Bumps session_epoch so live JWTs are rejected at server-verify immediately. A pending delete request owns the disabled state: 0 rows on an existing player means "cancel the deletion first".
func (*Queries) SetPlayerDisabledSelf ¶
Self-service disable: the epoch bump revokes live access tokens through the middleware gate. 0 rows = already disabled or gone.
func (*Queries) SetPlayerFriendCode ¶
func (q *Queries) SetPlayerFriendCode(ctx context.Context, arg SetPlayerFriendCodeParams) (int64, error)
Regenerate: overwrites unconditionally, invalidating the old code. 0 rows = soft-deleted or missing caller.
func (*Queries) SetPlayerFriendCodeIfAbsent ¶
func (q *Queries) SetPlayerFriendCodeIfAbsent(ctx context.Context, arg SetPlayerFriendCodeIfAbsentParams) (int64, error)
Lazy first-read initialization: 0 rows means a concurrent reader won the race (re-read) or the caller already has a code.
func (*Queries) SetPlayerPasswordResetChallenge ¶
func (q *Queries) SetPlayerPasswordResetChallenge(ctx context.Context, arg SetPlayerPasswordResetChallengeParams) error
Mints a fresh reset code: per-code attempts restart, lifetime attempts and the lockout survive so re-requesting codes never grants extra guesses.
func (*Queries) SetPlayerVerificationCode ¶
func (q *Queries) SetPlayerVerificationCode(ctx context.Context, arg SetPlayerVerificationCodeParams) error
func (*Queries) SetPlayerVerificationCodeByID ¶
func (q *Queries) SetPlayerVerificationCodeByID(ctx context.Context, arg SetPlayerVerificationCodeByIDParams) error
func (*Queries) SetProjectPublicJoining ¶
func (q *Queries) SetProjectPublicJoining(ctx context.Context, arg SetProjectPublicJoiningParams) error
func (*Queries) SetPublicSignupEnabled ¶
func (q *Queries) SetPublicSignupEnabled(ctx context.Context, arg SetPublicSignupEnabledParams) error
func (*Queries) SetTenantEnforceQuotas ¶
func (q *Queries) SetTenantEnforceQuotas(ctx context.Context, arg SetTenantEnforceQuotasParams) error
Flip the per-tenant enforcement flag. Used by provisioning when the operator has enabled quota enforcement for new tenants. player_count is maintained for unenforced tenants too, so flipping this on later is safe as long as players were only ever created through the app's create paths.
func (*Queries) SetTenantPublicJoining ¶
func (*Queries) SetTenantStorageNotifiedThreshold ¶
func (q *Queries) SetTenantStorageNotifiedThreshold(ctx context.Context, arg SetTenantStorageNotifiedThresholdParams) error
func (*Queries) SetTenantTierByID ¶
func (q *Queries) SetTenantTierByID(ctx context.Context, arg SetTenantTierByIDParams) (SetTenantTierByIDRow, error)
Platform-admin direct tier changes may move in either direction. Capture the prior tier under the same row lock so the audit record cannot race another administrator's update.
func (*Queries) SetTenantTierExact ¶
Declarative entitlement apply: converge on an exact class in either direction (downgrades rely on the existing grace path). 0 rows = no-op. Runs in tenant RLS context.
func (*Queries) SetTenantTierIfUpgrade ¶
Auto-applied on tier-upgrade approval. The direction check and write are one atomic operation so a stale request can never lower the current tier.
func (*Queries) SoftDeleteFleet ¶
func (*Queries) SoftDeleteLeaderboard ¶
func (*Queries) SoftDeleteStorageObject ¶
func (q *Queries) SoftDeleteStorageObject(ctx context.Context, arg SoftDeleteStorageObjectParams) (int64, error)
Soft-deletes and returns the freed byte count (octet_length(value::text)) so the caller can decrement the tenant storage counter in the same tx. Returns no rows when the object is already absent (delete is idempotent).
func (*Queries) StorageUsageForWrite ¶
func (q *Queries) StorageUsageForWrite(ctx context.Context, arg StorageUsageForWriteParams) (StorageUsageForWriteRow, error)
One-shot inputs for the pre-write storage-quota check: the tenant's current metered total, the existing object's size (0 if new), and the incoming value's size — all measured as octet_length(value::text) so they match the counter maintained by ApplyTenantStorageDelta. Runs in the write tx (app.tenant_id set), serialized per object by LockStorageObjectForWrite.
func (*Queries) SubmitScore ¶
Operator-aware upsert. 'best' keeps the better score by sort order, 'set' replaces, 'incr' adds. clamp_min/clamp_max bound the ACCUMULATED 'incr' total (the request-level bounds check only sees the delta, so without this a client could stack in-bounds deltas past score_max); callers pass NULL to leave the total unclamped. Metadata follows the standing score on 'best' (a worse run must not overwrite the record run's metadata) and the latest submission otherwise. Zero rows means the attempt cap blocked the write — the arbiter matched but the DO UPDATE WHERE refused it.
func (*Queries) SuppressEmail ¶
Idempotent: repeated unsubscribes are a no-op.
func (*Queries) SweepStaleMatchmakerClaims ¶
func (q *Queries) SweepStaleMatchmakerClaims(ctx context.Context, maxAttempts int32) (SweepStaleMatchmakerClaimsRow, error)
Release every claim whose lease has expired. Same accounting as ReleaseMatchmakerClaim (bump attempts, fail at the cap). Runs out of a detached context so it isn't tied to any request lifetime. Returns the number of claims released and, of those, how many flipped to 'failed' at the cap so the caller can meter the attempts_exhausted failure counter.
func (*Queries) TenantNameTaken ¶
A name is taken if an active tenant has it, or another live (pending/approved) signup request claims it. exclude_request_id lets the approve re-check ignore the request being approved; pass 0 at submit time.
func (*Queries) TopN ¶
display_name rides along from the entry's linked global account (NULL for anonymous players); joining pp/a cannot fan out because pp.id is unique.
func (*Queries) TouchControlPanelSession ¶
func (q *Queries) TouchControlPanelSession(ctx context.Context, arg TouchControlPanelSessionParams) error
func (*Queries) TouchControlPanelUserConnection ¶
func (q *Queries) TouchControlPanelUserConnection(ctx context.Context, arg TouchControlPanelUserConnectionParams) error
func (*Queries) TouchGameSessionPeer ¶
func (q *Queries) TouchGameSessionPeer(ctx context.Context, arg TouchGameSessionPeerParams) (int64, error)
Returns rows affected (0 when the caller isn't a member of the session) so the heartbeat handler can reject non-members instead of leaking the roster.
func (*Queries) TouchMCPTokenLastUsed ¶
At most one write per minute for each token.
func (*Queries) TouchPlayerAccountConnection ¶
func (q *Queries) TouchPlayerAccountConnection(ctx context.Context, arg TouchPlayerAccountConnectionParams) error
func (*Queries) UnlinkPlayerFromAccount ¶
func (q *Queries) UnlinkPlayerFromAccount(ctx context.Context, arg UnlinkPlayerFromAccountParams) (int64, error)
Player-initiated, non-destructive unlink. The row and its game data stay; the account link goes inactive and player-credential auth is blocked (unlinked_at filters on the auth queries). The epoch bump kills live access tokens immediately; the caller also revokes the player's sessions. The account guard stops one account from unlinking another account's player. A pending deletion blocks the unlink: severing the link would remove the portal's only cancellation path while the purge stays scheduled.
func (*Queries) UpdateAPIKeyLabel ¶
func (q *Queries) UpdateAPIKeyLabel(ctx context.Context, arg UpdateAPIKeyLabelParams) error
func (*Queries) UpdateControlPanelPassword ¶
func (q *Queries) UpdateControlPanelPassword(ctx context.Context, arg UpdateControlPanelPasswordParams) error
func (*Queries) UpdateFleet ¶
func (q *Queries) UpdateFleet(ctx context.Context, arg UpdateFleetParams) error
func (*Queries) UpdateGameSessionState ¶
func (q *Queries) UpdateGameSessionState(ctx context.Context, arg UpdateGameSessionStateParams) error
func (*Queries) UpdateLeaderboard ¶
func (q *Queries) UpdateLeaderboard(ctx context.Context, arg UpdateLeaderboardParams) (int64, error)
score_operator and current_period are deliberately absent: the operator is fixed at creation and the period only moves via AdvanceLeaderboardPeriod.
func (*Queries) UpdatePlayerPassword ¶
func (q *Queries) UpdatePlayerPassword(ctx context.Context, arg UpdatePlayerPasswordParams) error
func (*Queries) UpdateProfileEmail ¶
func (q *Queries) UpdateProfileEmail(ctx context.Context, arg UpdateProfileEmailParams) error
Profile updates are deliberately narrow — only fields explicitly enumerated server-side may change. PATCHing email re-triggers the verify flow (handler clears email_verified_at).
func (*Queries) UpdateProfileXuid ¶
func (q *Queries) UpdateProfileXuid(ctx context.Context, arg UpdateProfileXuidParams) error
Self-set secondary identifier. NULL clears it. The unique partial index on (project_id, xuid) rejects collisions with a constraint violation.
func (*Queries) UpdateProjectSteamAuthConfig ¶
func (q *Queries) UpdateProjectSteamAuthConfig(ctx context.Context, arg UpdateProjectSteamAuthConfigParams) (int64, error)
A NULL key keeps the stored one, so the settings form can update the app id without re-entering the secret (replace-on-write).
func (*Queries) UpdateRemoteConfig ¶
func (*Queries) UpdateTenantCustomTokenPublicKey ¶
func (*Queries) UpsertConnectionLimitOverride ¶
func (q *Queries) UpsertConnectionLimitOverride(ctx context.Context, arg UpsertConnectionLimitOverrideParams) error
func (*Queries) UpsertControlPanelTOTPPending ¶
func (q *Queries) UpsertControlPanelTOTPPending(ctx context.Context, arg UpsertControlPanelTOTPPendingParams) (int64, error)
Starts (or restarts) enrollment. The WHERE guard makes this a no-op for a confirmed credential — zero rows means "already enabled", so a stray setup POST can never silently replace a live secret.
func (*Queries) UpsertFriendEdgeStatusByAccount ¶
func (q *Queries) UpsertFriendEdgeStatusByAccount(ctx context.Context, arg UpsertFriendEdgeStatusByAccountParams) error
Used for block: create-or-overwrite the directed edge to a terminal status regardless of the prior state (blocking a stranger, a pending, or a friend).
func (*Queries) UpsertGameSessionPeer ¶
func (q *Queries) UpsertGameSessionPeer(ctx context.Context, arg UpsertGameSessionPeerParams) error
func (*Queries) UpsertPlayerAccountTOTPPending ¶
func (q *Queries) UpsertPlayerAccountTOTPPending(ctx context.Context, arg UpsertPlayerAccountTOTPPendingParams) (pgtype.UUID, error)
Player-account mirrors of control_panel_totp.sql; see the comments there for the atomicity rationale on each statement.
func (*Queries) UpsertPlayerByExternalID ¶
func (q *Queries) UpsertPlayerByExternalID(ctx context.Context, arg UpsertPlayerByExternalIDParams) (int64, error)
Custom-token flow: find existing player with this external_id under (tenant, project) or create one. Idempotent across repeated calls.
func (*Queries) UpsertPresence ¶
func (q *Queries) UpsertPresence(ctx context.Context, arg UpsertPresenceParams) error
func (*Queries) UpsertQuotaOverride ¶
func (q *Queries) UpsertQuotaOverride(ctx context.Context, arg UpsertQuotaOverrideParams) error
Write one axis override. Platform-admin only (directly or via an approved change request); the axis CHECK constraint rejects unknown axes.
func (*Queries) UpsertRateLimitOverride ¶
func (q *Queries) UpsertRateLimitOverride(ctx context.Context, arg UpsertRateLimitOverrideParams) error
func (*Queries) UpsertTenantFeatureGrant ¶
func (q *Queries) UpsertTenantFeatureGrant(ctx context.Context, arg UpsertTenantFeatureGrantParams) error
Auto-applied on feature-request approval. Tenant-level grant (project_id NULL); runs in tenant RLS context.
func (*Queries) WriteAudit ¶
func (q *Queries) WriteAudit(ctx context.Context, arg WriteAuditParams) error
func (*Queries) WritePlatformAudit ¶
func (q *Queries) WritePlatformAudit(ctx context.Context, arg WritePlatformAuditParams) error
type RateLimitOverride ¶
type RealtimeConnectionCapState ¶
type RealtimeConnectionCapState struct {
TenantID int64
Region string
Sustained int64
Ceiling int64
BurstRemainingNs int64
LastAssessedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type RealtimeConnectionGrant ¶
type RealtimeConnectionGrant struct {
TenantID int64
Region string
HolderID string
Allocated int64
Used int64
ExpiresAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type RealtimeTicket ¶
type RecordRelayNodeProbeRow ¶
type RecordRelayNodeProbeRow struct {
PrevProbeAt pgtype.Timestamptz
PrevProbeOk bool
PrevProbeError *string
}
type RedeemRealtimeTicketRow ¶
type RelayNode ¶
type RelayNode struct {
ID int64
Region string
TurnUrls []string
LifecycleUrl string
State string
LastProbeAt pgtype.Timestamptz
LastProbeOk bool
LastProbeError *string
LastLifecycleState *string
LastActiveAllocations *int64
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type RelaySessionUsage ¶
type RelaySessionUsage struct {
TenantID int64
Month pgtype.Date
Sessions int64
Warned80At pgtype.Timestamptz
Warned100At pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type ReserveControlPanelTOTPAttemptParams ¶
type ReserveControlPanelTOTPAttemptParams struct {
MaxAttempts int32
LockoutUntil pgtype.Timestamptz
ControlPanelUserID int64
}
type ReserveControlPanelTOTPAttemptRow ¶
type ReserveControlPanelTOTPAttemptRow struct {
Attempts int32
LockedUntil pgtype.Timestamptz
}
type ReservePlayerAccountTOTPAttemptParams ¶
type ReservePlayerAccountTOTPAttemptParams struct {
MaxAttempts int32
LockoutUntil pgtype.Timestamptz
PlayerAccountID pgtype.UUID
}
type ReservePlayerAccountTOTPAttemptRow ¶
type ReservePlayerAccountTOTPAttemptRow struct {
Attempts int32
LockedUntil pgtype.Timestamptz
}
type RestoreControlPanelUserVerificationCodeParams ¶
type RestoreControlPanelUserVerificationCodeParams struct {
PreviousCodeHash []byte
PreviousCodeSalt []byte
PreviousExpiresAt pgtype.Timestamptz
PreviousAttempts int32
PreviousLastSentAt pgtype.Timestamptz
ID int64
ExpectedCodeHash []byte
}
type RestorePlayerAccountVerificationCodeParams ¶
type RestorePlayerAccountVerificationCodeParams struct {
PreviousCodeHash []byte
PreviousCodeSalt []byte
PreviousExpiresAt pgtype.Timestamptz
PreviousAttempts int32
PreviousLastSentAt pgtype.Timestamptz
ID pgtype.UUID
ExpectedCodeHash []byte
}
type RevokeMCPTokenParams ¶
type RiverClient ¶
type RiverClient struct {
ID string
CreatedAt pgtype.Timestamptz
Metadata []byte
PausedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type RiverClientQueue ¶
type RiverClientQueue struct {
RiverClientID string
Name string
CreatedAt pgtype.Timestamptz
MaxWorkers int64
Metadata []byte
NumJobsCompleted int64
NumJobsRunning int64
UpdatedAt pgtype.Timestamptz
}
type RiverJob ¶
type RiverJob struct {
ID int64
State RiverJobState
Attempt int16
MaxAttempts int16
AttemptedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
FinalizedAt pgtype.Timestamptz
ScheduledAt pgtype.Timestamptz
Priority int16
Args []byte
AttemptedBy []string
Errors [][]byte
Kind string
Metadata []byte
Queue string
Tags []string
UniqueKey []byte
UniqueStates pgtype.Bits
}
type RiverJobState ¶
type RiverJobState string
const ( RiverJobStateAvailable RiverJobState = "available" RiverJobStateCancelled RiverJobState = "cancelled" RiverJobStateCompleted RiverJobState = "completed" RiverJobStateDiscarded RiverJobState = "discarded" RiverJobStatePending RiverJobState = "pending" RiverJobStateRetryable RiverJobState = "retryable" RiverJobStateRunning RiverJobState = "running" RiverJobStateScheduled RiverJobState = "scheduled" )
func (*RiverJobState) Scan ¶
func (e *RiverJobState) Scan(src interface{}) error
type RiverLeader ¶
type RiverLeader struct {
ElectedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
LeaderID string
Name string
}
type RiverQueue ¶
type RiverQueue struct {
Name string
CreatedAt pgtype.Timestamptz
Metadata []byte
PausedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type SearchPlayerAccountsRow ¶
type SearchPlayerAccountsRow struct {
ID pgtype.UUID
Email string
DisplayName *string
EmailVerifiedAt pgtype.Timestamptz
DisabledAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type ServerSecret ¶
type ServerSecret struct {
Name string
Value []byte
CreatedAt pgtype.Timestamptz
}
type Session ¶
type Session struct {
ID int64
TenantID int64
PlayerID int64
RefreshHash []byte
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
ProjectID int64
RevokedReason *string
}
type SetAPIKeyScopesParams ¶
type SetAllocationStatusParams ¶
type SetAllocationStatusParams struct {
ID int64
Status AllocationStatus
}
type SetAllowedOriginsParams ¶
type SetControlPanelUserDisabledParams ¶
type SetControlPanelUserDisabledParams struct {
DisabledAt pgtype.Timestamptz
ID int64
}
type SetControlPanelUserVerificationCodeParams ¶
type SetControlPanelUserVerificationCodeParams struct {
CodeHash []byte
CodeSalt []byte
ExpiresAt pgtype.Timestamptz
ID int64
}
type SetPlayerDisabledInProjectParams ¶
type SetPlayerDisabledInProjectParams struct {
DisabledAt pgtype.Timestamptz
ID int64
ProjectID int64
TenantID int64
}
type SetPlayerDisabledParams ¶
type SetPlayerDisabledParams struct {
ID int64
DisabledAt pgtype.Timestamptz
}
type SetPlayerPasswordResetChallengeParams ¶
type SetPlayerPasswordResetChallengeParams struct {
CodeHash []byte
Salt []byte
ExpiresAt pgtype.Timestamptz
ID int64
}
type SetPlayerVerificationCodeByIDParams ¶
type SetPlayerVerificationCodeByIDParams struct {
CodeHash []byte
CodeSalt []byte
ExpiresAt pgtype.Timestamptz
ID int64
}
type SetTenantTierByIDParams ¶
type SetTenantTierByIDRow ¶
type SettingsRevision ¶
type StorageLimit ¶
type StorageObject ¶
type StorageObject struct {
ID int64
TenantID int64
ProjectID int64
OwnerUserID int64
Key string
Value []byte
Version int64
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
}
type StorageUsageForWriteRow ¶
type SubmitScoreParams ¶
type Tenant ¶
type Tenant struct {
ID int64
Name string
CreatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
PublicJoiningEnabled bool
Tier int16
EnforceQuotas bool
PlayerCount int64
DisabledAt pgtype.Timestamptz
DisabledBy *string
CustomTokenPublicKey string
}
type TenantChangeRequest ¶
type TenantNameTakenParams ¶
type TenantPlayerBan ¶
type TenantQuotaOverride ¶
type TenantSignupRequest ¶
type TenantSignupRequest struct {
ID int64
Email string
RequestedTenantName string
FinalTenantName *string
ProjectDescription string
StudioName *string
Status string
CodeHash []byte
CodeExpiresAt pgtype.Timestamptz
ReviewedByUserID *int64
ReviewedAt pgtype.Timestamptz
ReviewReason *string
TenantID *int64
AcceptedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type TenantStorageUsage ¶
type TenantStorageUsage struct {
TenantID int64
TotalBytes int64
LastNotifiedThreshold int16
UpdatedAt pgtype.Timestamptz
}
type TicketStatus ¶
type TicketStatus string
const ( TicketStatusQueued TicketStatus = "queued" TicketStatusMatched TicketStatus = "matched" TicketStatusCancelled TicketStatus = "cancelled" TicketStatusFailed TicketStatus = "failed" )
func (*TicketStatus) Scan ¶
func (e *TicketStatus) Scan(src interface{}) error
type TopNParams ¶
type TouchControlPanelSessionParams ¶
type TouchControlPanelSessionParams struct {
ExpiresAt pgtype.Timestamptz
ID int64
}
type UpdateAPIKeyLabelParams ¶
type UpdateFleetParams ¶
type UpdateLeaderboardParams ¶
type UpdateProfileXuidParams ¶
type UpsertPresenceParams ¶
type UsageSample ¶
type UsageSamples202607 ¶
type UsageSamples202608 ¶
type UsageSamples202609 ¶
type UsageSamples202610 ¶
type UsageSamples202611 ¶
type UsageSamples202612 ¶
type UsageSamples202701 ¶
type UsageSamples202702 ¶
type UsageSamples202703 ¶
type UsageSamples202704 ¶
type UsageSamples202705 ¶
type UsageSamples202706 ¶
type UsageSamplesDefault ¶
type WriteAuditParams ¶
Source Files
¶
- allowed_origins.sql.go
- api_keys.sql.go
- audit.sql.go
- auth.sql.go
- auth_providers.sql.go
- change_requests.sql.go
- connection_limit_overrides.sql.go
- control_panel.sql.go
- control_panel_totp.sql.go
- control_panel_users.sql.go
- copyfrom.go
- credential_seal.sql.go
- db.go
- email_suppressions.sql.go
- entitlements.sql.go
- fleet.sql.go
- fleets.sql.go
- friends.sql.go
- game_invite.sql.go
- game_session.sql.go
- game_session_peer.sql.go
- game_session_signal.sql.go
- invitations.sql.go
- leaderboards.sql.go
- matchmaker.sql.go
- mcp_tokens.sql.go
- models.go
- player_accounts.sql.go
- player_bans.sql.go
- player_delete.sql.go
- player_totp.sql.go
- player_verify.sql.go
- players.sql.go
- players_control_panel.sql.go
- presence.sql.go
- profile.sql.go
- querier.go
- quota.sql.go
- rate_limit_overrides.sql.go
- realtime_tickets.sql.go
- relay_nodes.sql.go
- relay_usage.sql.go
- remote_config.sql.go
- server_secrets.sql.go
- settings_revisions.sql.go
- sso_connections.sql.go
- storage.sql.go
- tenant_signup.sql.go