Documentation
¶
Index ¶
- type AlertOutbox
- type ApiToken
- type AuditLog
- type ChannelRevisionParams
- type ClusterCa
- type CountEnabledUsersWithRoleParams
- type CountOpenTenantJoinTokensParams
- type DBTX
- type DeleteAPITokenParams
- type DeleteChannelParams
- type DeleteMaintenanceWindowParams
- type DeleteMonitorChannelsParams
- type DeleteMonitorParams
- type DeleteMonitorTagsParams
- type DeleteStatusHistoryBetweenParams
- type DeleteUserParams
- type DeletedTenant
- type DueAlertsParams
- type FsmMetum
- type GetAPITokenParams
- type GetAlertParams
- type GetChannelParams
- type GetIncidentParams
- type GetIncidentRow
- type GetJoinTokenRow
- type GetMaintenanceWindowParams
- type GetMonitorParams
- type GetMonitorRow
- type GetMonitorStateParams
- type GetProbeAlertParams
- type GetSystemAlertParams
- type GetUnconfirmedAlertParams
- type GetUserParams
- type Incident
- type InsertAPITokenParams
- type InsertAlertParams
- type InsertAuditEntryParams
- type InsertChannelParams
- type InsertClusterCAParams
- type InsertDedupParams
- type InsertDeletedTenantParams
- type InsertIncidentParams
- type InsertJoinTokenParams
- type InsertMaintenanceWindowParams
- type InsertMonitorChannelParams
- type InsertMonitorParams
- type InsertMonitorTagParams
- type InsertSessionParams
- type InsertUnconfirmedAlertParams
- type InsertUserParams
- type JoinToken
- type ListIncidentsParams
- type ListIncidentsRow
- type ListJoinTokensRow
- type ListMonitorChannelIDsParams
- type ListMonitorTagsParams
- type ListMonitorsParams
- type ListMonitorsRow
- type ListUnrevokedSessionUsersRow
- type MaintenanceWindow
- type MaintenanceWindowRevisionParams
- type MarkJoinTokenUsedParams
- type MarkSessionUsedParams
- type Monitor
- type MonitorChannel
- type MonitorRevisionParams
- type MonitorState
- type MonitorStatusHistory
- type MonitorTag
- type Node
- type NodeIncarnation
- type NotificationChannel
- type Plan
- type ProbeAlert
- type PruneStatusHistoryParams
- type PutNodeParams
- type PutRevokedCertParams
- type PutRevokedNodeParams
- type Queries
- func (q *Queries) ChannelRevision(ctx context.Context, arg ChannelRevisionParams) (int64, error)
- func (q *Queries) CountAPITokens(ctx context.Context, tenantID string) (int64, error)
- func (q *Queries) CountEnabledUsersWithRole(ctx context.Context, arg CountEnabledUsersWithRoleParams) (int64, error)
- func (q *Queries) CountOpenTenantJoinTokens(ctx context.Context, arg CountOpenTenantJoinTokensParams) (int64, error)
- func (q *Queries) CountPendingAlerts(ctx context.Context) (int64, error)
- func (q *Queries) CountTenantChannels(ctx context.Context, tenantID string) (int64, error)
- func (q *Queries) CountTenantMonitors(ctx context.Context, tenantID string) (int64, error)
- func (q *Queries) CountTenantPrivateProbes(ctx context.Context, ownerTenantID string) (int64, error)
- func (q *Queries) CountTenantsBySource(ctx context.Context, source string) (int64, error)
- func (q *Queries) CountTenantsWithPlan(ctx context.Context, plan string) (int64, error)
- func (q *Queries) CountUsers(ctx context.Context) (int64, error)
- func (q *Queries) DeleteAPIToken(ctx context.Context, arg DeleteAPITokenParams) (int64, error)
- func (q *Queries) DeleteChannel(ctx context.Context, arg DeleteChannelParams) (int64, error)
- func (q *Queries) DeleteJoinToken(ctx context.Context, id string) (int64, error)
- func (q *Queries) DeleteMaintenanceWindow(ctx context.Context, arg DeleteMaintenanceWindowParams) (int64, error)
- func (q *Queries) DeleteMonitor(ctx context.Context, arg DeleteMonitorParams) (int64, error)
- func (q *Queries) DeleteMonitorChannels(ctx context.Context, arg DeleteMonitorChannelsParams) error
- func (q *Queries) DeleteMonitorTags(ctx context.Context, arg DeleteMonitorTagsParams) error
- func (q *Queries) DeleteNode(ctx context.Context, id string) (int64, error)
- func (q *Queries) DeletePlan(ctx context.Context, id string) (int64, error)
- func (q *Queries) DeleteProbeAlertsByProbe(ctx context.Context, probeID string) error
- func (q *Queries) DeleteStatusHistoryBetween(ctx context.Context, arg DeleteStatusHistoryBetweenParams) error
- func (q *Queries) DeleteTenantAPITokens(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantAlerts(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantAudit(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantChannels(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantIncidents(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantJoinTokens(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantMaintenanceWindows(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantMonitorChannels(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantMonitorStates(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantMonitorTags(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantMonitors(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantProbeAlerts(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantRow(ctx context.Context, id string) (int64, error)
- func (q *Queries) DeleteTenantSessions(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantStatusHistory(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantUnconfirmedAlerts(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteTenantUsers(ctx context.Context, tenantID string) error
- func (q *Queries) DeleteUser(ctx context.Context, arg DeleteUserParams) (int64, error)
- func (q *Queries) DueAlerts(ctx context.Context, arg DueAlertsParams) ([]AlertOutbox, error)
- func (q *Queries) GetAPIToken(ctx context.Context, arg GetAPITokenParams) (ApiToken, error)
- func (q *Queries) GetAPITokenBySecretHash(ctx context.Context, secretHash string) (ApiToken, error)
- func (q *Queries) GetAlert(ctx context.Context, arg GetAlertParams) (AlertOutbox, error)
- func (q *Queries) GetChannel(ctx context.Context, arg GetChannelParams) (NotificationChannel, error)
- func (q *Queries) GetDedup(ctx context.Context, requestID string) (RequestDedup, error)
- func (q *Queries) GetFSMMeta(ctx context.Context, key string) (int64, error)
- func (q *Queries) GetIncident(ctx context.Context, arg GetIncidentParams) (GetIncidentRow, error)
- func (q *Queries) GetJoinToken(ctx context.Context, id string) (GetJoinTokenRow, error)
- func (q *Queries) GetMaintenanceWindow(ctx context.Context, arg GetMaintenanceWindowParams) (MaintenanceWindow, error)
- func (q *Queries) GetMonitor(ctx context.Context, arg GetMonitorParams) (GetMonitorRow, error)
- func (q *Queries) GetMonitorState(ctx context.Context, arg GetMonitorStateParams) (MonitorState, error)
- func (q *Queries) GetNode(ctx context.Context, id string) (Node, error)
- func (q *Queries) GetPlan(ctx context.Context, id string) (Plan, error)
- func (q *Queries) GetProbeAlert(ctx context.Context, arg GetProbeAlertParams) (ProbeAlert, error)
- func (q *Queries) GetRevokedNode(ctx context.Context, nodeID string) (RevokedNode, error)
- func (q *Queries) GetSession(ctx context.Context, tokenHash string) (RefreshSession, error)
- func (q *Queries) GetSystemAlert(ctx context.Context, arg GetSystemAlertParams) (SystemAlert, error)
- func (q *Queries) GetTenant(ctx context.Context, id string) (Tenant, error)
- func (q *Queries) GetTenantByOrg(ctx context.Context, zitadelOrgID sql.NullString) (Tenant, error)
- func (q *Queries) GetUnconfirmedAlert(ctx context.Context, arg GetUnconfirmedAlertParams) (UnconfirmedAlert, error)
- func (q *Queries) GetUser(ctx context.Context, arg GetUserParams) (User, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) InsertAPIToken(ctx context.Context, arg InsertAPITokenParams) error
- func (q *Queries) InsertAlert(ctx context.Context, arg InsertAlertParams) error
- func (q *Queries) InsertAuditEntry(ctx context.Context, arg InsertAuditEntryParams) error
- func (q *Queries) InsertChannel(ctx context.Context, arg InsertChannelParams) error
- func (q *Queries) InsertClusterCA(ctx context.Context, arg InsertClusterCAParams) error
- func (q *Queries) InsertDedup(ctx context.Context, arg InsertDedupParams) error
- func (q *Queries) InsertDeletedTenant(ctx context.Context, arg InsertDeletedTenantParams) error
- func (q *Queries) InsertIncident(ctx context.Context, arg InsertIncidentParams) error
- func (q *Queries) InsertJoinToken(ctx context.Context, arg InsertJoinTokenParams) error
- func (q *Queries) InsertMaintenanceWindow(ctx context.Context, arg InsertMaintenanceWindowParams) error
- func (q *Queries) InsertMonitor(ctx context.Context, arg InsertMonitorParams) error
- func (q *Queries) InsertMonitorChannel(ctx context.Context, arg InsertMonitorChannelParams) error
- func (q *Queries) InsertMonitorTag(ctx context.Context, arg InsertMonitorTagParams) error
- func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) error
- func (q *Queries) InsertUnconfirmedAlert(ctx context.Context, arg InsertUnconfirmedAlertParams) error
- func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) error
- func (q *Queries) IsTenantDeleted(ctx context.Context, id string) (int64, error)
- func (q *Queries) ListAPITokens(ctx context.Context, tenantID string) ([]ApiToken, error)
- func (q *Queries) ListActiveSystemAlerts(ctx context.Context) ([]SystemAlert, error)
- func (q *Queries) ListActiveTenantProbeAlerts(ctx context.Context, tenantID string) ([]ProbeAlert, error)
- func (q *Queries) ListAllActiveProbeAlerts(ctx context.Context) ([]ProbeAlert, error)
- func (q *Queries) ListAllMaintenanceWindows(ctx context.Context) ([]MaintenanceWindow, error)
- func (q *Queries) ListAllProbeAlerts(ctx context.Context) ([]ProbeAlert, error)
- func (q *Queries) ListChannels(ctx context.Context, tenantID string) ([]NotificationChannel, error)
- func (q *Queries) ListClusterCAs(ctx context.Context) ([]ClusterCa, error)
- func (q *Queries) ListDeletedTenants(ctx context.Context) ([]DeletedTenant, error)
- func (q *Queries) ListIncidents(ctx context.Context, arg ListIncidentsParams) ([]ListIncidentsRow, error)
- func (q *Queries) ListJoinTokens(ctx context.Context) ([]ListJoinTokensRow, error)
- func (q *Queries) ListMaintenanceWindows(ctx context.Context, tenantID string) ([]MaintenanceWindow, error)
- func (q *Queries) ListMonitorChannelIDs(ctx context.Context, arg ListMonitorChannelIDsParams) ([]string, error)
- func (q *Queries) ListMonitorTags(ctx context.Context, arg ListMonitorTagsParams) ([]string, error)
- func (q *Queries) ListMonitors(ctx context.Context, arg ListMonitorsParams) ([]ListMonitorsRow, error)
- func (q *Queries) ListNodeIncarnations(ctx context.Context) ([]NodeIncarnation, error)
- func (q *Queries) ListNodes(ctx context.Context) ([]Node, error)
- func (q *Queries) ListOpenUnconfirmedAlerts(ctx context.Context, rowLimit int64) ([]UnconfirmedAlert, error)
- func (q *Queries) ListPlans(ctx context.Context) ([]Plan, error)
- func (q *Queries) ListRevokedCerts(ctx context.Context) ([]RevokedCert, error)
- func (q *Queries) ListRevokedNodes(ctx context.Context) ([]RevokedNode, error)
- func (q *Queries) ListSecretKeys(ctx context.Context) ([]SecretKey, error)
- func (q *Queries) ListSigningKeys(ctx context.Context) ([]SigningKey, error)
- func (q *Queries) ListSystemAlerts(ctx context.Context) ([]SystemAlert, error)
- func (q *Queries) ListTenantProbeAlerts(ctx context.Context, tenantID string) ([]ProbeAlert, error)
- func (q *Queries) ListTenants(ctx context.Context) ([]Tenant, error)
- func (q *Queries) ListUnrevokedSessionUsers(ctx context.Context) ([]ListUnrevokedSessionUsersRow, error)
- func (q *Queries) ListUsers(ctx context.Context, tenantID string) ([]User, error)
- func (q *Queries) MaintenanceWindowRevision(ctx context.Context, arg MaintenanceWindowRevisionParams) (int64, error)
- func (q *Queries) MarkJoinTokenUsed(ctx context.Context, arg MarkJoinTokenUsedParams) (int64, error)
- func (q *Queries) MarkSessionUsed(ctx context.Context, arg MarkSessionUsedParams) (int64, error)
- func (q *Queries) MinTenantMonitorInterval(ctx context.Context, tenantID string) (int64, error)
- func (q *Queries) MonitorRevision(ctx context.Context, arg MonitorRevisionParams) (int64, error)
- func (q *Queries) PruneAPITokens(ctx context.Context, expiresMs int64) error
- func (q *Queries) PruneAlerts(ctx context.Context, updatedMs int64) error
- func (q *Queries) PruneAudit(ctx context.Context, atMs int64) error
- func (q *Queries) PruneDedup(ctx context.Context, issuedAtMs int64) (int64, error)
- func (q *Queries) PruneJoinTokens(ctx context.Context, expiresMs int64) error
- func (q *Queries) PruneRevokedCerts(ctx context.Context, notAfterMs int64) error
- func (q *Queries) PruneSessions(ctx context.Context, expiresMs int64) error
- func (q *Queries) PruneStatusHistory(ctx context.Context, arg PruneStatusHistoryParams) error
- func (q *Queries) PutNode(ctx context.Context, arg PutNodeParams) error
- func (q *Queries) PutRevokedCert(ctx context.Context, arg PutRevokedCertParams) error
- func (q *Queries) PutRevokedNode(ctx context.Context, arg PutRevokedNodeParams) error
- func (q *Queries) ResolveIncident(ctx context.Context, arg ResolveIncidentParams) (int64, error)
- func (q *Queries) ResolveUnconfirmedAlert(ctx context.Context, arg ResolveUnconfirmedAlertParams) (int64, error)
- func (q *Queries) RevokeSessionFamily(ctx context.Context, arg RevokeSessionFamilyParams) error
- func (q *Queries) RevokeTenantSessions(ctx context.Context, arg RevokeTenantSessionsParams) error
- func (q *Queries) RevokeUserSessions(ctx context.Context, arg RevokeUserSessionsParams) error
- func (q *Queries) SetChannelState(ctx context.Context, arg SetChannelStateParams) error
- func (q *Queries) SetFSMMeta(ctx context.Context, arg SetFSMMetaParams) error
- func (q *Queries) SetMonitorFlapping(ctx context.Context, arg SetMonitorFlappingParams) (int64, error)
- func (q *Queries) SetNodeConnectivity(ctx context.Context, arg SetNodeConnectivityParams) (int64, error)
- func (q *Queries) SetUserLastLogin(ctx context.Context, arg SetUserLastLoginParams) (int64, error)
- func (q *Queries) StatusChangesSince(ctx context.Context, arg StatusChangesSinceParams) ([]StatusChangesSinceRow, error)
- func (q *Queries) StatusHistory(ctx context.Context, arg StatusHistoryParams) ([]StatusHistoryRow, error)
- func (q *Queries) StatusHistoryBatch(ctx context.Context, arg StatusHistoryBatchParams) ([]StatusHistoryBatchRow, error)
- func (q *Queries) UpdateAlert(ctx context.Context, arg UpdateAlertParams) error
- func (q *Queries) UpdateChannel(ctx context.Context, arg UpdateChannelParams) (int64, error)
- func (q *Queries) UpdateMaintenanceWindow(ctx context.Context, arg UpdateMaintenanceWindowParams) (int64, error)
- func (q *Queries) UpdateMonitor(ctx context.Context, arg UpdateMonitorParams) (int64, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (int64, error)
- func (q *Queries) UpsertMonitorState(ctx context.Context, arg UpsertMonitorStateParams) error
- func (q *Queries) UpsertNodeIncarnation(ctx context.Context, arg UpsertNodeIncarnationParams) error
- func (q *Queries) UpsertPlan(ctx context.Context, arg UpsertPlanParams) error
- func (q *Queries) UpsertProbeAlert(ctx context.Context, arg UpsertProbeAlertParams) error
- func (q *Queries) UpsertSecretKey(ctx context.Context, arg UpsertSecretKeyParams) error
- func (q *Queries) UpsertSigningKey(ctx context.Context, arg UpsertSigningKeyParams) error
- func (q *Queries) UpsertStatusHistory(ctx context.Context, arg UpsertStatusHistoryParams) error
- func (q *Queries) UpsertSystemAlert(ctx context.Context, arg UpsertSystemAlertParams) error
- func (q *Queries) UpsertTenant(ctx context.Context, arg UpsertTenantParams) error
- func (q *Queries) UserRevision(ctx context.Context, arg UserRevisionParams) (int64, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type RefreshSession
- type RequestDedup
- type ResolveIncidentParams
- type ResolveUnconfirmedAlertParams
- type RevokeSessionFamilyParams
- type RevokeTenantSessionsParams
- type RevokeUserSessionsParams
- type RevokedCert
- type RevokedNode
- type SecretKey
- type SetChannelStateParams
- type SetFSMMetaParams
- type SetMonitorFlappingParams
- type SetNodeConnectivityParams
- type SetUserLastLoginParams
- type SigningKey
- type StatusChangesSinceParams
- type StatusChangesSinceRow
- type StatusHistoryBatchParams
- type StatusHistoryBatchRow
- type StatusHistoryParams
- type StatusHistoryRow
- type SystemAlert
- type Tenant
- type UnconfirmedAlert
- type UpdateAlertParams
- type UpdateChannelParams
- type UpdateMaintenanceWindowParams
- type UpdateMonitorParams
- type UpdateUserParams
- type UpsertMonitorStateParams
- type UpsertNodeIncarnationParams
- type UpsertPlanParams
- type UpsertProbeAlertParams
- type UpsertSecretKeyParams
- type UpsertSigningKeyParams
- type UpsertStatusHistoryParams
- type UpsertSystemAlertParams
- type UpsertTenantParams
- type User
- type UserRevisionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertOutbox ¶
type ChannelRevisionParams ¶
type CountOpenTenantJoinTokensParams ¶ added in v0.0.4
type DeleteAPITokenParams ¶
type DeleteChannelParams ¶
type DeleteMonitorParams ¶
type DeleteMonitorTagsParams ¶
type DeleteUserParams ¶
type DeletedTenant ¶
type DueAlertsParams ¶
type GetAPITokenParams ¶
type GetAlertParams ¶
type GetChannelParams ¶
type GetIncidentParams ¶
type GetIncidentRow ¶
type GetJoinTokenRow ¶
type GetMonitorParams ¶
type GetMonitorRow ¶
type GetMonitorStateParams ¶
type GetProbeAlertParams ¶ added in v0.0.4
type GetSystemAlertParams ¶
type GetUserParams ¶
type InsertAPITokenParams ¶
type InsertAlertParams ¶
type InsertAuditEntryParams ¶
type InsertChannelParams ¶
type InsertClusterCAParams ¶
type InsertDedupParams ¶
type InsertIncidentParams ¶
type InsertJoinTokenParams ¶
type InsertMonitorParams ¶
type InsertMonitorParams struct {
TenantID string
ID string
Name string
Description string
Type string
ConfigJson string
SecretsJson string
IntervalS int64
TimeoutS int64
Retries int64
RecoveryThreshold int64
ResendIntervalMin int64
AssignmentJson string
ConsensusPolicy string
Paused int64
Revision int64
CreatedMs int64
UpdatedMs int64
}
type InsertMonitorTagParams ¶
type InsertSessionParams ¶
type InsertUserParams ¶
type ListIncidentsParams ¶
type ListIncidentsRow ¶
type ListJoinTokensRow ¶
type ListMonitorTagsParams ¶
type ListMonitorsParams ¶
type ListMonitorsRow ¶
type MaintenanceWindow ¶
type MarkJoinTokenUsedParams ¶
type MarkSessionUsedParams ¶
type Monitor ¶
type Monitor struct {
TenantID string
ID string
Name string
Description string
Type string
ConfigJson string
IntervalS int64
TimeoutS int64
Retries int64
RecoveryThreshold int64
ResendIntervalMin int64
AssignmentJson string
ConsensusPolicy string
Paused int64
Revision int64
CreatedMs int64
UpdatedMs int64
SecretsJson string
}
type MonitorChannel ¶
type MonitorRevisionParams ¶
type MonitorState ¶
type MonitorStatusHistory ¶
type MonitorTag ¶
type Node ¶
type Node struct {
ID string
Name string
Role string
CapabilitiesJson string
LabelsJson string
Region string
Version string
MaxCommandVersion int64
Healthy int64
HealthChangedMs int64
RegisteredMs int64
UpdatedMs int64
ConnectivityImpaired int64
ConnectivityReason string
ConnectivityChangedMs int64
OwnerTenantID string
Incarnation string
}
type NodeIncarnation ¶
type NotificationChannel ¶
type ProbeAlert ¶ added in v0.0.4
type PutNodeParams ¶
type PutNodeParams struct {
ID string
Name string
Role string
CapabilitiesJson string
LabelsJson string
Region string
Version string
MaxCommandVersion int64
Healthy int64
HealthChangedMs int64
RegisteredMs int64
UpdatedMs int64
ConnectivityImpaired int64
ConnectivityReason string
ConnectivityChangedMs int64
OwnerTenantID string
Incarnation string
}
type PutRevokedCertParams ¶
type PutRevokedNodeParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ChannelRevision ¶
func (*Queries) CountAPITokens ¶
func (*Queries) CountEnabledUsersWithRole ¶
func (*Queries) CountOpenTenantJoinTokens ¶ added in v0.0.4
func (*Queries) CountPendingAlerts ¶
func (*Queries) CountTenantChannels ¶
func (*Queries) CountTenantMonitors ¶
func (*Queries) CountTenantPrivateProbes ¶ added in v0.0.4
func (*Queries) CountTenantsBySource ¶
func (*Queries) CountTenantsWithPlan ¶
func (*Queries) DeleteAPIToken ¶
func (*Queries) DeleteChannel ¶
func (*Queries) DeleteJoinToken ¶
func (*Queries) DeleteMaintenanceWindow ¶
func (*Queries) DeleteMonitor ¶
func (*Queries) DeleteMonitorChannels ¶
func (q *Queries) DeleteMonitorChannels(ctx context.Context, arg DeleteMonitorChannelsParams) error
func (*Queries) DeleteMonitorTags ¶
func (q *Queries) DeleteMonitorTags(ctx context.Context, arg DeleteMonitorTagsParams) error
func (*Queries) DeleteNode ¶
func (*Queries) DeletePlan ¶
func (*Queries) DeleteProbeAlertsByProbe ¶ added in v0.0.4
func (*Queries) DeleteStatusHistoryBetween ¶
func (q *Queries) DeleteStatusHistoryBetween(ctx context.Context, arg DeleteStatusHistoryBetweenParams) error
Removes the changes in [from_ms, to_ms) of one monitor (FA-UPT-07).
func (*Queries) DeleteTenantAPITokens ¶
func (*Queries) DeleteTenantAlerts ¶
The deletes below remove every row of one tenant from one table of state.db (ADR 0029). DeleteTenant runs them in this order; the tenants row goes last.
func (*Queries) DeleteTenantAudit ¶
func (*Queries) DeleteTenantChannels ¶
func (*Queries) DeleteTenantIncidents ¶
func (*Queries) DeleteTenantJoinTokens ¶
Only probe tokens of a private tenant carry the tenant ID (no foreign key).
func (*Queries) DeleteTenantMaintenanceWindows ¶
func (*Queries) DeleteTenantMonitorChannels ¶
func (*Queries) DeleteTenantMonitorStates ¶
func (*Queries) DeleteTenantMonitorTags ¶
func (*Queries) DeleteTenantMonitors ¶
func (*Queries) DeleteTenantProbeAlerts ¶ added in v0.0.4
func (*Queries) DeleteTenantRow ¶
func (*Queries) DeleteTenantSessions ¶
func (*Queries) DeleteTenantStatusHistory ¶
func (*Queries) DeleteTenantUnconfirmedAlerts ¶
func (*Queries) DeleteTenantUsers ¶
func (*Queries) DeleteUser ¶
func (*Queries) DueAlerts ¶
func (q *Queries) DueAlerts(ctx context.Context, arg DueAlertsParams) ([]AlertOutbox, error)
func (*Queries) GetAPIToken ¶
func (*Queries) GetAPITokenBySecretHash ¶
func (*Queries) GetAlert ¶
func (q *Queries) GetAlert(ctx context.Context, arg GetAlertParams) (AlertOutbox, error)
func (*Queries) GetChannel ¶
func (q *Queries) GetChannel(ctx context.Context, arg GetChannelParams) (NotificationChannel, error)
func (*Queries) GetFSMMeta ¶
func (*Queries) GetIncident ¶
func (q *Queries) GetIncident(ctx context.Context, arg GetIncidentParams) (GetIncidentRow, error)
func (*Queries) GetJoinToken ¶
func (*Queries) GetMaintenanceWindow ¶
func (q *Queries) GetMaintenanceWindow(ctx context.Context, arg GetMaintenanceWindowParams) (MaintenanceWindow, error)
func (*Queries) GetMonitor ¶
func (q *Queries) GetMonitor(ctx context.Context, arg GetMonitorParams) (GetMonitorRow, error)
Monitors and their state are written in the same FSM transaction; the defaults only cover monitors stored without the FSM (store tests).
func (*Queries) GetMonitorState ¶
func (q *Queries) GetMonitorState(ctx context.Context, arg GetMonitorStateParams) (MonitorState, error)
func (*Queries) GetProbeAlert ¶ added in v0.0.4
func (q *Queries) GetProbeAlert(ctx context.Context, arg GetProbeAlertParams) (ProbeAlert, error)
func (*Queries) GetRevokedNode ¶
func (*Queries) GetSession ¶
func (*Queries) GetSystemAlert ¶
func (q *Queries) GetSystemAlert(ctx context.Context, arg GetSystemAlertParams) (SystemAlert, error)
func (*Queries) GetTenantByOrg ¶
func (*Queries) GetUnconfirmedAlert ¶
func (q *Queries) GetUnconfirmedAlert(ctx context.Context, arg GetUnconfirmedAlertParams) (UnconfirmedAlert, error)
func (*Queries) GetUserByUsername ¶
func (*Queries) InsertAPIToken ¶
func (q *Queries) InsertAPIToken(ctx context.Context, arg InsertAPITokenParams) error
func (*Queries) InsertAlert ¶
func (q *Queries) InsertAlert(ctx context.Context, arg InsertAlertParams) error
The same alert for the same channel is enqueued once (FA-ALR-03).
func (*Queries) InsertAuditEntry ¶
func (q *Queries) InsertAuditEntry(ctx context.Context, arg InsertAuditEntryParams) error
func (*Queries) InsertChannel ¶
func (q *Queries) InsertChannel(ctx context.Context, arg InsertChannelParams) error
func (*Queries) InsertClusterCA ¶
func (q *Queries) InsertClusterCA(ctx context.Context, arg InsertClusterCAParams) error
func (*Queries) InsertDedup ¶
func (q *Queries) InsertDedup(ctx context.Context, arg InsertDedupParams) error
func (*Queries) InsertDeletedTenant ¶
func (q *Queries) InsertDeletedTenant(ctx context.Context, arg InsertDeletedTenantParams) error
func (*Queries) InsertIncident ¶
func (q *Queries) InsertIncident(ctx context.Context, arg InsertIncidentParams) error
resolved_ms is 0 for an open incident; a re-evaluated gap is stored closed.
func (*Queries) InsertJoinToken ¶
func (q *Queries) InsertJoinToken(ctx context.Context, arg InsertJoinTokenParams) error
func (*Queries) InsertMaintenanceWindow ¶
func (q *Queries) InsertMaintenanceWindow(ctx context.Context, arg InsertMaintenanceWindowParams) error
func (*Queries) InsertMonitor ¶
func (q *Queries) InsertMonitor(ctx context.Context, arg InsertMonitorParams) error
func (*Queries) InsertMonitorChannel ¶
func (q *Queries) InsertMonitorChannel(ctx context.Context, arg InsertMonitorChannelParams) error
func (*Queries) InsertMonitorTag ¶
func (q *Queries) InsertMonitorTag(ctx context.Context, arg InsertMonitorTagParams) error
func (*Queries) InsertSession ¶
func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) error
func (*Queries) InsertUnconfirmedAlert ¶
func (q *Queries) InsertUnconfirmedAlert(ctx context.Context, arg InsertUnconfirmedAlertParams) error
A report of an already stored alert changes nothing: the first copy wins.
func (*Queries) InsertUser ¶
func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) error
func (*Queries) IsTenantDeleted ¶
func (*Queries) ListAPITokens ¶
func (*Queries) ListActiveSystemAlerts ¶
func (q *Queries) ListActiveSystemAlerts(ctx context.Context) ([]SystemAlert, error)
func (*Queries) ListActiveTenantProbeAlerts ¶ added in v0.0.4
func (*Queries) ListAllActiveProbeAlerts ¶ added in v0.0.4
func (q *Queries) ListAllActiveProbeAlerts(ctx context.Context) ([]ProbeAlert, error)
func (*Queries) ListAllMaintenanceWindows ¶
func (q *Queries) ListAllMaintenanceWindows(ctx context.Context) ([]MaintenanceWindow, error)
func (*Queries) ListAllProbeAlerts ¶ added in v0.0.4
func (q *Queries) ListAllProbeAlerts(ctx context.Context) ([]ProbeAlert, error)
func (*Queries) ListChannels ¶
func (*Queries) ListClusterCAs ¶
func (*Queries) ListDeletedTenants ¶
func (q *Queries) ListDeletedTenants(ctx context.Context) ([]DeletedTenant, error)
func (*Queries) ListIncidents ¶
func (q *Queries) ListIncidents(ctx context.Context, arg ListIncidentsParams) ([]ListIncidentsRow, error)
Newest first with keyset (started_ms, id) descending. An incident matches the period if it overlaps [from_ms, to_ms].
func (*Queries) ListJoinTokens ¶
func (q *Queries) ListJoinTokens(ctx context.Context) ([]ListJoinTokensRow, error)
func (*Queries) ListMaintenanceWindows ¶
func (*Queries) ListMonitorChannelIDs ¶
func (*Queries) ListMonitorTags ¶
func (*Queries) ListMonitors ¶
func (q *Queries) ListMonitors(ctx context.Context, arg ListMonitorsParams) ([]ListMonitorsRow, error)
func (*Queries) ListNodeIncarnations ¶
func (q *Queries) ListNodeIncarnations(ctx context.Context) ([]NodeIncarnation, error)
func (*Queries) ListOpenUnconfirmedAlerts ¶
func (*Queries) ListRevokedCerts ¶
func (q *Queries) ListRevokedCerts(ctx context.Context) ([]RevokedCert, error)
func (*Queries) ListRevokedNodes ¶
func (q *Queries) ListRevokedNodes(ctx context.Context) ([]RevokedNode, error)
func (*Queries) ListSecretKeys ¶
func (*Queries) ListSigningKeys ¶
func (q *Queries) ListSigningKeys(ctx context.Context) ([]SigningKey, error)
func (*Queries) ListSystemAlerts ¶
func (q *Queries) ListSystemAlerts(ctx context.Context) ([]SystemAlert, error)
func (*Queries) ListTenantProbeAlerts ¶ added in v0.0.4
func (*Queries) ListUnrevokedSessionUsers ¶
func (q *Queries) ListUnrevokedSessionUsers(ctx context.Context) ([]ListUnrevokedSessionUsersRow, error)
The users that still hold a refresh token that is not revoked (ADR 0032).
func (*Queries) MaintenanceWindowRevision ¶
func (*Queries) MarkJoinTokenUsed ¶
func (q *Queries) MarkJoinTokenUsed(ctx context.Context, arg MarkJoinTokenUsedParams) (int64, error)
The first redemption is kept: a token with used_ms set matches no row.
func (*Queries) MarkSessionUsed ¶
The first use is kept: a second use is detected by used_ms <> 0.
func (*Queries) MinTenantMonitorInterval ¶
The shortest monitor interval of the tenant, 0 without monitors.
func (*Queries) MonitorRevision ¶
func (*Queries) PruneAPITokens ¶
func (*Queries) PruneAlerts ¶
func (*Queries) PruneDedup ¶
func (*Queries) PruneJoinTokens ¶
func (*Queries) PruneRevokedCerts ¶
func (*Queries) PruneSessions ¶
func (*Queries) PruneStatusHistory ¶
func (q *Queries) PruneStatusHistory(ctx context.Context, arg PruneStatusHistoryParams) error
Removes changes before before_ms but keeps the last one at or before it, which still defines the status at before_ms.
func (*Queries) PutRevokedCert ¶
func (q *Queries) PutRevokedCert(ctx context.Context, arg PutRevokedCertParams) error
A repeated revocation of the same serial changes nothing.
func (*Queries) PutRevokedNode ¶
func (q *Queries) PutRevokedNode(ctx context.Context, arg PutRevokedNodeParams) error
A repeated revocation keeps the later time: a node revoked again stays revoked for everything issued before the newer revocation.
func (*Queries) ResolveIncident ¶
func (*Queries) ResolveUnconfirmedAlert ¶
func (*Queries) RevokeSessionFamily ¶
func (q *Queries) RevokeSessionFamily(ctx context.Context, arg RevokeSessionFamilyParams) error
func (*Queries) RevokeTenantSessions ¶
func (q *Queries) RevokeTenantSessions(ctx context.Context, arg RevokeTenantSessionsParams) error
func (*Queries) RevokeUserSessions ¶
func (q *Queries) RevokeUserSessions(ctx context.Context, arg RevokeUserSessionsParams) error
func (*Queries) SetChannelState ¶
func (q *Queries) SetChannelState(ctx context.Context, arg SetChannelStateParams) error
func (*Queries) SetFSMMeta ¶
func (q *Queries) SetFSMMeta(ctx context.Context, arg SetFSMMetaParams) error
func (*Queries) SetMonitorFlapping ¶
func (*Queries) SetNodeConnectivity ¶
func (*Queries) SetUserLastLogin ¶
func (*Queries) StatusChangesSince ¶
func (q *Queries) StatusChangesSince(ctx context.Context, arg StatusChangesSinceParams) ([]StatusChangesSinceRow, error)
The changes at or after from_ms; the FSM counts flapping changes from them.
func (*Queries) StatusHistory ¶
func (q *Queries) StatusHistory(ctx context.Context, arg StatusHistoryParams) ([]StatusHistoryRow, error)
Changes in [from_ms, to_ms) plus the last change before from_ms.
func (*Queries) StatusHistoryBatch ¶
func (q *Queries) StatusHistoryBatch(ctx context.Context, arg StatusHistoryBatchParams) ([]StatusHistoryBatchRow, error)
StatusHistory of several monitors at once: per monitor, the changes in [from_ms, to_ms) plus the last change before from_ms, as StatusHistory. The slice comes last in the WHERE clause: sqlc numbers the named parameters before the slice's placeholders only if it does.
func (*Queries) UpdateAlert ¶
func (q *Queries) UpdateAlert(ctx context.Context, arg UpdateAlertParams) error
func (*Queries) UpdateChannel ¶
An update by the user resets the delivery state (the channel may be fixed).
func (*Queries) UpdateMaintenanceWindow ¶
func (q *Queries) UpdateMaintenanceWindow(ctx context.Context, arg UpdateMaintenanceWindowParams) (int64, error)
created_ms is kept: it is set once by the create.
func (*Queries) UpdateMonitor ¶
func (*Queries) UpdateUser ¶
created_ms and last_login_ms are kept: they are not part of the update.
func (*Queries) UpsertMonitorState ¶
func (q *Queries) UpsertMonitorState(ctx context.Context, arg UpsertMonitorStateParams) error
The flapping columns are not touched: only SetMonitorFlapping writes them.
func (*Queries) UpsertNodeIncarnation ¶
func (q *Queries) UpsertNodeIncarnation(ctx context.Context, arg UpsertNodeIncarnationParams) error
func (*Queries) UpsertPlan ¶
func (q *Queries) UpsertPlan(ctx context.Context, arg UpsertPlanParams) error
created_ms is kept on update (ADR 0029).
func (*Queries) UpsertProbeAlert ¶ added in v0.0.4
func (q *Queries) UpsertProbeAlert(ctx context.Context, arg UpsertProbeAlertParams) error
func (*Queries) UpsertSecretKey ¶
func (q *Queries) UpsertSecretKey(ctx context.Context, arg UpsertSecretKeyParams) error
created_ms is kept on update; rewrapping (KEK rotation) and retiring update the row.
func (*Queries) UpsertSigningKey ¶
func (q *Queries) UpsertSigningKey(ctx context.Context, arg UpsertSigningKeyParams) error
The creation time and the public part of an existing key are kept.
func (*Queries) UpsertStatusHistory ¶
func (q *Queries) UpsertStatusHistory(ctx context.Context, arg UpsertStatusHistoryParams) error
A second change at the same instant (PENDING, then DOWN dated back to the same failure) replaces the first.
func (*Queries) UpsertSystemAlert ¶
func (q *Queries) UpsertSystemAlert(ctx context.Context, arg UpsertSystemAlertParams) error
func (*Queries) UpsertTenant ¶
func (q *Queries) UpsertTenant(ctx context.Context, arg UpsertTenantParams) error
created_ms and source are kept on conflict: they are set once by the creation (ADR 0029).
func (*Queries) UserRevision ¶
type RefreshSession ¶
type RequestDedup ¶
type ResolveIncidentParams ¶
type RevokedCert ¶
type RevokedNode ¶
type SetChannelStateParams ¶
type SetFSMMetaParams ¶
type SetUserLastLoginParams ¶
type SigningKey ¶
type StatusChangesSinceRow ¶
type StatusHistoryBatchRow ¶
type StatusHistoryParams ¶
type StatusHistoryRow ¶
type SystemAlert ¶
type UnconfirmedAlert ¶
type UpdateAlertParams ¶
type UpdateChannelParams ¶
type UpdateMonitorParams ¶
type UpdateMonitorParams struct {
Name string
Description string
Type string
ConfigJson string
SecretsJson string
IntervalS int64
TimeoutS int64
Retries int64
RecoveryThreshold int64
ResendIntervalMin int64
AssignmentJson string
ConsensusPolicy string
Paused int64
Revision int64
UpdatedMs int64
TenantID string
ID string
ExpectedRevision int64
}