Admins set default limits for monitors (all types), status pages and regions per monitor, whether an organization's own checker regions count towards the region limit, and how many organizations an account may own, and override them per organization or account. Defaults are not copied: changing one applies at once to everyone without an override. 0 means unlimited; self-hosted defaults are unlimited, the cloud allows three organizations per account. Creations count under a per-organization advisory lock, so concurrent requests cannot overshoot. A lowered limit keeps everything that exists: monitors already beyond the region limit stay editable but may not grow. Organizations see their usage in their settings and GET /org/limits; the admin panel lists organizations with owner, usage and limits next to their suspend and delete actions. Empty numeric form fields marked data-nullable are sent as null. Refs #111 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
324 lines
22 KiB
Go
324 lines
22 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
|
|
package store
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Querier interface {
|
|
APITokenOrg(ctx context.Context, hash []byte) (uuid.UUID, error)
|
|
AddAlertGroupChannel(ctx context.Context, arg AddAlertGroupChannelParams) (int64, error)
|
|
AddMaintenanceTarget(ctx context.Context, arg AddMaintenanceTargetParams) error
|
|
AddMembership(ctx context.Context, arg AddMembershipParams) error
|
|
AddMonitorAlertGroup(ctx context.Context, arg AddMonitorAlertGroupParams) (int64, error)
|
|
AddMonitorRegion(ctx context.Context, arg AddMonitorRegionParams) error
|
|
AddStatusPageMonitor(ctx context.Context, arg AddStatusPageMonitorParams) error
|
|
// System scope: organizations with their usage, limit overrides and owner,
|
|
// newest first, matching search in name, slug or owner email.
|
|
AdminListOrgs(ctx context.Context, arg AdminListOrgsParams) ([]AdminListOrgsRow, error)
|
|
// System scope: public status pages and suspended ones, with their
|
|
// organization and its owner, newest first, matching search in title,
|
|
// slug, domain, organization or owner email.
|
|
AdminListStatusPages(ctx context.Context, arg AdminListStatusPagesParams) ([]AdminListStatusPagesRow, error)
|
|
AgentInstancesByID(ctx context.Context, ids []uuid.UUID) ([]AgentInstancesByIDRow, error)
|
|
// System scope: enabled alertmanager monitors of org, with when they last
|
|
// recorded a result.
|
|
AlertmanagerMonitors(ctx context.Context, orgID *uuid.UUID) ([]AlertmanagerMonitorsRow, error)
|
|
// System scope: the receiver a webhook token belongs to.
|
|
AlertmanagerReceiverByHash(ctx context.Context, tokenHash []byte) (AlertmanagerReceiverByHashRow, error)
|
|
AllMonitorAlertGroups(ctx context.Context) ([]MonitorAlertGroup, error)
|
|
AllMonitorRegions(ctx context.Context) ([]AllMonitorRegionsRow, error)
|
|
AnyUserExists(ctx context.Context) (bool, error)
|
|
// How much one instance checked for the organization in the last hour.
|
|
CheckerStats(ctx context.Context, arg CheckerStatsParams) (CheckerStatsRow, error)
|
|
// System scope. Leases due rows for five minutes so a crashed sender's rows
|
|
// come back; SKIP LOCKED lets every API replica work the outbox.
|
|
ClaimNotifications(ctx context.Context, max int32) ([]uuid.UUID, error)
|
|
// Shortens tokens that would outlive a newly set maximum lifetime.
|
|
ClampAPITokenExpiry(ctx context.Context, arg ClampAPITokenExpiryParams) (int64, error)
|
|
ClearMaintenanceTargets(ctx context.Context, windowID uuid.UUID) error
|
|
ClearStatusPageGroups(ctx context.Context, pageID uuid.UUID) error
|
|
ClearStatusPageMonitors(ctx context.Context, pageID uuid.UUID) error
|
|
CountMonitors(ctx context.Context, orgID uuid.UUID) (int64, error)
|
|
CountRoleAssignments(ctx context.Context, roleID uuid.UUID) (int64, error)
|
|
CountStatusPages(ctx context.Context, orgID uuid.UUID) (int64, error)
|
|
CountUnusedRecoveryCodes(ctx context.Context, userID uuid.UUID) (int64, error)
|
|
CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (ApiToken, error)
|
|
CreateAgent(ctx context.Context, arg CreateAgentParams) (Agent, error)
|
|
CreateAlertGroup(ctx context.Context, arg CreateAlertGroupParams) (AlertGroup, error)
|
|
CreateAlertmanagerReceiver(ctx context.Context, arg CreateAlertmanagerReceiverParams) (CreateAlertmanagerReceiverRow, error)
|
|
CreateAssignment(ctx context.Context, arg CreateAssignmentParams) (RoleAssignment, error)
|
|
CreateChannel(ctx context.Context, arg CreateChannelParams) (NotificationChannel, error)
|
|
CreateGroup(ctx context.Context, arg CreateGroupParams) (MonitorGroup, error)
|
|
CreateIdentity(ctx context.Context, arg CreateIdentityParams) error
|
|
CreateInvitation(ctx context.Context, arg CreateInvitationParams) (Invitation, error)
|
|
CreateMaintenance(ctx context.Context, arg CreateMaintenanceParams) (MaintenanceWindow, error)
|
|
CreateMonitor(ctx context.Context, arg CreateMonitorParams) (Monitor, error)
|
|
CreateOrg(ctx context.Context, arg CreateOrgParams) (Org, error)
|
|
CreateRegion(ctx context.Context, arg CreateRegionParams) (Region, error)
|
|
CreateRole(ctx context.Context, arg CreateRoleParams) (Role, error)
|
|
CreateSSOProvider(ctx context.Context, arg CreateSSOProviderParams) (SsoProvider, error)
|
|
CreateStatusPage(ctx context.Context, arg CreateStatusPageParams) (StatusPage, error)
|
|
CreateStatusPageGroup(ctx context.Context, arg CreateStatusPageGroupParams) (StatusPageGroup, error)
|
|
CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
|
|
DailyBuckets(ctx context.Context, arg DailyBucketsParams) ([]DailyBucketsRow, error)
|
|
DailyBucketsForMonitors(ctx context.Context, arg DailyBucketsForMonitorsParams) ([]DailyBucketsForMonitorsRow, error)
|
|
DeleteAPIToken(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteAccountAudit(ctx context.Context, actorUserID *uuid.UUID) error
|
|
DeleteAgent(ctx context.Context, arg DeleteAgentParams) (int64, error)
|
|
DeleteAlertGroup(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteAlertGroupChannels(ctx context.Context, groupID uuid.UUID) error
|
|
DeleteAlertmanagerReceiver(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteAssignment(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteAssignmentsForResource(ctx context.Context, arg DeleteAssignmentsForResourceParams) error
|
|
DeleteChannel(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteGroup(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteInvitation(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteInvitationsForEmail(ctx context.Context, email string) error
|
|
DeleteLegalDocument(ctx context.Context, arg DeleteLegalDocumentParams) error
|
|
DeleteMaintenance(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteMonitor(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteMonitorAlertGroups(ctx context.Context, monitorID uuid.UUID) error
|
|
DeleteMonitorRegions(ctx context.Context, monitorID uuid.UUID) error
|
|
DeleteOrg(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteOrgStorage(ctx context.Context, orgID uuid.UUID) error
|
|
DeleteRecoveryCodes(ctx context.Context, userID uuid.UUID) error
|
|
DeleteRegion(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteRole(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteSSOProvider(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteStatusPage(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DeleteStatusPageGroup(ctx context.Context, arg DeleteStatusPageGroupParams) (int64, error)
|
|
// Only the latest success per monitor and region is kept.
|
|
DeleteSuccessEvidence(ctx context.Context, arg DeleteSuccessEvidenceParams) error
|
|
DeleteUser(ctx context.Context, id uuid.UUID) (int64, error)
|
|
DisableTOTP(ctx context.Context, id uuid.UUID) error
|
|
EnableTOTP(ctx context.Context, arg EnableTOTPParams) error
|
|
EnqueueNotification(ctx context.Context, arg EnqueueNotificationParams) error
|
|
// An empty name names a new region after its key and keeps an existing name.
|
|
EnsurePlatformRegion(ctx context.Context, arg EnsurePlatformRegionParams) (Region, error)
|
|
// System scope: resolves a request to a page by verified custom domain or
|
|
// by slug.
|
|
FindPublishedPage(ctx context.Context, arg FindPublishedPageParams) (StatusPage, error)
|
|
// Alerts of org that fire and were repeated within the stale period.
|
|
FiringAlerts(ctx context.Context, arg FiringAlertsParams) ([]FiringAlertsRow, error)
|
|
// When each monitor and region first reported, to the day.
|
|
FirstDataDaily(ctx context.Context, orgID uuid.UUID) ([]FirstDataDailyRow, error)
|
|
// When each monitor and region first reported since $2, exactly. Used for
|
|
// data younger than the daily aggregate's resolution.
|
|
FirstDataRecent(ctx context.Context, arg FirstDataRecentParams) ([]FirstDataRecentRow, error)
|
|
// Keeps organization and platform entries readable as "deleted user" but
|
|
// drops who it was.
|
|
ForgetAuditActor(ctx context.Context, actorUserID *uuid.UUID) error
|
|
GetAPIToken(ctx context.Context, id uuid.UUID) (ApiToken, error)
|
|
GetAPITokenByHash(ctx context.Context, tokenHash []byte) (ApiToken, error)
|
|
// System scope.
|
|
GetAgentByHash(ctx context.Context, tokenHash []byte) (GetAgentByHashRow, error)
|
|
GetAssignment(ctx context.Context, id uuid.UUID) (RoleAssignment, error)
|
|
GetChannel(ctx context.Context, id uuid.UUID) (NotificationChannel, error)
|
|
GetEvidence(ctx context.Context, arg GetEvidenceParams) (CheckEvidence, error)
|
|
GetGroup(ctx context.Context, id uuid.UUID) (MonitorGroup, error)
|
|
GetIdentity(ctx context.Context, arg GetIdentityParams) (UserIdentity, error)
|
|
GetInvitation(ctx context.Context, id uuid.UUID) (Invitation, error)
|
|
GetInvitationByHash(ctx context.Context, tokenHash []byte) (GetInvitationByHashRow, error)
|
|
GetMaintenance(ctx context.Context, id uuid.UUID) (MaintenanceWindow, error)
|
|
GetMembership(ctx context.Context, arg GetMembershipParams) (Membership, error)
|
|
GetMonitor(ctx context.Context, id uuid.UUID) (Monitor, error)
|
|
GetOrg(ctx context.Context, id uuid.UUID) (Org, error)
|
|
GetOrgBySlug(ctx context.Context, slug string) (Org, error)
|
|
GetPlatformSetting(ctx context.Context, key string) ([]byte, error)
|
|
GetRegion(ctx context.Context, id uuid.UUID) (Region, error)
|
|
GetRole(ctx context.Context, id uuid.UUID) (Role, error)
|
|
GetSSOProvider(ctx context.Context, id uuid.UUID) (SsoProvider, error)
|
|
GetStatusPage(ctx context.Context, id uuid.UUID) (StatusPage, error)
|
|
GetUser(ctx context.Context, id uuid.UUID) (User, error)
|
|
GetUserByEmail(ctx context.Context, email string) (User, error)
|
|
// System scope: the monitor a ping token belongs to.
|
|
HeartbeatMonitor(ctx context.Context, target string) (HeartbeatMonitorRow, error)
|
|
// System scope: enabled heartbeat monitors with their grace period and
|
|
// since when they are being waited for: the latest result, or the last
|
|
// change of the monitor, which covers new and re-enabled ones. The result
|
|
// lookup is bounded because the longest interval plus grace is two days.
|
|
HeartbeatsDue(ctx context.Context) ([]HeartbeatsDueRow, error)
|
|
// Per monitor and hour since $2, across all regions.
|
|
HourlyBuckets(ctx context.Context, arg HourlyBucketsParams) ([]HourlyBucketsRow, error)
|
|
IncidentsForMonitors(ctx context.Context, arg IncidentsForMonitorsParams) ([]Incident, error)
|
|
// Incidents overlapping the time since $1, for SLA calculation.
|
|
IncidentsSince(ctx context.Context, resolvedAt *time.Time) ([]IncidentsSinceRow, error)
|
|
InsertAuditEvent(ctx context.Context, arg InsertAuditEventParams) error
|
|
// check_results and its aggregates have no row-level security (see
|
|
// migration 00013). Every query here must filter by org_id.
|
|
InsertCheckResults(ctx context.Context, arg []InsertCheckResultsParams) (int64, error)
|
|
InsertEvidence(ctx context.Context, arg InsertEvidenceParams) error
|
|
InsertRecoveryCodes(ctx context.Context, arg []InsertRecoveryCodesParams) (int64, error)
|
|
InvitationOrg(ctx context.Context, hash []byte) (uuid.UUID, error)
|
|
IsMember(ctx context.Context, arg IsMemberParams) (bool, error)
|
|
LastFailureEvidence(ctx context.Context, arg LastFailureEvidenceParams) (LastFailureEvidenceRow, error)
|
|
LatestResultForMonitor(ctx context.Context, arg LatestResultForMonitorParams) (LatestResultForMonitorRow, error)
|
|
// Newest result per monitor and region in the org.
|
|
LatestResults(ctx context.Context, orgID uuid.UUID) ([]LatestResultsRow, error)
|
|
LatestResultsForMonitor(ctx context.Context, arg LatestResultsForMonitorParams) ([]LatestResultsForMonitorRow, error)
|
|
// The organization's documents and the platform's, organization first.
|
|
LegalDocuments(ctx context.Context, orgID *uuid.UUID) ([]LegalDocument, error)
|
|
ListAPITokens(ctx context.Context, arg ListAPITokensParams) ([]ListAPITokensRow, error)
|
|
// Agents owned by org, or platform agents when org is NULL.
|
|
ListAgents(ctx context.Context, orgID *uuid.UUID) ([]ListAgentsRow, error)
|
|
ListAlertGroups(ctx context.Context) ([]ListAlertGroupsRow, error)
|
|
ListAlertmanagerReceivers(ctx context.Context) ([]ListAlertmanagerReceiversRow, error)
|
|
ListAssignments(ctx context.Context, orgID uuid.UUID) ([]ListAssignmentsRow, error)
|
|
// Newest first, paged by time. kind narrows to one kind; the row policy
|
|
// already limits what the scope can see.
|
|
ListAuditEvents(ctx context.Context, arg ListAuditEventsParams) ([]ListAuditEventsRow, error)
|
|
ListChannels(ctx context.Context) ([]NotificationChannel, error)
|
|
// System scope: every enabled monitor with its regions, for reconciling the
|
|
// schedule.
|
|
ListEnabledMonitorsForSchedule(ctx context.Context) ([]ListEnabledMonitorsForScheduleRow, error)
|
|
ListEnabledSSOProviders(ctx context.Context) ([]ListEnabledSSOProvidersRow, error)
|
|
ListEvidence(ctx context.Context, monitorID uuid.UUID) ([]ListEvidenceRow, error)
|
|
ListGroups(ctx context.Context) ([]MonitorGroup, error)
|
|
ListIncidents(ctx context.Context) ([]ListIncidentsRow, error)
|
|
ListMaintenance(ctx context.Context) ([]MaintenanceWindow, error)
|
|
ListMaintenanceTargets(ctx context.Context) ([]MaintenanceTarget, error)
|
|
ListMonitors(ctx context.Context) ([]Monitor, error)
|
|
ListOrgMembers(ctx context.Context, orgID uuid.UUID) ([]ListOrgMembersRow, error)
|
|
ListOrgs(ctx context.Context) ([]Org, error)
|
|
ListPendingInvitations(ctx context.Context) ([]ListPendingInvitationsRow, error)
|
|
ListPlatformRegions(ctx context.Context) ([]Region, error)
|
|
ListRoles(ctx context.Context) ([]Role, error)
|
|
ListSSOProviders(ctx context.Context) ([]SsoProvider, error)
|
|
ListStatusPageGroups(ctx context.Context, pageID uuid.UUID) ([]StatusPageGroup, error)
|
|
ListStatusPages(ctx context.Context) ([]StatusPage, error)
|
|
ListUserIdentitiesInOrg(ctx context.Context, userID uuid.UUID) ([]ListUserIdentitiesInOrgRow, error)
|
|
ListUserOrgs(ctx context.Context, userID uuid.UUID) ([]ListUserOrgsRow, error)
|
|
// Row-level security limits this to platform regions and the scope's org;
|
|
// the org's own regions come first.
|
|
ListVisibleRegions(ctx context.Context) ([]Region, error)
|
|
// Serializes creations counted against org's limits until the transaction
|
|
// ends.
|
|
LockOrgUsage(ctx context.Context, orgID uuid.UUID) error
|
|
// System scope: windows covering any of the monitors, directly or through
|
|
// their group or one of its ancestors.
|
|
MaintenanceForMonitors(ctx context.Context, ids []uuid.UUID) ([]MaintenanceForMonitorsRow, error)
|
|
MakeAdmin(ctx context.Context, id uuid.UUID) error
|
|
MarkDomainVerified(ctx context.Context, id uuid.UUID) error
|
|
MarkInvitationAccepted(ctx context.Context, id uuid.UUID) (int64, error)
|
|
MarkNotificationFailed(ctx context.Context, arg MarkNotificationFailedParams) error
|
|
MarkNotificationSent(ctx context.Context, id uuid.UUID) error
|
|
// Every role a member holds, with the scope it applies to.
|
|
MemberGrants(ctx context.Context, arg MemberGrantsParams) ([]MemberGrantsRow, error)
|
|
MonitorAlertGroups(ctx context.Context, monitorID uuid.UUID) ([]uuid.UUID, error)
|
|
MonitorAlertRoutes(ctx context.Context, monitorID uuid.UUID) ([]MonitorAlertRoutesRow, error)
|
|
MonitorIncidents(ctx context.Context, monitorID uuid.UUID) ([]Incident, error)
|
|
MonitorRegions(ctx context.Context, monitorID uuid.UUID) ([]uuid.UUID, error)
|
|
// System scope: monitors to hand to a checker of region, skipping ones that
|
|
// were disabled, deleted or moved out of the region since dispatch. An
|
|
// org-owned checker only ever sees its org's monitors.
|
|
MonitorsForJobs(ctx context.Context, arg MonitorsForJobsParams) ([]Monitor, error)
|
|
// System scope: monitors a checker of region may report, with every region
|
|
// they are assigned to, for evaluation.
|
|
MonitorsForResults(ctx context.Context, arg MonitorsForResultsParams) ([]MonitorsForResultsRow, error)
|
|
// System scope.
|
|
NotificationDetails(ctx context.Context, ids []uuid.UUID) ([]NotificationDetailsRow, error)
|
|
OpenIncident(ctx context.Context, arg OpenIncidentParams) (Incident, error)
|
|
OpenIncidents(ctx context.Context) ([]Incident, error)
|
|
OrgAssignmentsExport(ctx context.Context, orgID uuid.UUID) ([]OrgAssignmentsExportRow, error)
|
|
OrgAuditExport(ctx context.Context, orgID uuid.UUID) ([]OrgAuditExportRow, error)
|
|
OrgDailyStats(ctx context.Context, orgID uuid.UUID) ([]OrgDailyStatsRow, error)
|
|
OrgIDBySlug(ctx context.Context, slug string) (uuid.UUID, error)
|
|
OrgIncidentsExport(ctx context.Context, orgID uuid.UUID) ([]OrgIncidentsExportRow, error)
|
|
OrgMembersExport(ctx context.Context, orgID uuid.UUID) ([]OrgMembersExportRow, error)
|
|
// Organizations user owns, with their member count.
|
|
OwnedOrgs(ctx context.Context, userID uuid.UUID) ([]OwnedOrgsRow, error)
|
|
// Resolved and long silent alerts are history the monitors' results keep.
|
|
PurgeAlertmanagerAlerts(ctx context.Context, updatedAt time.Time) (int64, error)
|
|
PurgeAuditEvents(ctx context.Context, argTime time.Time) (int64, error)
|
|
PurgeEvidence(ctx context.Context, argTime time.Time) (int64, error)
|
|
PurgeExpiredTokens(ctx context.Context, expiresAt *time.Time) (int64, error)
|
|
// Incidents resolved before the oldest data still charted.
|
|
PurgeIncidents(ctx context.Context, resolvedAt *time.Time) (int64, error)
|
|
PurgeInvitations(ctx context.Context, expiresAt time.Time) (int64, error)
|
|
// Delivered and given-up notifications; pending ones are still being worked.
|
|
PurgeNotifications(ctx context.Context, createdAt time.Time) (int64, error)
|
|
PurgeOrgCheckData(ctx context.Context, org uuid.UUID) error
|
|
// Raw results bucketed by width since a point in time, for short ranges.
|
|
RangeBuckets(ctx context.Context, arg RangeBucketsParams) ([]RangeBucketsRow, error)
|
|
// The daily aggregate rebucketed by width, for ranges of months.
|
|
RangeBucketsDaily(ctx context.Context, arg RangeBucketsDailyParams) ([]RangeBucketsDailyRow, error)
|
|
// The hourly aggregate rebucketed by width, for ranges of days.
|
|
RangeBucketsHourly(ctx context.Context, arg RangeBucketsHourlyParams) ([]RangeBucketsHourlyRow, error)
|
|
RecentResults(ctx context.Context, arg RecentResultsParams) ([]RecentResultsRow, error)
|
|
// One monitor's raw results per region.
|
|
RegionBuckets(ctx context.Context, arg RegionBucketsParams) ([]RegionBucketsRow, error)
|
|
RegionBucketsDaily(ctx context.Context, arg RegionBucketsDailyParams) ([]RegionBucketsDailyRow, error)
|
|
RegionBucketsHourly(ctx context.Context, arg RegionBucketsHourlyParams) ([]RegionBucketsHourlyRow, error)
|
|
RegroupMonitors(ctx context.Context, arg RegroupMonitorsParams) error
|
|
RemoveMembership(ctx context.Context, arg RemoveMembershipParams) (int64, error)
|
|
// Moves the subgroups of a group that is about to be deleted.
|
|
ReparentGroups(ctx context.Context, arg ReparentGroupsParams) error
|
|
ReparentStatusPageGroupChildren(ctx context.Context, arg ReparentStatusPageGroupChildrenParams) error
|
|
ReparentStatusPageGroupMonitors(ctx context.Context, arg ReparentStatusPageGroupMonitorsParams) error
|
|
ResolveIncident(ctx context.Context, arg ResolveIncidentParams) (Incident, error)
|
|
// Heartbeats of an organization wait afresh after its suspension, during
|
|
// which pings were refused.
|
|
RestartHeartbeatWait(ctx context.Context, orgID uuid.UUID) error
|
|
// The organization's latest results run by one checker instance.
|
|
ResultsByChecker(ctx context.Context, arg ResultsByCheckerParams) ([]ResultsByCheckerRow, error)
|
|
ScrubAuditEmail(ctx context.Context, email string) error
|
|
SetAgentAllowPrivate(ctx context.Context, arg SetAgentAllowPrivateParams) (int64, error)
|
|
SetOrgDisabledCheckTypes(ctx context.Context, arg SetOrgDisabledCheckTypesParams) error
|
|
SetOrgLimits(ctx context.Context, arg SetOrgLimitsParams) (SetOrgLimitsRow, error)
|
|
SetPasswordHash(ctx context.Context, arg SetPasswordHashParams) error
|
|
SetPlatformSetting(ctx context.Context, arg SetPlatformSettingParams) error
|
|
// Changing the domain drops a previous verification.
|
|
SetStatusPageDomain(ctx context.Context, arg SetStatusPageDomainParams) (StatusPage, error)
|
|
SetStatusPageMonitorGroup(ctx context.Context, arg SetStatusPageMonitorGroupParams) error
|
|
SetUserAdmin(ctx context.Context, arg SetUserAdminParams) (int64, error)
|
|
SetUserLocale(ctx context.Context, arg SetUserLocaleParams) error
|
|
SetUserOrgLimit(ctx context.Context, arg SetUserOrgLimitParams) (SetUserOrgLimitRow, error)
|
|
// Other instances of the same agent seen in the last day.
|
|
SiblingInstances(ctx context.Context, agentID uuid.UUID) ([]SiblingInstancesRow, error)
|
|
StatusPageMonitors(ctx context.Context, pageID uuid.UUID) ([]StatusPageMonitorsRow, error)
|
|
// Deletes key and, as certmagic expects, everything below it.
|
|
StorageDelete(ctx context.Context, arg StorageDeleteParams) (int64, error)
|
|
StorageGet(ctx context.Context, arg StorageGetParams) (StorageGetRow, error)
|
|
StorageList(ctx context.Context, arg StorageListParams) ([]StorageListRow, error)
|
|
StoragePut(ctx context.Context, arg StoragePutParams) error
|
|
SuspendOrg(ctx context.Context, arg SuspendOrgParams) (SuspendOrgRow, error)
|
|
SuspendStatusPage(ctx context.Context, arg SuspendStatusPageParams) (SuspendStatusPageRow, error)
|
|
SuspendUser(ctx context.Context, arg SuspendUserParams) (SuspendUserRow, error)
|
|
TouchAPIToken(ctx context.Context, id uuid.UUID) error
|
|
TouchAgent(ctx context.Context, arg TouchAgentParams) error
|
|
// Writes at most once a minute per instance; agents poll far more often.
|
|
TouchAgentInstance(ctx context.Context, arg TouchAgentInstanceParams) error
|
|
TouchIdentity(ctx context.Context, arg TouchIdentityParams) error
|
|
UpdateAlertGroup(ctx context.Context, arg UpdateAlertGroupParams) (AlertGroup, error)
|
|
UpdateChannel(ctx context.Context, arg UpdateChannelParams) (NotificationChannel, error)
|
|
UpdateGroup(ctx context.Context, arg UpdateGroupParams) (MonitorGroup, error)
|
|
UpdateMaintenance(ctx context.Context, arg UpdateMaintenanceParams) (MaintenanceWindow, error)
|
|
UpdateMonitor(ctx context.Context, arg UpdateMonitorParams) (Monitor, error)
|
|
UpdateOrgPolicy(ctx context.Context, arg UpdateOrgPolicyParams) (Org, error)
|
|
UpdateRole(ctx context.Context, arg UpdateRoleParams) (Role, error)
|
|
UpdateSSOProvider(ctx context.Context, arg UpdateSSOProviderParams) (SsoProvider, error)
|
|
UpdateStatusPage(ctx context.Context, arg UpdateStatusPageParams) (StatusPage, error)
|
|
UpdateStatusPageGroup(ctx context.Context, arg UpdateStatusPageGroupParams) (StatusPageGroup, error)
|
|
UpsertAlertmanagerAlert(ctx context.Context, arg UpsertAlertmanagerAlertParams) error
|
|
UpsertLegalDocument(ctx context.Context, arg UpsertLegalDocumentParams) error
|
|
// Uptime per monitor from the hourly aggregate, including the not yet
|
|
// materialized most recent hours (real-time aggregation).
|
|
UptimeSince(ctx context.Context, arg UptimeSinceParams) ([]UptimeSinceRow, error)
|
|
UseRecoveryCode(ctx context.Context, arg UseRecoveryCodeParams) (int64, error)
|
|
// Everything the user did, in any organization, and their own account log.
|
|
UserAuditEvents(ctx context.Context, actorUserID *uuid.UUID) ([]UserAuditEventsRow, error)
|
|
UserIdentities(ctx context.Context, userID uuid.UUID) ([]UserIdentitiesRow, error)
|
|
UserMemberships(ctx context.Context, userID uuid.UUID) ([]UserMembershipsRow, error)
|
|
UserRoleNames(ctx context.Context, userID uuid.UUID) ([]UserRoleNamesRow, error)
|
|
UserTokens(ctx context.Context, userID uuid.UUID) ([]UserTokensRow, error)
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|