controlstatedb

package
v0.1.0-rc.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptTeamInvitationParams

type AcceptTeamInvitationParams struct {
	AcceptedAt   pgtype.Timestamptz
	IdentityID   pgtype.Text
	MembershipID pgtype.Text
	InvitationID string
}

type ActivateMemberSlugParams

type ActivateMemberSlugParams struct {
	IdentityID        pgtype.Text
	ActivatedAt       pgtype.Timestamptz
	SlugReservationID string
}

type AdvanceAuthorityRevisionParams

type AdvanceAuthorityRevisionParams struct {
	Issuer         string
	TeamID         string
	PolicyRevision int64
	UpdatedAt      pgtype.Timestamptz
}

type AdvanceTeamPolicyRevisionParams

type AdvanceTeamPolicyRevisionParams struct {
	UpdatedAt pgtype.Timestamptz
	TeamID    string
}

type ApplyIngressUsageReportParams

type ApplyIngressUsageReportParams struct {
	IngressID                      string
	IngressRunID                   string
	PublicURLID                    string
	PublishRunNumber               int64
	BucketStart                    pgtype.Timestamptz
	BucketEnd                      pgtype.Timestamptz
	ObservedThrough                pgtype.Timestamptz
	ReportRevision                 int64
	ConnectionAttempts             int64
	PolicyDenials                  int64
	CapacityDenials                int64
	VisitorStreamOpenFailures      int64
	SuccessfulStreams              int64
	ConnectionNanoseconds          int64
	IngressBytes                   int64
	EgressBytes                    int64
	HistogramData                  []byte
	Final                          bool
	ReceivedAt                     pgtype.Timestamptz
	DeltaConnectionAttempts        int64
	DeltaPolicyDenials             int64
	DeltaCapacityDenials           int64
	DeltaVisitorStreamOpenFailures int64
	DeltaSuccessfulStreams         int64
	DeltaConnectionNanoseconds     int64
	DeltaIngressBytes              int64
	DeltaEgressBytes               int64
	MergedHistogramData            []byte
}

type ApplyIngressUsageReportRow

type ApplyIngressUsageReportRow struct {
	ReportInserted       bool
	BucketUpdated        bool
	PolicyDenialsUpdated bool
}

type BeginAdminRelayDrainParams

type BeginAdminRelayDrainParams struct {
	DrainDeadline      pgtype.Timestamptz
	DrainedAt          pgtype.Timestamptz
	RelayID            string
	RelayRunID         string
	RelayLeaseRevision int64
}

type BeginAdminRelayDrainRow

type BeginAdminRelayDrainRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type BeginDNSAuthorityReleaseParams

type BeginDNSAuthorityReleaseParams struct {
	ReleaseIdempotencyKey pgtype.Text
	UpdatedAt             pgtype.Timestamptz
	AuthorityReference    string
}

type BeginIngressDrainParams

type BeginIngressDrainParams struct {
	DrainDeadline        pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
}

type BeginRelayDrainParams

type BeginRelayDrainParams struct {
	DrainDeadline      pgtype.Timestamptz
	RenewedAt          pgtype.Timestamptz
	RelayServiceID     string
	RelayID            string
	RelayRunID         string
	RelayLeaseRevision int64
}

type BeginRelayDrainRow

type BeginRelayDrainRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type CancelOpenPublicURLRecoveryEpisodeParams

type CancelOpenPublicURLRecoveryEpisodeParams struct {
	CanceledAt       pgtype.Timestamptz
	PublicURLID      string
	PublishRunNumber int64
}

type CancelPublishRunACMEAuthorizationsParams

type CancelPublishRunACMEAuthorizationsParams struct {
	CanceledAt   pgtype.Timestamptz
	PublishRunID string
}

type CancelPublishRunACMEOrdersParams

type CancelPublishRunACMEOrdersParams struct {
	CanceledAt   pgtype.Timestamptz
	PublishRunID string
}

type CheckACMEChallengeRoutingReadyParams

type CheckACMEChallengeRoutingReadyParams struct {
	CheckedAt  pgtype.Timestamptz
	IssuanceID string
}

type ClaimACMEOrderWorkParams

type ClaimACMEOrderWorkParams struct {
	WorkOwner     pgtype.Text
	WorkExpiresAt pgtype.Timestamptz
	ClaimedAt     pgtype.Timestamptz
}

type ClaimDNSAuthorityWorkParams

type ClaimDNSAuthorityWorkParams struct {
	WorkOwner     pgtype.Text
	WorkExpiresAt pgtype.Timestamptz
	ClaimedAt     pgtype.Timestamptz
}

type ClaimDNSPublicURLWorkParams

type ClaimDNSPublicURLWorkParams struct {
	WorkOwner     pgtype.Text
	WorkExpiresAt pgtype.Timestamptz
	ClaimedAt     pgtype.Timestamptz
}

type ClaimPublicURLUsageDeliveriesParams

type ClaimPublicURLUsageDeliveriesParams struct {
	WorkOwner     pgtype.Text
	WorkExpiresAt pgtype.Timestamptz
	ClaimedAt     pgtype.Timestamptz
	BatchSize     int32
}

type ClaimPublisherConnectionParams

type ClaimPublisherConnectionParams struct {
	RelayID                      pgtype.Text
	RelayRunID                   pgtype.Text
	RelayLeaseRevision           pgtype.Int8
	ClaimID                      pgtype.Text
	ConnectedAt                  pgtype.Timestamptz
	PublisherConnectionID        string
	PublishRunID                 string
	PublicURLID                  string
	PublishRunNumber             int64
	ConnectionSlot               int16
	ConnectionAssignmentRevision int64
	RelayServiceID               string
}

type ClaimRelayCertificateOrderWorkParams

type ClaimRelayCertificateOrderWorkParams struct {
	WorkOwner     pgtype.Text
	WorkExpiresAt pgtype.Timestamptz
	ClaimedAt     pgtype.Timestamptz
}

type ClaimRelayServiceForCertificateOrderParams

type ClaimRelayServiceForCertificateOrderParams struct {
	Now              pgtype.Timestamptz
	RetryFailedAfter pgtype.Timestamptz
}

type ClosePublishRunConnectionsParams

type ClosePublishRunConnectionsParams struct {
	ClosedAt     pgtype.Timestamptz
	PublishRunID string
}

type ClosePublishRunParams

type ClosePublishRunParams struct {
	State        string
	ClosedAt     pgtype.Timestamptz
	CloseReason  pgtype.Text
	PublishRunID string
}

type CompleteACMEAuthorizationCleanupParams

type CompleteACMEAuthorizationCleanupParams struct {
	CompletedAt pgtype.Timestamptz
	IssuanceID  string
}

type CompletePublicURLUsageDeliveryParams

type CompletePublicURLUsageDeliveryParams struct {
	CompletedAt pgtype.Timestamptz
	DeliveryID  int64
	WorkOwner   pgtype.Text
	WorkEpoch   int64
}

type ConsumeOIDCAssertionParams

type ConsumeOIDCAssertionParams struct {
	AssertionDigest []byte
	ConsumedAt      pgtype.Timestamptz
	ExpiresAt       pgtype.Timestamptz
}

type ControlAcmeAccount

type ControlAcmeAccount struct {
	ID                     string
	DirectoryUrl           string
	ContactEmail           string
	AccountKeyCiphertext   []byte
	AccountKeyStorageKeyID string
	AccountUrl             pgtype.Text
	AcceptedTermsUrl       pgtype.Text
	CreatedAt              pgtype.Timestamptz
	UpdatedAt              pgtype.Timestamptz
}

type ControlAcmeAuthorization

type ControlAcmeAuthorization struct {
	ID                    string
	OrderID               string
	Identifier            string
	AuthorizationUrl      string
	ChallengeType         pgtype.Text
	ChallengeUrl          pgtype.Text
	ChallengeToken        pgtype.Text
	ChallengeDigest       []byte
	PresentationReference pgtype.Text
	State                 string
	AuthorizationRevision int64
	WorkOwner             pgtype.Text
	WorkEpoch             int64
	WorkExpiresAt         pgtype.Timestamptz
	Attempts              int64
	AvailableAt           pgtype.Timestamptz
	PresentedAt           pgtype.Timestamptz
	ValidatedAt           pgtype.Timestamptz
	CleanupCompletedAt    pgtype.Timestamptz
	ExpiresAt             pgtype.Timestamptz
	LastError             pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
}

type ControlAcmeOrder

type ControlAcmeOrder struct {
	ID                     string
	AccountID              string
	PublishRunID           string
	PublicURLID            string
	PublishRunNumber       int64
	IdempotencyKey         string
	RequestDigest          []byte
	CertificateCacheKey    string
	CertificateScope       string
	CertificateIdentifiers []string
	ChallengeMethod        string
	CsrDer                 []byte
	CsrDigest              []byte
	State                  string
	OrderRevision          int64
	OrderUrl               pgtype.Text
	FinalizeUrl            pgtype.Text
	CertificateUrl         pgtype.Text
	CertificatePem         []byte
	NotBefore              pgtype.Timestamptz
	NotAfter               pgtype.Timestamptz
	RenewAt                pgtype.Timestamptz
	InstalledAt            pgtype.Timestamptz
	WorkOwner              pgtype.Text
	WorkEpoch              int64
	WorkExpiresAt          pgtype.Timestamptz
	Attempts               int64
	AvailableAt            pgtype.Timestamptz
	LastError              pgtype.Text
	CreatedAt              pgtype.Timestamptz
	UpdatedAt              pgtype.Timestamptz
}

type ControlAdminAuditEvent

type ControlAdminAuditEvent struct {
	ID              int64
	ActorIdentityID pgtype.Text
	Actor           string
	RequestID       string
	Operation       string
	TargetKind      string
	TargetID        string
	Details         []byte
	OccurredAt      pgtype.Timestamptz
}

type ControlAuthorityRevisionState

type ControlAuthorityRevisionState struct {
	ID                     int64
	Issuer                 string
	TeamID                 string
	ObservedPolicyRevision int64
	AppliedPolicyRevision  int64
	ObservedAt             pgtype.Timestamptz
	AppliedAt              pgtype.Timestamptz
}

type ControlControlSession

type ControlControlSession struct {
	ID                           string
	IdentityID                   string
	AuthenticationMethod         string
	AuthenticationSourceRevision int64
	Administrator                bool
	AccessTokenID                string
	AccessTokenDigest            []byte
	AccessExpiresAt              pgtype.Timestamptz
	RefreshTokenID               string
	RefreshTokenDigest           []byte
	RetrySecretCiphertext        []byte
	RetrySecretStorageKeyID      string
	RefreshExpiresAt             pgtype.Timestamptz
	CreatedAt                    pgtype.Timestamptz
	LastRefreshedAt              pgtype.Timestamptz
	RevokedAt                    pgtype.Timestamptz
	RevokedBy                    pgtype.Text
}

type ControlControlTlsCache

type ControlControlTlsCache struct {
	ID                int64
	DirectoryUrl      string
	CacheKey          string
	CacheCiphertext   []byte
	CacheStorageKeyID string
	UpdatedAt         pgtype.Timestamptz
}

type ControlDnsAuthority

type ControlDnsAuthority struct {
	ID                    int64
	AuthorityReference    string
	TeamID                string
	DomainID              string
	CanonicalDomain       string
	CreateIdempotencyKey  string
	CreateRequestDigest   []byte
	ReleaseIdempotencyKey pgtype.Text
	Provider              string
	ProviderZoneID        pgtype.Text
	State                 string
	Nameservers           []string
	WorkRevision          int64
	WorkOwner             pgtype.Text
	WorkEpoch             int64
	WorkExpiresAt         pgtype.Timestamptz
	Attempts              int64
	AvailableAt           pgtype.Timestamptz
	LastError             pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
}

type ControlDnsChallengeChange

type ControlDnsChallengeChange struct {
	ID            int64
	ZoneID        string
	RecordName    string
	DesiredDigest []byte
	ChangeID      string
	UpdatedAt     pgtype.Timestamptz
}

type ControlDomain

type ControlDomain struct {
	ID                      string
	Kind                    string
	TeamID                  pgtype.Text
	CanonicalDomain         string
	DnsAuthorityReference   pgtype.Text
	State                   string
	AuthorityRevision       int64
	VerificationTokenDigest []byte
	CreatedByIdentityID     pgtype.Text
	ClaimIdempotencyKey     pgtype.Text
	ClaimRequestDigest      []byte
	MakeDefaultWhenReady    bool
	CreatedAt               pgtype.Timestamptz
	VerifiedAt              pgtype.Timestamptz
	ReusableAfter           pgtype.Timestamptz
	ReleasedAt              pgtype.Timestamptz
	UpdatedAt               pgtype.Timestamptz
}

type ControlIdentity

type ControlIdentity struct {
	ID              string
	Kind            string
	Issuer          pgtype.Text
	Subject         pgtype.Text
	DisplayName     string
	NormalizedEmail pgtype.Text
	EmailVerified   bool
	Administrator   bool
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
	DisabledAt      pgtype.Timestamptz
}

type ControlIngressLease

type ControlIngressLease struct {
	ID                   int64
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
	ProtocolVersion      int64
	ConnectionCapacity   int64
	ReportedConnections  int64
	RoutingTableRevision int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
}

type ControlIngressRoutingTableClock

type ControlIngressRoutingTableClock struct {
	ID                    int16
	CurrentRevision       int64
	RetainedAfterRevision int64
	UpdatedAt             pgtype.Timestamptz
}

type ControlIngressRoutingTableEvent

type ControlIngressRoutingTableEvent struct {
	ID                 int64
	EventKind          string
	PublicURLID        string
	PublishRunNumber   int64
	CanonicalHostname  string
	EntryRevision      int64
	Projection         []byte
	PublicUrlExpiresAt pgtype.Timestamptz
	CreatedAt          pgtype.Timestamptz
}

type ControlIngressUsageReport

type ControlIngressUsageReport struct {
	ID                        int64
	IngressID                 string
	IngressRunID              string
	PublicURLID               string
	PublishRunNumber          int64
	BucketStart               pgtype.Timestamptz
	BucketEnd                 pgtype.Timestamptz
	ObservedThrough           pgtype.Timestamptz
	ReportRevision            int64
	ConnectionAttempts        int64
	PolicyDenials             int64
	CapacityDenials           int64
	VisitorStreamOpenFailures int64
	SuccessfulStreams         int64
	ConnectionNanoseconds     int64
	IngressBytes              int64
	EgressBytes               int64
	HistogramData             []byte
	Final                     bool
	ReceivedAt                pgtype.Timestamptz
}

type ControlIngressUsageRun

type ControlIngressUsageRun struct {
	ID                   int64
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
	StartedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	LastReportedAt       pgtype.Timestamptz
	ObservedThrough      pgtype.Timestamptz
	EndedAt              pgtype.Timestamptz
	CoverageComplete     bool
	IncompleteFrom       pgtype.Timestamptz
	IncompleteUntil      pgtype.Timestamptz
}

type ControlMaintenanceControl

type ControlMaintenanceControl struct {
	ID          int64
	ControlName string
	Allowed     bool
	Revision    int64
	UpdatedAt   pgtype.Timestamptz
	UpdatedBy   string
}

type ControlManagedLabelReservation

type ControlManagedLabelReservation struct {
	ID        int64
	Label     string
	CreatedAt pgtype.Timestamptz
}

type ControlMemberSlugReservation

type ControlMemberSlugReservation struct {
	ID                   string
	TeamID               string
	MemberSlug           string
	State                string
	ReservedByIdentityID pgtype.Text
	CreatedAt            pgtype.Timestamptz
	ActivatedAt          pgtype.Timestamptz
	QuarantinedAt        pgtype.Timestamptz
	ReusableAfter        pgtype.Timestamptz
	ReleasedAt           pgtype.Timestamptz
}

type ControlOidcAssertionExchange

type ControlOidcAssertionExchange struct {
	ID              int64
	AssertionDigest []byte
	ConsumedAt      pgtype.Timestamptz
	ExpiresAt       pgtype.Timestamptz
}

type ControlPublicUrl

type ControlPublicUrl struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
}

type ControlPublicUrlRecoveryEpisode

type ControlPublicUrlRecoveryEpisode struct {
	ID               int64
	PublicURLID      string
	PublishRunNumber int64
	State            string
	OpenedAt         pgtype.Timestamptz
	ObservedAt       pgtype.Timestamptz
	CanceledAt       pgtype.Timestamptz
	ObservedSeconds  pgtype.Float8
}

type ControlPublicUrlRecoveryHistogram

type ControlPublicUrlRecoveryHistogram struct {
	ID                    int16
	ObservationCount      int64
	ObservationSumSeconds float64
	BucketLe025           int64
	BucketLe05            int64
	BucketLe1             int64
	BucketLe2             int64
	BucketLe5             int64
	BucketLe10            int64
	BucketLe20            int64
	BucketLe30            int64
	BucketLe45            int64
	BucketLe60            int64
	BucketLe120           int64
	UpdatedAt             pgtype.Timestamptz
}

type ControlPublicUrlUsageBucket

type ControlPublicUrlUsageBucket struct {
	ID                        int64
	PublicURLID               string
	PublishRunNumber          int64
	TeamID                    string
	ActingIdentityID          string
	BucketStart               pgtype.Timestamptz
	BucketEnd                 pgtype.Timestamptz
	BucketRevision            int64
	ObservedThrough           pgtype.Timestamptz
	ConnectionAttempts        int64
	PolicyDenials             int64
	CapacityDenials           int64
	VisitorStreamOpenFailures int64
	SuccessfulStreams         int64
	ConnectionNanoseconds     int64
	IngressBytes              int64
	EgressBytes               int64
	HistogramData             []byte
	Finalized                 bool
	Complete                  bool
	FinalizedAt               pgtype.Timestamptz
	UpdatedAt                 pgtype.Timestamptz
}

type ControlPublicUrlUsageConfiguration

type ControlPublicUrlUsageConfiguration struct {
	ID                          int16
	VisitorNetworkHashMasterKey []byte
	CreatedAt                   pgtype.Timestamptz
}

type ControlPublicUrlUsageDelivery

type ControlPublicUrlUsageDelivery struct {
	ID              int64
	BucketID        int64
	BucketRevision  int64
	DeliveryKey     string
	State           string
	WorkOwner       pgtype.Text
	WorkEpoch       int64
	WorkExpiresAt   pgtype.Timestamptz
	Attempts        int64
	AvailableAt     pgtype.Timestamptz
	LastAttemptedAt pgtype.Timestamptz
	DeliveredAt     pgtype.Timestamptz
	LastError       pgtype.Text
	CreatedAt       pgtype.Timestamptz
}

type ControlPublishRun

type ControlPublishRun struct {
	ID                         string
	PublicURLID                string
	TeamID                     string
	MembershipID               pgtype.Text
	ActingIdentityID           string
	PublishRunNumber           int64
	IdempotencyKey             string
	RequestDigest              []byte
	PublishRunTokenID          string
	PublishRunTokenDigest      []byte
	PolicyRevision             int64
	PolicyDenials              int64
	CertificateCacheKey        string
	CertificateScope           string
	CertificateIdentifiers     []string
	CertificateChallengeMethod string
	State                      string
	CreatedAt                  pgtype.Timestamptz
	LastHeartbeatAt            pgtype.Timestamptz
	PublisherExpiresAt         pgtype.Timestamptz
	CertificateInstalledAt     pgtype.Timestamptz
	CertificateIssuanceID      pgtype.Text
	CertificateNotAfter        pgtype.Timestamptz
	ReadyAt                    pgtype.Timestamptz
	ClosedAt                   pgtype.Timestamptz
	CloseReason                pgtype.Text
	AssignmentsOpen            pgtype.Bool
}

type ControlPublishRunConnectionSlot

type ControlPublishRunConnectionSlot struct {
	ID                                     int64
	PublishRunID                           string
	PublicURLID                            string
	PublishRunNumber                       int64
	ConnectionSlot                         int16
	PublisherConnectionID                  string
	ConnectionAssignmentRevision           int64
	RelayServiceID                         string
	RelayAddress                           string
	TlsServerName                          string
	PublisherConnectionCredentialDigest    []byte
	PublisherConnectionCredentialExpiresAt pgtype.Timestamptz
	ConnectedRelayID                       pgtype.Text
	ConnectedRelayRunID                    pgtype.Text
	ConnectedRelayLeaseRevision            pgtype.Int8
	ClaimID                                pgtype.Text
	State                                  string
	AssignedAt                             pgtype.Timestamptz
	ConnectedAt                            pgtype.Timestamptz
	ReadyAt                                pgtype.Timestamptz
	DisconnectedAt                         pgtype.Timestamptz
	ClosedAt                               pgtype.Timestamptz
	SessionOpen                            bool
}

type ControlRelayCertificateOrder

type ControlRelayCertificateOrder struct {
	ID                     string
	AccountID              string
	RelayServiceID         string
	TlsServerName          string
	PrivateKeyCiphertext   []byte
	PrivateKeyStorageKeyID string
	CsrDer                 []byte
	CsrDigest              []byte
	State                  string
	OrderRevision          int64
	OrderUrl               pgtype.Text
	FinalizeUrl            pgtype.Text
	CertificateUrl         pgtype.Text
	AuthorizationUrl       pgtype.Text
	ChallengeUrl           pgtype.Text
	ChallengeToken         pgtype.Text
	ChallengeDigest        []byte
	PresentationReference  pgtype.Text
	CertificatePem         []byte
	NotBefore              pgtype.Timestamptz
	NotAfter               pgtype.Timestamptz
	RenewAt                pgtype.Timestamptz
	WorkOwner              pgtype.Text
	WorkEpoch              int64
	WorkExpiresAt          pgtype.Timestamptz
	Attempts               int64
	AvailableAt            pgtype.Timestamptz
	LastError              pgtype.Text
	CreatedAt              pgtype.Timestamptz
	UpdatedAt              pgtype.Timestamptz
	AuthorizationExpiresAt pgtype.Timestamptz
}

type ControlRelayLease

type ControlRelayLease struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
}

type ControlRelayService

type ControlRelayService struct {
	ID                              int64
	RelayServiceID                  string
	RelayAddress                    string
	TlsServerName                   string
	TransportCertificatePem         pgtype.Text
	TransportPrivateKeyCiphertext   []byte
	TransportPrivateKeyStorageKeyID pgtype.Text
	TransportCertificateSerial      pgtype.Text
	TransportCertificateExpiresAt   pgtype.Timestamptz
	Enabled                         bool
	CreatedAt                       pgtype.Timestamptz
	UpdatedAt                       pgtype.Timestamptz
}

type ControlRelayServiceAssignmentTotal

type ControlRelayServiceAssignmentTotal struct {
	ID              int64
	RelayServiceID  string
	AssignmentCount int64
}

type ControlRuntimeSecret

type ControlRuntimeSecret struct {
	ID                                 int16
	ExternalRetryMasterKeyCiphertext   []byte
	ExternalRetryMasterKeyStorageKeyID string
	CreatedAt                          pgtype.Timestamptz
}

type ControlTeam

type ControlTeam struct {
	ID                     string
	Kind                   string
	DisplayName            string
	ManagedLabel           string
	DefaultDomainID        pgtype.Text
	PolicyRevision         int64
	CreatedByIdentityID    string
	CreationIdempotencyKey pgtype.Text
	CreationRequestDigest  []byte
	CreatedAt              pgtype.Timestamptz
	UpdatedAt              pgtype.Timestamptz
	DeletedAt              pgtype.Timestamptz
}

type ControlTeamInvitation

type ControlTeamInvitation struct {
	ID                         string
	TeamID                     string
	SlugReservationID          string
	InitialRole                string
	InvitedByIdentityID        string
	IdempotencyKey             string
	RequestDigest              []byte
	TokenDigest                []byte
	NormalizedEmailRestriction pgtype.Text
	State                      string
	CreatedAt                  pgtype.Timestamptz
	ExpiresAt                  pgtype.Timestamptz
	AcceptedAt                 pgtype.Timestamptz
	AcceptedByIdentityID       pgtype.Text
	AcceptedMembershipID       pgtype.Text
	RevokedAt                  pgtype.Timestamptz
	RevokedByIdentityID        pgtype.Text
}

type ControlTeamMembership

type ControlTeamMembership struct {
	ID                  string
	TeamID              string
	IdentityID          string
	SlugReservationID   string
	ManagedLabel        string
	Role                string
	AuthorityRevision   int64
	CreatedAt           pgtype.Timestamptz
	UpdatedAt           pgtype.Timestamptz
	RemovedAt           pgtype.Timestamptz
	RemovedByIdentityID pgtype.Text
}

type CountOpenPublishRunAssignmentsByRelayServiceRow

type CountOpenPublishRunAssignmentsByRelayServiceRow struct {
	RelayServiceID  string
	AssignmentCount int64
}

type CountRelayActiveConnectionsParams

type CountRelayActiveConnectionsParams struct {
	RelayID            pgtype.Text
	RelayRunID         pgtype.Text
	RelayLeaseRevision pgtype.Int8
}

type CreateActiveSlugReservationParams

type CreateActiveSlugReservationParams struct {
	ID         string
	TeamID     string
	MemberSlug string
	IdentityID pgtype.Text
	CreatedAt  pgtype.Timestamptz
}

type CreateClaimedDNSAuthorityParams

type CreateClaimedDNSAuthorityParams struct {
	AuthorityReference   string
	TeamID               string
	DomainID             string
	CanonicalDomain      string
	CreateIdempotencyKey string
	CreateRequestDigest  []byte
	CreatedAt            pgtype.Timestamptz
}

type CreateClaimedDomainParams

type CreateClaimedDomainParams struct {
	ID                    string
	TeamID                pgtype.Text
	CanonicalDomain       string
	DnsAuthorityReference pgtype.Text
	AuthorityRevision     int64
	CreatedByIdentityID   pgtype.Text
	ClaimIdempotencyKey   pgtype.Text
	ClaimRequestDigest    []byte
	MakeDefaultWhenReady  bool
	CreatedAt             pgtype.Timestamptz
}

type CreateControlSessionParams

type CreateControlSessionParams struct {
	ID                           string
	IdentityID                   string
	AuthenticationMethod         string
	AuthenticationSourceRevision int64
	Administrator                bool
	AccessTokenID                string
	AccessTokenDigest            []byte
	AccessExpiresAt              pgtype.Timestamptz
	RefreshTokenID               string
	RefreshTokenDigest           []byte
	RetrySecretCiphertext        []byte
	RetrySecretStorageKeyID      string
	RefreshExpiresAt             pgtype.Timestamptz
	CreatedAt                    pgtype.Timestamptz
}

type CreateIdentityParams

type CreateIdentityParams struct {
	ID              string
	Kind            string
	DisplayName     string
	NormalizedEmail pgtype.Text
	EmailVerified   bool
	Administrator   bool
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type CreateManagedDomainParams

type CreateManagedDomainParams struct {
	ID              string
	CanonicalDomain string
	CreatedAt       pgtype.Timestamptz
}

type CreateOIDCIdentityParams

type CreateOIDCIdentityParams struct {
	ID              string
	Issuer          pgtype.Text
	Subject         pgtype.Text
	DisplayName     string
	NormalizedEmail pgtype.Text
	EmailVerified   bool
	CreatedAt       pgtype.Timestamptz
}

type CreateOrGetDNSAuthorityParams

type CreateOrGetDNSAuthorityParams struct {
	AuthorityReference   string
	TeamID               string
	DomainID             string
	CanonicalDomain      string
	CreateIdempotencyKey string
	CreateRequestDigest  []byte
	CreatedAt            pgtype.Timestamptz
}

type CreateOrganizationTeamParams

type CreateOrganizationTeamParams struct {
	ID                     string
	DisplayName            string
	ManagedLabel           string
	DefaultDomainID        pgtype.Text
	CreatedByIdentityID    string
	CreationIdempotencyKey pgtype.Text
	CreationRequestDigest  []byte
	CreatedAt              pgtype.Timestamptz
}

type CreateOrganizationTeamRow

type CreateOrganizationTeamRow struct {
	ID              string
	Kind            string
	DisplayName     string
	ManagedLabel    string
	DefaultDomainID pgtype.Text
	PolicyRevision  int64
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type CreateOwnerMembershipParams

type CreateOwnerMembershipParams struct {
	ID                string
	TeamID            string
	IdentityID        string
	SlugReservationID string
	ManagedLabel      string
	CreatedAt         pgtype.Timestamptz
}

type CreatePersonalTeamParams

type CreatePersonalTeamParams struct {
	ID                  string
	DisplayName         string
	ManagedLabel        string
	CreatedByIdentityID string
	CreatedAt           pgtype.Timestamptz
}

type CreateTeamInvitationParams

type CreateTeamInvitationParams struct {
	ID                         string
	TeamID                     string
	SlugReservationID          string
	InitialRole                string
	InvitedByIdentityID        string
	IdempotencyKey             string
	RequestDigest              []byte
	TokenDigest                []byte
	NormalizedEmailRestriction pgtype.Text
	CreatedAt                  pgtype.Timestamptz
	ExpiresAt                  pgtype.Timestamptz
}

type CreateTeamMembershipParams

type CreateTeamMembershipParams struct {
	ID                string
	TeamID            string
	IdentityID        string
	SlugReservationID string
	ManagedLabel      string
	Role              string
	AuthorityRevision int64
	CreatedAt         pgtype.Timestamptz
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DNSAuthorityReleaseReadyParams

type DNSAuthorityReleaseReadyParams struct {
	AuthorityDomainID string
	ObservedAt        pgtype.Timestamptz
}

type DeleteControlTLSCacheEntryParams

type DeleteControlTLSCacheEntryParams struct {
	DirectoryUrl string
	CacheKey     string
}

type DeletePublicURLParams

type DeletePublicURLParams struct {
	DeletedAt                pgtype.Timestamptz
	PublicURLID              string
	ExpectedMutationRevision int64
}

type DisconnectPublisherConnectionParams

type DisconnectPublisherConnectionParams struct {
	DisconnectedAt               pgtype.Timestamptz
	PublisherConnectionID        string
	PublishRunID                 string
	PublicURLID                  string
	PublishRunNumber             int64
	ConnectionSlot               int16
	ConnectionAssignmentRevision int64
	RelayServiceID               string
	RelayID                      pgtype.Text
	RelayRunID                   pgtype.Text
	RelayLeaseRevision           pgtype.Int8
	ClaimID                      pgtype.Text
}

type EnsureACMEAccountParams

type EnsureACMEAccountParams struct {
	ID                     string
	DirectoryUrl           string
	ContactEmail           string
	AccountKeyCiphertext   []byte
	AccountKeyStorageKeyID string
	CreatedAt              pgtype.Timestamptz
}

type EnsureExternalAuthorityPrincipalParams

type EnsureExternalAuthorityPrincipalParams struct {
	IdentityID string
	CreatedAt  pgtype.Timestamptz
}

type EnsureExternalRetryMasterKeyParams

type EnsureExternalRetryMasterKeyParams struct {
	ExternalRetryMasterKeyCiphertext   []byte
	ExternalRetryMasterKeyStorageKeyID string
	CreatedAt                          pgtype.Timestamptz
}

type EnsureExternalRetryMasterKeyRow

type EnsureExternalRetryMasterKeyRow struct {
	ExternalRetryMasterKeyCiphertext   []byte
	ExternalRetryMasterKeyStorageKeyID string
}

type EnsureIngressUsageRunParams

type EnsureIngressUsageRunParams struct {
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
	StartedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	ObservedThrough      pgtype.Timestamptz
}

type EnsurePublicURLUsageConfigurationParams

type EnsurePublicURLUsageConfigurationParams struct {
	VisitorNetworkHashMasterKey []byte
	CreatedAt                   pgtype.Timestamptz
}

type ExpirePublisherConnectionParams

type ExpirePublisherConnectionParams struct {
	ExpiredAt                    pgtype.Timestamptz
	PublisherConnectionID        string
	PublishRunID                 string
	ConnectionAssignmentRevision int64
}

type ExpireTeamInvitationsParams

type ExpireTeamInvitationsParams struct {
	TeamID string
	Now    pgtype.Timestamptz
}

type FinalizePublicURLUsageBucketsParams

type FinalizePublicURLUsageBucketsParams struct {
	FinalizedAt pgtype.Timestamptz
	Through     pgtype.Timestamptz
}

type FindOIDCIdentityParams

type FindOIDCIdentityParams struct {
	Issuer  pgtype.Text
	Subject pgtype.Text
}

type GetACMEOrderByIdempotencyParams

type GetACMEOrderByIdempotencyParams struct {
	PublishRunID   string
	IdempotencyKey string
}

type GetActivePublishRunChallengeExpiryParams

type GetActivePublishRunChallengeExpiryParams struct {
	PublishRunID string
	Now          pgtype.Timestamptz
}

type GetActivePublishRunMembershipParams

type GetActivePublishRunMembershipParams struct {
	TeamID     string
	IdentityID string
}

type GetActivePublishRunMembershipRow

type GetActivePublishRunMembershipRow struct {
	ID             string
	Role           string
	PolicyRevision int64
}

type GetAdminRuntimeCountsRow

type GetAdminRuntimeCountsRow struct {
	EnabledPublicURLs   int64
	SuspendedPublicURLs int64
	StartingPublishRuns int64
	ReadyPublishRuns    int64
	IngressLeases       int64
	RelayLeases         int64
}

type GetAuthorizedPublicURLByHostnameParams

type GetAuthorizedPublicURLByHostnameParams struct {
	TeamID            string
	CanonicalHostname string
}

type GetAuthorizedPublicURLByHostnameRow

type GetAuthorizedPublicURLByHostnameRow struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
	OpenPublishRunID      string
}

type GetClaimedDomainByIdempotencyParams

type GetClaimedDomainByIdempotencyParams struct {
	IdentityID     pgtype.Text
	TeamID         pgtype.Text
	IdempotencyKey pgtype.Text
}

type GetClaimedDomainByIdempotencyRow

type GetClaimedDomainByIdempotencyRow struct {
	ID                      string
	Kind                    string
	TeamID                  pgtype.Text
	CanonicalDomain         string
	DnsAuthorityReference   pgtype.Text
	State                   string
	AuthorityRevision       int64
	VerificationTokenDigest []byte
	CreatedByIdentityID     pgtype.Text
	ClaimIdempotencyKey     pgtype.Text
	ClaimRequestDigest      []byte
	MakeDefaultWhenReady    bool
	CreatedAt               pgtype.Timestamptz
	VerifiedAt              pgtype.Timestamptz
	ReusableAfter           pgtype.Timestamptz
	ReleasedAt              pgtype.Timestamptz
	UpdatedAt               pgtype.Timestamptz
	Nameservers             []string
}

type GetControlSessionByAccessIDRow

type GetControlSessionByAccessIDRow struct {
	ID                           string
	IdentityID                   string
	AuthenticationMethod         string
	AuthenticationSourceRevision int64
	AccessTokenDigest            []byte
	AccessExpiresAt              pgtype.Timestamptz
	RetrySecretCiphertext        []byte
	RetrySecretStorageKeyID      string
	RefreshExpiresAt             pgtype.Timestamptz
	Administrator                bool
}

type GetControlTLSCacheEntryParams

type GetControlTLSCacheEntryParams struct {
	DirectoryUrl string
	CacheKey     string
}

type GetControlTLSCacheEntryRow

type GetControlTLSCacheEntryRow struct {
	CacheCiphertext   []byte
	CacheStorageKeyID string
}

type GetDNSChallengeChangeParams

type GetDNSChallengeChangeParams struct {
	ZoneID     string
	RecordName string
}

type GetDNSChallengeChangeRow

type GetDNSChallengeChangeRow struct {
	DesiredDigest []byte
	ChangeID      string
}

type GetDNSChallengeContextParams

type GetDNSChallengeContextParams struct {
	PublicURLID     string
	AuthorizationID string
}

type GetDNSChallengeContextRow

type GetDNSChallengeContextRow struct {
	PublicURLID           string
	TeamID                string
	DomainID              string
	DnsAuthorityReference pgtype.Text
	CanonicalHostname     string
	CanonicalDomain       string
	AuthorizationID       string
	Identifier            string
	ChallengeDigest       []byte
	PresentationReference pgtype.Text
	State                 string
}

type GetExternalAuthorityPublicURLParams

type GetExternalAuthorityPublicURLParams struct {
	PublishRunIdempotencyKey string
	PublicURLID              string
}

type GetExternalAuthorityPublicURLRow

type GetExternalAuthorityPublicURLRow struct {
	ID                            string
	TeamID                        string
	DomainID                      string
	MembershipID                  pgtype.Text
	CreatedByIdentityID           string
	IdempotencyKey                string
	RequestDigest                 []byte
	CanonicalHostname             string
	Target                        string
	PublicURLScope                string
	PolicyRevision                int64
	IpPolicy                      string
	AllowedIpPrefixes             []netip.Prefix
	LifecycleState                string
	DnsAuthorityReference         pgtype.Text
	DnsState                      string
	DnsRevision                   int64
	DnsWorkOwner                  pgtype.Text
	DnsWorkEpoch                  int64
	DnsWorkExpiresAt              pgtype.Timestamptz
	DnsAttempts                   int64
	DnsAvailableAt                pgtype.Timestamptz
	DnsLastError                  pgtype.Text
	NextPublishRunNumber          int64
	MutationRevision              int64
	Ephemeral                     bool
	ExpiresAt                     pgtype.Timestamptz
	SuspensionRevision            int64
	SuspensionReason              pgtype.Text
	CreatedAt                     pgtype.Timestamptz
	UpdatedAt                     pgtype.Timestamptz
	SuspendedAt                   pgtype.Timestamptz
	DeletedAt                     pgtype.Timestamptz
	OpenPublishRunID              string
	AuthorizationPublishRunNumber int64
}

type GetIdentityContextIdentityRow

type GetIdentityContextIdentityRow struct {
	ID              string
	DisplayName     string
	NormalizedEmail pgtype.Text
	EmailVerified   bool
	Administrator   bool
	CreatedAt       pgtype.Timestamptz
	PersonalTeamID  string
}

type GetIdentityPublicURLParams

type GetIdentityPublicURLParams struct {
	PublicURLID string
	IdentityID  string
}

type GetIdentityPublicURLRow

type GetIdentityPublicURLRow struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
	OpenPublishRunID      string
}

type GetIdentityTeamParams

type GetIdentityTeamParams struct {
	IdentityID string
	TeamID     string
}

type GetIdentityTeamRow

type GetIdentityTeamRow struct {
	ID              string
	Kind            string
	DisplayName     string
	ManagedLabel    string
	DefaultDomainID pgtype.Text
	PolicyRevision  int64
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type GetIngressLeaseParams

type GetIngressLeaseParams struct {
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
	Now                  pgtype.Timestamptz
}

type GetIngressUsageReportParams

type GetIngressUsageReportParams struct {
	IngressID        string
	IngressRunID     string
	PublicURLID      string
	PublishRunNumber int64
	BucketStart      pgtype.Timestamptz
	ReportRevision   int64
}

type GetInvitationByIdempotencyParams

type GetInvitationByIdempotencyParams struct {
	IdentityID     string
	TeamID         string
	IdempotencyKey string
}

type GetInvitationByIdempotencyRow

type GetInvitationByIdempotencyRow struct {
	ID                         string
	TeamID                     string
	SlugReservationID          string
	InitialRole                string
	InvitedByIdentityID        string
	IdempotencyKey             string
	RequestDigest              []byte
	TokenDigest                []byte
	NormalizedEmailRestriction pgtype.Text
	State                      string
	CreatedAt                  pgtype.Timestamptz
	ExpiresAt                  pgtype.Timestamptz
	AcceptedAt                 pgtype.Timestamptz
	AcceptedByIdentityID       pgtype.Text
	AcceptedMembershipID       pgtype.Text
	RevokedAt                  pgtype.Timestamptz
	RevokedByIdentityID        pgtype.Text
	MemberSlug                 string
}

type GetOpenPublicURLRecoveryEpisodeParams

type GetOpenPublicURLRecoveryEpisodeParams struct {
	PublicURLID      string
	PublishRunNumber int64
}

type GetOrganizationTeamByIdempotencyParams

type GetOrganizationTeamByIdempotencyParams struct {
	IdentityID     string
	IdempotencyKey pgtype.Text
}

type GetOrganizationTeamByIdempotencyRow

type GetOrganizationTeamByIdempotencyRow struct {
	ID                    string
	Kind                  string
	DisplayName           string
	ManagedLabel          string
	DefaultDomainID       pgtype.Text
	PolicyRevision        int64
	CreationRequestDigest []byte
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
}

type GetPublicURLByCreatorIdempotencyParams

type GetPublicURLByCreatorIdempotencyParams struct {
	IdentityID     string
	IdempotencyKey string
}

type GetPublicURLByCreatorIdempotencyRow

type GetPublicURLByCreatorIdempotencyRow struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
	OpenPublishRunID      string
}

type GetPublicURLCreationContextParams

type GetPublicURLCreationContextParams struct {
	IdentityID string
	DomainID   string
	TeamID     string
}

type GetPublicURLCreationContextRow

type GetPublicURLCreationContextRow struct {
	TeamKind              string
	TeamCreatorIdentityID string
	PolicyRevision        int64
	IdentityKind          string
	ActorMembershipID     string
	ActorRole             string
	ActorManagedLabel     string
	ActorMemberSlug       string
	DomainKind            string
	DomainTeamID          pgtype.Text
	CanonicalDomain       string
	DomainState           string
	DnsAuthorityReference pgtype.Text
}

type GetPublicURLUsageBucketForUpdateParams

type GetPublicURLUsageBucketForUpdateParams struct {
	PublicURLID      string
	PublishRunNumber int64
	BucketStart      pgtype.Timestamptz
}

type GetPublishRunByIdempotencyParams

type GetPublishRunByIdempotencyParams struct {
	PublicURLID    string
	IdempotencyKey string
}

type GetRelayDNSChallengeContextRow

type GetRelayDNSChallengeContextRow struct {
	ID                    string
	RelayServiceID        string
	TlsServerName         string
	State                 string
	ChallengeDigest       []byte
	PresentationReference pgtype.Text
}

type GetRelayLeaseForClaimRow

type GetRelayLeaseForClaimRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type GetRelayLeaseForReadyRow

type GetRelayLeaseForReadyRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type GetRelayTransportCertificateParams

type GetRelayTransportCertificateParams struct {
	RelayServiceID     string
	RelayID            string
	RelayRunID         string
	RelayLeaseRevision int64
	Now                pgtype.Timestamptz
}

type GetTeamActorContextParams

type GetTeamActorContextParams struct {
	IdentityID string
	TeamID     string
}

type GetTeamActorContextRow

type GetTeamActorContextRow struct {
	ID                string
	Kind              string
	DisplayName       string
	ManagedLabel      string
	DefaultDomainID   pgtype.Text
	PolicyRevision    int64
	CreatedAt         pgtype.Timestamptz
	UpdatedAt         pgtype.Timestamptz
	ActorMembershipID string
	ActorRole         string
}

type GetTeamMembershipContextParams

type GetTeamMembershipContextParams struct {
	MembershipID string
	TeamID       string
}

type GetTeamMembershipContextRow

type GetTeamMembershipContextRow struct {
	ID              string
	TeamID          string
	IdentityID      string
	TeamDisplayName string
	TeamKind        string
	Role            string
	MemberSlug      string
	ManagedLabel    string
	PolicyRevision  int64
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type HeartbeatPublishRunParams

type HeartbeatPublishRunParams struct {
	HeartbeatAt      pgtype.Timestamptz
	ExpiresAt        pgtype.Timestamptz
	PublishRunID     string
	PublicURLID      string
	PublishRunNumber int64
}

type InsertACMEOrderParams

type InsertACMEOrderParams struct {
	ID                     string
	AccountID              string
	PublishRunID           string
	PublicURLID            string
	PublishRunNumber       int64
	IdempotencyKey         string
	RequestDigest          []byte
	CertificateCacheKey    string
	CertificateScope       string
	CertificateIdentifiers []string
	ChallengeMethod        string
	CsrDer                 []byte
	CsrDigest              []byte
	CreatedAt              pgtype.Timestamptz
}

type InsertAdminAuditEventParams

type InsertAdminAuditEventParams struct {
	ActorIdentityID pgtype.Text
	Actor           string
	RequestID       string
	Operation       string
	TargetKind      string
	TargetID        string
	Details         []byte
	OccurredAt      pgtype.Timestamptz
}

type InsertCertificateIssuanceAuditEventParams

type InsertCertificateIssuanceAuditEventParams struct {
	ActorIdentityID pgtype.Text
	RequestID       string
	IssuanceID      string
	OccurredAt      pgtype.Timestamptz
}

type InsertExpiredEphemeralPublicURLDeleteAuditEventParams

type InsertExpiredEphemeralPublicURLDeleteAuditEventParams struct {
	RequestID   string
	PublicURLID string
	OccurredAt  pgtype.Timestamptz
}

type InsertFinalIngressRoutingTableEventParams

type InsertFinalIngressRoutingTableEventParams struct {
	EventKind          string
	PublicURLID        string
	PublishRunNumber   int64
	CanonicalHostname  string
	EntryRevision      int64
	Projection         []byte
	PublicUrlExpiresAt pgtype.Timestamptz
	CreatedAt          pgtype.Timestamptz
	UpdatedAt          pgtype.Timestamptz
}

type InsertIngressRoutingTableEventParams

type InsertIngressRoutingTableEventParams struct {
	EventKind          string
	PublicURLID        string
	PublishRunNumber   int64
	CanonicalHostname  string
	EntryRevision      int64
	Projection         []byte
	PublicUrlExpiresAt pgtype.Timestamptz
	CreatedAt          pgtype.Timestamptz
}

type InsertPublicURLCreateAuditEventParams

type InsertPublicURLCreateAuditEventParams struct {
	ActorIdentityID pgtype.Text
	RequestID       string
	PublicURLID     string
	OccurredAt      pgtype.Timestamptz
}

type InsertPublicURLDeleteAuditEventParams

type InsertPublicURLDeleteAuditEventParams struct {
	ActorIdentityID pgtype.Text
	RequestID       string
	PublicURLID     string
	OccurredAt      pgtype.Timestamptz
}

type InsertPublicURLParams

type InsertPublicURLParams struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	DnsAuthorityReference pgtype.Text
	DnsState              string
	CreatedAt             pgtype.Timestamptz
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
}

type InsertPublicURLUpdateAuditEventParams

type InsertPublicURLUpdateAuditEventParams struct {
	ActorIdentityID pgtype.Text
	RequestID       string
	PublicURLID     string
	OccurredAt      pgtype.Timestamptz
}

type InsertPublicURLUsageDeliveryParams

type InsertPublicURLUsageDeliveryParams struct {
	BucketID       int64
	BucketRevision int64
	DeliveryKey    string
	AvailableAt    pgtype.Timestamptz
	CreatedAt      pgtype.Timestamptz
}

type InsertPublishRunAuditEventParams

type InsertPublishRunAuditEventParams struct {
	ActorIdentityID pgtype.Text
	Actor           string
	RequestID       string
	PublishRunID    string
	OccurredAt      pgtype.Timestamptz
}

type InsertPublishRunConnectionsParams

type InsertPublishRunConnectionsParams struct {
	PublishRunID                           string
	PublicURLID                            string
	PublishRunNumber                       int64
	PublisherConnectionIds                 []string
	RelayServiceIds                        []string
	RelayAddresses                         []string
	TlsServerNames                         []string
	CredentialDigests                      [][]byte
	PublisherConnectionCredentialExpiresAt pgtype.Timestamptz
	AssignedAt                             pgtype.Timestamptz
}

type InsertPublishRunParams

type InsertPublishRunParams struct {
	ID                         string
	PublicURLID                string
	TeamID                     string
	MembershipID               pgtype.Text
	ActingIdentityID           string
	IdempotencyKey             string
	RequestDigest              []byte
	PublishRunTokenID          string
	PublishRunTokenDigest      []byte
	PolicyRevision             int64
	CertificateCacheKey        string
	CertificateScope           string
	CertificateIdentifiers     []string
	CertificateChallengeMethod string
	CreatedAt                  pgtype.Timestamptz
	LastHeartbeatAt            pgtype.Timestamptz
	PublisherExpiresAt         pgtype.Timestamptz
	ExpectedMutationRevision   int64
}

type InsertRelayCertificateOrderParams

type InsertRelayCertificateOrderParams struct {
	ID                     string
	AccountID              string
	RelayServiceID         string
	TlsServerName          string
	PrivateKeyCiphertext   []byte
	PrivateKeyStorageKeyID string
	CsrDer                 []byte
	CsrDigest              []byte
	CreatedAt              pgtype.Timestamptz
}

type LatestIngressRoutingEntryRevisionParams

type LatestIngressRoutingEntryRevisionParams struct {
	PublicURLID      string
	PublishRunNumber int64
}

type ListAdminRelayLeasesParams

type ListAdminRelayLeasesParams struct {
	Now       pgtype.Timestamptz
	Cursor    pgtype.Text
	PageLimit int32
}

type ListAdminRelayLeasesRow

type ListAdminRelayLeasesRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type ListDNSChallengePresentationsRow

type ListDNSChallengePresentationsRow struct {
	ChallengeDigest []byte
	State           string
}

type ListExternalAuthorityPublicURLsParams

type ListExternalAuthorityPublicURLsParams struct {
	TeamID string
	Cursor pgtype.Text
}

type ListExternalAuthorityPublicURLsRow

type ListExternalAuthorityPublicURLsRow struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
	OpenPublishRunID      string
}

type ListIdentityMembershipContextsRow

type ListIdentityMembershipContextsRow struct {
	ID              string
	TeamID          string
	IdentityID      string
	TeamDisplayName string
	TeamKind        string
	Role            string
	MemberSlug      string
	ManagedLabel    string
	PolicyRevision  int64
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type ListIdentityPublicURLsParams

type ListIdentityPublicURLsParams struct {
	TeamID     string
	Cursor     pgtype.Text
	IdentityID string
}

type ListIdentityPublicURLsRow

type ListIdentityPublicURLsRow struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
	OpenPublishRunID      string
}

type ListIdentityTeamDomainsParams

type ListIdentityTeamDomainsParams struct {
	TeamID     pgtype.Text
	IdentityID string
}

type ListIdentityTeamDomainsRow

type ListIdentityTeamDomainsRow struct {
	ID                    string
	Kind                  string
	TeamID                pgtype.Text
	CanonicalDomain       string
	DnsAuthorityReference pgtype.Text
	State                 string
	AuthorityRevision     int64
	Nameservers           []string
	CreatedAt             pgtype.Timestamptz
	VerifiedAt            pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
}

type ListIdentityTeamsRow

type ListIdentityTeamsRow struct {
	ID              string
	Kind            string
	DisplayName     string
	ManagedLabel    string
	DefaultDomainID pgtype.Text
	PolicyRevision  int64
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type ListIngressRoutingTableEventsParams

type ListIngressRoutingTableEventsParams struct {
	AfterRevision   int64
	ThroughRevision int64
	PageLimit       int32
}

type ListIngressRoutingTableSnapshotParams

type ListIngressRoutingTableSnapshotParams struct {
	Now             pgtype.Timestamptz
	ThroughRevision int64
}

type ListLatestIngressUsageReportsParams

type ListLatestIngressUsageReportsParams struct {
	IngressID         string
	IngressRunID      string
	PublicUrlIds      []string
	PublishRunNumbers []int64
	BucketStarts      []pgtype.Timestamptz
}

type ListLatestIngressUsageReportsRow

type ListLatestIngressUsageReportsRow struct {
	PublicURLID               string
	PublishRunNumber          int64
	BucketStart               pgtype.Timestamptz
	BucketEnd                 pgtype.Timestamptz
	ObservedThrough           pgtype.Timestamptz
	ReportRevision            int64
	ConnectionAttempts        int64
	PolicyDenials             int64
	CapacityDenials           int64
	VisitorStreamOpenFailures int64
	SuccessfulStreams         int64
	ConnectionNanoseconds     int64
	IngressBytes              int64
	EgressBytes               int64
	Final                     bool
}

type ListRelayDNSChallengePresentationsRow

type ListRelayDNSChallengePresentationsRow struct {
	ChallengeDigest []byte
	State           string
}

type ListRelayServiceAssignmentTotalsRow

type ListRelayServiceAssignmentTotalsRow struct {
	RelayServiceID  string
	AssignmentCount int64
}

type ListTeamInvitationsRow

type ListTeamInvitationsRow struct {
	ID                         string
	TeamID                     string
	SlugReservationID          string
	InitialRole                string
	InvitedByIdentityID        string
	IdempotencyKey             string
	RequestDigest              []byte
	TokenDigest                []byte
	NormalizedEmailRestriction pgtype.Text
	State                      string
	CreatedAt                  pgtype.Timestamptz
	ExpiresAt                  pgtype.Timestamptz
	AcceptedAt                 pgtype.Timestamptz
	AcceptedByIdentityID       pgtype.Text
	AcceptedMembershipID       pgtype.Text
	RevokedAt                  pgtype.Timestamptz
	RevokedByIdentityID        pgtype.Text
	MemberSlug                 string
}

type ListTeamMembershipContextsParams

type ListTeamMembershipContextsParams struct {
	TeamID     string
	IdentityID string
}

type ListTeamMembershipContextsRow

type ListTeamMembershipContextsRow struct {
	ID              string
	TeamID          string
	IdentityID      string
	TeamDisplayName string
	TeamKind        string
	Role            string
	MemberSlug      string
	ManagedLabel    string
	PolicyRevision  int64
	CreatedAt       pgtype.Timestamptz
	UpdatedAt       pgtype.Timestamptz
}

type ListTeamNamespaceLabelsRow

type ListTeamNamespaceLabelsRow struct {
	ManagedLabel string
	MemberSlug   string
}

type ListValidReadyPublisherConnectionsParams

type ListValidReadyPublisherConnectionsParams struct {
	PublishRunID string
	Now          pgtype.Timestamptz
}

type ListValidReadyPublisherConnectionsRow

type ListValidReadyPublisherConnectionsRow struct {
	PublishRunID                 string
	PublicURLID                  string
	PublishRunNumber             int64
	ConnectionSlot               int16
	PublisherConnectionID        string
	ConnectionAssignmentRevision int64
	RelayServiceID               string
	ConnectedRelayID             pgtype.Text
	ConnectedRelayRunID          pgtype.Text
	ConnectedRelayLeaseRevision  pgtype.Int8
	InternalRelayAddress         string
	TlsServerName                string
	LeaseExpiresAt               pgtype.Timestamptz
}

type LockACMEOrderForInstallParams

type LockACMEOrderForInstallParams struct {
	IssuanceID             string
	TeamID                 string
	CertificateCacheKey    string
	CertificateScope       string
	CertificateIdentifiers []string
	ChallengeMethod        string
	InstalledAt            pgtype.Timestamptz
	NotAfter               pgtype.Timestamptz
}

type LockControlSessionByRefreshIDRow

type LockControlSessionByRefreshIDRow struct {
	ID                           string
	IdentityID                   string
	AuthenticationMethod         string
	AuthenticationSourceRevision int64
	RefreshTokenDigest           []byte
	RefreshExpiresAt             pgtype.Timestamptz
	Administrator                bool
}

type LockDomainPublicURLsParams

type LockDomainPublicURLsParams struct {
	TeamID   string
	DomainID string
}

type LockEligibleRelayLeasesParams

type LockEligibleRelayLeasesParams struct {
	Now             pgtype.Timestamptz
	RelayServiceIds []string
	ProtocolVersion int64
}

type LockEligibleRelayLeasesRow

type LockEligibleRelayLeasesRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type LockExpiredEphemeralPublicURLsParams

type LockExpiredEphemeralPublicURLsParams struct {
	Now       pgtype.Timestamptz
	BatchSize int32
}

type LockExpiredPublishRunPublicURLsParams

type LockExpiredPublishRunPublicURLsParams struct {
	Now       pgtype.Timestamptz
	BatchSize int32
}

type LockIdentityForTeamCreationRow

type LockIdentityForTeamCreationRow struct {
	ID          string
	DisplayName string
}

type LockIdentityPublicURLForDeleteParams

type LockIdentityPublicURLForDeleteParams struct {
	IdentityID  string
	PublicURLID string
}

type LockIdentityPublicURLForDeleteRow

type LockIdentityPublicURLForDeleteRow struct {
	ID                    string
	TeamID                string
	DomainID              string
	MembershipID          pgtype.Text
	CreatedByIdentityID   string
	IdempotencyKey        string
	RequestDigest         []byte
	CanonicalHostname     string
	Target                string
	PublicURLScope        string
	PolicyRevision        int64
	IpPolicy              string
	AllowedIpPrefixes     []netip.Prefix
	LifecycleState        string
	DnsAuthorityReference pgtype.Text
	DnsState              string
	DnsRevision           int64
	DnsWorkOwner          pgtype.Text
	DnsWorkEpoch          int64
	DnsWorkExpiresAt      pgtype.Timestamptz
	DnsAttempts           int64
	DnsAvailableAt        pgtype.Timestamptz
	DnsLastError          pgtype.Text
	NextPublishRunNumber  int64
	MutationRevision      int64
	Ephemeral             bool
	ExpiresAt             pgtype.Timestamptz
	SuspensionRevision    int64
	SuspensionReason      pgtype.Text
	CreatedAt             pgtype.Timestamptz
	UpdatedAt             pgtype.Timestamptz
	SuspendedAt           pgtype.Timestamptz
	DeletedAt             pgtype.Timestamptz
	ActorMembershipID     string
	ActorRole             string
}

type LockIngressLeaseParams

type LockIngressLeaseParams struct {
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
	Now                  pgtype.Timestamptz
}

type LockInvitationByTokenDigestParams

type LockInvitationByTokenDigestParams struct {
	IdentityID  string
	TokenDigest []byte
}

type LockInvitationByTokenDigestRow

type LockInvitationByTokenDigestRow struct {
	ID                         string
	TeamID                     string
	SlugReservationID          string
	InitialRole                string
	InvitedByIdentityID        string
	IdempotencyKey             string
	RequestDigest              []byte
	TokenDigest                []byte
	NormalizedEmailRestriction pgtype.Text
	State                      string
	CreatedAt                  pgtype.Timestamptz
	ExpiresAt                  pgtype.Timestamptz
	AcceptedAt                 pgtype.Timestamptz
	AcceptedByIdentityID       pgtype.Text
	AcceptedMembershipID       pgtype.Text
	RevokedAt                  pgtype.Timestamptz
	RevokedByIdentityID        pgtype.Text
	MemberSlug                 string
	TeamKind                   string
	TeamDisplayName            string
	AcceptingNormalizedEmail   pgtype.Text
	AcceptingEmailVerified     bool
}

type LockMembershipPublicURLsParams

type LockMembershipPublicURLsParams struct {
	TeamID       string
	MembershipID pgtype.Text
}

type LockPublishRunForUsageParams

type LockPublishRunForUsageParams struct {
	PublishRunNumber int64
	PublicURLID      string
}

type LockTeamActorContextParams

type LockTeamActorContextParams struct {
	IdentityID string
	TeamID     string
}

type LockTeamActorContextRow

type LockTeamActorContextRow struct {
	ID                string
	Kind              string
	DisplayName       string
	ManagedLabel      string
	DefaultDomainID   pgtype.Text
	PolicyRevision    int64
	CreatedAt         pgtype.Timestamptz
	UpdatedAt         pgtype.Timestamptz
	ActorMembershipID string
	ActorRole         string
}

type LockTeamDomainParams

type LockTeamDomainParams struct {
	DomainID string
	TeamID   pgtype.Text
}

type LockTeamDomainRow

type LockTeamDomainRow struct {
	ID                      string
	Kind                    string
	TeamID                  pgtype.Text
	CanonicalDomain         string
	DnsAuthorityReference   pgtype.Text
	State                   string
	AuthorityRevision       int64
	VerificationTokenDigest []byte
	CreatedByIdentityID     pgtype.Text
	ClaimIdempotencyKey     pgtype.Text
	ClaimRequestDigest      []byte
	MakeDefaultWhenReady    bool
	CreatedAt               pgtype.Timestamptz
	VerifiedAt              pgtype.Timestamptz
	ReusableAfter           pgtype.Timestamptz
	ReleasedAt              pgtype.Timestamptz
	UpdatedAt               pgtype.Timestamptz
	Nameservers             []string
}

type LockTeamInvitationParams

type LockTeamInvitationParams struct {
	InvitationID string
	TeamID       string
}

type LockTeamInvitationRow

type LockTeamInvitationRow struct {
	ID                         string
	TeamID                     string
	SlugReservationID          string
	InitialRole                string
	InvitedByIdentityID        string
	IdempotencyKey             string
	RequestDigest              []byte
	TokenDigest                []byte
	NormalizedEmailRestriction pgtype.Text
	State                      string
	CreatedAt                  pgtype.Timestamptz
	ExpiresAt                  pgtype.Timestamptz
	AcceptedAt                 pgtype.Timestamptz
	AcceptedByIdentityID       pgtype.Text
	AcceptedMembershipID       pgtype.Text
	RevokedAt                  pgtype.Timestamptz
	RevokedByIdentityID        pgtype.Text
	MemberSlug                 string
}

type LockTeamMembershipParams

type LockTeamMembershipParams struct {
	MembershipID string
	TeamID       string
}

type LockTeamMembershipRow

type LockTeamMembershipRow struct {
	ID                  string
	TeamID              string
	IdentityID          string
	SlugReservationID   string
	ManagedLabel        string
	Role                string
	AuthorityRevision   int64
	CreatedAt           pgtype.Timestamptz
	UpdatedAt           pgtype.Timestamptz
	RemovedAt           pgtype.Timestamptz
	RemovedByIdentityID pgtype.Text
	MemberSlug          string
}

type MarkACMEAuthorizationsPresentedParams

type MarkACMEAuthorizationsPresentedParams struct {
	PresentedAt pgtype.Timestamptz
	IssuanceID  string
}

type MarkACMEOrderInstalledParams

type MarkACMEOrderInstalledParams struct {
	InstalledAt pgtype.Timestamptz
	IssuanceID  string
}

type MarkClaimedDomainReleasingParams

type MarkClaimedDomainReleasingParams struct {
	AuthorityRevision int64
	UpdatedAt         pgtype.Timestamptz
	DomainID          string
	TeamID            pgtype.Text
}

type MarkDNSAuthorityReleasingParams

type MarkDNSAuthorityReleasingParams struct {
	UpdatedAt          pgtype.Timestamptz
	AuthorityReference string
}

type MarkExpiredIngressUsageRunIncompleteParams

type MarkExpiredIngressUsageRunIncompleteParams struct {
	EndedAt      pgtype.Timestamptz
	IngressID    string
	IngressRunID string
}

type MarkIngressUsageRunReportedParams

type MarkIngressUsageRunReportedParams struct {
	ReportedAt           pgtype.Timestamptz
	ObservedThrough      pgtype.Timestamptz
	Complete             bool
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
}

type MarkPublishRunCertificateInstalledParams

type MarkPublishRunCertificateInstalledParams struct {
	IssuanceID       pgtype.Text
	InstalledAt      pgtype.Timestamptz
	NotAfter         pgtype.Timestamptz
	PublishRunID     string
	PublicURLID      string
	PublishRunNumber int64
}

type MarkPublishRunReadyParams

type MarkPublishRunReadyParams struct {
	ReadyAt          pgtype.Timestamptz
	PublishRunID     string
	PublicURLID      string
	PublishRunNumber int64
}

type MarkPublisherConnectionReadyParams

type MarkPublisherConnectionReadyParams struct {
	ReadyAt                      pgtype.Timestamptz
	PublisherConnectionID        string
	PublishRunID                 string
	PublicURLID                  string
	PublishRunNumber             int64
	ConnectionSlot               int16
	ConnectionAssignmentRevision int64
	RelayServiceID               string
	RelayID                      pgtype.Text
	RelayRunID                   pgtype.Text
	RelayLeaseRevision           pgtype.Int8
	ClaimID                      pgtype.Text
}

type ObserveAuthorityRevisionParams

type ObserveAuthorityRevisionParams struct {
	Issuer         string
	TeamID         string
	PolicyRevision int64
	UpdatedAt      pgtype.Timestamptz
}

type ObservePublicURLRecoveryEpisodeParams

type ObservePublicURLRecoveryEpisodeParams struct {
	ObservedAt        pgtype.Timestamptz
	ObservedSeconds   pgtype.Float8
	RecoveryEpisodeID int64
	PublicURLID       string
	PublishRunNumber  int64
}

type OpenPublicURLRecoveryEpisodeParams

type OpenPublicURLRecoveryEpisodeParams struct {
	PublicURLID      string
	PublishRunNumber int64
	OpenedAt         pgtype.Timestamptz
}

type PruneIngressRoutingHistoryBatchRow

type PruneIngressRoutingHistoryBatchRow struct {
	NextRevision int64
	Scanned      int64
	Deleted      int64
}

type PutControlTLSCacheEntryParams

type PutControlTLSCacheEntryParams struct {
	DirectoryUrl      string
	CacheKey          string
	CacheCiphertext   []byte
	CacheStorageKeyID string
	UpdatedAt         pgtype.Timestamptz
}

type QuarantineMemberSlugParams

type QuarantineMemberSlugParams struct {
	QuarantinedAt     pgtype.Timestamptz
	SlugReservationID string
}

type Querier

type Querier interface {
	AcceptTeamInvitation(ctx context.Context, arg AcceptTeamInvitationParams) (int64, error)
	ActivateMemberSlug(ctx context.Context, arg ActivateMemberSlugParams) (int64, error)
	AdvanceAuthorityRevision(ctx context.Context, arg AdvanceAuthorityRevisionParams) (int64, error)
	// commit the retention floor before pruning in another transaction. a crash
	// between them retains extra rows, never a missing advertised suffix.
	AdvanceIngressRoutingRetentionFloor(ctx context.Context, revision int64) (int64, error)
	AdvanceTeamPolicyRevision(ctx context.Context, arg AdvanceTeamPolicyRevisionParams) (int64, error)
	// callers hold the ingress/run, public URL/publish run, and existing bucket
	// guards. dependent writes insert the immutable report, apply its aggregate
	// delta, and update denials atomically. reject any missing required step and
	// roll back the whole page.
	ApplyIngressUsageReport(ctx context.Context, arg ApplyIngressUsageReportParams) (ApplyIngressUsageReportRow, error)
	BeginAdminRelayDrain(ctx context.Context, arg BeginAdminRelayDrainParams) (BeginAdminRelayDrainRow, error)
	BeginDNSAuthorityRelease(ctx context.Context, arg BeginDNSAuthorityReleaseParams) (ControlDnsAuthority, error)
	BeginIngressDrain(ctx context.Context, arg BeginIngressDrainParams) (ControlIngressLease, error)
	BeginRelayDrain(ctx context.Context, arg BeginRelayDrainParams) (BeginRelayDrainRow, error)
	CancelOpenPublicURLRecoveryEpisode(ctx context.Context, arg CancelOpenPublicURLRecoveryEpisodeParams) (ControlPublicUrlRecoveryEpisode, error)
	CancelPublishRunACMEAuthorizations(ctx context.Context, arg CancelPublishRunACMEAuthorizationsParams) error
	CancelPublishRunACMEOrders(ctx context.Context, arg CancelPublishRunACMEOrdersParams) error
	// claim-time checks can precede a publisher's challenge-ready transition.
	// recheck the current projection and every live ingress immediately before
	// asking the CA to validate, while the authorization is still presented.
	CheckACMEChallengeRoutingReady(ctx context.Context, arg CheckACMEChallengeRoutingReadyParams) (bool, error)
	ClaimACMEOrderWork(ctx context.Context, arg ClaimACMEOrderWorkParams) (ControlAcmeOrder, error)
	ClaimDNSAuthorityWork(ctx context.Context, arg ClaimDNSAuthorityWorkParams) (ControlDnsAuthority, error)
	ClaimDNSPublicURLWork(ctx context.Context, arg ClaimDNSPublicURLWorkParams) (ControlPublicUrl, error)
	ClaimPublicURLUsageDeliveries(ctx context.Context, arg ClaimPublicURLUsageDeliveriesParams) ([]ControlPublicUrlUsageDelivery, error)
	// require the exact publish run, assignment revision, and relay service. only
	// the same process and claim ID may repeat a connected or ready claim.
	ClaimPublisherConnection(ctx context.Context, arg ClaimPublisherConnectionParams) (ControlPublishRunConnectionSlot, error)
	ClaimRelayCertificateOrderWork(ctx context.Context, arg ClaimRelayCertificateOrderWorkParams) (ControlRelayCertificateOrder, error)
	ClaimRelayServiceForCertificateOrder(ctx context.Context, arg ClaimRelayServiceForCertificateOrderParams) (ControlRelayService, error)
	ClosePublishRun(ctx context.Context, arg ClosePublishRunParams) (ControlPublishRun, error)
	ClosePublishRunConnections(ctx context.Context, arg ClosePublishRunConnectionsParams) error
	CompleteACMEAuthorizationCleanup(ctx context.Context, arg CompleteACMEAuthorizationCleanupParams) (int64, error)
	CompletePublicURLUsageDelivery(ctx context.Context, arg CompletePublicURLUsageDeliveryParams) (ControlPublicUrlUsageDelivery, error)
	ConsumeOIDCAssertion(ctx context.Context, arg ConsumeOIDCAssertionParams) (int64, error)
	// diagnostic/test oracle only; placement reads trigger-maintained totals.
	CountOpenPublishRunAssignmentsByRelayService(ctx context.Context) ([]CountOpenPublishRunAssignmentsByRelayServiceRow, error)
	CountRelayActiveConnections(ctx context.Context, arg CountRelayActiveConnectionsParams) (int64, error)
	CountTeamOwners(ctx context.Context, teamID string) (int64, error)
	CreateActiveSlugReservation(ctx context.Context, arg CreateActiveSlugReservationParams) error
	CreateClaimedDNSAuthority(ctx context.Context, arg CreateClaimedDNSAuthorityParams) error
	CreateClaimedDomain(ctx context.Context, arg CreateClaimedDomainParams) (ControlDomain, error)
	CreateControlSession(ctx context.Context, arg CreateControlSessionParams) error
	CreateIdentity(ctx context.Context, arg CreateIdentityParams) error
	CreateManagedDomain(ctx context.Context, arg CreateManagedDomainParams) error
	CreateOIDCIdentity(ctx context.Context, arg CreateOIDCIdentityParams) (ControlIdentity, error)
	CreateOrGetDNSAuthority(ctx context.Context, arg CreateOrGetDNSAuthorityParams) (ControlDnsAuthority, error)
	CreateOrganizationTeam(ctx context.Context, arg CreateOrganizationTeamParams) (CreateOrganizationTeamRow, error)
	CreateOwnerMembership(ctx context.Context, arg CreateOwnerMembershipParams) error
	CreatePersonalTeam(ctx context.Context, arg CreatePersonalTeamParams) error
	CreateTeamInvitation(ctx context.Context, arg CreateTeamInvitationParams) (ControlTeamInvitation, error)
	CreateTeamMembership(ctx context.Context, arg CreateTeamMembershipParams) error
	DNSAuthorityReleaseReady(ctx context.Context, arg DNSAuthorityReleaseReadyParams) (pgtype.Bool, error)
	DeleteControlTLSCacheEntry(ctx context.Context, arg DeleteControlTLSCacheEntryParams) error
	DeleteExpiredOIDCAssertionExchanges(ctx context.Context, now pgtype.Timestamptz) error
	DeletePublicURL(ctx context.Context, arg DeletePublicURLParams) (int64, error)
	// close only the exact claim so a late disconnect cannot close its replacement.
	DisconnectPublisherConnection(ctx context.Context, arg DisconnectPublisherConnectionParams) (ControlPublishRunConnectionSlot, error)
	EnsureACMEAccount(ctx context.Context, arg EnsureACMEAccountParams) (ControlAcmeAccount, error)
	EnsureExternalAuthorityPrincipal(ctx context.Context, arg EnsureExternalAuthorityPrincipalParams) (ControlIdentity, error)
	EnsureExternalRetryMasterKey(ctx context.Context, arg EnsureExternalRetryMasterKeyParams) (EnsureExternalRetryMasterKeyRow, error)
	EnsureIngressUsageRun(ctx context.Context, arg EnsureIngressUsageRunParams) (ControlIngressUsageRun, error)
	EnsurePublicURLUsageConfiguration(ctx context.Context, arg EnsurePublicURLUsageConfigurationParams) (ControlPublicUrlUsageConfiguration, error)
	ExpirePublisherConnection(ctx context.Context, arg ExpirePublisherConnectionParams) (ControlPublishRunConnectionSlot, error)
	ExpireTeamInvitations(ctx context.Context, arg ExpireTeamInvitationsParams) ([]string, error)
	FinalizePublicURLUsageBuckets(ctx context.Context, arg FinalizePublicURLUsageBucketsParams) ([]ControlPublicUrlUsageBucket, error)
	FindBuiltinIdentity(ctx context.Context) (ControlIdentity, error)
	FindInvitationTeamByTokenDigest(ctx context.Context, tokenDigest []byte) (string, error)
	FindManagedDomain(ctx context.Context) (ControlDomain, error)
	FindOIDCIdentity(ctx context.Context, arg FindOIDCIdentityParams) (ControlIdentity, error)
	GetACMEAccountByDirectory(ctx context.Context, directoryUrl string) (ControlAcmeAccount, error)
	GetACMEOrder(ctx context.Context, issuanceID string) (ControlAcmeOrder, error)
	GetACMEOrderByIdempotency(ctx context.Context, arg GetACMEOrderByIdempotencyParams) (ControlAcmeOrder, error)
	GetActivePublishRunChallengeExpiry(ctx context.Context, arg GetActivePublishRunChallengeExpiryParams) (pgtype.Timestamptz, error)
	GetActivePublishRunMembership(ctx context.Context, arg GetActivePublishRunMembershipParams) (GetActivePublishRunMembershipRow, error)
	GetAdminRuntimeCounts(ctx context.Context, now pgtype.Timestamptz) (GetAdminRuntimeCountsRow, error)
	GetAuthorizedPublicURLByHostname(ctx context.Context, arg GetAuthorizedPublicURLByHostnameParams) (GetAuthorizedPublicURLByHostnameRow, error)
	GetClaimedDomainByIdempotency(ctx context.Context, arg GetClaimedDomainByIdempotencyParams) (GetClaimedDomainByIdempotencyRow, error)
	GetControlSessionByAccessID(ctx context.Context, accessTokenID string) (GetControlSessionByAccessIDRow, error)
	GetControlTLSCacheEntry(ctx context.Context, arg GetControlTLSCacheEntryParams) (GetControlTLSCacheEntryRow, error)
	GetDNSAuthority(ctx context.Context, authorityReference string) (ControlDnsAuthority, error)
	GetDNSAuthorityByReleaseIdempotency(ctx context.Context, releaseIdempotencyKey pgtype.Text) (ControlDnsAuthority, error)
	GetDNSChallengeChange(ctx context.Context, arg GetDNSChallengeChangeParams) (GetDNSChallengeChangeRow, error)
	GetDNSChallengeContext(ctx context.Context, arg GetDNSChallengeContextParams) (GetDNSChallengeContextRow, error)
	GetExternalAuthorityPublicURL(ctx context.Context, arg GetExternalAuthorityPublicURLParams) (GetExternalAuthorityPublicURLRow, error)
	GetIdentityContextIdentity(ctx context.Context, identityID string) (GetIdentityContextIdentityRow, error)
	GetIdentityPublicURL(ctx context.Context, arg GetIdentityPublicURLParams) (GetIdentityPublicURLRow, error)
	GetIdentityTeam(ctx context.Context, arg GetIdentityTeamParams) (GetIdentityTeamRow, error)
	GetIngressLease(ctx context.Context, arg GetIngressLeaseParams) (ControlIngressLease, error)
	GetIngressUsageReport(ctx context.Context, arg GetIngressUsageReportParams) (ControlIngressUsageReport, error)
	GetInvitationByIdempotency(ctx context.Context, arg GetInvitationByIdempotencyParams) (GetInvitationByIdempotencyRow, error)
	GetOpenPublicURLRecoveryEpisode(ctx context.Context, arg GetOpenPublicURLRecoveryEpisodeParams) (ControlPublicUrlRecoveryEpisode, error)
	GetOpenPublishRun(ctx context.Context, publicUrlID string) (ControlPublishRun, error)
	GetOrganizationTeamByIdempotency(ctx context.Context, arg GetOrganizationTeamByIdempotencyParams) (GetOrganizationTeamByIdempotencyRow, error)
	GetPublicURLByCreatorIdempotency(ctx context.Context, arg GetPublicURLByCreatorIdempotencyParams) (GetPublicURLByCreatorIdempotencyRow, error)
	GetPublicURLCreationContext(ctx context.Context, arg GetPublicURLCreationContextParams) (GetPublicURLCreationContextRow, error)
	GetPublicURLUsageBucketByID(ctx context.Context, bucketID int64) (ControlPublicUrlUsageBucket, error)
	GetPublicURLUsageBucketForUpdate(ctx context.Context, arg GetPublicURLUsageBucketForUpdateParams) (ControlPublicUrlUsageBucket, error)
	GetPublishRun(ctx context.Context, publishRunID string) (ControlPublishRun, error)
	GetPublishRunByIdempotency(ctx context.Context, arg GetPublishRunByIdempotencyParams) (ControlPublishRun, error)
	GetPublishRunByTokenID(ctx context.Context, publishRunTokenID string) (ControlPublishRun, error)
	GetPublisherConnectionForClaim(ctx context.Context, publisherConnectionID string) (ControlPublishRunConnectionSlot, error)
	GetRelayDNSChallengeContext(ctx context.Context, orderID string) (GetRelayDNSChallengeContextRow, error)
	// claims and readiness share the relay-service guard across processes.
	// claims take NO KEY UPDATE on the selected lease to serialize capacity with
	// other claims, renewal, and drain. readiness takes compatible KEY SHARE
	// because it uses an existing reservation. service guards precede lease rows.
	GetRelayLeaseForClaim(ctx context.Context, relayID string) (GetRelayLeaseForClaimRow, error)
	// keep the service guard through routing publication so registration cannot
	// replace the relay process between readiness and the published projection.
	// KEY SHARE does not block claims or other readiness work. renewal or drain may
	// overlap; readiness checks its lease, and projection reads exclude drained leases.
	GetRelayLeaseForReady(ctx context.Context, relayID string) (GetRelayLeaseForReadyRow, error)
	GetRelayTransportCertificate(ctx context.Context, arg GetRelayTransportCertificateParams) (ControlRelayService, error)
	GetTeamActorContext(ctx context.Context, arg GetTeamActorContextParams) (GetTeamActorContextRow, error)
	GetTeamMembershipContext(ctx context.Context, arg GetTeamMembershipContextParams) (GetTeamMembershipContextRow, error)
	HeartbeatPublishRun(ctx context.Context, arg HeartbeatPublishRunParams) (ControlPublishRun, error)
	InsertACMEOrder(ctx context.Context, arg InsertACMEOrderParams) (ControlAcmeOrder, error)
	InsertAdminAuditEvent(ctx context.Context, arg InsertAdminAuditEventParams) error
	InsertCertificateIssuanceAuditEvent(ctx context.Context, arg InsertCertificateIssuanceAuditEventParams) error
	InsertExpiredEphemeralPublicURLDeleteAuditEvent(ctx context.Context, arg InsertExpiredEphemeralPublicURLDeleteAuditEventParams) error
	// take the routing clock before allocating the revision in this command.
	// single-event publishers avoid an extra round trip; multi-event publishers
	// already hold the clock. keep it through commit to preserve revision order.
	InsertFinalIngressRoutingTableEvent(ctx context.Context, arg InsertFinalIngressRoutingTableEventParams) (int64, error)
	InsertIngressRoutingTableEvent(ctx context.Context, arg InsertIngressRoutingTableEventParams) (int64, error)
	InsertPublicURL(ctx context.Context, arg InsertPublicURLParams) (ControlPublicUrl, error)
	InsertPublicURLCreateAuditEvent(ctx context.Context, arg InsertPublicURLCreateAuditEventParams) error
	InsertPublicURLDeleteAuditEvent(ctx context.Context, arg InsertPublicURLDeleteAuditEventParams) error
	InsertPublicURLUpdateAuditEvent(ctx context.Context, arg InsertPublicURLUpdateAuditEventParams) error
	InsertPublicURLUsageDelivery(ctx context.Context, arg InsertPublicURLUsageDeliveryParams) (ControlPublicUrlUsageDelivery, error)
	InsertPublishRun(ctx context.Context, arg InsertPublishRunParams) (ControlPublishRun, error)
	InsertPublishRunAuditEvent(ctx context.Context, arg InsertPublishRunAuditEventParams) error
	InsertPublishRunConnections(ctx context.Context, arg InsertPublishRunConnectionsParams) ([]ControlPublishRunConnectionSlot, error)
	InsertRelayCertificateOrder(ctx context.Context, arg InsertRelayCertificateOrderParams) (ControlRelayCertificateOrder, error)
	LatestIngressRoutingEntryRevision(ctx context.Context, arg LatestIngressRoutingEntryRevisionParams) (int64, error)
	ListACMEOrderAuthorizations(ctx context.Context, issuanceID string) ([]ControlAcmeAuthorization, error)
	ListAdminRelayLeases(ctx context.Context, arg ListAdminRelayLeasesParams) ([]ListAdminRelayLeasesRow, error)
	ListCurrentDomainNames(ctx context.Context) ([]string, error)
	ListDNSChallengePresentations(ctx context.Context, baseIdentifier string) ([]ListDNSChallengePresentationsRow, error)
	ListExternalAuthorityPublicURLs(ctx context.Context, arg ListExternalAuthorityPublicURLsParams) ([]ListExternalAuthorityPublicURLsRow, error)
	ListIdentityMembershipContexts(ctx context.Context, identityID string) ([]ListIdentityMembershipContextsRow, error)
	ListIdentityPublicURLs(ctx context.Context, arg ListIdentityPublicURLsParams) ([]ListIdentityPublicURLsRow, error)
	ListIdentityTeamDomains(ctx context.Context, arg ListIdentityTeamDomainsParams) ([]ListIdentityTeamDomainsRow, error)
	ListIdentityTeams(ctx context.Context, identityID string) ([]ListIdentityTeamsRow, error)
	ListIngressRoutingTableEvents(ctx context.Context, arg ListIngressRoutingTableEventsParams) ([]ControlIngressRoutingTableEvent, error)
	// select the latest revision for each entry before filtering kind or expiry;
	// filtering first could revive a superseded public URL or challenge.
	ListIngressRoutingTableSnapshot(ctx context.Context, arg ListIngressRoutingTableSnapshotParams) ([]ControlIngressRoutingTableEvent, error)
	// ingress and usage-run guards serialize this source's append-only history.
	// fetch bounded metadata; exact replays load histogram payloads separately.
	ListLatestIngressUsageReports(ctx context.Context, arg ListLatestIngressUsageReportsParams) ([]ListLatestIngressUsageReportsRow, error)
	ListMaintenanceControls(ctx context.Context) ([]ControlMaintenanceControl, error)
	ListPublishRunConnections(ctx context.Context, publishRunID string) ([]ControlPublishRunConnectionSlot, error)
	ListRelayDNSChallengePresentations(ctx context.Context, tlsServerName string) ([]ListRelayDNSChallengePresentationsRow, error)
	ListRelayServiceAssignmentTotals(ctx context.Context) ([]ListRelayServiceAssignmentTotalsRow, error)
	ListTeamInvitations(ctx context.Context, teamID string) ([]ListTeamInvitationsRow, error)
	ListTeamMembershipContexts(ctx context.Context, arg ListTeamMembershipContextsParams) ([]ListTeamMembershipContextsRow, error)
	ListTeamNamespaceLabels(ctx context.Context, teamID string) ([]ListTeamNamespaceLabelsRow, error)
	ListValidReadyPublisherConnections(ctx context.Context, arg ListValidReadyPublisherConnectionsParams) ([]ListValidReadyPublisherConnectionsRow, error)
	LockACMEOrder(ctx context.Context, issuanceID string) (ControlAcmeOrder, error)
	LockACMEOrderForInstall(ctx context.Context, arg LockACMEOrderForInstallParams) (ControlAcmeOrder, error)
	LockCertificateIssuanceControl(ctx context.Context) (bool, error)
	LockControlSessionByRefreshID(ctx context.Context, refreshTokenID string) (LockControlSessionByRefreshIDRow, error)
	LockDNSAuthority(ctx context.Context, authorityReference string) (ControlDnsAuthority, error)
	LockDNSAuthorityLocalDomain(ctx context.Context, authorityReference pgtype.Text) error
	LockDNSAuthorityLocalTeam(ctx context.Context, authorityReference pgtype.Text) error
	LockDomainPublicURLs(ctx context.Context, arg LockDomainPublicURLsParams) ([]ControlPublicUrl, error)
	LockEligibleRelayLeases(ctx context.Context, arg LockEligibleRelayLeasesParams) ([]LockEligibleRelayLeasesRow, error)
	LockExpiredEphemeralPublicURLs(ctx context.Context, arg LockExpiredEphemeralPublicURLsParams) ([]ControlPublicUrl, error)
	// lock public URLs before publish runs, as heartbeat and closure do. the
	// partial expiration index finds candidates; SKIP LOCKED leaves busy public
	// URLs to other controls and active publishers.
	LockExpiredPublishRunPublicURLs(ctx context.Context, arg LockExpiredPublishRunPublicURLsParams) ([]ControlPublicUrl, error)
	LockHostedTeamPublicURLs(ctx context.Context, teamID string) ([]ControlPublicUrl, error)
	LockIdentityBootstrap(ctx context.Context) error
	LockIdentityForTeamCreation(ctx context.Context, identityID string) (LockIdentityForTeamCreationRow, error)
	LockIdentityPublicURLForDelete(ctx context.Context, arg LockIdentityPublicURLForDeleteParams) (LockIdentityPublicURLForDeleteRow, error)
	LockIngressLease(ctx context.Context, arg LockIngressLeaseParams) (ControlIngressLease, error)
	LockIngressRoutingTableClock(ctx context.Context) (int64, error)
	LockInvalidReadyPublisherConnections(ctx context.Context, now pgtype.Timestamptz) ([]ControlPublishRunConnectionSlot, error)
	LockInvitationByTokenDigest(ctx context.Context, arg LockInvitationByTokenDigestParams) (LockInvitationByTokenDigestRow, error)
	LockLocalPublicURLTeamForMutation(ctx context.Context, publicUrlID string) (string, error)
	// local authority mutations lock the team before identities, memberships,
	// domains, DNS authorities, and public URLs. recheck authorization under this
	// transaction-held guard; hosted teams need no fabricated local rows.
	// queue writers with publish run readers through the advisory lock: row-lock
	// readers alone can bypass a waiting writer indefinitely.
	LockLocalTeamForMutation(ctx context.Context, teamID string) (string, error)
	// publish run creation reads authority under this guard before locking its
	// public URL. different public URLs may start together while team, role, or
	// domain mutations wait. callers must not upgrade this guard by writing the team.
	LockLocalTeamForSession(ctx context.Context, teamID string) (string, error)
	LockManagedDomainForClaim(ctx context.Context) (ControlDomain, error)
	LockMembershipPublicURLs(ctx context.Context, arg LockMembershipPublicURLsParams) ([]ControlPublicUrl, error)
	LockPublicURLCreationControl(ctx context.Context) (bool, error)
	// serialize creators without blocking publish run and audit foreign-key checks.
	LockPublicURLCreator(ctx context.Context, identityID string) (string, error)
	// publish run operations serialize with public URL mutations without changing
	// public URL identity. NO KEY UPDATE permits usage's KEY SHARE references;
	// overlapping usage pages could starve a stronger UPDATE heartbeat lock.
	LockPublicURLForRun(ctx context.Context, publicUrlID string) (ControlPublicUrl, error)
	LockPublicURLForUsage(ctx context.Context, publicUrlID string) (string, error)
	LockPublicURLRecoveryEpisode(ctx context.Context, recoveryEpisodeID int64) (ControlPublicUrlRecoveryEpisode, error)
	LockPublishRun(ctx context.Context, publishRunID string) (ControlPublishRun, error)
	LockPublishRunCreationControl(ctx context.Context) (bool, error)
	// acquire the public URL reference before the publish run in one statement.
	// read the bucket later: another ingress may create it while this statement
	// waits for the publish run lock, after this statement's snapshot was taken.
	LockPublishRunForUsage(ctx context.Context, arg LockPublishRunForUsageParams) (ControlPublishRun, error)
	LockRelayServiceForCertificate(ctx context.Context, relayServiceID string) (string, error)
	// callers hold affected public URL rows and any existing publish run rows.
	// take the assignment-total guard before relay-service guards and lease rows;
	// lock all services before checking capacity or locking leases.
	LockRelayServicesForPlacement(ctx context.Context) ([]string, error)
	LockTeamActorContext(ctx context.Context, arg LockTeamActorContextParams) (LockTeamActorContextRow, error)
	LockTeamDomain(ctx context.Context, arg LockTeamDomainParams) (LockTeamDomainRow, error)
	LockTeamForInvitationAcceptance(ctx context.Context, teamID string) (string, error)
	LockTeamInvitation(ctx context.Context, arg LockTeamInvitationParams) (LockTeamInvitationRow, error)
	LockTeamMembership(ctx context.Context, arg LockTeamMembershipParams) (LockTeamMembershipRow, error)
	MarkACMEAuthorizationsPresented(ctx context.Context, arg MarkACMEAuthorizationsPresentedParams) (int64, error)
	MarkACMEOrderInstalled(ctx context.Context, arg MarkACMEOrderInstalledParams) (ControlAcmeOrder, error)
	MarkClaimedDomainReleasing(ctx context.Context, arg MarkClaimedDomainReleasingParams) (int64, error)
	MarkDNSAuthorityReleasing(ctx context.Context, arg MarkDNSAuthorityReleasingParams) (int64, error)
	MarkExpiredIngressUsageRunIncomplete(ctx context.Context, arg MarkExpiredIngressUsageRunIncompleteParams) error
	MarkExpiredIngressUsageRunsIncomplete(ctx context.Context, now pgtype.Timestamptz) ([]ControlIngressUsageRun, error)
	MarkIngressUsageRunReported(ctx context.Context, arg MarkIngressUsageRunReportedParams) (ControlIngressUsageRun, error)
	MarkInvitationExpired(ctx context.Context, invitationID string) (int64, error)
	MarkPublishRunCertificateInstalled(ctx context.Context, arg MarkPublishRunCertificateInstalledParams) (ControlPublishRun, error)
	MarkPublishRunReady(ctx context.Context, arg MarkPublishRunReadyParams) (ControlPublishRun, error)
	// ready is idempotent for the exact claim; a replaced assignment cannot revive.
	MarkPublisherConnectionReady(ctx context.Context, arg MarkPublisherConnectionReadyParams) (ControlPublishRunConnectionSlot, error)
	ObserveAuthorityRevision(ctx context.Context, arg ObserveAuthorityRevisionParams) (int64, error)
	ObservePublicURLRecoveryEpisode(ctx context.Context, arg ObservePublicURLRecoveryEpisodeParams) (ControlPublicUrlRecoveryEpisode, error)
	OpenPublicURLRecoveryEpisode(ctx context.Context, arg OpenPublicURLRecoveryEpisodeParams) error
	// bound candidates scanned, even when an anchor cannot be removed. retain the
	// latest hostname/category projection, including tombstones and expired rows,
	// and each publish run number's latest revision. concurrent publication can
	// make an anchor redundant but cannot restore a superseded event.
	PruneIngressRoutingHistoryBatch(ctx context.Context, afterRevision int64) (PruneIngressRoutingHistoryBatchRow, error)
	PutControlTLSCacheEntry(ctx context.Context, arg PutControlTLSCacheEntryParams) error
	QuarantineMemberSlug(ctx context.Context, arg QuarantineMemberSlugParams) (int64, error)
	ReadIngressRoutingTableClock(ctx context.Context) (ControlIngressRoutingTableClock, error)
	RegisterIngress(ctx context.Context, arg RegisterIngressParams) (ControlIngressLease, error)
	// blocking relay-service operations take the transaction advisory guard before
	// service and lease rows. row readers can bypass a waiting writer without this
	// queue, starving registration, placement, or certificate updates.
	// SKIP LOCKED certificate preparation and key rotation only take row locks;
	// they must not wait for this guard while holding a row.
	RegisterRelay(ctx context.Context, arg RegisterRelayParams) (RegisterRelayRow, error)
	RejectPublicURLUsageDelivery(ctx context.Context, arg RejectPublicURLUsageDeliveryParams) (ControlPublicUrlUsageDelivery, error)
	ReleaseInvitedMemberSlug(ctx context.Context, arg ReleaseInvitedMemberSlugParams) (int64, error)
	RemoveTeamMembership(ctx context.Context, arg RemoveTeamMembershipParams) (int64, error)
	RenewEphemeralPublicURLExpiry(ctx context.Context, arg RenewEphemeralPublicURLExpiryParams) (pgtype.Timestamptz, error)
	RenewIngress(ctx context.Context, arg RenewIngressParams) (ControlIngressLease, error)
	RenewRelay(ctx context.Context, arg RenewRelayParams) (RenewRelayRow, error)
	// a failed ready connection can keep its existing service reservation. this
	// atomic ready -> assigned transition has zero counter delta and needs only the
	// caller's public URL/publish run locks, not placement's global/service/lease guards.
	// check failure and eligible service capacity in the statement snapshot. a
	// concurrent lease/configuration change may invalidate the returned assignment,
	// just as one immediately after commit can; claim checks the exact current lease
	// and process capacity under its exclusive lease guard. no capacity is added here.
	// closed or expired slots have no reservation and require guarded placement first.
	ReplacePublishRunConnection(ctx context.Context, arg ReplacePublishRunConnectionParams) (ControlPublishRunConnectionSlot, error)
	ReserveInvitedMemberSlug(ctx context.Context, arg ReserveInvitedMemberSlugParams) (string, error)
	ReserveManagedLabel(ctx context.Context, arg ReserveManagedLabelParams) (string, error)
	RetryPublicURLUsageDelivery(ctx context.Context, arg RetryPublicURLUsageDeliveryParams) (ControlPublicUrlUsageDelivery, error)
	RevokeControlSession(ctx context.Context, arg RevokeControlSessionParams) (int64, error)
	RevokeTeamInvitation(ctx context.Context, arg RevokeTeamInvitationParams) (int64, error)
	RotateACMEAccountKey(ctx context.Context, arg RotateACMEAccountKeyParams) error
	RotateControlSessionCredentials(ctx context.Context, arg RotateControlSessionCredentialsParams) (int64, error)
	RotateControlSessionRetrySecret(ctx context.Context, arg RotateControlSessionRetrySecretParams) error
	RotateControlTLSCacheEntry(ctx context.Context, arg RotateControlTLSCacheEntryParams) error
	RotateExternalRetryMasterKey(ctx context.Context, arg RotateExternalRetryMasterKeyParams) error
	RotateRelayCertificateOrderPrivateKey(ctx context.Context, arg RotateRelayCertificateOrderPrivateKeyParams) error
	RotateRelayServicePrivateKey(ctx context.Context, arg RotateRelayServicePrivateKeyParams) error
	SaveACMEAuthorizationWork(ctx context.Context, arg SaveACMEAuthorizationWorkParams) (ControlAcmeAuthorization, error)
	SaveACMEOrderWork(ctx context.Context, arg SaveACMEOrderWorkParams) (ControlAcmeOrder, error)
	SaveDNSAuthorityWork(ctx context.Context, arg SaveDNSAuthorityWorkParams) (ControlDnsAuthority, error)
	SaveDNSPublicURLWork(ctx context.Context, arg SaveDNSPublicURLWorkParams) (ControlPublicUrl, error)
	SaveRelayCertificateOrderWork(ctx context.Context, arg SaveRelayCertificateOrderWorkParams) (ControlRelayCertificateOrder, error)
	// find a committed prefix, not the largest old timestamp: request-start times
	// can be out of revision order. keep every recent event without taking the
	// publication clock during this scan.
	SelectIngressRoutingRetentionFloor(ctx context.Context, cutoff pgtype.Timestamptz) (int64, error)
	SetDNSReadyDomainDefault(ctx context.Context, arg SetDNSReadyDomainDefaultParams) (int64, error)
	SetDomainAuthorityRevision(ctx context.Context, arg SetDomainAuthorityRevisionParams) error
	SetMaintenanceControl(ctx context.Context, arg SetMaintenanceControlParams) (ControlMaintenanceControl, error)
	SetPersonalTeamDefaultDomain(ctx context.Context, arg SetPersonalTeamDefaultDomainParams) error
	SetTeamDefaultDomain(ctx context.Context, arg SetTeamDefaultDomainParams) (int64, error)
	StoreRelayTransportCertificate(ctx context.Context, arg StoreRelayTransportCertificateParams) (ControlRelayService, error)
	SuspendAuthorityPublicURL(ctx context.Context, arg SuspendAuthorityPublicURLParams) (int64, error)
	TeamMembershipIdentityExists(ctx context.Context, arg TeamMembershipIdentityExistsParams) (bool, error)
	// cleanup-only coordination; do not take public URL, placement, lease, or routing clock locks.
	TryLockIngressRoutingHistoryCleanup(ctx context.Context) (bool, error)
	UpdateACMEAccountRegistration(ctx context.Context, arg UpdateACMEAccountRegistrationParams) (ControlAcmeAccount, error)
	UpdateLocalDomainForDNSAuthority(ctx context.Context, arg UpdateLocalDomainForDNSAuthorityParams) (UpdateLocalDomainForDNSAuthorityRow, error)
	UpdateMembershipRole(ctx context.Context, arg UpdateMembershipRoleParams) (int64, error)
	UpdateOIDCIdentity(ctx context.Context, arg UpdateOIDCIdentityParams) (ControlIdentity, error)
	UpdatePublicURL(ctx context.Context, arg UpdatePublicURLParams) (ControlPublicUrl, error)
	UpdatePublicURLRecoveryHistogram(ctx context.Context, arg UpdatePublicURLRecoveryHistogramParams) (ControlPublicUrlRecoveryHistogram, error)
	UpsertDNSChallengeChange(ctx context.Context, arg UpsertDNSChallengeChangeParams) error
	// a publisher transition invalidates the worker's authorization snapshot.
	// call only after changing authorizations while holding the order lock.
	WakeACMEOrder(ctx context.Context, arg WakeACMEOrderParams) error
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AcceptTeamInvitation

func (q *Queries) AcceptTeamInvitation(ctx context.Context, arg AcceptTeamInvitationParams) (int64, error)

func (*Queries) ActivateMemberSlug

func (q *Queries) ActivateMemberSlug(ctx context.Context, arg ActivateMemberSlugParams) (int64, error)

func (*Queries) AdvanceAuthorityRevision

func (q *Queries) AdvanceAuthorityRevision(ctx context.Context, arg AdvanceAuthorityRevisionParams) (int64, error)

func (*Queries) AdvanceIngressRoutingRetentionFloor

func (q *Queries) AdvanceIngressRoutingRetentionFloor(ctx context.Context, revision int64) (int64, error)

commit the retention floor before pruning in another transaction. a crash between them retains extra rows, never a missing advertised suffix.

func (*Queries) AdvanceTeamPolicyRevision

func (q *Queries) AdvanceTeamPolicyRevision(ctx context.Context, arg AdvanceTeamPolicyRevisionParams) (int64, error)

func (*Queries) ApplyIngressUsageReport

func (q *Queries) ApplyIngressUsageReport(ctx context.Context, arg ApplyIngressUsageReportParams) (ApplyIngressUsageReportRow, error)

callers hold the ingress/run, public URL/publish run, and existing bucket guards. dependent writes insert the immutable report, apply its aggregate delta, and update denials atomically. reject any missing required step and roll back the whole page.

func (*Queries) BeginAdminRelayDrain

func (q *Queries) BeginAdminRelayDrain(ctx context.Context, arg BeginAdminRelayDrainParams) (BeginAdminRelayDrainRow, error)

func (*Queries) BeginDNSAuthorityRelease

func (q *Queries) BeginDNSAuthorityRelease(ctx context.Context, arg BeginDNSAuthorityReleaseParams) (ControlDnsAuthority, error)

func (*Queries) BeginIngressDrain

func (q *Queries) BeginIngressDrain(ctx context.Context, arg BeginIngressDrainParams) (ControlIngressLease, error)

func (*Queries) BeginRelayDrain

func (q *Queries) BeginRelayDrain(ctx context.Context, arg BeginRelayDrainParams) (BeginRelayDrainRow, error)

func (*Queries) CancelPublishRunACMEAuthorizations

func (q *Queries) CancelPublishRunACMEAuthorizations(ctx context.Context, arg CancelPublishRunACMEAuthorizationsParams) error

func (*Queries) CancelPublishRunACMEOrders

func (q *Queries) CancelPublishRunACMEOrders(ctx context.Context, arg CancelPublishRunACMEOrdersParams) error

func (*Queries) CheckACMEChallengeRoutingReady

func (q *Queries) CheckACMEChallengeRoutingReady(ctx context.Context, arg CheckACMEChallengeRoutingReadyParams) (bool, error)

claim-time checks can precede a publisher's challenge-ready transition. recheck the current projection and every live ingress immediately before asking the CA to validate, while the authorization is still presented.

func (*Queries) ClaimACMEOrderWork

func (q *Queries) ClaimACMEOrderWork(ctx context.Context, arg ClaimACMEOrderWorkParams) (ControlAcmeOrder, error)

func (*Queries) ClaimDNSAuthorityWork

func (q *Queries) ClaimDNSAuthorityWork(ctx context.Context, arg ClaimDNSAuthorityWorkParams) (ControlDnsAuthority, error)

func (*Queries) ClaimDNSPublicURLWork

func (q *Queries) ClaimDNSPublicURLWork(ctx context.Context, arg ClaimDNSPublicURLWorkParams) (ControlPublicUrl, error)

func (*Queries) ClaimPublisherConnection

require the exact publish run, assignment revision, and relay service. only the same process and claim ID may repeat a connected or ready claim.

func (*Queries) ClaimRelayServiceForCertificateOrder

func (q *Queries) ClaimRelayServiceForCertificateOrder(ctx context.Context, arg ClaimRelayServiceForCertificateOrderParams) (ControlRelayService, error)

func (*Queries) ClosePublishRun

func (q *Queries) ClosePublishRun(ctx context.Context, arg ClosePublishRunParams) (ControlPublishRun, error)

func (*Queries) ClosePublishRunConnections

func (q *Queries) ClosePublishRunConnections(ctx context.Context, arg ClosePublishRunConnectionsParams) error

func (*Queries) CompleteACMEAuthorizationCleanup

func (q *Queries) CompleteACMEAuthorizationCleanup(ctx context.Context, arg CompleteACMEAuthorizationCleanupParams) (int64, error)

func (*Queries) ConsumeOIDCAssertion

func (q *Queries) ConsumeOIDCAssertion(ctx context.Context, arg ConsumeOIDCAssertionParams) (int64, error)

func (*Queries) CountOpenPublishRunAssignmentsByRelayService

func (q *Queries) CountOpenPublishRunAssignmentsByRelayService(ctx context.Context) ([]CountOpenPublishRunAssignmentsByRelayServiceRow, error)

diagnostic/test oracle only; placement reads trigger-maintained totals.

func (*Queries) CountRelayActiveConnections

func (q *Queries) CountRelayActiveConnections(ctx context.Context, arg CountRelayActiveConnectionsParams) (int64, error)

func (*Queries) CountTeamOwners

func (q *Queries) CountTeamOwners(ctx context.Context, teamID string) (int64, error)

func (*Queries) CreateActiveSlugReservation

func (q *Queries) CreateActiveSlugReservation(ctx context.Context, arg CreateActiveSlugReservationParams) error

func (*Queries) CreateClaimedDNSAuthority

func (q *Queries) CreateClaimedDNSAuthority(ctx context.Context, arg CreateClaimedDNSAuthorityParams) error

func (*Queries) CreateClaimedDomain

func (q *Queries) CreateClaimedDomain(ctx context.Context, arg CreateClaimedDomainParams) (ControlDomain, error)

func (*Queries) CreateControlSession

func (q *Queries) CreateControlSession(ctx context.Context, arg CreateControlSessionParams) error

func (*Queries) CreateIdentity

func (q *Queries) CreateIdentity(ctx context.Context, arg CreateIdentityParams) error

func (*Queries) CreateManagedDomain

func (q *Queries) CreateManagedDomain(ctx context.Context, arg CreateManagedDomainParams) error

func (*Queries) CreateOIDCIdentity

func (q *Queries) CreateOIDCIdentity(ctx context.Context, arg CreateOIDCIdentityParams) (ControlIdentity, error)

func (*Queries) CreateOrGetDNSAuthority

func (q *Queries) CreateOrGetDNSAuthority(ctx context.Context, arg CreateOrGetDNSAuthorityParams) (ControlDnsAuthority, error)

func (*Queries) CreateOrganizationTeam

func (q *Queries) CreateOrganizationTeam(ctx context.Context, arg CreateOrganizationTeamParams) (CreateOrganizationTeamRow, error)

func (*Queries) CreateOwnerMembership

func (q *Queries) CreateOwnerMembership(ctx context.Context, arg CreateOwnerMembershipParams) error

func (*Queries) CreatePersonalTeam

func (q *Queries) CreatePersonalTeam(ctx context.Context, arg CreatePersonalTeamParams) error

func (*Queries) CreateTeamInvitation

func (q *Queries) CreateTeamInvitation(ctx context.Context, arg CreateTeamInvitationParams) (ControlTeamInvitation, error)

func (*Queries) CreateTeamMembership

func (q *Queries) CreateTeamMembership(ctx context.Context, arg CreateTeamMembershipParams) error

func (*Queries) DNSAuthorityReleaseReady

func (q *Queries) DNSAuthorityReleaseReady(ctx context.Context, arg DNSAuthorityReleaseReadyParams) (pgtype.Bool, error)

func (*Queries) DeleteControlTLSCacheEntry

func (q *Queries) DeleteControlTLSCacheEntry(ctx context.Context, arg DeleteControlTLSCacheEntryParams) error

func (*Queries) DeleteExpiredOIDCAssertionExchanges

func (q *Queries) DeleteExpiredOIDCAssertionExchanges(ctx context.Context, now pgtype.Timestamptz) error

func (*Queries) DeletePublicURL

func (q *Queries) DeletePublicURL(ctx context.Context, arg DeletePublicURLParams) (int64, error)

func (*Queries) DisconnectPublisherConnection

close only the exact claim so a late disconnect cannot close its replacement.

func (*Queries) EnsureACMEAccount

func (q *Queries) EnsureACMEAccount(ctx context.Context, arg EnsureACMEAccountParams) (ControlAcmeAccount, error)

func (*Queries) EnsureExternalAuthorityPrincipal

func (q *Queries) EnsureExternalAuthorityPrincipal(ctx context.Context, arg EnsureExternalAuthorityPrincipalParams) (ControlIdentity, error)

func (*Queries) EnsureIngressUsageRun

func (q *Queries) EnsureIngressUsageRun(ctx context.Context, arg EnsureIngressUsageRunParams) (ControlIngressUsageRun, error)

func (*Queries) ExpireTeamInvitations

func (q *Queries) ExpireTeamInvitations(ctx context.Context, arg ExpireTeamInvitationsParams) ([]string, error)

func (*Queries) FinalizePublicURLUsageBuckets

func (q *Queries) FinalizePublicURLUsageBuckets(ctx context.Context, arg FinalizePublicURLUsageBucketsParams) ([]ControlPublicUrlUsageBucket, error)

func (*Queries) FindBuiltinIdentity

func (q *Queries) FindBuiltinIdentity(ctx context.Context) (ControlIdentity, error)

func (*Queries) FindInvitationTeamByTokenDigest

func (q *Queries) FindInvitationTeamByTokenDigest(ctx context.Context, tokenDigest []byte) (string, error)

func (*Queries) FindManagedDomain

func (q *Queries) FindManagedDomain(ctx context.Context) (ControlDomain, error)

func (*Queries) FindOIDCIdentity

func (q *Queries) FindOIDCIdentity(ctx context.Context, arg FindOIDCIdentityParams) (ControlIdentity, error)

func (*Queries) GetACMEAccountByDirectory

func (q *Queries) GetACMEAccountByDirectory(ctx context.Context, directoryUrl string) (ControlAcmeAccount, error)

func (*Queries) GetACMEOrder

func (q *Queries) GetACMEOrder(ctx context.Context, issuanceID string) (ControlAcmeOrder, error)

func (*Queries) GetACMEOrderByIdempotency

func (q *Queries) GetACMEOrderByIdempotency(ctx context.Context, arg GetACMEOrderByIdempotencyParams) (ControlAcmeOrder, error)

func (*Queries) GetActivePublishRunChallengeExpiry

func (q *Queries) GetActivePublishRunChallengeExpiry(ctx context.Context, arg GetActivePublishRunChallengeExpiryParams) (pgtype.Timestamptz, error)

func (*Queries) GetAdminRuntimeCounts

func (q *Queries) GetAdminRuntimeCounts(ctx context.Context, now pgtype.Timestamptz) (GetAdminRuntimeCountsRow, error)

func (*Queries) GetControlSessionByAccessID

func (q *Queries) GetControlSessionByAccessID(ctx context.Context, accessTokenID string) (GetControlSessionByAccessIDRow, error)

func (*Queries) GetControlTLSCacheEntry

func (q *Queries) GetControlTLSCacheEntry(ctx context.Context, arg GetControlTLSCacheEntryParams) (GetControlTLSCacheEntryRow, error)

func (*Queries) GetDNSAuthority

func (q *Queries) GetDNSAuthority(ctx context.Context, authorityReference string) (ControlDnsAuthority, error)

func (*Queries) GetDNSAuthorityByReleaseIdempotency

func (q *Queries) GetDNSAuthorityByReleaseIdempotency(ctx context.Context, releaseIdempotencyKey pgtype.Text) (ControlDnsAuthority, error)

func (*Queries) GetDNSChallengeChange

func (q *Queries) GetDNSChallengeChange(ctx context.Context, arg GetDNSChallengeChangeParams) (GetDNSChallengeChangeRow, error)

func (*Queries) GetDNSChallengeContext

func (q *Queries) GetDNSChallengeContext(ctx context.Context, arg GetDNSChallengeContextParams) (GetDNSChallengeContextRow, error)

func (*Queries) GetIdentityContextIdentity

func (q *Queries) GetIdentityContextIdentity(ctx context.Context, identityID string) (GetIdentityContextIdentityRow, error)

func (*Queries) GetIdentityPublicURL

func (q *Queries) GetIdentityPublicURL(ctx context.Context, arg GetIdentityPublicURLParams) (GetIdentityPublicURLRow, error)

func (*Queries) GetIdentityTeam

func (q *Queries) GetIdentityTeam(ctx context.Context, arg GetIdentityTeamParams) (GetIdentityTeamRow, error)

func (*Queries) GetIngressLease

func (q *Queries) GetIngressLease(ctx context.Context, arg GetIngressLeaseParams) (ControlIngressLease, error)

func (*Queries) GetIngressUsageReport

func (q *Queries) GetIngressUsageReport(ctx context.Context, arg GetIngressUsageReportParams) (ControlIngressUsageReport, error)

func (*Queries) GetOpenPublishRun

func (q *Queries) GetOpenPublishRun(ctx context.Context, publicUrlID string) (ControlPublishRun, error)

func (*Queries) GetPublicURLUsageBucketByID

func (q *Queries) GetPublicURLUsageBucketByID(ctx context.Context, bucketID int64) (ControlPublicUrlUsageBucket, error)

func (*Queries) GetPublishRun

func (q *Queries) GetPublishRun(ctx context.Context, publishRunID string) (ControlPublishRun, error)

func (*Queries) GetPublishRunByIdempotency

func (q *Queries) GetPublishRunByIdempotency(ctx context.Context, arg GetPublishRunByIdempotencyParams) (ControlPublishRun, error)

func (*Queries) GetPublishRunByTokenID

func (q *Queries) GetPublishRunByTokenID(ctx context.Context, publishRunTokenID string) (ControlPublishRun, error)

func (*Queries) GetPublisherConnectionForClaim

func (q *Queries) GetPublisherConnectionForClaim(ctx context.Context, publisherConnectionID string) (ControlPublishRunConnectionSlot, error)

func (*Queries) GetRelayDNSChallengeContext

func (q *Queries) GetRelayDNSChallengeContext(ctx context.Context, orderID string) (GetRelayDNSChallengeContextRow, error)

func (*Queries) GetRelayLeaseForClaim

func (q *Queries) GetRelayLeaseForClaim(ctx context.Context, relayID string) (GetRelayLeaseForClaimRow, error)

claims and readiness share the relay-service guard across processes. claims take NO KEY UPDATE on the selected lease to serialize capacity with other claims, renewal, and drain. readiness takes compatible KEY SHARE because it uses an existing reservation. service guards precede lease rows.

func (*Queries) GetRelayLeaseForReady

func (q *Queries) GetRelayLeaseForReady(ctx context.Context, relayID string) (GetRelayLeaseForReadyRow, error)

keep the service guard through routing publication so registration cannot replace the relay process between readiness and the published projection. KEY SHARE does not block claims or other readiness work. renewal or drain may overlap; readiness checks its lease, and projection reads exclude drained leases.

func (*Queries) GetRelayTransportCertificate

func (q *Queries) GetRelayTransportCertificate(ctx context.Context, arg GetRelayTransportCertificateParams) (ControlRelayService, error)

func (*Queries) GetTeamActorContext

func (q *Queries) GetTeamActorContext(ctx context.Context, arg GetTeamActorContextParams) (GetTeamActorContextRow, error)

func (*Queries) GetTeamMembershipContext

func (*Queries) HeartbeatPublishRun

func (q *Queries) HeartbeatPublishRun(ctx context.Context, arg HeartbeatPublishRunParams) (ControlPublishRun, error)

func (*Queries) InsertACMEOrder

func (q *Queries) InsertACMEOrder(ctx context.Context, arg InsertACMEOrderParams) (ControlAcmeOrder, error)

func (*Queries) InsertAdminAuditEvent

func (q *Queries) InsertAdminAuditEvent(ctx context.Context, arg InsertAdminAuditEventParams) error

func (*Queries) InsertCertificateIssuanceAuditEvent

func (q *Queries) InsertCertificateIssuanceAuditEvent(ctx context.Context, arg InsertCertificateIssuanceAuditEventParams) error

func (*Queries) InsertExpiredEphemeralPublicURLDeleteAuditEvent

func (q *Queries) InsertExpiredEphemeralPublicURLDeleteAuditEvent(ctx context.Context, arg InsertExpiredEphemeralPublicURLDeleteAuditEventParams) error

func (*Queries) InsertFinalIngressRoutingTableEvent

func (q *Queries) InsertFinalIngressRoutingTableEvent(ctx context.Context, arg InsertFinalIngressRoutingTableEventParams) (int64, error)

take the routing clock before allocating the revision in this command. single-event publishers avoid an extra round trip; multi-event publishers already hold the clock. keep it through commit to preserve revision order.

func (*Queries) InsertIngressRoutingTableEvent

func (q *Queries) InsertIngressRoutingTableEvent(ctx context.Context, arg InsertIngressRoutingTableEventParams) (int64, error)

func (*Queries) InsertPublicURL

func (q *Queries) InsertPublicURL(ctx context.Context, arg InsertPublicURLParams) (ControlPublicUrl, error)

func (*Queries) InsertPublicURLCreateAuditEvent

func (q *Queries) InsertPublicURLCreateAuditEvent(ctx context.Context, arg InsertPublicURLCreateAuditEventParams) error

func (*Queries) InsertPublicURLDeleteAuditEvent

func (q *Queries) InsertPublicURLDeleteAuditEvent(ctx context.Context, arg InsertPublicURLDeleteAuditEventParams) error

func (*Queries) InsertPublicURLUpdateAuditEvent

func (q *Queries) InsertPublicURLUpdateAuditEvent(ctx context.Context, arg InsertPublicURLUpdateAuditEventParams) error

func (*Queries) InsertPublishRun

func (q *Queries) InsertPublishRun(ctx context.Context, arg InsertPublishRunParams) (ControlPublishRun, error)

func (*Queries) InsertPublishRunAuditEvent

func (q *Queries) InsertPublishRunAuditEvent(ctx context.Context, arg InsertPublishRunAuditEventParams) error

func (*Queries) LatestIngressRoutingEntryRevision

func (q *Queries) LatestIngressRoutingEntryRevision(ctx context.Context, arg LatestIngressRoutingEntryRevisionParams) (int64, error)

func (*Queries) ListACMEOrderAuthorizations

func (q *Queries) ListACMEOrderAuthorizations(ctx context.Context, issuanceID string) ([]ControlAcmeAuthorization, error)

func (*Queries) ListAdminRelayLeases

func (q *Queries) ListAdminRelayLeases(ctx context.Context, arg ListAdminRelayLeasesParams) ([]ListAdminRelayLeasesRow, error)

func (*Queries) ListCurrentDomainNames

func (q *Queries) ListCurrentDomainNames(ctx context.Context) ([]string, error)

func (*Queries) ListDNSChallengePresentations

func (q *Queries) ListDNSChallengePresentations(ctx context.Context, baseIdentifier string) ([]ListDNSChallengePresentationsRow, error)

func (*Queries) ListIdentityMembershipContexts

func (q *Queries) ListIdentityMembershipContexts(ctx context.Context, identityID string) ([]ListIdentityMembershipContextsRow, error)

func (*Queries) ListIdentityPublicURLs

func (q *Queries) ListIdentityPublicURLs(ctx context.Context, arg ListIdentityPublicURLsParams) ([]ListIdentityPublicURLsRow, error)

func (*Queries) ListIdentityTeamDomains

func (q *Queries) ListIdentityTeamDomains(ctx context.Context, arg ListIdentityTeamDomainsParams) ([]ListIdentityTeamDomainsRow, error)

func (*Queries) ListIdentityTeams

func (q *Queries) ListIdentityTeams(ctx context.Context, identityID string) ([]ListIdentityTeamsRow, error)

func (*Queries) ListIngressRoutingTableSnapshot

func (q *Queries) ListIngressRoutingTableSnapshot(ctx context.Context, arg ListIngressRoutingTableSnapshotParams) ([]ControlIngressRoutingTableEvent, error)

select the latest revision for each entry before filtering kind or expiry; filtering first could revive a superseded public URL or challenge.

func (*Queries) ListLatestIngressUsageReports

func (q *Queries) ListLatestIngressUsageReports(ctx context.Context, arg ListLatestIngressUsageReportsParams) ([]ListLatestIngressUsageReportsRow, error)

ingress and usage-run guards serialize this source's append-only history. fetch bounded metadata; exact replays load histogram payloads separately.

func (*Queries) ListMaintenanceControls

func (q *Queries) ListMaintenanceControls(ctx context.Context) ([]ControlMaintenanceControl, error)

func (*Queries) ListPublishRunConnections

func (q *Queries) ListPublishRunConnections(ctx context.Context, publishRunID string) ([]ControlPublishRunConnectionSlot, error)

func (*Queries) ListRelayDNSChallengePresentations

func (q *Queries) ListRelayDNSChallengePresentations(ctx context.Context, tlsServerName string) ([]ListRelayDNSChallengePresentationsRow, error)

func (*Queries) ListRelayServiceAssignmentTotals

func (q *Queries) ListRelayServiceAssignmentTotals(ctx context.Context) ([]ListRelayServiceAssignmentTotalsRow, error)

func (*Queries) ListTeamInvitations

func (q *Queries) ListTeamInvitations(ctx context.Context, teamID string) ([]ListTeamInvitationsRow, error)

func (*Queries) ListTeamMembershipContexts

func (q *Queries) ListTeamMembershipContexts(ctx context.Context, arg ListTeamMembershipContextsParams) ([]ListTeamMembershipContextsRow, error)

func (*Queries) ListTeamNamespaceLabels

func (q *Queries) ListTeamNamespaceLabels(ctx context.Context, teamID string) ([]ListTeamNamespaceLabelsRow, error)

func (*Queries) LockACMEOrder

func (q *Queries) LockACMEOrder(ctx context.Context, issuanceID string) (ControlAcmeOrder, error)

func (*Queries) LockACMEOrderForInstall

func (q *Queries) LockACMEOrderForInstall(ctx context.Context, arg LockACMEOrderForInstallParams) (ControlAcmeOrder, error)

func (*Queries) LockCertificateIssuanceControl

func (q *Queries) LockCertificateIssuanceControl(ctx context.Context) (bool, error)

func (*Queries) LockControlSessionByRefreshID

func (q *Queries) LockControlSessionByRefreshID(ctx context.Context, refreshTokenID string) (LockControlSessionByRefreshIDRow, error)

func (*Queries) LockDNSAuthority

func (q *Queries) LockDNSAuthority(ctx context.Context, authorityReference string) (ControlDnsAuthority, error)

func (*Queries) LockDNSAuthorityLocalDomain

func (q *Queries) LockDNSAuthorityLocalDomain(ctx context.Context, authorityReference pgtype.Text) error

func (*Queries) LockDNSAuthorityLocalTeam

func (q *Queries) LockDNSAuthorityLocalTeam(ctx context.Context, authorityReference pgtype.Text) error

func (*Queries) LockDomainPublicURLs

func (q *Queries) LockDomainPublicURLs(ctx context.Context, arg LockDomainPublicURLsParams) ([]ControlPublicUrl, error)

func (*Queries) LockEligibleRelayLeases

func (q *Queries) LockEligibleRelayLeases(ctx context.Context, arg LockEligibleRelayLeasesParams) ([]LockEligibleRelayLeasesRow, error)

func (*Queries) LockExpiredEphemeralPublicURLs

func (q *Queries) LockExpiredEphemeralPublicURLs(ctx context.Context, arg LockExpiredEphemeralPublicURLsParams) ([]ControlPublicUrl, error)

func (*Queries) LockExpiredPublishRunPublicURLs

func (q *Queries) LockExpiredPublishRunPublicURLs(ctx context.Context, arg LockExpiredPublishRunPublicURLsParams) ([]ControlPublicUrl, error)

lock public URLs before publish runs, as heartbeat and closure do. the partial expiration index finds candidates; SKIP LOCKED leaves busy public URLs to other controls and active publishers.

func (*Queries) LockHostedTeamPublicURLs

func (q *Queries) LockHostedTeamPublicURLs(ctx context.Context, teamID string) ([]ControlPublicUrl, error)

func (*Queries) LockIdentityBootstrap

func (q *Queries) LockIdentityBootstrap(ctx context.Context) error

func (*Queries) LockIdentityForTeamCreation

func (q *Queries) LockIdentityForTeamCreation(ctx context.Context, identityID string) (LockIdentityForTeamCreationRow, error)

func (*Queries) LockIngressLease

func (q *Queries) LockIngressLease(ctx context.Context, arg LockIngressLeaseParams) (ControlIngressLease, error)

func (*Queries) LockIngressRoutingTableClock

func (q *Queries) LockIngressRoutingTableClock(ctx context.Context) (int64, error)

func (*Queries) LockInvalidReadyPublisherConnections

func (q *Queries) LockInvalidReadyPublisherConnections(ctx context.Context, now pgtype.Timestamptz) ([]ControlPublishRunConnectionSlot, error)

func (*Queries) LockLocalPublicURLTeamForMutation

func (q *Queries) LockLocalPublicURLTeamForMutation(ctx context.Context, publicUrlID string) (string, error)

func (*Queries) LockLocalTeamForMutation

func (q *Queries) LockLocalTeamForMutation(ctx context.Context, teamID string) (string, error)

local authority mutations lock the team before identities, memberships, domains, DNS authorities, and public URLs. recheck authorization under this transaction-held guard; hosted teams need no fabricated local rows. queue writers with publish run readers through the advisory lock: row-lock readers alone can bypass a waiting writer indefinitely.

func (*Queries) LockLocalTeamForSession

func (q *Queries) LockLocalTeamForSession(ctx context.Context, teamID string) (string, error)

publish run creation reads authority under this guard before locking its public URL. different public URLs may start together while team, role, or domain mutations wait. callers must not upgrade this guard by writing the team.

func (*Queries) LockManagedDomainForClaim

func (q *Queries) LockManagedDomainForClaim(ctx context.Context) (ControlDomain, error)

func (*Queries) LockMembershipPublicURLs

func (q *Queries) LockMembershipPublicURLs(ctx context.Context, arg LockMembershipPublicURLsParams) ([]ControlPublicUrl, error)

func (*Queries) LockPublicURLCreationControl

func (q *Queries) LockPublicURLCreationControl(ctx context.Context) (bool, error)

func (*Queries) LockPublicURLCreator

func (q *Queries) LockPublicURLCreator(ctx context.Context, identityID string) (string, error)

serialize creators without blocking publish run and audit foreign-key checks.

func (*Queries) LockPublicURLForRun

func (q *Queries) LockPublicURLForRun(ctx context.Context, publicUrlID string) (ControlPublicUrl, error)

publish run operations serialize with public URL mutations without changing public URL identity. NO KEY UPDATE permits usage's KEY SHARE references; overlapping usage pages could starve a stronger UPDATE heartbeat lock.

func (*Queries) LockPublicURLForUsage

func (q *Queries) LockPublicURLForUsage(ctx context.Context, publicUrlID string) (string, error)

func (*Queries) LockPublicURLRecoveryEpisode

func (q *Queries) LockPublicURLRecoveryEpisode(ctx context.Context, recoveryEpisodeID int64) (ControlPublicUrlRecoveryEpisode, error)

func (*Queries) LockPublishRun

func (q *Queries) LockPublishRun(ctx context.Context, publishRunID string) (ControlPublishRun, error)

func (*Queries) LockPublishRunCreationControl

func (q *Queries) LockPublishRunCreationControl(ctx context.Context) (bool, error)

func (*Queries) LockPublishRunForUsage

func (q *Queries) LockPublishRunForUsage(ctx context.Context, arg LockPublishRunForUsageParams) (ControlPublishRun, error)

acquire the public URL reference before the publish run in one statement. read the bucket later: another ingress may create it while this statement waits for the publish run lock, after this statement's snapshot was taken.

func (*Queries) LockRelayServiceForCertificate

func (q *Queries) LockRelayServiceForCertificate(ctx context.Context, relayServiceID string) (string, error)

func (*Queries) LockRelayServicesForPlacement

func (q *Queries) LockRelayServicesForPlacement(ctx context.Context) ([]string, error)

callers hold affected public URL rows and any existing publish run rows. take the assignment-total guard before relay-service guards and lease rows; lock all services before checking capacity or locking leases.

func (*Queries) LockTeamActorContext

func (q *Queries) LockTeamActorContext(ctx context.Context, arg LockTeamActorContextParams) (LockTeamActorContextRow, error)

func (*Queries) LockTeamDomain

func (q *Queries) LockTeamDomain(ctx context.Context, arg LockTeamDomainParams) (LockTeamDomainRow, error)

func (*Queries) LockTeamForInvitationAcceptance

func (q *Queries) LockTeamForInvitationAcceptance(ctx context.Context, teamID string) (string, error)

func (*Queries) LockTeamInvitation

func (q *Queries) LockTeamInvitation(ctx context.Context, arg LockTeamInvitationParams) (LockTeamInvitationRow, error)

func (*Queries) LockTeamMembership

func (q *Queries) LockTeamMembership(ctx context.Context, arg LockTeamMembershipParams) (LockTeamMembershipRow, error)

func (*Queries) MarkACMEAuthorizationsPresented

func (q *Queries) MarkACMEAuthorizationsPresented(ctx context.Context, arg MarkACMEAuthorizationsPresentedParams) (int64, error)

func (*Queries) MarkACMEOrderInstalled

func (q *Queries) MarkACMEOrderInstalled(ctx context.Context, arg MarkACMEOrderInstalledParams) (ControlAcmeOrder, error)

func (*Queries) MarkClaimedDomainReleasing

func (q *Queries) MarkClaimedDomainReleasing(ctx context.Context, arg MarkClaimedDomainReleasingParams) (int64, error)

func (*Queries) MarkDNSAuthorityReleasing

func (q *Queries) MarkDNSAuthorityReleasing(ctx context.Context, arg MarkDNSAuthorityReleasingParams) (int64, error)

func (*Queries) MarkExpiredIngressUsageRunIncomplete

func (q *Queries) MarkExpiredIngressUsageRunIncomplete(ctx context.Context, arg MarkExpiredIngressUsageRunIncompleteParams) error

func (*Queries) MarkExpiredIngressUsageRunsIncomplete

func (q *Queries) MarkExpiredIngressUsageRunsIncomplete(ctx context.Context, now pgtype.Timestamptz) ([]ControlIngressUsageRun, error)

func (*Queries) MarkIngressUsageRunReported

func (q *Queries) MarkIngressUsageRunReported(ctx context.Context, arg MarkIngressUsageRunReportedParams) (ControlIngressUsageRun, error)

func (*Queries) MarkInvitationExpired

func (q *Queries) MarkInvitationExpired(ctx context.Context, invitationID string) (int64, error)

func (*Queries) MarkPublishRunCertificateInstalled

func (q *Queries) MarkPublishRunCertificateInstalled(ctx context.Context, arg MarkPublishRunCertificateInstalledParams) (ControlPublishRun, error)

func (*Queries) MarkPublishRunReady

func (q *Queries) MarkPublishRunReady(ctx context.Context, arg MarkPublishRunReadyParams) (ControlPublishRun, error)

func (*Queries) MarkPublisherConnectionReady

ready is idempotent for the exact claim; a replaced assignment cannot revive.

func (*Queries) ObserveAuthorityRevision

func (q *Queries) ObserveAuthorityRevision(ctx context.Context, arg ObserveAuthorityRevisionParams) (int64, error)

func (*Queries) OpenPublicURLRecoveryEpisode

func (q *Queries) OpenPublicURLRecoveryEpisode(ctx context.Context, arg OpenPublicURLRecoveryEpisodeParams) error

func (*Queries) PruneIngressRoutingHistoryBatch

func (q *Queries) PruneIngressRoutingHistoryBatch(ctx context.Context, afterRevision int64) (PruneIngressRoutingHistoryBatchRow, error)

bound candidates scanned, even when an anchor cannot be removed. retain the latest hostname/category projection, including tombstones and expired rows, and each publish run number's latest revision. concurrent publication can make an anchor redundant but cannot restore a superseded event.

func (*Queries) PutControlTLSCacheEntry

func (q *Queries) PutControlTLSCacheEntry(ctx context.Context, arg PutControlTLSCacheEntryParams) error

func (*Queries) QuarantineMemberSlug

func (q *Queries) QuarantineMemberSlug(ctx context.Context, arg QuarantineMemberSlugParams) (int64, error)

func (*Queries) ReadIngressRoutingTableClock

func (q *Queries) ReadIngressRoutingTableClock(ctx context.Context) (ControlIngressRoutingTableClock, error)

func (*Queries) RegisterIngress

func (q *Queries) RegisterIngress(ctx context.Context, arg RegisterIngressParams) (ControlIngressLease, error)

func (*Queries) RegisterRelay

func (q *Queries) RegisterRelay(ctx context.Context, arg RegisterRelayParams) (RegisterRelayRow, error)

blocking relay-service operations take the transaction advisory guard before service and lease rows. row readers can bypass a waiting writer without this queue, starving registration, placement, or certificate updates. SKIP LOCKED certificate preparation and key rotation only take row locks; they must not wait for this guard while holding a row.

func (*Queries) ReleaseInvitedMemberSlug

func (q *Queries) ReleaseInvitedMemberSlug(ctx context.Context, arg ReleaseInvitedMemberSlugParams) (int64, error)

func (*Queries) RemoveTeamMembership

func (q *Queries) RemoveTeamMembership(ctx context.Context, arg RemoveTeamMembershipParams) (int64, error)

func (*Queries) RenewEphemeralPublicURLExpiry

func (q *Queries) RenewEphemeralPublicURLExpiry(ctx context.Context, arg RenewEphemeralPublicURLExpiryParams) (pgtype.Timestamptz, error)

func (*Queries) RenewIngress

func (q *Queries) RenewIngress(ctx context.Context, arg RenewIngressParams) (ControlIngressLease, error)

func (*Queries) RenewRelay

func (q *Queries) RenewRelay(ctx context.Context, arg RenewRelayParams) (RenewRelayRow, error)

func (*Queries) ReplacePublishRunConnection

a failed ready connection can keep its existing service reservation. this atomic ready -> assigned transition has zero counter delta and needs only the caller's public URL/publish run locks, not placement's global/service/lease guards. check failure and eligible service capacity in the statement snapshot. a concurrent lease/configuration change may invalidate the returned assignment, just as one immediately after commit can; claim checks the exact current lease and process capacity under its exclusive lease guard. no capacity is added here. closed or expired slots have no reservation and require guarded placement first.

func (*Queries) ReserveInvitedMemberSlug

func (q *Queries) ReserveInvitedMemberSlug(ctx context.Context, arg ReserveInvitedMemberSlugParams) (string, error)

func (*Queries) ReserveManagedLabel

func (q *Queries) ReserveManagedLabel(ctx context.Context, arg ReserveManagedLabelParams) (string, error)

func (*Queries) RevokeControlSession

func (q *Queries) RevokeControlSession(ctx context.Context, arg RevokeControlSessionParams) (int64, error)

func (*Queries) RevokeTeamInvitation

func (q *Queries) RevokeTeamInvitation(ctx context.Context, arg RevokeTeamInvitationParams) (int64, error)

func (*Queries) RotateACMEAccountKey

func (q *Queries) RotateACMEAccountKey(ctx context.Context, arg RotateACMEAccountKeyParams) error

func (*Queries) RotateControlSessionCredentials

func (q *Queries) RotateControlSessionCredentials(ctx context.Context, arg RotateControlSessionCredentialsParams) (int64, error)

func (*Queries) RotateControlSessionRetrySecret

func (q *Queries) RotateControlSessionRetrySecret(ctx context.Context, arg RotateControlSessionRetrySecretParams) error

func (*Queries) RotateControlTLSCacheEntry

func (q *Queries) RotateControlTLSCacheEntry(ctx context.Context, arg RotateControlTLSCacheEntryParams) error

func (*Queries) RotateExternalRetryMasterKey

func (q *Queries) RotateExternalRetryMasterKey(ctx context.Context, arg RotateExternalRetryMasterKeyParams) error

func (*Queries) RotateRelayCertificateOrderPrivateKey

func (q *Queries) RotateRelayCertificateOrderPrivateKey(ctx context.Context, arg RotateRelayCertificateOrderPrivateKeyParams) error

func (*Queries) RotateRelayServicePrivateKey

func (q *Queries) RotateRelayServicePrivateKey(ctx context.Context, arg RotateRelayServicePrivateKeyParams) error

func (*Queries) SaveACMEAuthorizationWork

func (q *Queries) SaveACMEAuthorizationWork(ctx context.Context, arg SaveACMEAuthorizationWorkParams) (ControlAcmeAuthorization, error)

func (*Queries) SaveACMEOrderWork

func (q *Queries) SaveACMEOrderWork(ctx context.Context, arg SaveACMEOrderWorkParams) (ControlAcmeOrder, error)

func (*Queries) SaveDNSAuthorityWork

func (q *Queries) SaveDNSAuthorityWork(ctx context.Context, arg SaveDNSAuthorityWorkParams) (ControlDnsAuthority, error)

func (*Queries) SaveDNSPublicURLWork

func (q *Queries) SaveDNSPublicURLWork(ctx context.Context, arg SaveDNSPublicURLWorkParams) (ControlPublicUrl, error)

func (*Queries) SelectIngressRoutingRetentionFloor

func (q *Queries) SelectIngressRoutingRetentionFloor(ctx context.Context, cutoff pgtype.Timestamptz) (int64, error)

find a committed prefix, not the largest old timestamp: request-start times can be out of revision order. keep every recent event without taking the publication clock during this scan.

func (*Queries) SetDNSReadyDomainDefault

func (q *Queries) SetDNSReadyDomainDefault(ctx context.Context, arg SetDNSReadyDomainDefaultParams) (int64, error)

func (*Queries) SetDomainAuthorityRevision

func (q *Queries) SetDomainAuthorityRevision(ctx context.Context, arg SetDomainAuthorityRevisionParams) error

func (*Queries) SetMaintenanceControl

func (q *Queries) SetMaintenanceControl(ctx context.Context, arg SetMaintenanceControlParams) (ControlMaintenanceControl, error)

func (*Queries) SetPersonalTeamDefaultDomain

func (q *Queries) SetPersonalTeamDefaultDomain(ctx context.Context, arg SetPersonalTeamDefaultDomainParams) error

func (*Queries) SetTeamDefaultDomain

func (q *Queries) SetTeamDefaultDomain(ctx context.Context, arg SetTeamDefaultDomainParams) (int64, error)

func (*Queries) StoreRelayTransportCertificate

func (q *Queries) StoreRelayTransportCertificate(ctx context.Context, arg StoreRelayTransportCertificateParams) (ControlRelayService, error)

func (*Queries) SuspendAuthorityPublicURL

func (q *Queries) SuspendAuthorityPublicURL(ctx context.Context, arg SuspendAuthorityPublicURLParams) (int64, error)

func (*Queries) TeamMembershipIdentityExists

func (q *Queries) TeamMembershipIdentityExists(ctx context.Context, arg TeamMembershipIdentityExistsParams) (bool, error)

func (*Queries) TryLockIngressRoutingHistoryCleanup

func (q *Queries) TryLockIngressRoutingHistoryCleanup(ctx context.Context) (bool, error)

cleanup-only coordination; do not take public URL, placement, lease, or routing clock locks.

func (*Queries) UpdateACMEAccountRegistration

func (q *Queries) UpdateACMEAccountRegistration(ctx context.Context, arg UpdateACMEAccountRegistrationParams) (ControlAcmeAccount, error)

func (*Queries) UpdateMembershipRole

func (q *Queries) UpdateMembershipRole(ctx context.Context, arg UpdateMembershipRoleParams) (int64, error)

func (*Queries) UpdateOIDCIdentity

func (q *Queries) UpdateOIDCIdentity(ctx context.Context, arg UpdateOIDCIdentityParams) (ControlIdentity, error)

func (*Queries) UpdatePublicURL

func (q *Queries) UpdatePublicURL(ctx context.Context, arg UpdatePublicURLParams) (ControlPublicUrl, error)

func (*Queries) UpsertDNSChallengeChange

func (q *Queries) UpsertDNSChallengeChange(ctx context.Context, arg UpsertDNSChallengeChangeParams) error

func (*Queries) WakeACMEOrder

func (q *Queries) WakeACMEOrder(ctx context.Context, arg WakeACMEOrderParams) error

a publisher transition invalidates the worker's authorization snapshot. call only after changing authorizations while holding the order lock.

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RegisterIngressParams

type RegisterIngressParams struct {
	IngressID          string
	IngressRunID       string
	ProtocolVersion    int64
	ConnectionCapacity int64
	RegisteredAt       pgtype.Timestamptz
	RenewedAt          pgtype.Timestamptz
	LeaseExpiresAt     pgtype.Timestamptz
}

type RegisterRelayParams

type RegisterRelayParams struct {
	RelayServiceID       string
	RelayAddress         string
	TlsServerName        string
	RegisteredAt         pgtype.Timestamptz
	RelayID              string
	RelayRunID           string
	ProtocolVersion      int64
	InternalRelayAddress string
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
}

type RegisterRelayRow

type RegisterRelayRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type RejectPublicURLUsageDeliveryParams

type RejectPublicURLUsageDeliveryParams struct {
	LastError   pgtype.Text
	DeliveryID  int64
	WorkOwner   pgtype.Text
	WorkEpoch   int64
	CompletedAt pgtype.Timestamptz
}

type ReleaseInvitedMemberSlugParams

type ReleaseInvitedMemberSlugParams struct {
	ReleasedAt        pgtype.Timestamptz
	SlugReservationID string
}

type RemoveTeamMembershipParams

type RemoveTeamMembershipParams struct {
	AuthorityRevision   int64
	RemovedAt           pgtype.Timestamptz
	RemovedByIdentityID pgtype.Text
	MembershipID        string
	TeamID              string
}

type RenewEphemeralPublicURLExpiryParams

type RenewEphemeralPublicURLExpiryParams struct {
	ExpiresAt   pgtype.Timestamptz
	PublicURLID string
}

type RenewIngressParams

type RenewIngressParams struct {
	ReportedConnections  int64
	RoutingTableRevision int64
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	IngressID            string
	IngressRunID         string
	IngressLeaseRevision int64
}

type RenewRelayParams

type RenewRelayParams struct {
	ReportedConnections int64
	ReportedStreams     int64
	RenewedAt           pgtype.Timestamptz
	LeaseExpiresAt      pgtype.Timestamptz
	RelayServiceID      string
	RelayID             string
	RelayRunID          string
	RelayLeaseRevision  int64
}

type RenewRelayRow

type RenewRelayRow struct {
	ID                   int64
	RelayID              string
	RelayServiceID       string
	RelayRunID           string
	RelayLeaseRevision   int64
	ProtocolVersion      int64
	InternalRelayAddress string
	ObservedAddress      *netip.Addr
	InternalNetworks     []netip.Prefix
	ConnectionCapacity   int64
	StreamCapacity       int64
	ReportedConnections  int64
	ReportedStreams      int64
	Draining             bool
	DrainDeadline        pgtype.Timestamptz
	RegisteredAt         pgtype.Timestamptz
	RenewedAt            pgtype.Timestamptz
	LeaseExpiresAt       pgtype.Timestamptz
	RelayAddress         string
	TlsServerName        string
}

type ReplacePublishRunConnectionParams

type ReplacePublishRunConnectionParams struct {
	NewPublisherConnectionID               string
	NewConnectionAssignmentRevision        int64
	RelayServiceID                         string
	RelayAddress                           string
	TlsServerName                          string
	PublisherConnectionCredentialDigest    []byte
	PublisherConnectionCredentialExpiresAt pgtype.Timestamptz
	AssignedAt                             pgtype.Timestamptz
	PublishRunID                           string
	ConnectionSlot                         int16
	PreviousPublisherConnectionID          string
	PreviousConnectionAssignmentRevision   int64
}

type ReserveInvitedMemberSlugParams

type ReserveInvitedMemberSlugParams struct {
	ID                   string
	TeamID               string
	MemberSlug           string
	ReservedByIdentityID pgtype.Text
	CreatedAt            pgtype.Timestamptz
}

type ReserveManagedLabelParams

type ReserveManagedLabelParams struct {
	Label     string
	CreatedAt pgtype.Timestamptz
}

type RetryPublicURLUsageDeliveryParams

type RetryPublicURLUsageDeliveryParams struct {
	AvailableAt pgtype.Timestamptz
	LastError   pgtype.Text
	DeliveryID  int64
	WorkOwner   pgtype.Text
	WorkEpoch   int64
	CompletedAt pgtype.Timestamptz
}

type RevokeControlSessionParams

type RevokeControlSessionParams struct {
	RevokedAt pgtype.Timestamptz
	RevokedBy pgtype.Text
	ID        string
}

type RevokeTeamInvitationParams

type RevokeTeamInvitationParams struct {
	RevokedAt    pgtype.Timestamptz
	IdentityID   pgtype.Text
	InvitationID string
}

type RotateACMEAccountKeyParams

type RotateACMEAccountKeyParams struct {
	AccountKeyCiphertext   []byte
	AccountKeyStorageKeyID string
	UpdatedAt              pgtype.Timestamptz
	AccountID              string
	PreviousKeyID          string
	PreviousCiphertext     []byte
}

type RotateControlSessionCredentialsParams

type RotateControlSessionCredentialsParams struct {
	AccessTokenID      string
	AccessTokenDigest  []byte
	AccessExpiresAt    pgtype.Timestamptz
	RefreshTokenID     string
	RefreshTokenDigest []byte
	RefreshedAt        pgtype.Timestamptz
	ID                 string
}

type RotateControlSessionRetrySecretParams

type RotateControlSessionRetrySecretParams struct {
	RetrySecretCiphertext   []byte
	RetrySecretStorageKeyID string
	ID                      string
	PreviousKeyID           string
	PreviousCiphertext      []byte
}

type RotateControlTLSCacheEntryParams

type RotateControlTLSCacheEntryParams struct {
	CacheCiphertext    []byte
	CacheStorageKeyID  string
	UpdatedAt          pgtype.Timestamptz
	DirectoryUrl       string
	CacheKey           string
	PreviousKeyID      string
	PreviousCiphertext []byte
}

type RotateExternalRetryMasterKeyParams

type RotateExternalRetryMasterKeyParams struct {
	ExternalRetryMasterKeyCiphertext   []byte
	ExternalRetryMasterKeyStorageKeyID string
	PreviousKeyID                      string
	PreviousCiphertext                 []byte
}

type RotateRelayCertificateOrderPrivateKeyParams

type RotateRelayCertificateOrderPrivateKeyParams struct {
	PrivateKeyCiphertext   []byte
	PrivateKeyStorageKeyID string
	UpdatedAt              pgtype.Timestamptz
	OrderID                string
	PreviousKeyID          string
	PreviousCiphertext     []byte
}

type RotateRelayServicePrivateKeyParams

type RotateRelayServicePrivateKeyParams struct {
	TransportPrivateKeyCiphertext   []byte
	TransportPrivateKeyStorageKeyID pgtype.Text
	UpdatedAt                       pgtype.Timestamptz
	RelayServiceID                  string
	PreviousKeyID                   pgtype.Text
	PreviousCiphertext              []byte
}

type SaveACMEAuthorizationWorkParams

type SaveACMEAuthorizationWorkParams struct {
	ID                            string
	OrderID                       string
	Identifier                    string
	AuthorizationUrl              string
	ChallengeType                 pgtype.Text
	ChallengeUrl                  pgtype.Text
	ChallengeToken                pgtype.Text
	ChallengeDigest               []byte
	PresentationReference         pgtype.Text
	State                         string
	AuthorizationRevision         int64
	Attempts                      int64
	AvailableAt                   pgtype.Timestamptz
	PresentedAt                   pgtype.Timestamptz
	ValidatedAt                   pgtype.Timestamptz
	CleanupCompletedAt            pgtype.Timestamptz
	ExpiresAt                     pgtype.Timestamptz
	LastError                     pgtype.Text
	CreatedAt                     pgtype.Timestamptz
	UpdatedAt                     pgtype.Timestamptz
	ExpectedAuthorizationRevision int64
}

type SaveACMEOrderWorkParams

type SaveACMEOrderWorkParams struct {
	State                 string
	OrderUrl              pgtype.Text
	FinalizeUrl           pgtype.Text
	CertificateUrl        pgtype.Text
	CertificatePem        []byte
	NotBefore             pgtype.Timestamptz
	NotAfter              pgtype.Timestamptz
	RenewAt               pgtype.Timestamptz
	AvailableAt           pgtype.Timestamptz
	LastError             pgtype.Text
	CompletedAt           pgtype.Timestamptz
	IssuanceID            string
	WorkOwner             pgtype.Text
	WorkEpoch             int64
	ExpectedOrderRevision int64
}

type SaveDNSAuthorityWorkParams

type SaveDNSAuthorityWorkParams struct {
	ProviderZoneID       pgtype.Text
	State                string
	Nameservers          []string
	AvailableAt          pgtype.Timestamptz
	LastError            pgtype.Text
	CompletedAt          pgtype.Timestamptz
	AuthorityReference   string
	WorkOwner            pgtype.Text
	WorkEpoch            int64
	ExpectedWorkRevision int64
}

type SaveDNSPublicURLWorkParams

type SaveDNSPublicURLWorkParams struct {
	DnsState            string
	DnsAvailableAt      pgtype.Timestamptz
	DnsLastError        pgtype.Text
	CompletedAt         pgtype.Timestamptz
	PublicURLID         string
	WorkOwner           pgtype.Text
	WorkEpoch           int64
	ExpectedDnsRevision int64
}

type SaveRelayCertificateOrderWorkParams

type SaveRelayCertificateOrderWorkParams struct {
	State                  string
	OrderUrl               pgtype.Text
	FinalizeUrl            pgtype.Text
	CertificateUrl         pgtype.Text
	AuthorizationUrl       pgtype.Text
	AuthorizationExpiresAt pgtype.Timestamptz
	ChallengeUrl           pgtype.Text
	ChallengeToken         pgtype.Text
	ChallengeDigest        []byte
	PresentationReference  pgtype.Text
	CertificatePem         []byte
	NotBefore              pgtype.Timestamptz
	NotAfter               pgtype.Timestamptz
	RenewAt                pgtype.Timestamptz
	AvailableAt            pgtype.Timestamptz
	LastError              pgtype.Text
	CompletedAt            pgtype.Timestamptz
	OrderID                string
	WorkOwner              pgtype.Text
	WorkEpoch              int64
	ExpectedOrderRevision  int64
}

type SetDNSReadyDomainDefaultParams

type SetDNSReadyDomainDefaultParams struct {
	UpdatedAt          pgtype.Timestamptz
	AuthorityReference pgtype.Text
}

type SetDomainAuthorityRevisionParams

type SetDomainAuthorityRevisionParams struct {
	AuthorityRevision  int64
	UpdatedAt          pgtype.Timestamptz
	AuthorityReference pgtype.Text
}

type SetMaintenanceControlParams

type SetMaintenanceControlParams struct {
	Allowed     bool
	UpdatedAt   pgtype.Timestamptz
	UpdatedBy   string
	ControlName string
}

type SetPersonalTeamDefaultDomainParams

type SetPersonalTeamDefaultDomainParams struct {
	DomainID  pgtype.Text
	UpdatedAt pgtype.Timestamptz
	TeamID    string
}

type SetTeamDefaultDomainParams

type SetTeamDefaultDomainParams struct {
	DomainID  pgtype.Text
	UpdatedAt pgtype.Timestamptz
	TeamID    string
}

type StoreRelayTransportCertificateParams

type StoreRelayTransportCertificateParams struct {
	TransportCertificatePem         pgtype.Text
	TransportPrivateKeyCiphertext   []byte
	TransportPrivateKeyStorageKeyID pgtype.Text
	TransportCertificateSerial      pgtype.Text
	TransportCertificateExpiresAt   pgtype.Timestamptz
	UpdatedAt                       pgtype.Timestamptz
	RelayServiceID                  string
	TlsServerName                   string
}

type SuspendAuthorityPublicURLParams

type SuspendAuthorityPublicURLParams struct {
	SuspendedAt      pgtype.Timestamptz
	SuspensionReason pgtype.Text
	PublicURLID      string
}

type TeamMembershipIdentityExistsParams

type TeamMembershipIdentityExistsParams struct {
	TeamID     string
	IdentityID string
}

type UpdateACMEAccountRegistrationParams

type UpdateACMEAccountRegistrationParams struct {
	ContactEmail     string
	AccountUrl       pgtype.Text
	AcceptedTermsUrl pgtype.Text
	UpdatedAt        pgtype.Timestamptz
	AccountID        string
}

type UpdateLocalDomainForDNSAuthorityParams

type UpdateLocalDomainForDNSAuthorityParams struct {
	State              string
	UpdatedAt          pgtype.Timestamptz
	AuthorityReference pgtype.Text
}

type UpdateLocalDomainForDNSAuthorityRow

type UpdateLocalDomainForDNSAuthorityRow struct {
	ID                   string
	TeamID               pgtype.Text
	MakeDefaultWhenReady bool
}

type UpdateMembershipRoleParams

type UpdateMembershipRoleParams struct {
	Role              string
	AuthorityRevision int64
	UpdatedAt         pgtype.Timestamptz
	MembershipID      string
	TeamID            string
}

type UpdateOIDCIdentityParams

type UpdateOIDCIdentityParams struct {
	DisplayName     string
	NormalizedEmail pgtype.Text
	EmailVerified   bool
	UpdatedAt       pgtype.Timestamptz
	ID              string
}

type UpdatePublicURLParams

type UpdatePublicURLParams struct {
	Target                   string
	PolicyRevision           int64
	IpPolicy                 string
	AllowedIpPrefixes        []netip.Prefix
	UpdatedAt                pgtype.Timestamptz
	PublicURLID              string
	ExpectedMutationRevision int64
}

type UpdatePublicURLRecoveryHistogramParams

type UpdatePublicURLRecoveryHistogramParams struct {
	ObservedSeconds float64
	UpdatedAt       pgtype.Timestamptz
}

type UpsertDNSChallengeChangeParams

type UpsertDNSChallengeChangeParams struct {
	ZoneID        string
	RecordName    string
	DesiredDigest []byte
	ChangeID      string
	UpdatedAt     pgtype.Timestamptz
}

type WakeACMEOrderParams

type WakeACMEOrderParams struct {
	AvailableAt pgtype.Timestamptz
	IssuanceID  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL