Documentation
¶
Index ¶
- type AddSigningSecretParams
- type AttemptTotalsRow
- type AuthMethod
- type ClaimDeliveriesParams
- type ClaimDeliveriesRow
- type ClaimPlacement
- type ClaimUnplannedEventsRow
- type CreateDeliveryParams
- type CreateDestinationParams
- type CreateInboundEventParams
- type CreateInboundRequestParams
- type CreatePanelSessionParams
- type CreatePanelUserParams
- type CreateRouteParams
- type CreateSSOUserParams
- type CreateSystemAdminParams
- type CreateTenantParams
- type DBTX
- type DeletePanelUserParams
- type DeleteProviderParams
- type DeleteRoleParams
- type DeleteRouteParams
- type Delivery
- type DeliveryAttempt
- type DeliveryAttemptsParams
- type DeliveryAttemptsRow
- type DeliveryState
- type DeliveryStateTotalsRow
- type DeliveryTargetRow
- type DeliveryTotalsRow
- type Destination
- type DestinationByNameParams
- type DestinationsWithoutSigningRow
- type DetailedRoutesRow
- type EnabledDestinationsForProviderParams
- type EventDeliveriesParams
- type EventDeliveriesRow
- type EventDetailParams
- type EventDetailRow
- type EventTotalsRow
- type ForgetShippedGrantsParams
- type GetInboundEventParams
- type GetInboundRequestParams
- type GrantPermissionParams
- type InboundEvent
- type InboundRequest
- type JoinFromProviderAsParams
- type JoinFromProviderParams
- type JoinTenantParams
- type LeaveTenantsNoLongerNamedParams
- type LinkSubjectToUserParams
- type ListRoutesRow
- type MarkDeliveredParams
- type MarkFailedParams
- type MarkSignatureAndReopenParams
- type MarkSignatureParams
- type Membership
- type MembershipInParams
- type MembershipsRow
- type NextWorkAtRow
- type OldestPendingRow
- type OverrideEventsParams
- type OverruleOnEventParams
- type OverruleOnEventRow
- type PanelSession
- type PanelSessionUserRow
- type PanelUser
- type PanelUsersRow
- type Permission
- type PermissionsRow
- type PlacementsPointedAtParams
- type PlacementsPointedAtRow
- type PointValueAtParams
- type Provider
- type ProviderAlreadyRoutedToParams
- type ProvidersRow
- type PurgeEventsParams
- type PurgeableEventsParams
- type Querier
- type Queries
- func (q *Queries) AddSigningSecret(ctx context.Context, arg AddSigningSecretParams) error
- func (q *Queries) AttemptTotals(ctx context.Context, tenantID uuid.UUID) ([]AttemptTotalsRow, error)
- func (q *Queries) ClaimDeliveries(ctx context.Context, arg ClaimDeliveriesParams) ([]ClaimDeliveriesRow, error)
- func (q *Queries) ClaimUnplannedEvents(ctx context.Context, limit int32) ([]ClaimUnplannedEventsRow, error)
- func (q *Queries) ClearRoleGrants(ctx context.Context, roleID uuid.UUID) error
- func (q *Queries) ClearSystemAdmin(ctx context.Context, id uuid.UUID) (int64, error)
- func (q *Queries) ClearSystemAdminByEmail(ctx context.Context, email string) (int64, error)
- func (q *Queries) CountEventsAwaitingRoute(ctx context.Context, tenantID uuid.UUID) (int64, error)
- func (q *Queries) CountInboundEvents(ctx context.Context) (int64, error)
- func (q *Queries) CountOperators(ctx context.Context) (int64, error)
- func (q *Queries) CountPanelUsers(ctx context.Context) (int64, error)
- func (q *Queries) CountSystemAdmins(ctx context.Context) (int64, error)
- func (q *Queries) CountTenants(ctx context.Context) (int64, error)
- func (q *Queries) CreateDelivery(ctx context.Context, arg CreateDeliveryParams) error
- func (q *Queries) CreateDestination(ctx context.Context, arg CreateDestinationParams) (Destination, error)
- func (q *Queries) CreateInboundEvent(ctx context.Context, arg CreateInboundEventParams) (uuid.UUID, error)
- func (q *Queries) CreateInboundRequest(ctx context.Context, arg CreateInboundRequestParams) error
- func (q *Queries) CreatePanelSession(ctx context.Context, arg CreatePanelSessionParams) error
- func (q *Queries) CreatePanelUser(ctx context.Context, arg CreatePanelUserParams) (uuid.UUID, error)
- func (q *Queries) CreateRoute(ctx context.Context, arg CreateRouteParams) error
- func (q *Queries) CreateSSOUser(ctx context.Context, arg CreateSSOUserParams) (PanelUser, error)
- func (q *Queries) CreateSystemAdmin(ctx context.Context, arg CreateSystemAdminParams) error
- func (q *Queries) CreateTenant(ctx context.Context, arg CreateTenantParams) (Tenant, error)
- func (q *Queries) DeleteExpiredPanelSessions(ctx context.Context) error
- func (q *Queries) DeletePanelSession(ctx context.Context, token []byte) error
- func (q *Queries) DeletePanelUser(ctx context.Context, arg DeletePanelUserParams) (int64, error)
- func (q *Queries) DeleteProvider(ctx context.Context, arg DeleteProviderParams) error
- func (q *Queries) DeleteRole(ctx context.Context, arg DeleteRoleParams) (int64, error)
- func (q *Queries) DeleteRoute(ctx context.Context, arg DeleteRouteParams) error
- func (q *Queries) DeleteTenant(ctx context.Context, slug string) error
- func (q *Queries) DeliveryAttempts(ctx context.Context, arg DeliveryAttemptsParams) ([]DeliveryAttemptsRow, error)
- func (q *Queries) DeliveryStateTotals(ctx context.Context, tenantID uuid.UUID) ([]DeliveryStateTotalsRow, error)
- func (q *Queries) DeliveryTarget(ctx context.Context, id uuid.UUID) (DeliveryTargetRow, error)
- func (q *Queries) DeliveryTotals(ctx context.Context, tenantID uuid.UUID) ([]DeliveryTotalsRow, error)
- func (q *Queries) DestinationByName(ctx context.Context, arg DestinationByNameParams) (Destination, error)
- func (q *Queries) DestinationsWithoutSigning(ctx context.Context, tenantID uuid.UUID) ([]DestinationsWithoutSigningRow, error)
- func (q *Queries) DetailedRoutes(ctx context.Context, tenantID uuid.UUID) ([]DetailedRoutesRow, error)
- func (q *Queries) DistinctProviders(ctx context.Context, tenantID uuid.UUID) ([]string, error)
- func (q *Queries) EnabledDestinationsForProvider(ctx context.Context, arg EnabledDestinationsForProviderParams) ([]uuid.UUID, error)
- func (q *Queries) EventDeliveries(ctx context.Context, arg EventDeliveriesParams) ([]EventDeliveriesRow, error)
- func (q *Queries) EventDetail(ctx context.Context, arg EventDetailParams) (EventDetailRow, error)
- func (q *Queries) EventTotals(ctx context.Context, tenantID uuid.UUID) ([]EventTotalsRow, error)
- func (q *Queries) EventsUnderOverride(ctx context.Context, overrideID pgtype.UUID) ([]uuid.UUID, error)
- func (q *Queries) ForgetShippedGrants(ctx context.Context, arg ForgetShippedGrantsParams) error
- func (q *Queries) GetInboundEvent(ctx context.Context, arg GetInboundEventParams) (InboundEvent, error)
- func (q *Queries) GetInboundRequest(ctx context.Context, arg GetInboundRequestParams) (InboundRequest, error)
- func (q *Queries) GrantPermission(ctx context.Context, arg GrantPermissionParams) error
- func (q *Queries) JoinFromProvider(ctx context.Context, arg JoinFromProviderParams) error
- func (q *Queries) JoinFromProviderAs(ctx context.Context, arg JoinFromProviderAsParams) error
- func (q *Queries) JoinTenant(ctx context.Context, arg JoinTenantParams) error
- func (q *Queries) KnownProviders(ctx context.Context, tenantID uuid.UUID) ([]string, error)
- func (q *Queries) LeaveEveryTenant(ctx context.Context, userID uuid.UUID) error
- func (q *Queries) LeaveEveryTenantByEmail(ctx context.Context, email string) error
- func (q *Queries) LeaveTenantsNoLongerNamed(ctx context.Context, arg LeaveTenantsNoLongerNamedParams) error
- func (q *Queries) LinkSubjectToUser(ctx context.Context, arg LinkSubjectToUserParams) (PanelUser, error)
- func (q *Queries) ListRecentInboundEvents(ctx context.Context, limit int32) ([]InboundEvent, error)
- func (q *Queries) ListRoutes(ctx context.Context, tenantID uuid.UUID) ([]ListRoutesRow, error)
- func (q *Queries) MarkDelivered(ctx context.Context, arg MarkDeliveredParams) error
- func (q *Queries) MarkEventPlanned(ctx context.Context, id uuid.UUID) error
- func (q *Queries) MarkFailed(ctx context.Context, arg MarkFailedParams) error
- func (q *Queries) MarkSignature(ctx context.Context, arg MarkSignatureParams) error
- func (q *Queries) MarkSignatureAndReopen(ctx context.Context, arg MarkSignatureAndReopenParams) error
- func (q *Queries) MembershipIn(ctx context.Context, arg MembershipInParams) (string, error)
- func (q *Queries) Memberships(ctx context.Context, userID uuid.UUID) ([]MembershipsRow, error)
- func (q *Queries) NextWorkAt(ctx context.Context) (NextWorkAtRow, error)
- func (q *Queries) NotifyPanel(ctx context.Context) error
- func (q *Queries) NotifyProviders(ctx context.Context) error
- func (q *Queries) NotifySigning(ctx context.Context) error
- func (q *Queries) NotifyTenants(ctx context.Context) error
- func (q *Queries) NotifyWork(ctx context.Context) error
- func (q *Queries) OldestPending(ctx context.Context, tenantID uuid.UUID) ([]OldestPendingRow, error)
- func (q *Queries) OldestPendingAge(ctx context.Context) (float64, error)
- func (q *Queries) OverrideEvents(ctx context.Context, arg OverrideEventsParams) (int64, error)
- func (q *Queries) OverruleOnEvent(ctx context.Context, arg OverruleOnEventParams) (OverruleOnEventRow, error)
- func (q *Queries) PanelSessionUser(ctx context.Context, token []byte) (PanelSessionUserRow, error)
- func (q *Queries) PanelUserByEmail(ctx context.Context, email string) (PanelUser, error)
- func (q *Queries) PanelUserBySubject(ctx context.Context, oidcSubject pgtype.Text) (PanelUser, error)
- func (q *Queries) PanelUsers(ctx context.Context, tenantID uuid.UUID) ([]PanelUsersRow, error)
- func (q *Queries) Permissions(ctx context.Context) ([]PermissionsRow, error)
- func (q *Queries) PlacementsPointedAt(ctx context.Context, arg PlacementsPointedAtParams) ([]PlacementsPointedAtRow, error)
- func (q *Queries) PointValueAt(ctx context.Context, arg PointValueAtParams) error
- func (q *Queries) ProviderAlreadyRoutedTo(ctx context.Context, arg ProviderAlreadyRoutedToParams) (bool, error)
- func (q *Queries) Providers(ctx context.Context, tenantID uuid.UUID) ([]ProvidersRow, error)
- func (q *Queries) PurgeEvents(ctx context.Context, arg PurgeEventsParams) (int64, error)
- func (q *Queries) PurgeableEvents(ctx context.Context, arg PurgeableEventsParams) (int64, error)
- func (q *Queries) RecordDeliveryAttempt(ctx context.Context, arg RecordDeliveryAttemptParams) error
- func (q *Queries) RecordOverride(ctx context.Context, arg RecordOverrideParams) (uuid.UUID, error)
- func (q *Queries) RecordSigningCheck(ctx context.Context, arg RecordSigningCheckParams) error
- func (q *Queries) RefusedByProvider(ctx context.Context, tenantID uuid.UUID) ([]RefusedByProviderRow, error)
- func (q *Queries) RegisterAuthMethod(ctx context.Context, name string) error
- func (q *Queries) RegisterDeliveryState(ctx context.Context, arg RegisterDeliveryStateParams) error
- func (q *Queries) RegisterPermission(ctx context.Context, arg RegisterPermissionParams) error
- func (q *Queries) RegisterShippedGrant(ctx context.Context, arg RegisterShippedGrantParams) error
- func (q *Queries) RegisterShippedRole(ctx context.Context, arg RegisterShippedRoleParams) (uuid.UUID, error)
- func (q *Queries) RegisterSignatureState(ctx context.Context, arg RegisterSignatureStateParams) error
- func (q *Queries) RegisterTransport(ctx context.Context, name string) error
- func (q *Queries) RegisterVerifier(ctx context.Context, name string) error
- func (q *Queries) RemoveSigningSecret(ctx context.Context, arg RemoveSigningSecretParams) (int64, error)
- func (q *Queries) ReplayDelivery(ctx context.Context, arg ReplayDeliveryParams) (int64, error)
- func (q *Queries) ReplayDestination(ctx context.Context, arg ReplayDestinationParams) (int64, error)
- func (q *Queries) ReplayEvent(ctx context.Context, arg ReplayEventParams) (int64, error)
- func (q *Queries) Retentions(ctx context.Context) ([]RetentionsRow, error)
- func (q *Queries) Role(ctx context.Context, arg RoleParams) (RoleRow, error)
- func (q *Queries) RoleByID(ctx context.Context, id uuid.UUID) (RoleByIDRow, error)
- func (q *Queries) RoleIDByName(ctx context.Context, arg RoleIDByNameParams) (uuid.UUID, error)
- func (q *Queries) RoleWasChanged(ctx context.Context, id uuid.UUID) (bool, error)
- func (q *Queries) Roles(ctx context.Context, tenantID pgtype.UUID) ([]RolesRow, error)
- func (q *Queries) RouteByID(ctx context.Context, arg RouteByIDParams) (RouteByIDRow, error)
- func (q *Queries) SearchEvents(ctx context.Context, arg SearchEventsParams) ([]SearchEventsRow, error)
- func (q *Queries) SetProvider(ctx context.Context, arg SetProviderParams) error
- func (q *Queries) SetRetention(ctx context.Context, arg SetRetentionParams) (int64, error)
- func (q *Queries) SetRole(ctx context.Context, arg SetRoleParams) (uuid.UUID, error)
- func (q *Queries) SetSystemAdmin(ctx context.Context, id uuid.UUID) (int64, error)
- func (q *Queries) SetSystemAdminByEmail(ctx context.Context, email string) (int64, error)
- func (q *Queries) SignatureTotals(ctx context.Context) ([]SignatureTotalsRow, error)
- func (q *Queries) SigningFor(ctx context.Context, destinationID uuid.UUID) ([]SigningForRow, error)
- func (q *Queries) SigningSecrets(ctx context.Context, tenantID uuid.UUID) ([]SigningSecretsRow, error)
- func (q *Queries) SigningSecretsEverywhere(ctx context.Context) ([]SigningSecretsEverywhereRow, error)
- func (q *Queries) SigningSecretsFor(ctx context.Context, destinationID uuid.UUID) ([]string, error)
- func (q *Queries) StopPointingValue(ctx context.Context, arg StopPointingValueParams) error
- func (q *Queries) SystemAdmins(ctx context.Context) ([]SystemAdminsRow, error)
- func (q *Queries) TenantBySlug(ctx context.Context, slug string) (Tenant, error)
- func (q *Queries) Tenants(ctx context.Context) ([]Tenant, error)
- func (q *Queries) TenantsNamed(ctx context.Context, dollar_1 []string) ([]TenantsNamedRow, error)
- func (q *Queries) TryAgainAtTheNewAddress(ctx context.Context, arg TryAgainAtTheNewAddressParams) (int64, error)
- func (q *Queries) UnplanEvent(ctx context.Context, arg UnplanEventParams) error
- func (q *Queries) UnplanProvider(ctx context.Context, arg UnplanProviderParams) (int64, error)
- func (q *Queries) UnroutedProviders(ctx context.Context, tenantID uuid.UUID) ([]UnroutedProvidersRow, error)
- func (q *Queries) UnverifiedEvents(ctx context.Context, arg UnverifiedEventsParams) ([]UnverifiedEventsRow, error)
- func (q *Queries) UpdateDestination(ctx context.Context, arg UpdateDestinationParams) error
- func (q *Queries) UpdatePanelUserRole(ctx context.Context, arg UpdatePanelUserRoleParams) (int64, error)
- func (q *Queries) ValuesPointedAtTenant(ctx context.Context, tenantID uuid.UUID) ([]ValuesPointedAtTenantRow, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RecordDeliveryAttemptParams
- type RecordOverrideParams
- type RecordSigningCheckParams
- type RefusedByProviderRow
- type RegisterDeliveryStateParams
- type RegisterPermissionParams
- type RegisterShippedGrantParams
- type RegisterShippedRoleParams
- type RegisterSignatureStateParams
- type RemoveSigningSecretParams
- type ReplayDeliveryParams
- type ReplayDestinationParams
- type ReplayEventParams
- type RetentionsRow
- type Role
- type RoleByIDRow
- type RoleGrant
- type RoleIDByNameParams
- type RoleParams
- type RoleRow
- type RolesRow
- type Route
- type RouteByIDParams
- type RouteByIDRow
- type SchemaMigration
- type SearchEventsParams
- type SearchEventsRow
- type SetProviderParams
- type SetRetentionParams
- type SetRoleParams
- type SignatureOverride
- type SignatureState
- type SignatureTotalsRow
- type SigningForRow
- type SigningSecret
- type SigningSecretCheck
- type SigningSecretsEverywhereRow
- type SigningSecretsRow
- type StopPointingValueParams
- type SystemAdminsRow
- type Tenant
- type TenantsNamedRow
- type Transport
- type TryAgainAtTheNewAddressParams
- type UnplanEventParams
- type UnplanProviderParams
- type UnroutedProvidersRow
- type UnverifiedEventsParams
- type UnverifiedEventsRow
- type UpdateDestinationParams
- type UpdatePanelUserRoleParams
- type ValuesPointedAtTenantRow
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddSigningSecretParams ¶
type AttemptTotalsRow ¶
type AuthMethod ¶
type ClaimDeliveriesParams ¶
type ClaimDeliveriesRow ¶
type ClaimPlacement ¶
type ClaimUnplannedEventsRow ¶
type CreateDeliveryParams ¶
type CreateDestinationParams ¶
type CreatePanelUserParams ¶
type CreateRouteParams ¶
type CreateSSOUserParams ¶
type CreateSystemAdminParams ¶
type CreateTenantParams ¶
type DeletePanelUserParams ¶
type DeleteProviderParams ¶
type DeleteRoleParams ¶
type Delivery ¶
type Delivery struct {
ID uuid.UUID
EventID uuid.UUID
DestinationID uuid.UUID
State string
Attempts int32
NextAttemptAt time.Time
LeasedUntil pgtype.Timestamptz
LastStatus pgtype.Int4
LastError pgtype.Text
DeliveredAt pgtype.Timestamptz
CreatedAt time.Time
ReplayCount int32
ReplayedAt pgtype.Timestamptz
TenantID uuid.UUID
}
type DeliveryAttempt ¶
type DeliveryAttemptsParams ¶
type DeliveryAttemptsRow ¶
type DeliveryState ¶
type DeliveryStateTotalsRow ¶
type DeliveryTargetRow ¶
type DeliveryTotalsRow ¶
type Destination ¶
type DestinationByNameParams ¶
type DetailedRoutesRow ¶
type EventDeliveriesParams ¶
type EventDeliveriesRow ¶
type EventDetailRow ¶
type EventTotalsRow ¶
type GetInboundRequestParams ¶
type GrantPermissionParams ¶
type InboundEvent ¶
type InboundRequest ¶
type JoinFromProviderParams ¶
type JoinTenantParams ¶
type LinkSubjectToUserParams ¶
type ListRoutesRow ¶
type MarkFailedParams ¶
type MarkSignatureParams ¶
type Membership ¶
type MembershipsRow ¶
type NextWorkAtRow ¶
type OldestPendingRow ¶
type OverrideEventsParams ¶
type OverruleOnEventRow ¶
type PanelSession ¶
type PanelSessionUserRow ¶
type PanelUsersRow ¶
type PermissionsRow ¶
type PlacementsPointedAtRow ¶
type PointValueAtParams ¶
type ProvidersRow ¶
type PurgeEventsParams ¶
type PurgeableEventsParams ¶
type Querier ¶
type Querier interface {
AddSigningSecret(ctx context.Context, arg AddSigningSecretParams) error
AttemptTotals(ctx context.Context, tenantID uuid.UUID) ([]AttemptTotalsRow, error)
// Switching a destination off pauses it. What is already waiting for it stays
// waiting, keeping its attempts, instead of being spent against somewhere that
// was deliberately taken out of service — which would leave a delivery dead by
// the time it came back.
ClaimDeliveries(ctx context.Context, arg ClaimDeliveriesParams) ([]ClaimDeliveriesRow, error)
// A signature that was checked and failed is never delivered, unless somebody
// overruled that deliberately and said why. One that was never checked is
// delivered: a provider with no verifier configured behaves as before.
ClaimUnplannedEvents(ctx context.Context, limit int32) ([]ClaimUnplannedEventsRow, error)
ClearRoleGrants(ctx context.Context, roleID uuid.UUID) error
ClearSystemAdmin(ctx context.Context, id uuid.UUID) (int64, error)
ClearSystemAdminByEmail(ctx context.Context, email string) (int64, error)
CountEventsAwaitingRoute(ctx context.Context, tenantID uuid.UUID) (int64, error)
CountInboundEvents(ctx context.Context) (int64, error)
CountOperators(ctx context.Context) (int64, error)
CountPanelUsers(ctx context.Context) (int64, error)
CountSystemAdmins(ctx context.Context) (int64, error)
CountTenants(ctx context.Context) (int64, error)
CreateDelivery(ctx context.Context, arg CreateDeliveryParams) error
CreateDestination(ctx context.Context, arg CreateDestinationParams) (Destination, error)
CreateInboundEvent(ctx context.Context, arg CreateInboundEventParams) (uuid.UUID, error)
CreateInboundRequest(ctx context.Context, arg CreateInboundRequestParams) error
CreatePanelSession(ctx context.Context, arg CreatePanelSessionParams) error
CreatePanelUser(ctx context.Context, arg CreatePanelUserParams) (uuid.UUID, error)
CreateRoute(ctx context.Context, arg CreateRouteParams) error
CreateSSOUser(ctx context.Context, arg CreateSSOUserParams) (PanelUser, error)
CreateSystemAdmin(ctx context.Context, arg CreateSystemAdminParams) error
CreateTenant(ctx context.Context, arg CreateTenantParams) (Tenant, error)
DeleteExpiredPanelSessions(ctx context.Context) error
DeletePanelSession(ctx context.Context, token []byte) error
DeletePanelUser(ctx context.Context, arg DeletePanelUserParams) (int64, error)
DeleteProvider(ctx context.Context, arg DeleteProviderParams) error
DeleteRole(ctx context.Context, arg DeleteRoleParams) (int64, error)
DeleteRoute(ctx context.Context, arg DeleteRouteParams) error
DeleteTenant(ctx context.Context, slug string) error
DeliveryAttempts(ctx context.Context, arg DeliveryAttemptsParams) ([]DeliveryAttemptsRow, error)
DeliveryStateTotals(ctx context.Context, tenantID uuid.UUID) ([]DeliveryStateTotalsRow, error)
DeliveryTarget(ctx context.Context, id uuid.UUID) (DeliveryTargetRow, error)
DeliveryTotals(ctx context.Context, tenantID uuid.UUID) ([]DeliveryTotalsRow, error)
DestinationByName(ctx context.Context, arg DestinationByNameParams) (Destination, error)
DestinationsWithoutSigning(ctx context.Context, tenantID uuid.UUID) ([]DestinationsWithoutSigningRow, error)
DetailedRoutes(ctx context.Context, tenantID uuid.UUID) ([]DetailedRoutesRow, error)
DistinctProviders(ctx context.Context, tenantID uuid.UUID) ([]string, error)
EnabledDestinationsForProvider(ctx context.Context, arg EnabledDestinationsForProviderParams) ([]uuid.UUID, error)
EventDeliveries(ctx context.Context, arg EventDeliveriesParams) ([]EventDeliveriesRow, error)
EventDetail(ctx context.Context, arg EventDetailParams) (EventDetailRow, error)
// Every number a scrape reports, one tenant at a time. A scrape covers the
// whole deployment, but each query still names the tenant it counts: the
// tenant is pinned on the connection, not on the statement, so a query that
// left it out would count whatever the pooled connection happened to be
// pinned to and report it under every tenant's name.
EventTotals(ctx context.Context, tenantID uuid.UUID) ([]EventTotalsRow, error)
EventsUnderOverride(ctx context.Context, overrideID pgtype.UUID) ([]uuid.UUID, error)
// A role nobody has changed grants what this build says it grants: not only
// what is missing, but exactly that, so a permission the build stopped
// shipping stops being granted too.
ForgetShippedGrants(ctx context.Context, arg ForgetShippedGrantsParams) error
GetInboundEvent(ctx context.Context, arg GetInboundEventParams) (InboundEvent, error)
GetInboundRequest(ctx context.Context, arg GetInboundRequestParams) (InboundRequest, error)
GrantPermission(ctx context.Context, arg GrantPermissionParams) error
// A value that names only a tenant leaves the role to whoever decides it here,
// so arriving again does not undo it.
JoinFromProvider(ctx context.Context, arg JoinFromProviderParams) error
// A value that names the role too makes the token the truth about it as well.
JoinFromProviderAs(ctx context.Context, arg JoinFromProviderAsParams) error
JoinTenant(ctx context.Context, arg JoinTenantParams) error
KnownProviders(ctx context.Context, tenantID uuid.UUID) ([]string, error)
LeaveEveryTenant(ctx context.Context, userID uuid.UUID) error
LeaveEveryTenantByEmail(ctx context.Context, email string) error
LeaveTenantsNoLongerNamed(ctx context.Context, arg LeaveTenantsNoLongerNamedParams) error
LinkSubjectToUser(ctx context.Context, arg LinkSubjectToUserParams) (PanelUser, error)
ListRecentInboundEvents(ctx context.Context, limit int32) ([]InboundEvent, error)
ListRoutes(ctx context.Context, tenantID uuid.UUID) ([]ListRoutesRow, error)
MarkDelivered(ctx context.Context, arg MarkDeliveredParams) error
MarkEventPlanned(ctx context.Context, id uuid.UUID) error
MarkFailed(ctx context.Context, arg MarkFailedParams) error
MarkSignature(ctx context.Context, arg MarkSignatureParams) error
MarkSignatureAndReopen(ctx context.Context, arg MarkSignatureAndReopenParams) error
MembershipIn(ctx context.Context, arg MembershipInParams) (string, error)
Memberships(ctx context.Context, userID uuid.UUID) ([]MembershipsRow, error)
NextWorkAt(ctx context.Context) (NextWorkAtRow, error)
NotifyPanel(ctx context.Context) error
NotifyProviders(ctx context.Context) error
NotifySigning(ctx context.Context) error
NotifyTenants(ctx context.Context) error
NotifyWork(ctx context.Context) error
OldestPending(ctx context.Context, tenantID uuid.UUID) ([]OldestPendingRow, error)
OldestPendingAge(ctx context.Context) (float64, error)
// An event is overruled once. Saying so twice is the same decision, not a new
// one, and the first is the one that let it out.
OverrideEvents(ctx context.Context, arg OverrideEventsParams) (int64, error)
OverruleOnEvent(ctx context.Context, arg OverruleOnEventParams) (OverruleOnEventRow, error)
PanelSessionUser(ctx context.Context, token []byte) (PanelSessionUserRow, error)
PanelUserByEmail(ctx context.Context, email string) (PanelUser, error)
PanelUserBySubject(ctx context.Context, oidcSubject pgtype.Text) (PanelUser, error)
PanelUsers(ctx context.Context, tenantID uuid.UUID) ([]PanelUsersRow, error)
Permissions(ctx context.Context) ([]PermissionsRow, error)
PlacementsPointedAt(ctx context.Context, arg PlacementsPointedAtParams) ([]PlacementsPointedAtRow, error)
PointValueAt(ctx context.Context, arg PointValueAtParams) error
ProviderAlreadyRoutedTo(ctx context.Context, arg ProviderAlreadyRoutedToParams) (bool, error)
Providers(ctx context.Context, tenantID uuid.UUID) ([]ProvidersRow, error)
// An event is only discarded once nothing is still trying to deliver it. A
// pending delivery is live work, and its age says the destination has been
// unreachable for a long time, which is a reason to look rather than to erase.
PurgeEvents(ctx context.Context, arg PurgeEventsParams) (int64, error)
PurgeableEvents(ctx context.Context, arg PurgeableEventsParams) (int64, error)
RecordDeliveryAttempt(ctx context.Context, arg RecordDeliveryAttemptParams) error
RecordOverride(ctx context.Context, arg RecordOverrideParams) (uuid.UUID, error)
RecordSigningCheck(ctx context.Context, arg RecordSigningCheckParams) error
RefusedByProvider(ctx context.Context, tenantID uuid.UUID) ([]RefusedByProviderRow, error)
RegisterAuthMethod(ctx context.Context, name string) error
RegisterDeliveryState(ctx context.Context, arg RegisterDeliveryStateParams) error
RegisterPermission(ctx context.Context, arg RegisterPermissionParams) error
RegisterShippedGrant(ctx context.Context, arg RegisterShippedGrantParams) error
// A role Charon ships belongs to no tenant and is held in any. Its description
// is left alone once it exists, because a deployment is allowed to change it.
RegisterShippedRole(ctx context.Context, arg RegisterShippedRoleParams) (uuid.UUID, error)
RegisterSignatureState(ctx context.Context, arg RegisterSignatureStateParams) error
RegisterTransport(ctx context.Context, name string) error
RegisterVerifier(ctx context.Context, name string) error
RemoveSigningSecret(ctx context.Context, arg RemoveSigningSecretParams) (int64, error)
// A replay only reopens deliveries whose destination is still routed for this
// event's provider and still enabled. Anything else is history: the routes page
// is the truth about where events go.
ReplayDelivery(ctx context.Context, arg ReplayDeliveryParams) (int64, error)
ReplayDestination(ctx context.Context, arg ReplayDestinationParams) (int64, error)
ReplayEvent(ctx context.Context, arg ReplayEventParams) (int64, error)
Retentions(ctx context.Context) ([]RetentionsRow, error)
// A tenant may define a role of its own under a name Charon also ships, and
// changing a shipped role is how that happens. Its own wins, said here rather
// than left to whichever row the database hands back first: deciding what
// somebody may do cannot depend on that.
Role(ctx context.Context, arg RoleParams) (RoleRow, error)
RoleByID(ctx context.Context, id uuid.UUID) (RoleByIDRow, error)
RoleIDByName(ctx context.Context, arg RoleIDByNameParams) (uuid.UUID, error)
RoleWasChanged(ctx context.Context, id uuid.UUID) (bool, error)
Roles(ctx context.Context, tenantID pgtype.UUID) ([]RolesRow, error)
RouteByID(ctx context.Context, arg RouteByIDParams) (RouteByIDRow, error)
// The state counts only take deliveries whose destination is still routed and
// enabled, so the numbers reconcile with the routes page. What is left over is
// reported apart as history.
SearchEvents(ctx context.Context, arg SearchEventsParams) ([]SearchEventsRow, error)
SetProvider(ctx context.Context, arg SetProviderParams) error
SetRetention(ctx context.Context, arg SetRetentionParams) (int64, error)
// Changing a role is what makes it the deployment's, and from then on starting
// leaves it alone.
SetRole(ctx context.Context, arg SetRoleParams) (uuid.UUID, error)
// Becoming one means leaving the role behind, and with it the tenant the role
// belonged to; giving it up means being given a role again.
SetSystemAdmin(ctx context.Context, id uuid.UUID) (int64, error)
SetSystemAdminByEmail(ctx context.Context, email string) (int64, error)
SignatureTotals(ctx context.Context) ([]SignatureTotalsRow, error)
SigningFor(ctx context.Context, destinationID uuid.UUID) ([]SigningForRow, error)
SigningSecrets(ctx context.Context, tenantID uuid.UUID) ([]SigningSecretsRow, error)
SigningSecretsEverywhere(ctx context.Context) ([]SigningSecretsEverywhereRow, error)
SigningSecretsFor(ctx context.Context, destinationID uuid.UUID) ([]string, error)
StopPointingValue(ctx context.Context, arg StopPointingValueParams) error
SystemAdmins(ctx context.Context) ([]SystemAdminsRow, error)
TenantBySlug(ctx context.Context, slug string) (Tenant, error)
Tenants(ctx context.Context) ([]Tenant, error)
TenantsNamed(ctx context.Context, dollar_1 []string) ([]TenantsNamedRow, error)
// What failed against an address that was wrong did not fail against the
// destination, so a corrected address gets the attempts back and is tried at
// once rather than at the end of a backoff earned by a typo.
TryAgainAtTheNewAddress(ctx context.Context, arg TryAgainAtTheNewAddressParams) (int64, error)
UnplanEvent(ctx context.Context, arg UnplanEventParams) error
UnplanProvider(ctx context.Context, arg UnplanProviderParams) (int64, error)
UnroutedProviders(ctx context.Context, tenantID uuid.UUID) ([]UnroutedProvidersRow, error)
UnverifiedEvents(ctx context.Context, arg UnverifiedEventsParams) ([]UnverifiedEventsRow, error)
UpdateDestination(ctx context.Context, arg UpdateDestinationParams) error
UpdatePanelUserRole(ctx context.Context, arg UpdatePanelUserRoleParams) (int64, error)
ValuesPointedAtTenant(ctx context.Context, tenantID uuid.UUID) ([]ValuesPointedAtTenantRow, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddSigningSecret ¶
func (q *Queries) AddSigningSecret(ctx context.Context, arg AddSigningSecretParams) error
func (*Queries) AttemptTotals ¶
func (*Queries) ClaimDeliveries ¶
func (q *Queries) ClaimDeliveries(ctx context.Context, arg ClaimDeliveriesParams) ([]ClaimDeliveriesRow, error)
Switching a destination off pauses it. What is already waiting for it stays waiting, keeping its attempts, instead of being spent against somewhere that was deliberately taken out of service — which would leave a delivery dead by the time it came back.
func (*Queries) ClaimUnplannedEvents ¶
func (q *Queries) ClaimUnplannedEvents(ctx context.Context, limit int32) ([]ClaimUnplannedEventsRow, error)
A signature that was checked and failed is never delivered, unless somebody overruled that deliberately and said why. One that was never checked is delivered: a provider with no verifier configured behaves as before.
func (*Queries) ClearRoleGrants ¶
func (*Queries) ClearSystemAdmin ¶
func (*Queries) ClearSystemAdminByEmail ¶
func (*Queries) CountEventsAwaitingRoute ¶
func (*Queries) CountInboundEvents ¶
func (*Queries) CountOperators ¶
func (*Queries) CountPanelUsers ¶
func (*Queries) CountSystemAdmins ¶
func (*Queries) CreateDelivery ¶
func (q *Queries) CreateDelivery(ctx context.Context, arg CreateDeliveryParams) error
func (*Queries) CreateDestination ¶
func (q *Queries) CreateDestination(ctx context.Context, arg CreateDestinationParams) (Destination, error)
func (*Queries) CreateInboundEvent ¶
func (*Queries) CreateInboundRequest ¶
func (q *Queries) CreateInboundRequest(ctx context.Context, arg CreateInboundRequestParams) error
func (*Queries) CreatePanelSession ¶
func (q *Queries) CreatePanelSession(ctx context.Context, arg CreatePanelSessionParams) error
func (*Queries) CreatePanelUser ¶
func (*Queries) CreateRoute ¶
func (q *Queries) CreateRoute(ctx context.Context, arg CreateRouteParams) error
func (*Queries) CreateSSOUser ¶
func (*Queries) CreateSystemAdmin ¶
func (q *Queries) CreateSystemAdmin(ctx context.Context, arg CreateSystemAdminParams) error
func (*Queries) CreateTenant ¶
func (*Queries) DeleteExpiredPanelSessions ¶
func (*Queries) DeletePanelSession ¶
func (*Queries) DeletePanelUser ¶
func (*Queries) DeleteProvider ¶
func (q *Queries) DeleteProvider(ctx context.Context, arg DeleteProviderParams) error
func (*Queries) DeleteRole ¶
func (*Queries) DeleteRoute ¶
func (q *Queries) DeleteRoute(ctx context.Context, arg DeleteRouteParams) error
func (*Queries) DeleteTenant ¶
func (*Queries) DeliveryAttempts ¶
func (q *Queries) DeliveryAttempts(ctx context.Context, arg DeliveryAttemptsParams) ([]DeliveryAttemptsRow, error)
func (*Queries) DeliveryStateTotals ¶
func (*Queries) DeliveryTarget ¶
func (*Queries) DeliveryTotals ¶
func (*Queries) DestinationByName ¶
func (q *Queries) DestinationByName(ctx context.Context, arg DestinationByNameParams) (Destination, error)
func (*Queries) DestinationsWithoutSigning ¶
func (*Queries) DetailedRoutes ¶
func (*Queries) DistinctProviders ¶
func (*Queries) EnabledDestinationsForProvider ¶
func (*Queries) EventDeliveries ¶
func (q *Queries) EventDeliveries(ctx context.Context, arg EventDeliveriesParams) ([]EventDeliveriesRow, error)
func (*Queries) EventDetail ¶
func (q *Queries) EventDetail(ctx context.Context, arg EventDetailParams) (EventDetailRow, error)
func (*Queries) EventTotals ¶
Every number a scrape reports, one tenant at a time. A scrape covers the whole deployment, but each query still names the tenant it counts: the tenant is pinned on the connection, not on the statement, so a query that left it out would count whatever the pooled connection happened to be pinned to and report it under every tenant's name.
func (*Queries) EventsUnderOverride ¶
func (*Queries) ForgetShippedGrants ¶
func (q *Queries) ForgetShippedGrants(ctx context.Context, arg ForgetShippedGrantsParams) error
A role nobody has changed grants what this build says it grants: not only what is missing, but exactly that, so a permission the build stopped shipping stops being granted too.
func (*Queries) GetInboundEvent ¶
func (q *Queries) GetInboundEvent(ctx context.Context, arg GetInboundEventParams) (InboundEvent, error)
func (*Queries) GetInboundRequest ¶
func (q *Queries) GetInboundRequest(ctx context.Context, arg GetInboundRequestParams) (InboundRequest, error)
func (*Queries) GrantPermission ¶
func (q *Queries) GrantPermission(ctx context.Context, arg GrantPermissionParams) error
func (*Queries) JoinFromProvider ¶
func (q *Queries) JoinFromProvider(ctx context.Context, arg JoinFromProviderParams) error
A value that names only a tenant leaves the role to whoever decides it here, so arriving again does not undo it.
func (*Queries) JoinFromProviderAs ¶
func (q *Queries) JoinFromProviderAs(ctx context.Context, arg JoinFromProviderAsParams) error
A value that names the role too makes the token the truth about it as well.
func (*Queries) JoinTenant ¶
func (q *Queries) JoinTenant(ctx context.Context, arg JoinTenantParams) error
func (*Queries) KnownProviders ¶
func (*Queries) LeaveEveryTenant ¶
func (*Queries) LeaveEveryTenantByEmail ¶
func (*Queries) LeaveTenantsNoLongerNamed ¶
func (q *Queries) LeaveTenantsNoLongerNamed(ctx context.Context, arg LeaveTenantsNoLongerNamedParams) error
func (*Queries) LinkSubjectToUser ¶
func (*Queries) ListRecentInboundEvents ¶
func (*Queries) ListRoutes ¶
func (*Queries) MarkDelivered ¶
func (q *Queries) MarkDelivered(ctx context.Context, arg MarkDeliveredParams) error
func (*Queries) MarkEventPlanned ¶
func (*Queries) MarkFailed ¶
func (q *Queries) MarkFailed(ctx context.Context, arg MarkFailedParams) error
func (*Queries) MarkSignature ¶
func (q *Queries) MarkSignature(ctx context.Context, arg MarkSignatureParams) error
func (*Queries) MarkSignatureAndReopen ¶
func (q *Queries) MarkSignatureAndReopen(ctx context.Context, arg MarkSignatureAndReopenParams) error
func (*Queries) MembershipIn ¶
func (*Queries) Memberships ¶
func (*Queries) NextWorkAt ¶
func (q *Queries) NextWorkAt(ctx context.Context) (NextWorkAtRow, error)
func (*Queries) OldestPending ¶
func (*Queries) OldestPendingAge ¶
func (*Queries) OverrideEvents ¶
An event is overruled once. Saying so twice is the same decision, not a new one, and the first is the one that let it out.
func (*Queries) OverruleOnEvent ¶
func (q *Queries) OverruleOnEvent(ctx context.Context, arg OverruleOnEventParams) (OverruleOnEventRow, error)
func (*Queries) PanelSessionUser ¶
func (*Queries) PanelUserByEmail ¶
func (*Queries) PanelUserBySubject ¶
func (*Queries) PanelUsers ¶
func (*Queries) Permissions ¶
func (q *Queries) Permissions(ctx context.Context) ([]PermissionsRow, error)
func (*Queries) PlacementsPointedAt ¶
func (q *Queries) PlacementsPointedAt(ctx context.Context, arg PlacementsPointedAtParams) ([]PlacementsPointedAtRow, error)
func (*Queries) PointValueAt ¶
func (q *Queries) PointValueAt(ctx context.Context, arg PointValueAtParams) error
func (*Queries) ProviderAlreadyRoutedTo ¶
func (*Queries) PurgeEvents ¶
An event is only discarded once nothing is still trying to deliver it. A pending delivery is live work, and its age says the destination has been unreachable for a long time, which is a reason to look rather than to erase.
func (*Queries) PurgeableEvents ¶
func (*Queries) RecordDeliveryAttempt ¶
func (q *Queries) RecordDeliveryAttempt(ctx context.Context, arg RecordDeliveryAttemptParams) error
func (*Queries) RecordOverride ¶
func (*Queries) RecordSigningCheck ¶
func (q *Queries) RecordSigningCheck(ctx context.Context, arg RecordSigningCheckParams) error
func (*Queries) RefusedByProvider ¶
func (*Queries) RegisterAuthMethod ¶
func (*Queries) RegisterDeliveryState ¶
func (q *Queries) RegisterDeliveryState(ctx context.Context, arg RegisterDeliveryStateParams) error
func (*Queries) RegisterPermission ¶
func (q *Queries) RegisterPermission(ctx context.Context, arg RegisterPermissionParams) error
func (*Queries) RegisterShippedGrant ¶
func (q *Queries) RegisterShippedGrant(ctx context.Context, arg RegisterShippedGrantParams) error
func (*Queries) RegisterShippedRole ¶
func (q *Queries) RegisterShippedRole(ctx context.Context, arg RegisterShippedRoleParams) (uuid.UUID, error)
A role Charon ships belongs to no tenant and is held in any. Its description is left alone once it exists, because a deployment is allowed to change it.
func (*Queries) RegisterSignatureState ¶
func (q *Queries) RegisterSignatureState(ctx context.Context, arg RegisterSignatureStateParams) error
func (*Queries) RegisterTransport ¶
func (*Queries) RegisterVerifier ¶
func (*Queries) RemoveSigningSecret ¶
func (*Queries) ReplayDelivery ¶
A replay only reopens deliveries whose destination is still routed for this event's provider and still enabled. Anything else is history: the routes page is the truth about where events go.
func (*Queries) ReplayDestination ¶
func (*Queries) ReplayEvent ¶
func (*Queries) Retentions ¶
func (q *Queries) Retentions(ctx context.Context) ([]RetentionsRow, error)
func (*Queries) Role ¶
A tenant may define a role of its own under a name Charon also ships, and changing a shipped role is how that happens. Its own wins, said here rather than left to whichever row the database hands back first: deciding what somebody may do cannot depend on that.
func (*Queries) RoleIDByName ¶
func (*Queries) RoleWasChanged ¶
func (*Queries) RouteByID ¶
func (q *Queries) RouteByID(ctx context.Context, arg RouteByIDParams) (RouteByIDRow, error)
func (*Queries) SearchEvents ¶
func (q *Queries) SearchEvents(ctx context.Context, arg SearchEventsParams) ([]SearchEventsRow, error)
The state counts only take deliveries whose destination is still routed and enabled, so the numbers reconcile with the routes page. What is left over is reported apart as history.
func (*Queries) SetProvider ¶
func (q *Queries) SetProvider(ctx context.Context, arg SetProviderParams) error
func (*Queries) SetRetention ¶
func (*Queries) SetRole ¶
Changing a role is what makes it the deployment's, and from then on starting leaves it alone.
func (*Queries) SetSystemAdmin ¶
Becoming one means leaving the role behind, and with it the tenant the role belonged to; giving it up means being given a role again.
func (*Queries) SetSystemAdminByEmail ¶
func (*Queries) SignatureTotals ¶
func (q *Queries) SignatureTotals(ctx context.Context) ([]SignatureTotalsRow, error)
func (*Queries) SigningFor ¶
func (*Queries) SigningSecrets ¶
func (*Queries) SigningSecretsEverywhere ¶
func (q *Queries) SigningSecretsEverywhere(ctx context.Context) ([]SigningSecretsEverywhereRow, error)
func (*Queries) SigningSecretsFor ¶
func (*Queries) StopPointingValue ¶
func (q *Queries) StopPointingValue(ctx context.Context, arg StopPointingValueParams) error
func (*Queries) SystemAdmins ¶
func (q *Queries) SystemAdmins(ctx context.Context) ([]SystemAdminsRow, error)
func (*Queries) TenantBySlug ¶
func (*Queries) TenantsNamed ¶
func (*Queries) TryAgainAtTheNewAddress ¶
func (q *Queries) TryAgainAtTheNewAddress(ctx context.Context, arg TryAgainAtTheNewAddressParams) (int64, error)
What failed against an address that was wrong did not fail against the destination, so a corrected address gets the attempts back and is tried at once rather than at the end of a backoff earned by a typo.
func (*Queries) UnplanEvent ¶
func (q *Queries) UnplanEvent(ctx context.Context, arg UnplanEventParams) error
func (*Queries) UnplanProvider ¶
func (*Queries) UnroutedProviders ¶
func (*Queries) UnverifiedEvents ¶
func (q *Queries) UnverifiedEvents(ctx context.Context, arg UnverifiedEventsParams) ([]UnverifiedEventsRow, error)
func (*Queries) UpdateDestination ¶
func (q *Queries) UpdateDestination(ctx context.Context, arg UpdateDestinationParams) error