Documentation
¶
Overview ¶
Package storedb is the sqlc-generated query layer over the deploy control schema.
It is generated from services/deploy/store/migrations and services/deploy/store/queries.sql by services/deploy/store/generate.sh and must never be edited by hand. It is internal on purpose: every type here mirrors the relational schema, so it changes whenever a migration does and carries no compatibility promise. Reach durable control-plane state through services/deploy/store instead.
Index ¶
- type AppendReceiptParams
- type CreateApprovalParams
- type CreateDeploymentRolloutParams
- type CreateDeploymentRunParams
- type CreateRunParams
- type DBTX
- type DeployActivityReceipt
- type DeployAppRevision
- type DeployDeployment
- type DeployDeploymentLabel
- type DeployDeploymentRollout
- type DeployDeploymentRun
- type DeployNode
- type DeployNodeLabel
- type DeployOperatorApproval
- type DeployOperatorRun
- type DeployPossiblyActiveDeploymentNode
- type DeploySchemaMigration
- type ExpirePendingApprovalsOnRestartRow
- type FinishDeploymentRunParams
- type GetDeploymentForReconcileRow
- type ListDeploymentLabelsRow
- type ListDeploymentRolloutRowsRow
- type Queries
- func (q *Queries) AcquireMigrationLock(ctx context.Context) error
- func (q *Queries) AppendReceipt(ctx context.Context, arg AppendReceiptParams) (int64, error)
- func (q *Queries) CreateApproval(ctx context.Context, arg CreateApprovalParams) error
- func (q *Queries) CreateDeploymentRollout(ctx context.Context, arg CreateDeploymentRolloutParams) error
- func (q *Queries) CreateDeploymentRun(ctx context.Context, arg CreateDeploymentRunParams) error
- func (q *Queries) CreateRun(ctx context.Context, arg CreateRunParams) error
- func (q *Queries) DeleteDeploymentLabels(ctx context.Context, deploymentID string) error
- func (q *Queries) DeleteNodeLabels(ctx context.Context, nodeID string) error
- func (q *Queries) ExpireApprovals(ctx context.Context, expiredAt pgtype.Timestamptz) (int64, error)
- func (q *Queries) ExpirePendingApprovalsOnRestart(ctx context.Context, interruptedAt pgtype.Timestamptz) ([]ExpirePendingApprovalsOnRestartRow, error)
- func (q *Queries) FailInterruptedDeploymentRuns(ctx context.Context, interruptedAt pgtype.Timestamptz) ([]string, error)
- func (q *Queries) FailInterruptedOperatorRuns(ctx context.Context, interruptedAt pgtype.Timestamptz) ([]string, error)
- func (q *Queries) FinishDeploymentRun(ctx context.Context, arg FinishDeploymentRunParams) (int64, error)
- func (q *Queries) GetApproval(ctx context.Context, approvalID string) (DeployOperatorApproval, error)
- func (q *Queries) GetDeploymentForReconcile(ctx context.Context, deploymentID string) (GetDeploymentForReconcileRow, error)
- func (q *Queries) GetRun(ctx context.Context, runID string) (DeployOperatorRun, error)
- func (q *Queries) ListAppliedMigrationVersions(ctx context.Context) ([]int32, error)
- func (q *Queries) ListDeploymentLabels(ctx context.Context, deploymentID string) ([]ListDeploymentLabelsRow, error)
- func (q *Queries) ListDeploymentRolloutRows(ctx context.Context) ([]ListDeploymentRolloutRowsRow, error)
- func (q *Queries) ListNodeLabels(ctx context.Context, nodeID string) ([]DeployNodeLabel, error)
- func (q *Queries) ListNodes(ctx context.Context) ([]DeployNode, error)
- func (q *Queries) ListPendingApprovals(ctx context.Context, nowAt pgtype.Timestamptz) ([]DeployOperatorApproval, error)
- func (q *Queries) ListPossiblyActiveDeploymentNodes(ctx context.Context, deploymentID string) ([]string, error)
- func (q *Queries) ListRecentReceipts(ctx context.Context, rowLimit int32) ([]DeployActivityReceipt, error)
- func (q *Queries) ListRecentRuns(ctx context.Context, rowLimit int32) ([]DeployOperatorRun, error)
- func (q *Queries) RecordMigration(ctx context.Context, arg RecordMigrationParams) error
- func (q *Queries) ResolveApproval(ctx context.Context, arg ResolveApprovalParams) (int64, error)
- func (q *Queries) UpdateRunStatus(ctx context.Context, arg UpdateRunStatusParams) (int64, error)
- func (q *Queries) UpsertAppRevision(ctx context.Context, arg UpsertAppRevisionParams) error
- func (q *Queries) UpsertDeployment(ctx context.Context, arg UpsertDeploymentParams) error
- func (q *Queries) UpsertDeploymentLabel(ctx context.Context, arg UpsertDeploymentLabelParams) error
- func (q *Queries) UpsertNode(ctx context.Context, arg UpsertNodeParams) error
- func (q *Queries) UpsertNodeLabel(ctx context.Context, arg UpsertNodeLabelParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RecordMigrationParams
- type ResolveApprovalParams
- type UpdateRunStatusParams
- type UpsertAppRevisionParams
- type UpsertDeploymentLabelParams
- type UpsertDeploymentParams
- type UpsertNodeLabelParams
- type UpsertNodeParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendReceiptParams ¶
type CreateApprovalParams ¶
type CreateApprovalParams struct {
ApprovalID string `json:"approval_id"`
RunID pgtype.Text `json:"run_id"`
ToolCallID pgtype.Text `json:"tool_call_id"`
RequestKind string `json:"request_kind"`
Title string `json:"title"`
Detail string `json:"detail"`
Risk string `json:"risk"`
PayloadSha256 string `json:"payload_sha256"`
RequestedAt pgtype.Timestamptz `json:"requested_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}
type CreateDeploymentRunParams ¶
type CreateDeploymentRunParams struct {
RunID string `json:"run_id"`
RolloutID string `json:"rollout_id"`
DeploymentID string `json:"deployment_id"`
AppRevisionID string `json:"app_revision_id"`
NodeID string `json:"node_id"`
DesiredState string `json:"desired_state"`
WardenTerm int64 `json:"warden_term"`
LeaderID string `json:"leader_id"`
RequestedAt pgtype.Timestamptz `json:"requested_at"`
}
type CreateRunParams ¶
type DeployActivityReceipt ¶
type DeployActivityReceipt struct {
ReceiptID int64 `json:"receipt_id"`
EntityType string `json:"entity_type"`
EntityID string `json:"entity_id"`
Kind string `json:"kind"`
Summary string `json:"summary"`
PayloadSha256 pgtype.Text `json:"payload_sha256"`
OccurredAt pgtype.Timestamptz `json:"occurred_at"`
}
type DeployAppRevision ¶
type DeployAppRevision struct {
AppRevisionID string `json:"app_revision_id"`
AppName string `json:"app_name"`
SourceRepository string `json:"source_repository"`
SourceRevision string `json:"source_revision"`
SourceSha256 string `json:"source_sha256"`
ComposeFile string `json:"compose_file"`
ImageDigest pgtype.Text `json:"image_digest"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type DeployDeployment ¶
type DeployDeployment struct {
DeploymentID string `json:"deployment_id"`
AppRevisionID string `json:"app_revision_id"`
ProjectName string `json:"project_name"`
WorkspacePath string `json:"workspace_path"`
DesiredState string `json:"desired_state"`
PlacementMode string `json:"placement_mode"`
ExactNodeID pgtype.Text `json:"exact_node_id"`
Replicas int32 `json:"replicas"`
Stateful bool `json:"stateful"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type DeployDeploymentLabel ¶
type DeployDeploymentRollout ¶
type DeployDeploymentRun ¶
type DeployDeploymentRun struct {
RunID string `json:"run_id"`
DeploymentID string `json:"deployment_id"`
AppRevisionID string `json:"app_revision_id"`
NodeID string `json:"node_id"`
WardenTerm int64 `json:"warden_term"`
LeaderID string `json:"leader_id"`
Status string `json:"status"`
DryRun pgtype.Bool `json:"dry_run"`
ErrorMessage pgtype.Text `json:"error_message"`
RequestedAt pgtype.Timestamptz `json:"requested_at"`
FinishedAt pgtype.Timestamptz `json:"finished_at"`
RolloutID string `json:"rollout_id"`
DesiredState string `json:"desired_state"`
}
type DeployNode ¶
type DeployNode struct {
NodeID string `json:"node_id"`
Address string `json:"address"`
Role string `json:"role"`
Status string `json:"status"`
WardenTerm int64 `json:"warden_term"`
LastSeenAt pgtype.Timestamptz `json:"last_seen_at"`
ObservedAt pgtype.Timestamptz `json:"observed_at"`
}
type DeployNodeLabel ¶
type DeployOperatorApproval ¶
type DeployOperatorApproval struct {
ApprovalID string `json:"approval_id"`
RunID pgtype.Text `json:"run_id"`
ToolCallID pgtype.Text `json:"tool_call_id"`
RequestKind string `json:"request_kind"`
Title string `json:"title"`
Detail string `json:"detail"`
Risk string `json:"risk"`
PayloadSha256 string `json:"payload_sha256"`
Status string `json:"status"`
RequestedAt pgtype.Timestamptz `json:"requested_at"`
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
ResolvedAt pgtype.Timestamptz `json:"resolved_at"`
ResolvedBy pgtype.Text `json:"resolved_by"`
}
type DeployOperatorRun ¶
type DeployOperatorRun struct {
RunID string `json:"run_id"`
SessionID string `json:"session_id"`
Title string `json:"title"`
Prompt string `json:"prompt"`
Status string `json:"status"`
StartedAt pgtype.Timestamptz `json:"started_at"`
FinishedAt pgtype.Timestamptz `json:"finished_at"`
}
type DeploySchemaMigration ¶
type DeploySchemaMigration struct {
Version int32 `json:"version"`
Name string `json:"name"`
AppliedAt pgtype.Timestamptz `json:"applied_at"`
}
type GetDeploymentForReconcileRow ¶
type GetDeploymentForReconcileRow struct {
DeploymentID string `json:"deployment_id"`
AppRevisionID string `json:"app_revision_id"`
ProjectName string `json:"project_name"`
WorkspacePath string `json:"workspace_path"`
DesiredState string `json:"desired_state"`
PlacementMode string `json:"placement_mode"`
ExactNodeID pgtype.Text `json:"exact_node_id"`
Replicas int32 `json:"replicas"`
Stateful bool `json:"stateful"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
AppName string `json:"app_name"`
SourceRepository string `json:"source_repository"`
SourceRevision string `json:"source_revision"`
SourceSha256 string `json:"source_sha256"`
ComposeFile string `json:"compose_file"`
ImageDigest pgtype.Text `json:"image_digest"`
RevisionCreatedAt pgtype.Timestamptz `json:"revision_created_at"`
}
type ListDeploymentLabelsRow ¶
type ListDeploymentRolloutRowsRow ¶
type ListDeploymentRolloutRowsRow struct {
DeploymentID string `json:"deployment_id"`
AppRevisionID string `json:"app_revision_id"`
ProjectName string `json:"project_name"`
WorkspacePath string `json:"workspace_path"`
DesiredState string `json:"desired_state"`
PlacementMode string `json:"placement_mode"`
ExactNodeID pgtype.Text `json:"exact_node_id"`
Replicas int32 `json:"replicas"`
Stateful bool `json:"stateful"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
AppName string `json:"app_name"`
SourceRevision string `json:"source_revision"`
SourceSha256 string `json:"source_sha256"`
ComposeFile string `json:"compose_file"`
ImageDigest pgtype.Text `json:"image_digest"`
LatestRolloutID string `json:"latest_rollout_id"`
LatestRunID string `json:"latest_run_id"`
LatestNodeID string `json:"latest_node_id"`
LatestDesiredState string `json:"latest_desired_state"`
LatestStatus string `json:"latest_status"`
LatestDryRun bool `json:"latest_dry_run"`
LatestFinishedAt pgtype.Timestamptz `json:"latest_finished_at"`
PossiblyActiveNodeIds []string `json:"possibly_active_node_ids"`
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AcquireMigrationLock ¶
Held until the enclosing migration transaction ends, including when its connection is lost.
func (*Queries) AppendReceipt ¶
func (*Queries) CreateApproval ¶
func (q *Queries) CreateApproval(ctx context.Context, arg CreateApprovalParams) error
func (*Queries) CreateDeploymentRollout ¶
func (q *Queries) CreateDeploymentRollout(ctx context.Context, arg CreateDeploymentRolloutParams) error
func (*Queries) CreateDeploymentRun ¶
func (q *Queries) CreateDeploymentRun(ctx context.Context, arg CreateDeploymentRunParams) error
func (*Queries) CreateRun ¶
func (q *Queries) CreateRun(ctx context.Context, arg CreateRunParams) error
func (*Queries) DeleteDeploymentLabels ¶
func (*Queries) DeleteNodeLabels ¶
func (*Queries) ExpireApprovals ¶
func (*Queries) ExpirePendingApprovalsOnRestart ¶
func (q *Queries) ExpirePendingApprovalsOnRestart(ctx context.Context, interruptedAt pgtype.Timestamptz) ([]ExpirePendingApprovalsOnRestartRow, error)
func (*Queries) FailInterruptedDeploymentRuns ¶
func (*Queries) FailInterruptedOperatorRuns ¶
func (*Queries) FinishDeploymentRun ¶
func (*Queries) GetApproval ¶
func (*Queries) GetDeploymentForReconcile ¶
func (*Queries) ListAppliedMigrationVersions ¶
func (*Queries) ListDeploymentLabels ¶
func (*Queries) ListDeploymentRolloutRows ¶
func (q *Queries) ListDeploymentRolloutRows(ctx context.Context) ([]ListDeploymentRolloutRowsRow, error)
func (*Queries) ListNodeLabels ¶
func (*Queries) ListPendingApprovals ¶
func (q *Queries) ListPendingApprovals(ctx context.Context, nowAt pgtype.Timestamptz) ([]DeployOperatorApproval, error)
func (*Queries) ListPossiblyActiveDeploymentNodes ¶
func (*Queries) ListRecentReceipts ¶
func (*Queries) ListRecentRuns ¶
func (*Queries) RecordMigration ¶
func (q *Queries) RecordMigration(ctx context.Context, arg RecordMigrationParams) error
func (*Queries) ResolveApproval ¶
func (*Queries) UpdateRunStatus ¶
func (*Queries) UpsertAppRevision ¶
func (q *Queries) UpsertAppRevision(ctx context.Context, arg UpsertAppRevisionParams) error
func (*Queries) UpsertDeployment ¶
func (q *Queries) UpsertDeployment(ctx context.Context, arg UpsertDeploymentParams) error
func (*Queries) UpsertDeploymentLabel ¶
func (q *Queries) UpsertDeploymentLabel(ctx context.Context, arg UpsertDeploymentLabelParams) error
func (*Queries) UpsertNode ¶
func (q *Queries) UpsertNode(ctx context.Context, arg UpsertNodeParams) error
func (*Queries) UpsertNodeLabel ¶
func (q *Queries) UpsertNodeLabel(ctx context.Context, arg UpsertNodeLabelParams) error
type RecordMigrationParams ¶
type RecordMigrationParams struct {
Version int32 `json:"version"`
Name string `json:"name"`
AppliedAt pgtype.Timestamptz `json:"applied_at"`
}
type ResolveApprovalParams ¶
type UpdateRunStatusParams ¶
type UpdateRunStatusParams struct {
Status string `json:"status"`
FinishedAt pgtype.Timestamptz `json:"finished_at"`
RunID string `json:"run_id"`
}
type UpsertAppRevisionParams ¶
type UpsertAppRevisionParams struct {
AppRevisionID string `json:"app_revision_id"`
AppName string `json:"app_name"`
SourceRepository string `json:"source_repository"`
SourceRevision string `json:"source_revision"`
SourceSha256 string `json:"source_sha256"`
ComposeFile string `json:"compose_file"`
ImageDigest pgtype.Text `json:"image_digest"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type UpsertDeploymentParams ¶
type UpsertDeploymentParams struct {
DeploymentID string `json:"deployment_id"`
AppRevisionID string `json:"app_revision_id"`
ProjectName string `json:"project_name"`
WorkspacePath string `json:"workspace_path"`
DesiredState string `json:"desired_state"`
PlacementMode string `json:"placement_mode"`
ExactNodeID pgtype.Text `json:"exact_node_id"`
Replicas int32 `json:"replicas"`
Stateful bool `json:"stateful"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
type UpsertNodeLabelParams ¶
type UpsertNodeParams ¶
type UpsertNodeParams struct {
NodeID string `json:"node_id"`
Address string `json:"address"`
Role string `json:"role"`
Status string `json:"status"`
WardenTerm int64 `json:"warden_term"`
LastSeenAt pgtype.Timestamptz `json:"last_seen_at"`
ObservedAt pgtype.Timestamptz `json:"observed_at"`
}
Click to show internal directories.
Click to hide internal directories.