dbgen

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcquireInstallationBudgetLeaseParams

type AcquireInstallationBudgetLeaseParams struct {
	LeaseToken     string
	InstallationID int64
	TtlSeconds     float64
}

type AcquireInstallationBudgetLeaseRow

type AcquireInstallationBudgetLeaseRow struct {
	Class        string
	Remaining    pgtype.Int8
	RateLimit    pgtype.Int8
	ResetAt      pgtype.Timestamptz
	BackoffUntil pgtype.Timestamptz
	LeaseUntil   pgtype.Timestamptz
}

type AcquireOrRenewStreamWatermarkLeaseParams

type AcquireOrRenewStreamWatermarkLeaseParams struct {
	LeaseToken string
	LeaseTtl   string
}

type AdvanceBackfillCursorParams

type AdvanceBackfillCursorParams struct {
	NextPhase      string
	NextPage       int32
	QueueName      string
	InstallationID int64
	RepoFullName   string
	ExpectedPhase  string
	ExpectedPage   int32
}

type AdvanceGapHealCursorParams

type AdvanceGapHealCursorParams struct {
	NextCursor     string
	UpdatedAt      pgtype.Timestamptz
	InstallationID int64
	ExpectedCursor string
}

type AdvanceInstallationBackfillCursorParams

type AdvanceInstallationBackfillCursorParams struct {
	NextPhase      string
	NextPage       int32
	QueueName      string
	InstallationID int64
	ExpectedPhase  string
	ExpectedPage   int32
}

type AdvanceSweepCursorParams

type AdvanceSweepCursorParams struct {
	NextCursor     string
	PassNewCount   int32
	UpdatedAt      pgtype.Timestamptz
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	ExpectedCursor string
}

type AppendAcceptedCheckHistoryParams

type AppendAcceptedCheckHistoryParams struct {
	RepoID     int64
	HeadSha    string
	SyncedAt   pgtype.Timestamptz
	Etag       string
	SyncSource string
	CheckRuns  []byte
}

type ApplyDerivedWorkItemBatchParams

type ApplyDerivedWorkItemBatchParams struct {
	Stream      string
	ScopeKeys   []string
	Items       []byte
	ChangedKind string
	RemovedKind string
}

type BackfillChild

type BackfillChild struct {
	InstallationID   int64
	RepoFullName     string
	Kind             string
	RefreshKey       string
	TargetGeneration int64
	CreatedAt        pgtype.Timestamptz
	CompletedAt      pgtype.Timestamptz
}

type BackfillCursor

type BackfillCursor struct {
	InstallationID int64
	RepoFullName   string
	Phase          string
	Page           int32
	CompletedAt    pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	QueueName      string
}

type BumpRefreshIntentGenerationsRow

type BumpRefreshIntentGenerationsRow struct {
	Kind            string
	RefreshKey      string
	Generation      int64
	DeadlineAt      pgtype.Timestamptz
	EventReceivedAt pgtype.Timestamptz
}

type ChangeEvent

type ChangeEvent struct {
	Seq        int64
	Stream     string
	Kind       string
	EntityKey  string
	OccurredAt pgtype.Timestamptz
	Payload    []byte
	OutboxTxid pgtype.Uint64
}

type CheckHistory

type CheckHistory struct {
	ID              int64
	CheckRunGhID    int64
	RepoID          int64
	Name            string
	Status          string
	Conclusion      string
	Observed        []byte
	GhUpdatedAt     pgtype.Timestamptz
	HeadSha         string
	SyncedAt        pgtype.Timestamptz
	Etag            string
	SyncSource      string
	TombstonedAt    pgtype.Timestamptz
	SemanticVersion string
}

type CheckRun

type CheckRun struct {
	GhID            int64
	RepoID          int64
	NodeID          string
	Name            string
	Status          string
	Conclusion      string
	DetailsUrl      string
	AppSlug         string
	StartedAt       pgtype.Timestamptz
	CompletedAt     pgtype.Timestamptz
	GhUpdatedAt     pgtype.Timestamptz
	HeadSha         string
	SyncedAt        pgtype.Timestamptz
	Etag            string
	SyncSource      string
	TombstonedAt    pgtype.Timestamptz
	SemanticVersion string
	LastCheckedAt   pgtype.Timestamptz
}

type CollectBudgetMetricsRow

type CollectBudgetMetricsRow struct {
	Class      string
	Remaining  int64
	RateLimit  int64
	GateClosed bool
}

type CollectCacheStalenessMetricsRow

type CollectCacheStalenessMetricsRow struct {
	EntityClass string
	AgeSeconds  float64
}

type CollectConsumerStreamMetricsRow

type CollectConsumerStreamMetricsRow struct {
	Consumer             string
	Stream               string
	OutstandingCount     int64
	OldestOutstandingAge float64
	ResyncCount          int64
}

type CollectDeliveryMetricsRow

type CollectDeliveryMetricsRow struct {
	OldestUnprocessed      float64
	Parked                 int64
	OldestParked           float64
	OutstandingGenerations int64
	OldestGeneration       float64
}

type CollectDriftMetricsRow

type CollectDriftMetricsRow struct {
	FindingState string
	EntityKind   string
	FindingCount int64
}

type CollectOperationHeartbeatMetricsRow

type CollectOperationHeartbeatMetricsRow struct {
	Component         string
	Operation         string
	SuccessCount      int64
	SampleCount       int64
	SuccessAgeSeconds float64
	SampleAgeSeconds  float64
}

type CollectPrunableOutboxMetricsRow

type CollectPrunableOutboxMetricsRow struct {
	Stream        string
	PrunableCount int64
}

type CollectRiverQueueDepthMetricsRow

type CollectRiverQueueDepthMetricsRow struct {
	Queue string
	Depth int64
}

type CollectStreamWatermarkMetricsRow

type CollectStreamWatermarkMetricsRow struct {
	SafeSeq    int64
	MaxSeq     int64
	AgeSeconds float64
}

type CollectSweepMetricsRow

type CollectSweepMetricsRow struct {
	SweepKind       string
	DurationSeconds float64
}

type CollectTombstoneMetricsRow

type CollectTombstoneMetricsRow struct {
	EntityKind     string
	TombstoneCount int64
}

type CompleteGapHealCursorParams

type CompleteGapHealCursorParams struct {
	CompletedAt    pgtype.Timestamptz
	InstallationID int64
	ExpectedCursor string
}

type CompleteRefreshIntentGenerationParams

type CompleteRefreshIntentGenerationParams struct {
	CompletedGeneration int64
	Kind                string
	RefreshKey          string
}

type CompleteSweepCursorParams

type CompleteSweepCursorParams struct {
	CompletedAt    pgtype.Timestamptz
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	ExpectedCursor string
}

type ConsumerCursor

type ConsumerCursor struct {
	Consumer     string
	Stream       string
	Seq          int64
	UpdatedAt    pgtype.Timestamptz
	ResyncCount  int64
	LastResyncAt pgtype.Timestamptz
}

type CountLoadgenRunDeliveriesRow

type CountLoadgenRunDeliveriesRow struct {
	Completed int64
	Total     int64
}

type CountPendingBackfillChildrenParams

type CountPendingBackfillChildrenParams struct {
	InstallationID int64
	RepoFullName   string
}

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 DeleteCheckHistoryBatchParams

type DeleteCheckHistoryBatchParams struct {
	Cutoff    pgtype.Timestamptz
	BatchSize int32
}

type DeleteLoadgenConsumerCursorParams

type DeleteLoadgenConsumerCursorParams struct {
	Consumer string
	Stream   string
}

type DerivationDirty

type DerivationDirty struct {
	ScopeKey string
	MarkedAt pgtype.Timestamptz
}

type DriftEntitiesWithoutChangeInput added in v0.3.0

type DriftEntitiesWithoutChangeInput struct {
	InstallationID int64
	EntityKind     string
	SourceID       int64
	EntityKey      string
	LockKey        string
	CacheSnapshot  []byte
	LastCheckedAt  pgtype.Timestamptz
}

type DriftEntitiesWithoutParticipation added in v0.3.0

type DriftEntitiesWithoutParticipation struct {
	InstallationID int64
	EntityKind     string
	SourceID       int64
	EntityKey      string
	LockKey        string
	CacheSnapshot  []byte
	LastCheckedAt  pgtype.Timestamptz
}

type DriftEntity

type DriftEntity struct {
	InstallationID int64
	EntityKind     string
	SourceID       int64
	EntityKey      string
	LockKey        string
	CacheSnapshot  []byte
	LastCheckedAt  pgtype.Timestamptz
}

type DriftEntityKey

type DriftEntityKey struct {
	InstallationID int64
	EntityKind     string
	SourceID       int64
}

type DriftFinding

type DriftFinding struct {
	ID                int64
	InstallationID    int64
	EntityKind        string
	EntityKey         string
	DetectedAt        pgtype.Timestamptz
	CacheSnapshot     []byte
	UpstreamSnapshot  []byte
	Diff              []byte
	RefreshEnqueuedAt pgtype.Timestamptz
	DiffHash          string
	FirstSeenAt       pgtype.Timestamptz
	LastSeenAt        pgtype.Timestamptz
	OccurrenceCount   int64
	HealGeneration    int64
	EscalatedAt       pgtype.Timestamptz
	ResolvedAt        pgtype.Timestamptz
}

type DriftSampleCursor

type DriftSampleCursor struct {
	InstallationID int64
	EntityKind     string
	SourceID       int64
	UpdatedAt      pgtype.Timestamptz
}

type EnsureBackfillCursorParams

type EnsureBackfillCursorParams struct {
	InstallationID int64
	RepoFullName   string
}

type EnsureConsumerCursorParams

type EnsureConsumerCursorParams struct {
	Consumer string
	Stream   string
}

type EnsureInstallationBudgetParams

type EnsureInstallationBudgetParams struct {
	InstallationID int64
	Class          string
}

type EnsureSweepCursorParams

type EnsureSweepCursorParams struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
}

type EscalateOpenDriftFindingParams

type EscalateOpenDriftFindingParams struct {
	LastSeenAt       pgtype.Timestamptz
	CacheSnapshot    []byte
	UpstreamSnapshot []byte
	Diff             []byte
	EscalatedAt      pgtype.Timestamptz
	ID               int64
}

type GapHealCursor

type GapHealCursor struct {
	InstallationID int64
	Cursor         string
	Cutoff         pgtype.Timestamptz
	StartedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	CompletedAt    pgtype.Timestamptz
}

type GetBackfillCursorForUpdateParams

type GetBackfillCursorForUpdateParams struct {
	InstallationID int64
	RepoFullName   string
}

type GetBackfillCursorParams

type GetBackfillCursorParams struct {
	InstallationID int64
	RepoFullName   string
}

type GetCachedEntitySnapshotParams

type GetCachedEntitySnapshotParams struct {
	InstallationID int64
	EntityKind     string
	EntityKey      string
}

type GetCachedEntitySnapshotRow

type GetCachedEntitySnapshotRow struct {
	EntityKind    string
	SourceID      int64
	EntityKey     string
	LockKey       string
	CacheSnapshot []byte
	LastCheckedAt pgtype.Timestamptz
}

type GetCheckRunsFetchMetadataParams

type GetCheckRunsFetchMetadataParams struct {
	HeadSha      string
	RepoFullName string
}

type GetCheckRunsFetchMetadataRow

type GetCheckRunsFetchMetadataRow struct {
	RepoGhID       int64
	InstallationID int64
	RepoFullName   string
	Etag           string
}

type GetConsumerCursorForUpdateParams

type GetConsumerCursorForUpdateParams struct {
	Consumer string
	Stream   string
}

type GetDriftSampleCursorParams

type GetDriftSampleCursorParams struct {
	InstallationID int64
	EntityKind     string
}

type GetLoadgenCacheSeedStateRow

type GetLoadgenCacheSeedStateRow struct {
	InstallationDone bool
	Repositories     int64
	IncompleteRepos  int64
	PendingChildren  int64
	BackfillJobs     int64
}

type GetOpenDriftFindingByHashParams

type GetOpenDriftFindingByHashParams struct {
	InstallationID int64
	EntityKind     string
	EntityKey      string
	DiffHash       string
}

type GetPullRequestByIdentityParams

type GetPullRequestByIdentityParams struct {
	RepoGhID int64
	PrNumber int32
}

type GetPullRequestByIdentityRow

type GetPullRequestByIdentityRow struct {
	ID             int64
	RepoID         int64
	GhID           pgtype.Int8
	NodeID         string
	Number         int32
	Title          string
	State          string
	Draft          bool
	AuthorLogin    string
	HeadRef        string
	HeadSha        string
	BaseRef        string
	BaseSha        string
	ReviewDecision string
	MergeableState string
	StackNumber    pgtype.Int4
	StackPosition  pgtype.Int4
	GhUpdatedAt    pgtype.Timestamptz
	SyncedAt       pgtype.Timestamptz
	Etag           string
	SyncSource     string
	TombstonedAt   pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
	DisplayUntil   pgtype.Timestamptz
	RepoFullName   string
}

type GetPullRequestByKeyParams

type GetPullRequestByKeyParams struct {
	RepoFullName string
	PrNumber     int32
}

type GetPullRequestByKeyRow

type GetPullRequestByKeyRow struct {
	ID             int64
	RepoID         int64
	GhID           pgtype.Int8
	NodeID         string
	Number         int32
	Title          string
	State          string
	Draft          bool
	AuthorLogin    string
	HeadRef        string
	HeadSha        string
	BaseRef        string
	BaseSha        string
	ReviewDecision string
	MergeableState string
	StackNumber    pgtype.Int4
	StackPosition  pgtype.Int4
	GhUpdatedAt    pgtype.Timestamptz
	SyncedAt       pgtype.Timestamptz
	Etag           string
	SyncSource     string
	TombstonedAt   pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
	DisplayUntil   pgtype.Timestamptz
	RepoFullName   string
}

type GetPullRequestFetchMetadataParams

type GetPullRequestFetchMetadataParams struct {
	RepoFullName string
	PrNumber     int32
}

type GetPullRequestFetchMetadataRow

type GetPullRequestFetchMetadataRow struct {
	NodeID         string
	Etag           string
	StackNumber    pgtype.Int4
	StackPosition  pgtype.Int4
	HeadSha        string
	RepoGhID       int64
	InstallationID int64
	RepoFullName   string
}

type GetRefreshIntentGenerationForUpdateParams

type GetRefreshIntentGenerationForUpdateParams struct {
	Kind       string
	RefreshKey string
}

type GetRefreshIntentStateParams

type GetRefreshIntentStateParams struct {
	Kind       string
	RefreshKey string
}

type GetRefreshIntentStateRow

type GetRefreshIntentStateRow struct {
	Generation          int64
	CompletedGeneration int64
	DeadlineAt          pgtype.Timestamptz
	EventReceivedAt     pgtype.Timestamptz
}

type GetRepoRulesFetchMetadataRow

type GetRepoRulesFetchMetadataRow struct {
	RepoID         int64
	RepoGhID       int64
	InstallationID int64
	FullName       string
	Etag           string
}

type GetStackByIdentityParams

type GetStackByIdentityParams struct {
	RepoGhID    int64
	StackNumber int32
}

type GetStackByIdentityRow

type GetStackByIdentityRow struct {
	ID            int64
	RepoID        int64
	GhID          pgtype.Int8
	NodeID        string
	Number        int32
	BaseRef       string
	BaseSha       string
	Open          bool
	Entries       []byte
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
	DisplayUntil  pgtype.Timestamptz
	RepoFullName  string
}

type GetStackByKeyParams

type GetStackByKeyParams struct {
	RepoFullName string
	StackNumber  int32
}

type GetStackByKeyRow

type GetStackByKeyRow struct {
	ID            int64
	RepoID        int64
	GhID          pgtype.Int8
	NodeID        string
	Number        int32
	BaseRef       string
	BaseSha       string
	Open          bool
	Entries       []byte
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
	DisplayUntil  pgtype.Timestamptz
	RepoFullName  string
}

type GetStackFetchMetadataParams

type GetStackFetchMetadataParams struct {
	RepoFullName string
	StackNumber  int32
}

type GetStackFetchMetadataRow

type GetStackFetchMetadataRow struct {
	Etag           string
	Entries        []byte
	HeadSha        string
	RepoGhID       int64
	InstallationID int64
	RepoFullName   string
}

type GetSweepCursorForUpdateParams

type GetSweepCursorForUpdateParams struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
}

type GetSweepCursorParams

type GetSweepCursorParams struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
}

type GetSweepPageParams

type GetSweepPageParams struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	Cursor         string
}

type InsertChangeEventParams

type InsertChangeEventParams struct {
	Stream     string
	Kind       string
	EntityKey  string
	OccurredAt pgtype.Timestamptz
	Payload    []byte
}

type InsertDriftFindingParams

type InsertDriftFindingParams struct {
	InstallationID    int64
	EntityKind        string
	EntityKey         string
	DetectedAt        pgtype.Timestamptz
	CacheSnapshot     []byte
	UpstreamSnapshot  []byte
	Diff              []byte
	DiffHash          string
	RefreshEnqueuedAt pgtype.Timestamptz
}

type InsertSweepSeenKeysParams

type InsertSweepSeenKeysParams struct {
	EntityKeys     []string
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	FirstSeenAt    pgtype.Timestamptz
}

type InsertWebhookDeliveryParams

type InsertWebhookDeliveryParams struct {
	DeliveryGuid string
	Event        string
	RawBody      []byte
	Headers      []byte
	Traceparent  string
	Tracestate   string
}

type InstallationBackfillCursor

type InstallationBackfillCursor struct {
	InstallationID int64
	Phase          string
	Page           int32
	QueueName      string
	CompletedAt    pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
}

type InstallationBudget

type InstallationBudget struct {
	InstallationID int64
	Class          string
	Remaining      pgtype.Int8
	RateLimit      pgtype.Int8
	ResetAt        pgtype.Timestamptz
	LeaseOwner     pgtype.Text
	LeaseUntil     pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	BackoffUntil   pgtype.Timestamptz
}

type ListCachedPRMembershipsParams

type ListCachedPRMembershipsParams struct {
	RepoID    int64
	PrNumbers []int32
}

type ListCachedPRMembershipsRow

type ListCachedPRMembershipsRow struct {
	Number      int32
	StackNumber pgtype.Int4
}

type ListCodeOwnerIdentitiesRow added in v0.3.0

type ListCodeOwnerIdentitiesRow struct {
	OwnerType   string
	OwnerGhID   int64
	OwnerNodeID string
	OwnerLogin  string
}

type ListLiveOpenPullRequestNumbersParams

type ListLiveOpenPullRequestNumbersParams struct {
	InstallationID int64
	RepoFullName   string
}

type ListLiveStackNumbersParams

type ListLiveStackNumbersParams struct {
	InstallationID int64
	RepoFullName   string
}

type ListLoadgenCachedCheckRunsRow

type ListLoadgenCachedCheckRunsRow struct {
	GhID            int64
	NodeID          string
	HeadSha         string
	Name            string
	Status          string
	Conclusion      string
	DetailsUrl      string
	AppSlug         string
	StartedAt       pgtype.Timestamptz
	CompletedAt     pgtype.Timestamptz
	GhUpdatedAt     pgtype.Timestamptz
	SemanticVersion string
}

type ListLoadgenCachedPullRequestChangeSnapshotsRow added in v0.3.0

type ListLoadgenCachedPullRequestChangeSnapshotsRow struct {
	PrNumber         int32
	BaseSha          string
	HeadSha          string
	FilesTotalCount  int32
	FilesTruncated   bool
	CodeownersRef    string
	CodeownersSha    string
	CodeownersPath   pgtype.Text
	CodeownersState  string
	CodeownersSource pgtype.Text
	CodeownersHash   string
}

type ListLoadgenCachedPullRequestChangedFilesRow added in v0.3.0

type ListLoadgenCachedPullRequestChangedFilesRow struct {
	PrNumber     int32
	Path         string
	PreviousPath pgtype.Text
	ChangeType   string
	BaseSha      string
	HeadSha      string
}

type ListLoadgenCachedPullRequestCommentsRow added in v0.3.0

type ListLoadgenCachedPullRequestCommentsRow struct {
	PrNumber     int32
	GhID         pgtype.Int8
	NodeID       string
	AuthorKind   string
	AuthorNodeID pgtype.Text
	AuthorLogin  pgtype.Text
	CreatedAt    pgtype.Timestamptz
	GhUpdatedAt  pgtype.Timestamptz
	HeadSha      string
}

type ListLoadgenCachedPullRequestFileOwnersRow added in v0.3.0

type ListLoadgenCachedPullRequestFileOwnersRow struct {
	PrNumber        int32
	Path            string
	OwnerToken      string
	OwnerType       string
	OwnerName       string
	ResolutionState string
	OwnerGhID       pgtype.Int8
	OwnerNodeID     pgtype.Text
	OwnerLogin      pgtype.Text
	SourcePattern   string
	SourceLine      int32
	BaseSha         string
	HeadSha         string
}

type ListLoadgenCachedPullRequestReviewRequestsRow added in v0.3.0

type ListLoadgenCachedPullRequestReviewRequestsRow struct {
	PrNumber       int32
	ReviewerKind   string
	ReviewerGhID   int64
	ReviewerNodeID string
	ReviewerLogin  string
	RequestedAt    pgtype.Timestamptz
	HeadSha        string
}

type ListLoadgenCachedPullRequestReviewsRow added in v0.3.0

type ListLoadgenCachedPullRequestReviewsRow struct {
	PrNumber     int32
	GhID         pgtype.Int8
	NodeID       string
	AuthorKind   string
	AuthorNodeID pgtype.Text
	AuthorLogin  pgtype.Text
	State        string
	SubmittedAt  pgtype.Timestamptz
	CommitOid    pgtype.Text
	GhUpdatedAt  pgtype.Timestamptz
	HeadSha      string
}

type ListLoadgenCachedPullRequestsRow

type ListLoadgenCachedPullRequestsRow struct {
	GhID           pgtype.Int8
	NodeID         string
	Number         int32
	Title          string
	State          string
	Draft          bool
	AuthorLogin    string
	ReviewDecision string
	MergeableState string
	HeadRef        string
	HeadSha        string
	BaseRef        string
	BaseSha        string
	StackNumber    pgtype.Int4
	StackPosition  pgtype.Int4
	GhUpdatedAt    pgtype.Timestamptz
}

type ListLoadgenCachedReviewThreadsRow

type ListLoadgenCachedReviewThreadsRow struct {
	ID          string
	PrNumber    int32
	IsResolved  bool
	IsOutdated  bool
	Path        string
	Line        pgtype.Int4
	Comments    []byte
	GhUpdatedAt pgtype.Timestamptz
	HeadSha     string
}

type ListLoadgenCachedStacksRow

type ListLoadgenCachedStacksRow struct {
	GhID        pgtype.Int8
	NodeID      string
	Number      int32
	BaseRef     string
	BaseSha     string
	Open        bool
	Entries     []byte
	GhUpdatedAt pgtype.Timestamptz
	HeadSha     string
}

type ListLoadgenDroppedDeliveriesRow

type ListLoadgenDroppedDeliveriesRow struct {
	DeliveryGuid string
	ReceivedAt   pgtype.Timestamptz
	Status       string
}

type ListMissingSweepEntityKeysParams

type ListMissingSweepEntityKeysParams struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
}

type ListPRScopesByHeadSHAParams

type ListPRScopesByHeadSHAParams struct {
	RepoGhID int64
	HeadSha  string
}

type ListPRScopesByHeadSHARow

type ListPRScopesByHeadSHARow struct {
	Number         int32
	StackNumber    pgtype.Int4
	RepoGhID       int64
	InstallationID int64
}

type ListPRsAffectedByBranchParams

type ListPRsAffectedByBranchParams struct {
	RepoFullName string
	Branch       string
}

type ListPRsAffectedByBranchRow

type ListPRsAffectedByBranchRow struct {
	Number      int32
	StackNumber pgtype.Int4
}

type ListSeenBackfillRefreshKeysParams

type ListSeenBackfillRefreshKeysParams struct {
	InstallationID int64
	RepoFullName   string
	Kind           string
	RefreshKeys    []string
}

type ListStacksAffectedByBranchParams

type ListStacksAffectedByBranchParams struct {
	RepoFullName string
	Branch       string
}

type ListStaleClosedPullRequestsParams

type ListStaleClosedPullRequestsParams struct {
	InstallationID int64
	StaleBefore    pgtype.Timestamptz
}

type ListStaleClosedPullRequestsRow

type ListStaleClosedPullRequestsRow struct {
	RepoFullName  string
	Number        int32
	LastCheckedAt pgtype.Timestamptz
}

type ListStaleClosedStacksParams

type ListStaleClosedStacksParams struct {
	InstallationID int64
	StaleBefore    pgtype.Timestamptz
}

type ListStaleClosedStacksRow

type ListStaleClosedStacksRow struct {
	RepoFullName  string
	Number        int32
	LastCheckedAt pgtype.Timestamptz
}

type ListStaleOpenPullRequestsParams

type ListStaleOpenPullRequestsParams struct {
	InstallationID int64
	StaleBefore    pgtype.Timestamptz
}

type ListStaleOpenPullRequestsRow

type ListStaleOpenPullRequestsRow struct {
	RepoFullName  string
	Number        int32
	LastCheckedAt pgtype.Timestamptz
}

type ListStaleOpenStacksParams

type ListStaleOpenStacksParams struct {
	InstallationID int64
	StaleBefore    pgtype.Timestamptz
}

type ListStaleOpenStacksRow

type ListStaleOpenStacksRow struct {
	RepoFullName  string
	Number        int32
	LastCheckedAt pgtype.Timestamptz
}

type ListStaleRepoRulesParams

type ListStaleRepoRulesParams struct {
	InstallationID int64
	StaleBefore    pgtype.Timestamptz
}

type ListStaleRepoRulesRow

type ListStaleRepoRulesRow struct {
	FullName      string
	LastCheckedAt pgtype.Timestamptz
}

type ListSweepRepositoriesRow

type ListSweepRepositoriesRow struct {
	ID       int64
	GhID     int64
	FullName string
}

type LoadDerivationSnapshotRow

type LoadDerivationSnapshotRow struct {
	ScopeKey string
	OrgID    int64
	RepoID   int64
	Data     []byte
}

type MarkCompletedBackfillChildrenParams

type MarkCompletedBackfillChildrenParams struct {
	InstallationID int64
	RepoFullName   string
}

type MarkDerivationDirtyParams

type MarkDerivationDirtyParams struct {
	MarkedAt  pgtype.Timestamptz
	ScopeKeys []string
}

type NullRiverJobState

type NullRiverJobState struct {
	RiverJobState RiverJobState
	Valid         bool // Valid is true if RiverJobState is not NULL
}

func (*NullRiverJobState) Scan

func (ns *NullRiverJobState) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullRiverJobState) Value

func (ns NullRiverJobState) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type OperationHeartbeat

type OperationHeartbeat struct {
	InstallationID int64
	Component      string
	Operation      string
	SuccessCount   int64
	LastSuccessAt  pgtype.Timestamptz
	SampleCount    int64
	LastSampleAt   pgtype.Timestamptz
}

type PageChangeEventsParams

type PageChangeEventsParams struct {
	Stream     string
	AfterSeq   int64
	ThroughSeq int64
	PageSize   int32
}

type PageChangeEventsRow

type PageChangeEventsRow struct {
	Seq        int64
	Stream     string
	Kind       string
	EntityKey  string
	OccurredAt pgtype.Timestamptz
	Payload    []byte
}

type PruneChangeEventsParams

type PruneChangeEventsParams struct {
	Cutoff    pgtype.Timestamptz
	BatchSize int32
}

type PruneResolvedDriftFindingBatchParams

type PruneResolvedDriftFindingBatchParams struct {
	Cutoff    pgtype.Timestamptz
	BatchSize int32
}

type PruneWebhookDeliveryPayloadBatchParams

type PruneWebhookDeliveryPayloadBatchParams struct {
	PrunedAt  pgtype.Timestamptz
	Cutoff    pgtype.Timestamptz
	BatchSize int32
}

type PublishStreamWatermarkParams

type PublishStreamWatermarkParams struct {
	SafeSeq    int64
	LeaseToken string
}

type PullRequest

type PullRequest struct {
	ID             int64
	RepoID         int64
	GhID           pgtype.Int8
	NodeID         string
	Number         int32
	Title          string
	State          string
	Draft          bool
	AuthorLogin    string
	HeadRef        string
	HeadSha        string
	BaseRef        string
	BaseSha        string
	ReviewDecision string
	MergeableState string
	StackNumber    pgtype.Int4
	StackPosition  pgtype.Int4
	GhUpdatedAt    pgtype.Timestamptz
	SyncedAt       pgtype.Timestamptz
	Etag           string
	SyncSource     string
	TombstonedAt   pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
	DisplayUntil   pgtype.Timestamptz
}

type PullRequestChangeSnapshot added in v0.3.0

type PullRequestChangeSnapshot struct {
	RepoID            int64
	PrNumber          int32
	BaseSha           string
	HeadSha           string
	FilesTotalCount   int32
	FilesTruncated    bool
	CodeownersRef     string
	CodeownersSha     string
	CodeownersPath    pgtype.Text
	CodeownersState   string
	CodeownersSource  pgtype.Text
	CodeownersHash    string
	ParentGhUpdatedAt pgtype.Timestamptz
	SyncedAt          pgtype.Timestamptz
	Etag              string
	SyncSource        string
	TombstonedAt      pgtype.Timestamptz
	LastCheckedAt     pgtype.Timestamptz
}

type PullRequestChangedFile added in v0.3.0

type PullRequestChangedFile struct {
	RepoID        int64
	PrNumber      int32
	Path          string
	PreviousPath  pgtype.Text
	ChangeType    string
	BaseSha       string
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
}

type PullRequestComment added in v0.3.0

type PullRequestComment struct {
	NodeID        string
	GhID          pgtype.Int8
	RepoID        int64
	PrNumber      int32
	AuthorKind    string
	AuthorNodeID  pgtype.Text
	AuthorLogin   pgtype.Text
	CreatedAt     pgtype.Timestamptz
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
}

type PullRequestFileOwner added in v0.3.0

type PullRequestFileOwner struct {
	RepoID          int64
	PrNumber        int32
	Path            string
	OwnerToken      string
	OwnerType       string
	OwnerName       string
	ResolutionState string
	OwnerGhID       pgtype.Int8
	OwnerNodeID     pgtype.Text
	OwnerLogin      pgtype.Text
	SourcePattern   string
	SourceLine      int32
	BaseSha         string
	HeadSha         string
	SyncedAt        pgtype.Timestamptz
	Etag            string
	SyncSource      string
	TombstonedAt    pgtype.Timestamptz
	LastCheckedAt   pgtype.Timestamptz
}

type PullRequestReview added in v0.3.0

type PullRequestReview struct {
	NodeID        string
	GhID          pgtype.Int8
	RepoID        int64
	PrNumber      int32
	AuthorKind    string
	AuthorNodeID  pgtype.Text
	AuthorLogin   pgtype.Text
	State         string
	SubmittedAt   pgtype.Timestamptz
	CommitOid     pgtype.Text
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
}

type PullRequestReviewRequest added in v0.3.0

type PullRequestReviewRequest struct {
	RepoID         int64
	PrNumber       int32
	ReviewerKind   string
	ReviewerGhID   int64
	ReviewerNodeID string
	ReviewerLogin  string
	RequestedAt    pgtype.Timestamptz
	FirstSeenAt    pgtype.Timestamptz
	GhUpdatedAt    pgtype.Timestamptz
	HeadSha        string
	SyncedAt       pgtype.Timestamptz
	Etag           string
	SyncSource     string
	TombstonedAt   pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AcquireEntityAdvisoryLock

func (q *Queries) AcquireEntityAdvisoryLock(ctx context.Context, entityKey string) error

C-C1 transaction-scoped serialization for direct writer calls.

func (*Queries) AcquireEntitySessionLock

func (q *Queries) AcquireEntitySessionLock(ctx context.Context, entityKey string) error

Fetch workers use a dedicated connection and hold this lock from before observation until after the state transaction commits.

func (*Queries) AcquireOrRenewStreamWatermarkLease

func (q *Queries) AcquireOrRenewStreamWatermarkLease(ctx context.Context, arg AcquireOrRenewStreamWatermarkLeaseParams) (string, error)

func (*Queries) AcquireOutboxWatermarkFence

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

func (*Queries) AcquireOutboxWriterFence

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

func (*Queries) AdvanceBackfillCursor

func (q *Queries) AdvanceBackfillCursor(ctx context.Context, arg AdvanceBackfillCursorParams) (BackfillCursor, error)

func (*Queries) AdvanceGapHealCursor

func (q *Queries) AdvanceGapHealCursor(ctx context.Context, arg AdvanceGapHealCursorParams) (GapHealCursor, error)

func (*Queries) AdvanceSweepCursor

func (q *Queries) AdvanceSweepCursor(ctx context.Context, arg AdvanceSweepCursorParams) (SweepCursor, error)

func (*Queries) AppendAcceptedCheckHistory

func (q *Queries) AppendAcceptedCheckHistory(ctx context.Context, arg AppendAcceptedCheckHistoryParams) error

func (*Queries) ApplyDerivedWorkItemBatch

func (q *Queries) ApplyDerivedWorkItemBatch(ctx context.Context, arg ApplyDerivedWorkItemBatchParams) ([]int64, error)

func (*Queries) BumpRefreshIntentGenerations

func (q *Queries) BumpRefreshIntentGenerations(ctx context.Context, intents []byte) ([]BumpRefreshIntentGenerationsRow, error)

Bump each coalesced key once in the same transaction that inserts its River job. Workers snapshot it when they begin authoritative refresh work.

func (*Queries) ClaimDerivationDirtyScopes

func (q *Queries) ClaimDerivationDirtyScopes(ctx context.Context, dirtyCap int32) ([]string, error)

func (*Queries) ClaimWebhookDeliveries

func (q *Queries) ClaimWebhookDeliveries(ctx context.Context, batchSize int32) ([]WebhookDelivery, error)

C-P2/C-O2: claim a bounded batch without blocking another dispatcher. The processing transition and attempt increment remain in the caller's batch transaction, so a crashed dispatcher rolls the claim back to pending.

func (*Queries) ClearDerivationDirtyScopes

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

func (*Queries) CollectBudgetMetrics

func (q *Queries) CollectBudgetMetrics(ctx context.Context, installationID int64) ([]CollectBudgetMetricsRow, error)

func (*Queries) CollectCacheStalenessMetrics

func (q *Queries) CollectCacheStalenessMetrics(ctx context.Context, installationID int64) ([]CollectCacheStalenessMetricsRow, error)

func (*Queries) CollectConsumerStreamMetrics

func (q *Queries) CollectConsumerStreamMetrics(ctx context.Context) ([]CollectConsumerStreamMetricsRow, error)

func (*Queries) CollectDeliveryMetrics

func (q *Queries) CollectDeliveryMetrics(ctx context.Context) (CollectDeliveryMetricsRow, error)

Every aggregate here is per-status so that it rides webhook_deliveries_unfinished_received_idx (status, received_at) WHERE status IN ('pending','processing','parked'). Aggregate FILTER clauses block both the min/max index optimisation and the partial index's predicate proof, so the older single-pass form seq-scanned the whole delivery table on every metrics scrape. LEAST() ignores NULLs, so LEAST(min pending, min processing) is exactly the old min(received_at) FILTER (WHERE status IN ('pending','processing')).

func (*Queries) CollectDriftMetrics

func (q *Queries) CollectDriftMetrics(ctx context.Context, installationID int64) ([]CollectDriftMetricsRow, error)

func (*Queries) CollectOperationHeartbeatMetrics

func (q *Queries) CollectOperationHeartbeatMetrics(ctx context.Context, installationID int64) ([]CollectOperationHeartbeatMetricsRow, error)

func (*Queries) CollectPrunableOutboxMetrics

func (q *Queries) CollectPrunableOutboxMetrics(ctx context.Context, retentionAge string) ([]CollectPrunableOutboxMetricsRow, error)

func (*Queries) CollectRiverQueueDepthMetrics

func (q *Queries) CollectRiverQueueDepthMetrics(ctx context.Context) ([]CollectRiverQueueDepthMetricsRow, error)

func (*Queries) CollectStreamWatermarkMetrics

func (q *Queries) CollectStreamWatermarkMetrics(ctx context.Context) (CollectStreamWatermarkMetricsRow, error)

func (*Queries) CollectSweepMetrics

func (q *Queries) CollectSweepMetrics(ctx context.Context, installationID int64) ([]CollectSweepMetricsRow, error)

func (*Queries) CollectTombstoneMetrics

func (q *Queries) CollectTombstoneMetrics(ctx context.Context) ([]CollectTombstoneMetricsRow, error)

func (*Queries) CompleteGapHealCursor

func (q *Queries) CompleteGapHealCursor(ctx context.Context, arg CompleteGapHealCursorParams) (GapHealCursor, error)

func (*Queries) CompleteRefreshIntentGeneration

func (q *Queries) CompleteRefreshIntentGeneration(ctx context.Context, arg CompleteRefreshIntentGenerationParams) error

func (*Queries) CompleteSweepCursor

func (q *Queries) CompleteSweepCursor(ctx context.Context, arg CompleteSweepCursorParams) (SweepCursor, error)

func (*Queries) CountDerivationDirty

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

func (*Queries) CountDriftFindings

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

func (*Queries) CountLoadgenRunDeliveries

func (q *Queries) CountLoadgenRunDeliveries(ctx context.Context, deliveryGuids []string) (CountLoadgenRunDeliveriesRow, error)

func (*Queries) CountPendingBackfillChildren

func (q *Queries) CountPendingBackfillChildren(ctx context.Context, arg CountPendingBackfillChildrenParams) (int64, error)

func (*Queries) CountPendingInstallationRepos

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

func (*Queries) CountWebhookDeliveriesByStatus

func (q *Queries) CountWebhookDeliveriesByStatus(ctx context.Context, status string) (int64, error)

func (*Queries) DeleteCheckHistoryBatch

func (q *Queries) DeleteCheckHistoryBatch(ctx context.Context, arg DeleteCheckHistoryBatchParams) (int64, error)

func (*Queries) DeleteLoadgenConsumerCursor

func (q *Queries) DeleteLoadgenConsumerCursor(ctx context.Context, arg DeleteLoadgenConsumerCursorParams) error

func (*Queries) EnsureBackfillCursor

func (q *Queries) EnsureBackfillCursor(ctx context.Context, arg EnsureBackfillCursorParams) (BackfillCursor, error)

func (*Queries) EnsureConsumerCursor

func (q *Queries) EnsureConsumerCursor(ctx context.Context, arg EnsureConsumerCursorParams) error

func (*Queries) EnsureGapHealCursor

func (q *Queries) EnsureGapHealCursor(ctx context.Context, installationID int64) (GapHealCursor, error)

func (*Queries) EnsureInstallationBackfillCursor

func (q *Queries) EnsureInstallationBackfillCursor(ctx context.Context, installationID int64) (InstallationBackfillCursor, error)

func (*Queries) EnsureInstallationBudget

func (q *Queries) EnsureInstallationBudget(ctx context.Context, arg EnsureInstallationBudgetParams) error

func (*Queries) EnsureSweepCursor

func (q *Queries) EnsureSweepCursor(ctx context.Context, arg EnsureSweepCursorParams) (SweepCursor, error)

func (*Queries) EscalateOpenDriftFinding

func (q *Queries) EscalateOpenDriftFinding(ctx context.Context, arg EscalateOpenDriftFindingParams) (DriftFinding, error)

func (*Queries) GetBackfillCursor

func (q *Queries) GetBackfillCursor(ctx context.Context, arg GetBackfillCursorParams) (BackfillCursor, error)

func (*Queries) GetBackfillCursorForUpdate

func (q *Queries) GetBackfillCursorForUpdate(ctx context.Context, arg GetBackfillCursorForUpdateParams) (BackfillCursor, error)

func (*Queries) GetCachedEntitySnapshot

func (q *Queries) GetCachedEntitySnapshot(ctx context.Context, arg GetCachedEntitySnapshotParams) (GetCachedEntitySnapshotRow, error)

func (*Queries) GetCheckRunsFetchMetadata

C-B4: the first-page validator is shared by every check row in one repository/head-SHA listing. Prefer the newest observation when rows span multiple refreshes, including a fully tombstoned listing.

func (*Queries) GetConsumerCursorForUpdate

func (q *Queries) GetConsumerCursorForUpdate(ctx context.Context, arg GetConsumerCursorForUpdateParams) (int64, error)

func (*Queries) GetDatabaseClock

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

func (*Queries) GetDriftFinding

func (q *Queries) GetDriftFinding(ctx context.Context, id int64) (DriftFinding, error)

func (*Queries) GetDriftSampleCursor

func (q *Queries) GetDriftSampleCursor(ctx context.Context, arg GetDriftSampleCursorParams) (int64, error)

func (*Queries) GetGapHealCursorForUpdate

func (q *Queries) GetGapHealCursorForUpdate(ctx context.Context, installationID int64) (GapHealCursor, error)

func (*Queries) GetInstallationBackfillCursor

func (q *Queries) GetInstallationBackfillCursor(ctx context.Context, installationID int64) (InstallationBackfillCursor, error)

func (*Queries) GetInstallationBackfillCursorForUpdate

func (q *Queries) GetInstallationBackfillCursorForUpdate(ctx context.Context, installationID int64) (InstallationBackfillCursor, error)

func (*Queries) GetLoadgenCacheSeedState

func (q *Queries) GetLoadgenCacheSeedState(ctx context.Context, installationID int64) (GetLoadgenCacheSeedStateRow, error)

func (*Queries) GetOpenDriftFindingByHash

func (q *Queries) GetOpenDriftFindingByHash(ctx context.Context, arg GetOpenDriftFindingByHashParams) (DriftFinding, error)

func (*Queries) GetPullRequestByIdentity

func (*Queries) GetPullRequestByKey

func (q *Queries) GetPullRequestByKey(ctx context.Context, arg GetPullRequestByKeyParams) (GetPullRequestByKeyRow, error)

func (*Queries) GetRefreshIntentGenerationForUpdate

func (q *Queries) GetRefreshIntentGenerationForUpdate(ctx context.Context, arg GetRefreshIntentGenerationForUpdateParams) (int64, error)

Workers lock the generation before transactionally completing their River job. A concurrent dispatcher therefore bumps either before the recheck or after completion, when it can insert a fresh job.

func (*Queries) GetRefreshIntentState

func (q *Queries) GetRefreshIntentState(ctx context.Context, arg GetRefreshIntentStateParams) (GetRefreshIntentStateRow, error)

func (*Queries) GetRepoByFullName

func (q *Queries) GetRepoByFullName(ctx context.Context, fullName string) (Repo, error)

func (*Queries) GetRepoByGitHubID

func (q *Queries) GetRepoByGitHubID(ctx context.Context, ghID int64) (Repo, error)

func (*Queries) GetRepoRulesFetchMetadata

func (q *Queries) GetRepoRulesFetchMetadata(ctx context.Context, repoFullName string) (GetRepoRulesFetchMetadataRow, error)

func (*Queries) GetStackByIdentity

func (q *Queries) GetStackByIdentity(ctx context.Context, arg GetStackByIdentityParams) (GetStackByIdentityRow, error)

func (*Queries) GetStackByKey

func (q *Queries) GetStackByKey(ctx context.Context, arg GetStackByKeyParams) (GetStackByKeyRow, error)

func (*Queries) GetStackFetchMetadata

func (q *Queries) GetStackFetchMetadata(ctx context.Context, arg GetStackFetchMetadataParams) (GetStackFetchMetadataRow, error)

func (*Queries) GetStreamPrunedThroughSequence

func (q *Queries) GetStreamPrunedThroughSequence(ctx context.Context, stream string) (int64, error)

func (*Queries) GetStreamSafeSequence

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

func (*Queries) GetSweepCursor

func (q *Queries) GetSweepCursor(ctx context.Context, arg GetSweepCursorParams) (SweepCursor, error)

func (*Queries) GetSweepCursorForUpdate

func (q *Queries) GetSweepCursorForUpdate(ctx context.Context, arg GetSweepCursorForUpdateParams) (SweepCursor, error)

func (*Queries) GetSweepPage

func (q *Queries) GetSweepPage(ctx context.Context, arg GetSweepPageParams) (SweepPage, error)

func (*Queries) GetWebhookDelivery

func (q *Queries) GetWebhookDelivery(ctx context.Context, deliveryGuid string) (WebhookDelivery, error)

func (*Queries) HasOutstandingRefresh

func (q *Queries) HasOutstandingRefresh(ctx context.Context, refreshKey string) (bool, error)

func (*Queries) InsertChangeEvent

func (q *Queries) InsertChangeEvent(ctx context.Context, arg InsertChangeEventParams) (int64, error)

func (*Queries) InsertDriftFinding

func (q *Queries) InsertDriftFinding(ctx context.Context, arg InsertDriftFindingParams) (DriftFinding, error)

func (*Queries) InsertSweepSeenKeys

func (q *Queries) InsertSweepSeenKeys(ctx context.Context, arg InsertSweepSeenKeysParams) (int64, error)

func (*Queries) InsertWebhookDelivery

func (q *Queries) InsertWebhookDelivery(ctx context.Context, arg InsertWebhookDeliveryParams) (int64, error)

C-I3: duplicate deliveries are free no-ops.

func (*Queries) IsInstallationBackfillDone

func (q *Queries) IsInstallationBackfillDone(ctx context.Context, installationID int64) (bool, error)

Done means SETTLED: the installation cursor alone flips 'done' while per-repo child seeding is still in flight, and drift sampling in that window compares half-seeded entities against upstream truth.

func (*Queries) ListCachedPRMemberships

func (q *Queries) ListCachedPRMemberships(ctx context.Context, arg ListCachedPRMembershipsParams) ([]ListCachedPRMembershipsRow, error)

func (*Queries) ListCodeOwnerIdentities added in v0.3.0

func (q *Queries) ListCodeOwnerIdentities(ctx context.Context, repoID int64) ([]ListCodeOwnerIdentitiesRow, error)

func (*Queries) ListExistingWebhookDeliveryGUIDs

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

func (*Queries) ListLiveOpenPullRequestNumbers

func (q *Queries) ListLiveOpenPullRequestNumbers(ctx context.Context, arg ListLiveOpenPullRequestNumbersParams) ([]int32, error)

func (*Queries) ListLiveRepositoryNames

func (q *Queries) ListLiveRepositoryNames(ctx context.Context, installationID int64) ([]string, error)

func (*Queries) ListLiveStackNumbers

func (q *Queries) ListLiveStackNumbers(ctx context.Context, arg ListLiveStackNumbersParams) ([]int32, error)

func (*Queries) ListLoadgenCachedCheckRuns

func (q *Queries) ListLoadgenCachedCheckRuns(ctx context.Context, repoFullName string) ([]ListLoadgenCachedCheckRunsRow, error)

func (*Queries) ListLoadgenCachedPullRequestChangeSnapshots added in v0.3.0

func (q *Queries) ListLoadgenCachedPullRequestChangeSnapshots(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestChangeSnapshotsRow, error)

func (*Queries) ListLoadgenCachedPullRequestChangedFiles added in v0.3.0

func (q *Queries) ListLoadgenCachedPullRequestChangedFiles(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestChangedFilesRow, error)

func (*Queries) ListLoadgenCachedPullRequestComments added in v0.3.0

func (q *Queries) ListLoadgenCachedPullRequestComments(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestCommentsRow, error)

func (*Queries) ListLoadgenCachedPullRequestFileOwners added in v0.3.0

func (q *Queries) ListLoadgenCachedPullRequestFileOwners(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestFileOwnersRow, error)

func (*Queries) ListLoadgenCachedPullRequestReviewRequests added in v0.3.0

func (q *Queries) ListLoadgenCachedPullRequestReviewRequests(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestReviewRequestsRow, error)

func (*Queries) ListLoadgenCachedPullRequestReviews added in v0.3.0

func (q *Queries) ListLoadgenCachedPullRequestReviews(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestReviewsRow, error)

func (*Queries) ListLoadgenCachedPullRequests

func (q *Queries) ListLoadgenCachedPullRequests(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestsRow, error)

func (*Queries) ListLoadgenCachedReviewThreads

func (q *Queries) ListLoadgenCachedReviewThreads(ctx context.Context, repoFullName string) ([]ListLoadgenCachedReviewThreadsRow, error)

func (*Queries) ListLoadgenCachedStacks

func (q *Queries) ListLoadgenCachedStacks(ctx context.Context, repoFullName string) ([]ListLoadgenCachedStacksRow, error)

func (*Queries) ListLoadgenDroppedDeliveries

func (q *Queries) ListLoadgenDroppedDeliveries(ctx context.Context, deliveryGuids []string) ([]ListLoadgenDroppedDeliveriesRow, error)

func (*Queries) ListMissingSweepEntityKeys

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

C-R3/Q13: disappearance candidates are cached live entities absent from the row-oriented membership set accumulated by the completed listing.

func (*Queries) ListPRScopesByHeadSHA

func (q *Queries) ListPRScopesByHeadSHA(ctx context.Context, arg ListPRScopesByHeadSHAParams) ([]ListPRScopesByHeadSHARow, error)

func (*Queries) ListPRsAffectedByBranch

func (q *Queries) ListPRsAffectedByBranch(ctx context.Context, arg ListPRsAffectedByBranchParams) ([]ListPRsAffectedByBranchRow, error)

func (*Queries) ListParkedWebhookDeliveries

func (q *Queries) ListParkedWebhookDeliveries(ctx context.Context, resultLimit int32) ([]WebhookDelivery, error)

C-I5: dead-letter deliveries are explicitly queryable for operations and replay tooling.

func (*Queries) ListRepositoryDerivationScopes

func (q *Queries) ListRepositoryDerivationScopes(ctx context.Context, repoID int64) ([]string, error)

func (*Queries) ListSeenBackfillRefreshKeys

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

func (*Queries) ListStacksAffectedByBranch

func (q *Queries) ListStacksAffectedByBranch(ctx context.Context, arg ListStacksAffectedByBranchParams) ([]int32, error)

func (*Queries) ListStaleClosedStacks

func (q *Queries) ListStaleClosedStacks(ctx context.Context, arg ListStaleClosedStacksParams) ([]ListStaleClosedStacksRow, error)

func (*Queries) ListStaleOpenPullRequests

func (q *Queries) ListStaleOpenPullRequests(ctx context.Context, arg ListStaleOpenPullRequestsParams) ([]ListStaleOpenPullRequestsRow, error)

func (*Queries) ListStaleOpenStacks

func (q *Queries) ListStaleOpenStacks(ctx context.Context, arg ListStaleOpenStacksParams) ([]ListStaleOpenStacksRow, error)

func (*Queries) ListStaleRepoRules

func (q *Queries) ListStaleRepoRules(ctx context.Context, arg ListStaleRepoRulesParams) ([]ListStaleRepoRulesRow, error)

func (*Queries) ListSweepRepositories

func (q *Queries) ListSweepRepositories(ctx context.Context, installationID int64) ([]ListSweepRepositoriesRow, error)

func (*Queries) LoadDerivationSnapshot

func (q *Queries) LoadDerivationSnapshot(ctx context.Context, scopes []byte) ([]LoadDerivationSnapshotRow, error)

func (*Queries) MarkCompletedBackfillChildren

func (q *Queries) MarkCompletedBackfillChildren(ctx context.Context, arg MarkCompletedBackfillChildrenParams) (int64, error)

func (*Queries) MarkDerivationDirty

func (q *Queries) MarkDerivationDirty(ctx context.Context, arg MarkDerivationDirtyParams) error

func (*Queries) PageChangeEvents

func (q *Queries) PageChangeEvents(ctx context.Context, arg PageChangeEventsParams) ([]PageChangeEventsRow, error)

func (*Queries) PruneChangeEvents

func (q *Queries) PruneChangeEvents(ctx context.Context, arg PruneChangeEventsParams) (int64, error)

func (*Queries) PruneResolvedDriftFindingBatch

func (q *Queries) PruneResolvedDriftFindingBatch(ctx context.Context, arg PruneResolvedDriftFindingBatchParams) (int64, error)

func (*Queries) PruneWebhookDeliveryPayloadBatch

func (q *Queries) PruneWebhookDeliveryPayloadBatch(ctx context.Context, arg PruneWebhookDeliveryPayloadBatchParams) (int64, error)

func (*Queries) PublishStreamWatermark

func (q *Queries) PublishStreamWatermark(ctx context.Context, arg PublishStreamWatermarkParams) (int64, error)

func (*Queries) ReadStreamWatermarkTarget

func (q *Queries) ReadStreamWatermarkTarget(ctx context.Context, leaseToken string) (ReadStreamWatermarkTargetRow, error)

func (*Queries) ReapOrphanedRepositorySweepCursors

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

Q16: repository-scoped cursors use mutable names to call GitHub. Remove scopes whose current live repository identity no longer owns that name; child pages and seen keys follow via ON DELETE CASCADE.

func (*Queries) RecordConsumerResync

func (q *Queries) RecordConsumerResync(ctx context.Context, arg RecordConsumerResyncParams) error

func (*Queries) RecordOperationHeartbeat

func (q *Queries) RecordOperationHeartbeat(ctx context.Context, arg RecordOperationHeartbeatParams) error

func (*Queries) ReleaseEntitySessionLock

func (q *Queries) ReleaseEntitySessionLock(ctx context.Context, entityKey string) error

func (*Queries) ReleaseInstallationBudgetLease

func (q *Queries) ReleaseInstallationBudgetLease(ctx context.Context, arg ReleaseInstallationBudgetLeaseParams) (int64, error)

func (*Queries) ReleaseStreamWatermarkLease

func (q *Queries) ReleaseStreamWatermarkLease(ctx context.Context, leaseToken string) error

func (*Queries) RenewInstallationBudgetLease

func (q *Queries) RenewInstallationBudgetLease(ctx context.Context, arg RenewInstallationBudgetLeaseParams) ([]pgtype.Timestamptz, error)

func (*Queries) ReplaceCheckRuns

func (q *Queries) ReplaceCheckRuns(ctx context.Context, arg ReplaceCheckRunsParams) ([]int64, error)

func (*Queries) ReplacePullRequestChangedFiles added in v0.3.0

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

func (*Queries) ReplacePullRequestComments added in v0.3.0

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

func (*Queries) ReplacePullRequestFileOwners added in v0.3.0

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

func (*Queries) ReplacePullRequestReviewRequests added in v0.3.0

func (q *Queries) ReplacePullRequestReviewRequests(ctx context.Context, arg ReplacePullRequestReviewRequestsParams) ([]interface{}, error)

The parent pull request's updated_at is the C-C2 observation version for this timestamp-less GitHub connection. Equal-version replacements remain eligible so a pure request-set change is not swallowed.

func (*Queries) ReplacePullRequestReviews added in v0.3.0

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

func (*Queries) ReplaceRepoRules

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

func (*Queries) ReplaceReviewThreads

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

func (*Queries) RequeueParkedWebhookDeliveries

func (q *Queries) RequeueParkedWebhookDeliveries(ctx context.Context, arg RequeueParkedWebhookDeliveriesParams) (int64, error)

C-I5: replay is deliberately bounded to an explicit GUID set or one event/error signature. Payload-pruned deliveries remain parked and receive an explicit refusal reason; an explicit-GUID CLI replay consequently fails its selected-vs-requeued count check instead of dispatching a nil body.

func (*Queries) ResolveOpenDriftFindings

func (q *Queries) ResolveOpenDriftFindings(ctx context.Context, arg ResolveOpenDriftFindingsParams) (int64, error)

func (*Queries) RestartSweepCursorPass

func (q *Queries) RestartSweepCursorPass(ctx context.Context, arg RestartSweepCursorPassParams) (SweepCursor, error)

func (*Queries) SampleCachedEntitiesAfter

func (q *Queries) SampleCachedEntitiesAfter(ctx context.Context, arg SampleCachedEntitiesAfterParams) ([]SampleCachedEntitiesAfterRow, error)

Q11: the forward half of the rotating sample is a plain indexed source_id range. Detect issues a second bounded range only when this reaches the end.

The keyset is resolved against drift_entity_keys, which projects the same (installation_id, entity_kind, source_id) triples as drift_entities with no snapshot payload. Ordering drift_entities directly forced PostgreSQL to plan every UNION ALL arm for full retrieval -- an ORDER BY at this level stops the LIMIT's tuple fraction from reaching the arms -- so the 'checks' arm built a jsonb snapshot for every cached check group on every sample. The ARRAY() sub-select becomes an InitPlan, whose Param IS pushed into the arms as an indexable source_id qual, so only the sampled rows are built. source_id is unique per (installation_id, entity_kind), so the rows and their order are identical to the single-statement form.

func (*Queries) SampleCachedEntitiesThrough

func (q *Queries) SampleCachedEntitiesThrough(ctx context.Context, arg SampleCachedEntitiesThroughParams) ([]SampleCachedEntitiesThroughRow, error)

The wrap half cannot overlap the forward half and retains source_id order. Same two-phase keyset shape as SampleCachedEntitiesAfter.

func (*Queries) SaveInstallationBudgetBackoff

func (q *Queries) SaveInstallationBudgetBackoff(ctx context.Context, arg SaveInstallationBudgetBackoffParams) (int64, error)

func (*Queries) SaveInstallationBudgetSnapshot

func (q *Queries) SaveInstallationBudgetSnapshot(ctx context.Context, arg SaveInstallationBudgetSnapshotParams) (int64, error)

func (*Queries) SetBudgetLeaseTransactionTimeouts

func (q *Queries) SetBudgetLeaseTransactionTimeouts(ctx context.Context, timeout string) error

func (*Queries) SetDriftFindingHealGeneration

func (q *Queries) SetDriftFindingHealGeneration(ctx context.Context, arg SetDriftFindingHealGenerationParams) (DriftFinding, error)

func (*Queries) SetLocalLockTimeout

func (q *Queries) SetLocalLockTimeout(ctx context.Context, lockTimeout string) error

func (*Queries) SetWebhookDeliveryResults

func (q *Queries) SetWebhookDeliveryResults(ctx context.Context, results []byte) (int64, error)

C-P2: finish the entire claimed batch with one set-based status update.

func (*Queries) ShowSynchronousCommit

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

func (*Queries) StartGapHealCursor

func (q *Queries) StartGapHealCursor(ctx context.Context, arg StartGapHealCursorParams) (GapHealCursor, error)

func (*Queries) StartSweepCursor

func (q *Queries) StartSweepCursor(ctx context.Context, arg StartSweepCursorParams) (SweepCursor, error)

func (*Queries) TombstonePullRequest

func (q *Queries) TombstonePullRequest(ctx context.Context, arg TombstonePullRequestParams) (PullRequest, error)

func (*Queries) TombstonePullRequestChangeSnapshot added in v0.3.0

func (q *Queries) TombstonePullRequestChangeSnapshot(ctx context.Context, arg TombstonePullRequestChangeSnapshotParams) (int64, error)

func (*Queries) TombstonePullRequestChangedFiles added in v0.3.0

func (q *Queries) TombstonePullRequestChangedFiles(ctx context.Context, arg TombstonePullRequestChangedFilesParams) (int64, error)

func (*Queries) TombstonePullRequestComments added in v0.3.0

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

func (*Queries) TombstonePullRequestFileOwners added in v0.3.0

func (q *Queries) TombstonePullRequestFileOwners(ctx context.Context, arg TombstonePullRequestFileOwnersParams) (int64, error)

func (*Queries) TombstonePullRequestReviewRequests added in v0.3.0

func (q *Queries) TombstonePullRequestReviewRequests(ctx context.Context, arg TombstonePullRequestReviewRequestsParams) ([]interface{}, error)

func (*Queries) TombstonePullRequestReviews added in v0.3.0

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

func (*Queries) TombstoneRepository

func (q *Queries) TombstoneRepository(ctx context.Context, arg TombstoneRepositoryParams) (Repo, error)

C-R3 repository disappearance is authoritative only after the installation listing omits it and this entity fetch confirms 404.

func (*Queries) TombstoneStack

func (q *Queries) TombstoneStack(ctx context.Context, arg TombstoneStackParams) (Stack, error)

func (*Queries) TouchCheckRunsCheckedAt

func (q *Queries) TouchCheckRunsCheckedAt(ctx context.Context, arg TouchCheckRunsCheckedAtParams) error

func (*Queries) TouchOpenDriftFinding

func (q *Queries) TouchOpenDriftFinding(ctx context.Context, arg TouchOpenDriftFindingParams) (DriftFinding, error)

func (*Queries) TouchPullRequestChangeInputsCheckedAt added in v0.3.0

func (q *Queries) TouchPullRequestChangeInputsCheckedAt(ctx context.Context, arg TouchPullRequestChangeInputsCheckedAtParams) error

func (*Queries) TouchPullRequestChangedFilesCheckedAt added in v0.3.0

func (q *Queries) TouchPullRequestChangedFilesCheckedAt(ctx context.Context, arg TouchPullRequestChangedFilesCheckedAtParams) error

func (*Queries) TouchPullRequestCheckedAt

func (q *Queries) TouchPullRequestCheckedAt(ctx context.Context, arg TouchPullRequestCheckedAtParams) error

func (*Queries) TouchPullRequestCommentsCheckedAt added in v0.3.0

func (q *Queries) TouchPullRequestCommentsCheckedAt(ctx context.Context, arg TouchPullRequestCommentsCheckedAtParams) error

func (*Queries) TouchPullRequestFileOwnersCheckedAt added in v0.3.0

func (q *Queries) TouchPullRequestFileOwnersCheckedAt(ctx context.Context, arg TouchPullRequestFileOwnersCheckedAtParams) error

func (*Queries) TouchPullRequestReviewRequestsCheckedAt added in v0.3.0

func (q *Queries) TouchPullRequestReviewRequestsCheckedAt(ctx context.Context, arg TouchPullRequestReviewRequestsCheckedAtParams) error

func (*Queries) TouchPullRequestReviewsCheckedAt added in v0.3.0

func (q *Queries) TouchPullRequestReviewsCheckedAt(ctx context.Context, arg TouchPullRequestReviewsCheckedAtParams) error

func (*Queries) TouchRepoRulesCheckedAt

func (q *Queries) TouchRepoRulesCheckedAt(ctx context.Context, arg TouchRepoRulesCheckedAtParams) error

func (*Queries) TouchRepositoryCheckedAt

func (q *Queries) TouchRepositoryCheckedAt(ctx context.Context, arg TouchRepositoryCheckedAtParams) error

func (*Queries) TouchReviewThreadsCheckedAt

func (q *Queries) TouchReviewThreadsCheckedAt(ctx context.Context, arg TouchReviewThreadsCheckedAtParams) error

func (*Queries) TouchStackCheckedAt

func (q *Queries) TouchStackCheckedAt(ctx context.Context, arg TouchStackCheckedAtParams) error

func (*Queries) UpdateConsumerCursor

func (q *Queries) UpdateConsumerCursor(ctx context.Context, arg UpdateConsumerCursorParams) error

func (*Queries) UpsertBackfillChildren

func (q *Queries) UpsertBackfillChildren(ctx context.Context, arg UpsertBackfillChildrenParams) error

func (*Queries) UpsertDriftSampleCursor

func (q *Queries) UpsertDriftSampleCursor(ctx context.Context, arg UpsertDriftSampleCursorParams) error

func (*Queries) UpsertPullRequestChangeSnapshot added in v0.3.0

func (q *Queries) UpsertPullRequestChangeSnapshot(ctx context.Context, arg UpsertPullRequestChangeSnapshotParams) (int64, error)

C-C2 parent freshness plus explicit base/head identity gates the current changed-file and ownership snapshot. Equal parent versions remain eligible so a base-branch CODEOWNERS push or a later complete listing can heal facts without relying on pull_request.updatedAt changing.

func (*Queries) UpsertPullRequestWriteIfNewer

func (q *Queries) UpsertPullRequestWriteIfNewer(ctx context.Context, arg UpsertPullRequestWriteIfNewerParams) (PullRequest, error)

func (*Queries) UpsertRepoRuleSyncState

func (q *Queries) UpsertRepoRuleSyncState(ctx context.Context, arg UpsertRepoRuleSyncStateParams) error

func (*Queries) UpsertRepositoryAlias

func (q *Queries) UpsertRepositoryAlias(ctx context.Context, arg UpsertRepositoryAliasParams) error

func (*Queries) UpsertRepositoryWriteIfNewer

func (q *Queries) UpsertRepositoryWriteIfNewer(ctx context.Context, arg UpsertRepositoryWriteIfNewerParams) (Repo, error)

func (*Queries) UpsertStackWriteIfNewer

func (q *Queries) UpsertStackWriteIfNewer(ctx context.Context, arg UpsertStackWriteIfNewerParams) (Stack, error)

func (*Queries) UpsertSweepPage

func (q *Queries) UpsertSweepPage(ctx context.Context, arg UpsertSweepPageParams) error

func (*Queries) WithTx

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

type ReadStreamWatermarkTargetRow

type ReadStreamWatermarkTargetRow struct {
	SafeSeq    int64
	TargetSeq  int64
	LeaseValid bool
}

type RecordConsumerResyncParams

type RecordConsumerResyncParams struct {
	Consumer string
	Stream   string
}

type RecordOperationHeartbeatParams

type RecordOperationHeartbeatParams struct {
	InstallationID int64
	Component      string
	Operation      string
	Samples        int64
}

type RefreshIntentGeneration

type RefreshIntentGeneration struct {
	Kind                string
	RefreshKey          string
	Generation          int64
	UpdatedAt           pgtype.Timestamptz
	CompletedGeneration int64
	DeadlineAt          pgtype.Timestamptz
	EventReceivedAt     pgtype.Timestamptz
}

type ReleaseInstallationBudgetLeaseParams

type ReleaseInstallationBudgetLeaseParams struct {
	InstallationID int64
	LeaseToken     string
}

type RenewInstallationBudgetLeaseParams

type RenewInstallationBudgetLeaseParams struct {
	InstallationID int64
	LeaseToken     string
	TtlSeconds     float64
}

type ReplaceCheckRunsParams

type ReplaceCheckRunsParams struct {
	CheckRuns     []byte
	RepoID        int64
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
	Etag          string
	SyncSource    string
}

type ReplacePullRequestChangedFilesParams added in v0.3.0

type ReplacePullRequestChangedFilesParams struct {
	ChangedFiles      []byte
	RepoID            int64
	PrNumber          int32
	BaseSha           string
	HeadSha           string
	ParentGhUpdatedAt pgtype.Timestamptz
	SyncedAt          pgtype.Timestamptz
	Etag              string
	SyncSource        string
	LastCheckedAt     pgtype.Timestamptz
}

type ReplacePullRequestCommentsParams added in v0.3.0

type ReplacePullRequestCommentsParams struct {
	Comments          []byte
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
	HeadSha           string
	SyncedAt          pgtype.Timestamptz
	Etag              string
	SyncSource        string
	LastCheckedAt     pgtype.Timestamptz
}

type ReplacePullRequestFileOwnersParams added in v0.3.0

type ReplacePullRequestFileOwnersParams struct {
	FileOwners        []byte
	RepoID            int64
	PrNumber          int32
	BaseSha           string
	HeadSha           string
	ParentGhUpdatedAt pgtype.Timestamptz
	SyncedAt          pgtype.Timestamptz
	Etag              string
	SyncSource        string
	LastCheckedAt     pgtype.Timestamptz
}

type ReplacePullRequestReviewRequestsParams added in v0.3.0

type ReplacePullRequestReviewRequestsParams struct {
	ReviewRequests []byte
	RepoID         int64
	PrNumber       int32
	GhUpdatedAt    pgtype.Timestamptz
	FirstSeenAt    pgtype.Timestamptz
	HeadSha        string
	SyncedAt       pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
	Etag           string
	SyncSource     string
}

type ReplacePullRequestReviewsParams added in v0.3.0

type ReplacePullRequestReviewsParams struct {
	Reviews           []byte
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
	HeadSha           string
	SyncedAt          pgtype.Timestamptz
	Etag              string
	SyncSource        string
	LastCheckedAt     pgtype.Timestamptz
}

type ReplaceRepoRulesParams

type ReplaceRepoRulesParams struct {
	Rules         []byte
	RepoID        int64
	SyncedAt      pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
	Etag          string
	SyncSource    string
}

type ReplaceReviewThreadsParams

type ReplaceReviewThreadsParams struct {
	Threads       []byte
	RepoID        int64
	PrNumber      int32
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
	Etag          string
	SyncSource    string
}

type Repo

type Repo struct {
	ID             int64
	InstallationID int64
	OrgID          int64
	GhID           int64
	NodeID         string
	Owner          string
	Name           string
	FullName       string
	DefaultBranch  string
	Archived       bool
	GhUpdatedAt    pgtype.Timestamptz
	HeadSha        string
	SyncedAt       pgtype.Timestamptz
	Etag           string
	SyncSource     string
	TombstonedAt   pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
}

type RepoAlias

type RepoAlias struct {
	FullName    string
	RepoID      int64
	FirstSeenAt pgtype.Timestamptz
	LastSeenAt  pgtype.Timestamptz
}

type RepoRule

type RepoRule struct {
	RepoID        int64
	RuleKey       string
	Rule          []byte
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
}

type RepoRuleSyncState

type RepoRuleSyncState struct {
	RepoID        int64
	Etag          string
	LastCheckedAt pgtype.Timestamptz
}

type RequeueParkedWebhookDeliveriesParams

type RequeueParkedWebhookDeliveriesParams struct {
	DeliveryGuids []string
	Event         string
	ErrorContains string
}

type ResolveOpenDriftFindingsParams

type ResolveOpenDriftFindingsParams struct {
	ResolvedAt     pgtype.Timestamptz
	InstallationID int64
	EntityKind     string
	EntityKey      string
}

type RestartSweepCursorPassParams

type RestartSweepCursorPassParams struct {
	FirstCursor    string
	UpdatedAt      pgtype.Timestamptz
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	ExpectedCursor string
}

type ReviewThread

type ReviewThread struct {
	ID            string
	RepoID        int64
	PrNumber      int32
	IsResolved    bool
	IsOutdated    bool
	Path          string
	Line          pgtype.Int4
	Comments      []byte
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
}

type RiverJob

type RiverJob struct {
	ID           int64
	State        RiverJobState
	Attempt      int16
	MaxAttempts  int16
	AttemptedAt  pgtype.Timestamptz
	CreatedAt    pgtype.Timestamptz
	FinalizedAt  pgtype.Timestamptz
	ScheduledAt  pgtype.Timestamptz
	Priority     int16
	Args         []byte
	AttemptedBy  []string
	Errors       [][]byte
	Kind         string
	Metadata     []byte
	Queue        string
	Tags         []string
	UniqueKey    []byte
	UniqueStates pgtype.Bits
}

type RiverJobState

type RiverJobState string
const (
	RiverJobStateAvailable RiverJobState = "available"
	RiverJobStateCancelled RiverJobState = "cancelled"
	RiverJobStateCompleted RiverJobState = "completed"
	RiverJobStateDiscarded RiverJobState = "discarded"
	RiverJobStatePending   RiverJobState = "pending"
	RiverJobStateRetryable RiverJobState = "retryable"
	RiverJobStateRunning   RiverJobState = "running"
	RiverJobStateScheduled RiverJobState = "scheduled"
)

func (*RiverJobState) Scan

func (e *RiverJobState) Scan(src interface{}) error

type SampleCachedEntitiesAfterParams

type SampleCachedEntitiesAfterParams struct {
	InstallationID int64
	EntityKind     string
	AfterSourceID  int64
	SampleSize     int32
}

type SampleCachedEntitiesAfterRow

type SampleCachedEntitiesAfterRow struct {
	EntityKind    string
	SourceID      int64
	EntityKey     string
	LockKey       string
	CacheSnapshot []byte
	LastCheckedAt pgtype.Timestamptz
}

type SampleCachedEntitiesThroughParams

type SampleCachedEntitiesThroughParams struct {
	InstallationID  int64
	EntityKind      string
	ThroughSourceID int64
	SampleSize      int32
}

type SampleCachedEntitiesThroughRow

type SampleCachedEntitiesThroughRow struct {
	EntityKind    string
	SourceID      int64
	EntityKey     string
	LockKey       string
	CacheSnapshot []byte
	LastCheckedAt pgtype.Timestamptz
}

type SaveInstallationBudgetBackoffParams

type SaveInstallationBudgetBackoffParams struct {
	BackoffUntil   pgtype.Timestamptz
	InstallationID int64
	LeaseToken     string
}

type SaveInstallationBudgetSnapshotParams

type SaveInstallationBudgetSnapshotParams struct {
	RestRemaining    pgtype.Int8
	GraphqlRemaining pgtype.Int8
	RestLimit        pgtype.Int8
	GraphqlLimit     pgtype.Int8
	RestResetAt      pgtype.Timestamptz
	GraphqlResetAt   pgtype.Timestamptz
	BackoffUntil     pgtype.Timestamptz
	InstallationID   int64
	LeaseToken       string
}

type SetDriftFindingHealGenerationParams

type SetDriftFindingHealGenerationParams struct {
	HealGeneration int64
	ID             int64
}

type Stack

type Stack struct {
	ID            int64
	RepoID        int64
	GhID          pgtype.Int8
	NodeID        string
	Number        int32
	BaseRef       string
	BaseSha       string
	Open          bool
	Entries       []byte
	GhUpdatedAt   pgtype.Timestamptz
	HeadSha       string
	SyncedAt      pgtype.Timestamptz
	Etag          string
	SyncSource    string
	TombstonedAt  pgtype.Timestamptz
	LastCheckedAt pgtype.Timestamptz
	DisplayUntil  pgtype.Timestamptz
}

type StartGapHealCursorParams

type StartGapHealCursorParams struct {
	Cutoff         pgtype.Timestamptz
	StartedAt      pgtype.Timestamptz
	InstallationID int64
}

type StartSweepCursorParams

type StartSweepCursorParams struct {
	FirstCursor    string
	StartedAt      pgtype.Timestamptz
	InstallationID int64
	SweepKind      string
	ScopeKey       string
}

type StreamHorizon

type StreamHorizon struct {
	Stream           string
	PrunedThroughSeq int64
	UpdatedAt        pgtype.Timestamptz
}

type StreamWatermark

type StreamWatermark struct {
	Singleton    bool
	SafeSeq      int64
	CandidateSeq pgtype.Int8
	CandidateXid pgtype.Uint64
	UpdatedAt    pgtype.Timestamptz
	LeaseToken   pgtype.Text
	LeaseUntil   pgtype.Timestamptz
}

type SweepCursor

type SweepCursor struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	Cursor         string
	StartedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	CompletedAt    pgtype.Timestamptz
	PassNewCount   int32
}

type SweepPage

type SweepPage struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	Cursor         string
	Etag           string
	NextCursor     string
	EntityKeys     []byte
	ListSeenAt     pgtype.Timestamptz
}

type SweepSeenKey

type SweepSeenKey struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	EntityKey      string
	FirstSeenAt    pgtype.Timestamptz
}

type TombstonePullRequestChangeSnapshotParams added in v0.3.0

type TombstonePullRequestChangeSnapshotParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstonePullRequestChangedFilesParams added in v0.3.0

type TombstonePullRequestChangedFilesParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstonePullRequestCommentsParams added in v0.3.0

type TombstonePullRequestCommentsParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstonePullRequestFileOwnersParams added in v0.3.0

type TombstonePullRequestFileOwnersParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstonePullRequestParams

type TombstonePullRequestParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncedAt     pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstonePullRequestReviewRequestsParams added in v0.3.0

type TombstonePullRequestReviewRequestsParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstonePullRequestReviewsParams added in v0.3.0

type TombstonePullRequestReviewsParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	PrNumber     int32
}

type TombstoneRepositoryParams

type TombstoneRepositoryParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncedAt     pgtype.Timestamptz
	SyncSource   string
	GhID         int64
}

type TombstoneStackParams

type TombstoneStackParams struct {
	TombstonedAt pgtype.Timestamptz
	SyncedAt     pgtype.Timestamptz
	SyncSource   string
	RepoID       int64
	StackNumber  int32
}

type TouchCheckRunsCheckedAtParams

type TouchCheckRunsCheckedAtParams struct {
	CheckedAt pgtype.Timestamptz
	Etag      string
	RepoID    int64
	HeadSha   string
}

type TouchOpenDriftFindingParams

type TouchOpenDriftFindingParams struct {
	LastSeenAt       pgtype.Timestamptz
	CacheSnapshot    []byte
	UpstreamSnapshot []byte
	Diff             []byte
	ID               int64
}

type TouchPullRequestChangeInputsCheckedAtParams added in v0.3.0

type TouchPullRequestChangeInputsCheckedAtParams struct {
	CheckedAt         pgtype.Timestamptz
	Etag              string
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
}

type TouchPullRequestChangedFilesCheckedAtParams added in v0.3.0

type TouchPullRequestChangedFilesCheckedAtParams struct {
	CheckedAt         pgtype.Timestamptz
	Etag              string
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
}

type TouchPullRequestCheckedAtParams

type TouchPullRequestCheckedAtParams struct {
	CheckedAt pgtype.Timestamptz
	Etag      string
	RepoID    int64
	PrNumber  int32
}

type TouchPullRequestCommentsCheckedAtParams added in v0.3.0

type TouchPullRequestCommentsCheckedAtParams struct {
	CheckedAt         pgtype.Timestamptz
	Etag              string
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
}

type TouchPullRequestFileOwnersCheckedAtParams added in v0.3.0

type TouchPullRequestFileOwnersCheckedAtParams struct {
	CheckedAt         pgtype.Timestamptz
	Etag              string
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
}

type TouchPullRequestReviewRequestsCheckedAtParams added in v0.3.0

type TouchPullRequestReviewRequestsCheckedAtParams struct {
	CheckedAt   pgtype.Timestamptz
	Etag        string
	RepoID      int64
	PrNumber    int32
	GhUpdatedAt pgtype.Timestamptz
}

type TouchPullRequestReviewsCheckedAtParams added in v0.3.0

type TouchPullRequestReviewsCheckedAtParams struct {
	CheckedAt         pgtype.Timestamptz
	Etag              string
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
}

type TouchRepoRulesCheckedAtParams

type TouchRepoRulesCheckedAtParams struct {
	CheckedAt pgtype.Timestamptz
	RepoID    int64
}

type TouchRepositoryCheckedAtParams

type TouchRepositoryCheckedAtParams struct {
	CheckedAt pgtype.Timestamptz
	Etag      string
	GhID      int64
}

type TouchReviewThreadsCheckedAtParams

type TouchReviewThreadsCheckedAtParams struct {
	CheckedAt pgtype.Timestamptz
	RepoID    int64
	PrNumber  int32
}

type TouchStackCheckedAtParams

type TouchStackCheckedAtParams struct {
	CheckedAt   pgtype.Timestamptz
	Etag        string
	RepoID      int64
	StackNumber int32
}

type UpdateConsumerCursorParams

type UpdateConsumerCursorParams struct {
	Seq      int64
	Consumer string
	Stream   string
}

type UpsertBackfillChildrenParams

type UpsertBackfillChildrenParams struct {
	InstallationID int64
	RepoFullName   string
	Children       []byte
}

type UpsertDriftSampleCursorParams

type UpsertDriftSampleCursorParams struct {
	InstallationID int64
	EntityKind     string
	SourceID       int64
}

type UpsertPullRequestChangeSnapshotParams added in v0.3.0

type UpsertPullRequestChangeSnapshotParams struct {
	BaseSha           string
	HeadSha           string
	FilesTotalCount   int32
	FilesTruncated    bool
	CodeownersRef     string
	CodeownersSha     string
	CodeownersPath    pgtype.Text
	CodeownersState   string
	CodeownersSource  pgtype.Text
	CodeownersHash    string
	RepoID            int64
	PrNumber          int32
	ParentGhUpdatedAt pgtype.Timestamptz
	SyncedAt          pgtype.Timestamptz
	Etag              string
	SyncSource        string
	LastCheckedAt     pgtype.Timestamptz
}

type UpsertPullRequestWriteIfNewerParams

type UpsertPullRequestWriteIfNewerParams struct {
	RepoID               int64
	GhID                 pgtype.Int8
	NodeID               string
	PrNumber             int32
	Title                string
	State                string
	Draft                bool
	AuthorLogin          string
	HeadRef              string
	HeadSha              string
	BaseRef              string
	BaseSha              string
	ReviewDecision       string
	MergeableState       string
	MembershipKnown      bool
	StackNumber          pgtype.Int4
	StackPosition        pgtype.Int4
	GhUpdatedAt          pgtype.Timestamptz
	SyncedAt             pgtype.Timestamptz
	LastCheckedAt        pgtype.Timestamptz
	Etag                 string
	SyncSource           string
	DisplayWindowSeconds int32
}

type UpsertRepoRuleSyncStateParams

type UpsertRepoRuleSyncStateParams struct {
	RepoID    int64
	Etag      string
	CheckedAt pgtype.Timestamptz
}

type UpsertRepositoryAliasParams

type UpsertRepositoryAliasParams struct {
	FullName   string
	RepoID     int64
	ObservedAt pgtype.Timestamptz
}

type UpsertRepositoryWriteIfNewerParams

type UpsertRepositoryWriteIfNewerParams struct {
	InstallationID int64
	OrgID          int64
	GhID           int64
	NodeID         string
	Owner          string
	Name           string
	FullName       string
	DefaultBranch  string
	Archived       bool
	GhUpdatedAt    pgtype.Timestamptz
	HeadSha        string
	SyncedAt       pgtype.Timestamptz
	LastCheckedAt  pgtype.Timestamptz
	Etag           string
	SyncSource     string
}

type UpsertStackWriteIfNewerParams

type UpsertStackWriteIfNewerParams struct {
	RepoID               int64
	GhID                 pgtype.Int8
	NodeID               string
	StackNumber          int32
	BaseRef              string
	BaseSha              string
	Open                 bool
	Entries              []byte
	GhUpdatedAt          pgtype.Timestamptz
	HeadSha              string
	SyncedAt             pgtype.Timestamptz
	LastCheckedAt        pgtype.Timestamptz
	Etag                 string
	SyncSource           string
	DisplayWindowSeconds int32
}

type UpsertSweepPageParams

type UpsertSweepPageParams struct {
	InstallationID int64
	SweepKind      string
	ScopeKey       string
	Cursor         string
	Etag           string
	NextCursor     string
	EntityKeys     []byte
	ListSeenAt     pgtype.Timestamptz
}

type WebhookDelivery

type WebhookDelivery struct {
	DeliveryGuid    string
	Event           string
	RawBody         []byte
	Headers         []byte
	ReceivedAt      pgtype.Timestamptz
	Status          string
	Attempts        int32
	LastError       pgtype.Text
	PayloadPrunedAt pgtype.Timestamptz
	NextAttemptAt   pgtype.Timestamptz
	Traceparent     pgtype.Text
	Tracestate      pgtype.Text
}

type WorkItem

type WorkItem struct {
	IdentityKey string
	OrgID       int64
	Payload     []byte
	UpdatedAt   pgtype.Timestamptz
	ScopeKey    string
}

Jump to

Keyboard shortcuts

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