Help us shape the future of Go! Take the 2026 Go Developer Survey

dbgen

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 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 AcceptInvitationRow

type AcceptInvitationRow struct {
	OwnerID string
	Role    string
	Email   string
}

type App

type App struct {
	ID              uuid.UUID
	OwnerID         string
	Name            string
	Namespace       string
	Image           string
	Replicas        int32
	Port            int32
	CpuRequest      string
	CpuLimit        string
	MemoryRequest   string
	MemoryLimit     string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	HealthPath      string
	HealthLiveness  bool
	Source          string
	Internal        bool
	ProjectID       pgtype.UUID
	CanvasX         *int32
	CanvasY         *int32
	HttpsOnly       bool
	CnameOnly       bool
	RepoUrl         string
	RepoBranch      string
	RepoSubdir      string
	RunAsUser       int64
	ConfigVersion   int64
	ActiveReleaseID pgtype.UUID
}

type AppHook added in v0.2.0

type AppHook struct {
	AppID           uuid.UUID
	OwnerID         string
	Secret          []byte
	CreatedAt       time.Time
	PendingAt       pgtype.Timestamptz
	PendingRevision string
	LastDeliveryAt  pgtype.Timestamptz
	LastDelivery    string
}
type AppLink struct {
	OwnerID   string
	FromAppID uuid.UUID
	ToAppID   uuid.UUID
	ViaKey    string
	CreatedAt time.Time
}

type AppRelease

type AppRelease struct {
	ID                     uuid.UUID
	OwnerID                string
	AppID                  uuid.UUID
	ImageRef               string
	ImageDigest            string
	Source                 string
	SourceRevision         string
	Replicas               int32
	Port                   int32
	CpuRequest             string
	CpuLimit               string
	MemoryRequest          string
	MemoryLimit            string
	Internal               bool
	RunAsUser              int64
	FsGroup                int64
	ScratchPaths           []string
	WritableRootFilesystem bool
	HealthPath             string
	HealthLiveness         bool
	Env                    []byte
	SecretKeys             []string
	ConfigVersion          int64
	CreatedAt              time.Time
	Origin                 string
}

type AppReleaseBackfill

type AppReleaseBackfill struct {
	AppID         uuid.UUID
	OwnerID       string
	State         string
	LastError     string
	Attempts      int32
	NextAttemptAt time.Time
	UpdatedAt     time.Time
}

type AppendBuildLogParams

type AppendBuildLogParams struct {
	Chunk string
	ID    uuid.UUID
}

type Build

type Build struct {
	ID           uuid.UUID
	OwnerID      string
	AppID        uuid.UUID
	DeploymentID uuid.UUID
	RepoUrl      string
	RepoRef      string
	CommitSha    string
	Image        string
	Status       string
	Message      string
	Log          string
	StartedAt    time.Time
	FinishedAt   pgtype.Timestamptz
	JobName      string
}

type CancelDeploymentOperationParams

type CancelDeploymentOperationParams struct {
	OwnerID string
	ID      uuid.UUID
}

type ClaimDeploymentOperationParams

type ClaimDeploymentOperationParams struct {
	LeaseDuration       pgtype.Interval
	ID                  uuid.UUID
	OwnerID             string
	MaxConcurrentBuilds int64
}

type ClaimDomainsDueForCheckParams

type ClaimDomainsDueForCheckParams struct {
	LeaseUntil time.Time
	DueBefore  time.Time
	Lim        int32
}

type ClaimNextDeploymentOperationParams

type ClaimNextDeploymentOperationParams struct {
	LeaseDuration       pgtype.Interval
	MaxConcurrentBuilds int64
}

type ClaimRecoverableDeploymentOperationParams

type ClaimRecoverableDeploymentOperationParams struct {
	LeaseDuration pgtype.Interval
	OwnerID       string
	ID            uuid.UUID
}

type ClearProjectPositionsParams

type ClearProjectPositionsParams struct {
	OwnerID   string
	ProjectID pgtype.UUID
}

type ClusterJoin

type ClusterJoin struct {
	ID          int32
	ServerUrl   string
	TokenSealed []byte
	UpdatedAt   time.Time
	UpdatedBy   pgtype.UUID
}

type CreateAppLinkParams

type CreateAppLinkParams struct {
	OwnerID   string
	FromAppID uuid.UUID
	ToAppID   uuid.UUID
	ViaKey    string
}

type CreateAppParams

type CreateAppParams struct {
	OwnerID       string
	Name          string
	Namespace     string
	Image         string
	Replicas      int32
	Port          int32
	Source        string
	Internal      bool
	CpuRequest    string
	CpuLimit      string
	MemoryRequest string
	MemoryLimit   string
	ProjectID     pgtype.UUID
	RepoUrl       string
	RepoBranch    string
	RepoSubdir    string
}

type CreateAppReleaseParams

type CreateAppReleaseParams struct {
	OwnerID                string
	AppID                  uuid.UUID
	ImageRef               string
	ImageDigest            string
	Source                 string
	SourceRevision         string
	Replicas               int32
	Port                   int32
	CpuRequest             string
	CpuLimit               string
	MemoryRequest          string
	MemoryLimit            string
	Internal               bool
	RunAsUser              int64
	FsGroup                int64
	ScratchPaths           []string
	WritableRootFilesystem bool
	HealthPath             string
	HealthLiveness         bool
	Env                    []byte
	SecretKeys             []string
	ConfigVersion          int64
	Origin                 string
}

type CreateBuildParams

type CreateBuildParams struct {
	OwnerID      string
	AppID        uuid.UUID
	DeploymentID uuid.UUID
	RepoUrl      string
	RepoRef      string
}

type CreateCustomDomainParams

type CreateCustomDomainParams struct {
	OwnerID      string
	AppID        uuid.UUID
	Host         string
	VerifyTarget string
}

type CreateDeploymentOperationParams

type CreateDeploymentOperationParams struct {
	OwnerID       string
	AppID         uuid.UUID
	DeploymentID  uuid.UUID
	ReleaseID     pgtype.UUID
	RequiresBuild bool
}

type CreateDeploymentParams

type CreateDeploymentParams struct {
	OwnerID   string
	AppID     uuid.UUID
	Image     string
	Revision  string
	Status    string
	ReleaseID pgtype.UUID
	Trigger   string
	ActorKind string
	ActorID   string
}

type CreateMagicLinkParams

type CreateMagicLinkParams struct {
	UserID    uuid.UUID
	TokenHash []byte
	ExpiresAt time.Time
}

type CreateProjectParams

type CreateProjectParams struct {
	OwnerID string
	Slug    string
	Name    string
}

type CreateSessionParams

type CreateSessionParams struct {
	UserID       uuid.UUID
	TokenHash    []byte
	ActiveTeamID *string
	UserAgent    string
	Ip           string
	ExpiresAt    time.Time
}

type CreateTeamParams

type CreateTeamParams struct {
	ID          string
	DisplayName string
}

type CreateTeamRowParams

type CreateTeamRowParams struct {
	ID          string
	DisplayName string
	Email       string
}

type CreateVolumeAndBumpParams

type CreateVolumeAndBumpParams struct {
	OwnerID   string
	AppID     uuid.UUID
	Name      string
	MountPath string
	SizeBytes int64
	Class     string
}

type CreateVolumeAndBumpRow

type CreateVolumeAndBumpRow struct {
	ID            uuid.UUID
	OwnerID       string
	AppID         uuid.UUID
	Name          string
	MountPath     string
	SizeBytes     int64
	Class         string
	CreatedAt     time.Time
	UpdatedAt     time.Time
	ConfigVersion int64
}

type CreateVolumeParams

type CreateVolumeParams struct {
	OwnerID   string
	AppID     uuid.UUID
	Name      string
	MountPath string
	SizeBytes int64
	Class     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 DeleteAppHookParams added in v0.2.0

type DeleteAppHookParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type DeleteAppParams

type DeleteAppParams struct {
	OwnerID string
	ID      uuid.UUID
}

type DeleteCustomDomainParams

type DeleteCustomDomainParams struct {
	OwnerID string
	ID      uuid.UUID
}

type DeleteInvitationParams

type DeleteInvitationParams struct {
	ID      uuid.UUID
	OwnerID string
}

type DeleteInvitationsByInviterParams

type DeleteInvitationsByInviterParams struct {
	OwnerID   string
	InvitedBy uuid.UUID
}

type DeleteMembershipParams

type DeleteMembershipParams struct {
	UserID  uuid.UUID
	OwnerID string
}

type DeleteOtherSessionsForUserParams

type DeleteOtherSessionsForUserParams struct {
	UserID uuid.UUID
	Keep   uuid.UUID
}

type DeleteProjectParams

type DeleteProjectParams struct {
	OwnerID string
	ID      uuid.UUID
}

type DeleteVariableAndBumpParams

type DeleteVariableAndBumpParams struct {
	OwnerID string
	AppID   uuid.UUID
	Key     string
}

type DeleteVariableAndBumpRow

type DeleteVariableAndBumpRow struct {
	Secret        bool
	ConfigVersion int64
}

type DeleteVariableParams

type DeleteVariableParams struct {
	OwnerID string
	AppID   uuid.UUID
	Key     string
}

type DeleteVolumeAndBumpParams

type DeleteVolumeAndBumpParams struct {
	OwnerID string
	AppID   uuid.UUID
	Name    string
}

type DeleteVolumeAndBumpRow

type DeleteVolumeAndBumpRow struct {
	ID            uuid.UUID
	OwnerID       string
	AppID         uuid.UUID
	Name          string
	MountPath     string
	SizeBytes     int64
	Class         string
	CreatedAt     time.Time
	UpdatedAt     time.Time
	ConfigVersion int64
}

type DeleteVolumeParams

type DeleteVolumeParams struct {
	OwnerID string
	AppID   uuid.UUID
	Name    string
}

type DeployActivityParams

type DeployActivityParams struct {
	OwnerID   string
	StartedAt time.Time
}

type DeployActivityRow

type DeployActivityRow struct {
	Day    time.Time
	Status string
	Total  int64
}

type Deployment

type Deployment struct {
	ID         uuid.UUID
	OwnerID    string
	AppID      uuid.UUID
	Image      string
	Revision   string
	Status     string
	Message    string
	StartedAt  time.Time
	FinishedAt pgtype.Timestamptz
	ReleaseID  pgtype.UUID
	Trigger    string
	ActorKind  string
	ActorID    string
}

type DeploymentOperation

type DeploymentOperation struct {
	ID             uuid.UUID
	OwnerID        string
	AppID          uuid.UUID
	DeploymentID   uuid.UUID
	ReleaseID      pgtype.UUID
	RequiresBuild  bool
	Status         string
	Message        string
	CreatedAt      time.Time
	ClaimedAt      pgtype.Timestamptz
	FinishedAt     pgtype.Timestamptz
	ClaimToken     pgtype.UUID
	LeaseExpiresAt pgtype.Timestamptz
	CancelledAt    pgtype.Timestamptz
	Checkpoint     string
	StageStartedAt time.Time
}

type Domain

type Domain struct {
	ID            uuid.UUID
	OwnerID       string
	AppID         uuid.UUID
	Host          string
	Tls           bool
	CreatedAt     time.Time
	Managed       bool
	VerifiedAt    pgtype.Timestamptz
	VerifyTarget  string
	State         string
	Observed      string
	LastError     string
	LastCheckedAt pgtype.Timestamptz
	NextCheckAt   time.Time
	CheckAttempts int32
	Verified      bool
}

type FailQueuedBuildOperationParams

type FailQueuedBuildOperationParams struct {
	Message      string
	OwnerID      string
	DeploymentID uuid.UUID
}

type FinishBuildParams

type FinishBuildParams struct {
	Status    string
	Message   string
	Image     string
	CommitSha string
	ID        uuid.UUID
}

type FinishDeploymentOperationParams

type FinishDeploymentOperationParams struct {
	Status         string
	Message        string
	OwnerID        string
	ID             uuid.UUID
	ExpectedStatus string
	ClaimToken     pgtype.UUID
}

type FinishDeploymentParams

type FinishDeploymentParams struct {
	OwnerID string
	ID      uuid.UUID
	Status  string
	Message string
}

type GetAppByIDParams

type GetAppByIDParams struct {
	OwnerID string
	ID      uuid.UUID
}

type GetAppForReleaseBackfillParams

type GetAppForReleaseBackfillParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type GetAppHookParams added in v0.2.0

type GetAppHookParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type GetAppParams

type GetAppParams struct {
	OwnerID string
	Name    string
}

type GetAppReleaseParams

type GetAppReleaseParams struct {
	OwnerID string
	AppID   uuid.UUID
	ID      uuid.UUID
}

type GetBuildForDeploymentParams

type GetBuildForDeploymentParams struct {
	OwnerID      string
	DeploymentID uuid.UUID
}

type GetBuildParams

type GetBuildParams struct {
	OwnerID string
	ID      uuid.UUID
}

type GetBuildRecoveryOperationParams

type GetBuildRecoveryOperationParams struct {
	OwnerID      string
	DeploymentID uuid.UUID
}

type GetCustomDomainParams

type GetCustomDomainParams struct {
	OwnerID string
	ID      uuid.UUID
}

type GetDeploymentOperationByDeploymentParams

type GetDeploymentOperationByDeploymentParams struct {
	OwnerID      string
	DeploymentID uuid.UUID
}

type GetDeploymentOperationParams

type GetDeploymentOperationParams struct {
	OwnerID string
	ID      uuid.UUID
}

type GetDeploymentParams

type GetDeploymentParams struct {
	OwnerID string
	ID      uuid.UUID
}

type GetHookForDeliveryRow added in v0.2.0

type GetHookForDeliveryRow struct {
	App    App
	Secret []byte
}

type GetInvitationByHashRow

type GetInvitationByHashRow struct {
	ID        uuid.UUID
	OwnerID   string
	Email     string
	Role      string
	ExpiresAt time.Time
	CreatedAt time.Time
}

type GetLatestSuccessfulBuildForAppParams

type GetLatestSuccessfulBuildForAppParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type GetLiveDeploymentOperationForAppParams

type GetLiveDeploymentOperationForAppParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type GetLiveSessionRow

type GetLiveSessionRow struct {
	ID              uuid.UUID
	UserID          uuid.UUID
	ActiveTeamID    *string
	AuthenticatedAt time.Time
	ExpiresAt       time.Time
	CreatedAt       time.Time
}

type GetMembershipParams

type GetMembershipParams struct {
	UserID  uuid.UUID
	OwnerID string
}

type GetPasswordByEmailRow

type GetPasswordByEmailRow struct {
	Secret      string
	ID          uuid.UUID
	Email       string
	DisplayName string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type GetProjectByIDParams

type GetProjectByIDParams struct {
	OwnerID string
	ID      uuid.UUID
}

type GetProjectBySlugParams

type GetProjectBySlugParams struct {
	OwnerID string
	Slug    string
}

type GetReleaseBackfillStateParams

type GetReleaseBackfillStateParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type GetSessionByHashRow

type GetSessionByHashRow struct {
	ID              uuid.UUID
	UserID          uuid.UUID
	TokenHash       []byte
	ActiveTeamID    *string
	UserAgent       string
	Ip              string
	ExpiresAt       time.Time
	CreatedAt       time.Time
	AuthenticatedAt time.Time
	TeamName        string
	TeamEmail       string
	MemberRole      string
}

type GetSuccessfulBuildForImageParams

type GetSuccessfulBuildForImageParams struct {
	OwnerID string
	AppID   uuid.UUID
	Image   string
}

type GetVariableParams

type GetVariableParams struct {
	OwnerID string
	AppID   uuid.UUID
	Key     string
}

type GetVolumeParams

type GetVolumeParams struct {
	OwnerID string
	AppID   uuid.UUID
	Name    string
}

type GrowVolumeAndBumpParams

type GrowVolumeAndBumpParams struct {
	SizeBytes int64
	OwnerID   string
	AppID     uuid.UUID
	Name      string
}

type GrowVolumeAndBumpRow

type GrowVolumeAndBumpRow struct {
	ID            uuid.UUID
	OwnerID       string
	AppID         uuid.UUID
	Name          string
	MountPath     string
	SizeBytes     int64
	Class         string
	CreatedAt     time.Time
	UpdatedAt     time.Time
	ConfigVersion int64
}

type GrowVolumeParams

type GrowVolumeParams struct {
	SizeBytes int64
	OwnerID   string
	AppID     uuid.UUID
	Name      string
}

type HasVerifiedDomainsForAppParams

type HasVerifiedDomainsForAppParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type IncrementAppConfigVersionParams

type IncrementAppConfigVersionParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type Invitation

type Invitation struct {
	ID         uuid.UUID
	OwnerID    string
	Email      string
	Role       string
	TokenHash  []byte
	InvitedBy  pgtype.UUID
	ExpiresAt  time.Time
	AcceptedAt pgtype.Timestamptz
	CreatedAt  time.Time
}

type ListAdmissiblePushesRow added in v0.2.0

type ListAdmissiblePushesRow struct {
	App             App
	PendingRevision string
}

type ListAppLinksRow

type ListAppLinksRow struct {
	FromAppID uuid.UUID
	ToAppID   uuid.UUID
	ViaKey    string
	FromName  string
	ToName    string
}

type ListAppReleasesParams

type ListAppReleasesParams struct {
	OwnerID     string
	AppID       uuid.UUID
	ResultLimit int32
}

type ListAppsInProjectParams

type ListAppsInProjectParams struct {
	OwnerID   string
	ProjectID pgtype.UUID
}

type ListAppsWithLastDeployRow

type ListAppsWithLastDeployRow struct {
	App              App
	LastDeployStatus string
}

type ListCustomDomainsForOwnerRow

type ListCustomDomainsForOwnerRow struct {
	Domain  Domain
	AppName string
}

type ListCustomDomainsParams

type ListCustomDomainsParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type ListDeploymentOperationsParams

type ListDeploymentOperationsParams struct {
	OwnerID     string
	ResultLimit int32
}

type ListDeploymentsParams

type ListDeploymentsParams struct {
	OwnerID string
	AppID   uuid.UUID
	Limit   int32
}

type ListMembersOfTeamRow

type ListMembersOfTeamRow struct {
	UserID    uuid.UUID
	OwnerID   string
	Role      string
	CreatedAt time.Time
	Email     string
	UserName  string
}

type ListMembershipsForUserRow

type ListMembershipsForUserRow struct {
	UserID    uuid.UUID
	OwnerID   string
	Role      string
	CreatedAt time.Time
	TeamName  string
}

type ListPendingInvitationsRow

type ListPendingInvitationsRow struct {
	ID        uuid.UUID
	OwnerID   string
	Email     string
	Role      string
	ExpiresAt time.Time
	CreatedAt time.Time
}

type ListPendingReleaseBackfillsRow

type ListPendingReleaseBackfillsRow struct {
	App       App
	State     string
	LastError string
	Attempts  int32
}

type ListProjectsRow

type ListProjectsRow struct {
	ID        uuid.UUID
	OwnerID   string
	Slug      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
	AppCount  int64
}

type ListRecentDeploymentsParams

type ListRecentDeploymentsParams struct {
	OwnerID string
	Limit   int32
}

type ListRecentDeploymentsRow

type ListRecentDeploymentsRow struct {
	ID              uuid.UUID
	OwnerID         string
	AppID           uuid.UUID
	Image           string
	Revision        string
	Status          string
	Message         string
	StartedAt       time.Time
	FinishedAt      pgtype.Timestamptz
	ReleaseID       pgtype.UUID
	Trigger         string
	ActorKind       string
	ActorID         string
	AppName         string
	AppNamespace    string
	ActiveReleaseID pgtype.UUID
}

type LockPasswordRow

type LockPasswordRow struct {
	ID     uuid.UUID
	Secret string
}
type MagicLink struct {
	ID         uuid.UUID
	UserID     uuid.UUID
	TokenHash  []byte
	ExpiresAt  time.Time
	ConsumedAt pgtype.Timestamptz
	CreatedAt  time.Time
}

type MarkHookPendingParams added in v0.2.0

type MarkHookPendingParams struct {
	Revision string
	AppID    uuid.UUID
}

type MarkVerifiedDomainsRoutedForAppParams

type MarkVerifiedDomainsRoutedForAppParams struct {
	OwnerID string
	AppID   uuid.UUID
}

type Membership

type Membership struct {
	UserID    uuid.UUID
	OwnerID   string
	Role      string
	CreatedAt time.Time
}

type MoveAppsWithoutProjectParams

type MoveAppsWithoutProjectParams struct {
	OwnerID   string
	ProjectID pgtype.UUID
}

type PlatformDn

type PlatformDn struct {
	ID          int32
	CnameTarget string
	TxtPrefix   string
	UpdatedAt   time.Time
}

type PlatformRegistry

type PlatformRegistry struct {
	ID             int32
	Host           string
	Repository     string
	Username       string
	PasswordSealed []byte
	UpdatedAt      time.Time
	UpdatedBy      pgtype.UUID
	Insecure       bool
}

type Project

type Project struct {
	ID        uuid.UUID
	OwnerID   string
	Slug      string
	Name      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Querier

type Querier interface {
	// One conditional UPDATE, like the magic link: checking first and writing after
	// leaves a window in which the same invitation is accepted twice.
	AcceptInvitation(ctx context.Context, tokenHash []byte) (AcceptInvitationRow, error)
	// Appended rather than replaced, so a build streaming its output does not have
	// to hold the whole log in memory to write any of it.
	AppendBuildLog(ctx context.Context, arg AppendBuildLogParams) error
	CancelDeploymentOperation(ctx context.Context, arg CancelDeploymentOperationParams) (DeploymentOperation, error)
	ClaimDeploymentOperation(ctx context.Context, arg ClaimDeploymentOperationParams) (DeploymentOperation, error)
	// Claims the domains whose next check is due, and leases them.
	//
	// Two things at once, and both matter.
	//
	// FOR UPDATE SKIP LOCKED is what lets the checker run on every replica without
	// those replicas agreeing on anything: each takes rows nobody else holds, and a
	// row already being worked on is skipped rather than waited for. The build
	// reconciler is safe on several replicas for the same reason.
	//
	// Pushing next_check_at forward in the same statement is what keeps the lock
	// short. The alternative — holding the transaction open while the lookups run —
	// would hold row locks for as long as DNS takes to answer, which is unbounded
	// and occasionally seconds. Leasing instead means the claim is committed
	// immediately and the network happens outside any transaction; a checker that
	// dies mid-pass simply lets the lease expire, and the next pass picks the row
	// up again.
	ClaimDomainsDueForCheck(ctx context.Context, arg ClaimDomainsDueForCheckParams) ([]Domain, error)
	ClaimNextDeploymentOperation(ctx context.Context, arg ClaimNextDeploymentOperationParams) (DeploymentOperation, error)
	// Applying and verifying are recovered from workload observation, never by
	// the ordinary admission worker. The checkpoint tells this claimant which
	// stage the dead worker had durably entered.
	ClaimRecoverableDeploymentOperation(ctx context.Context, arg ClaimRecoverableDeploymentOperationParams) (DeploymentOperation, error)
	ClearClusterJoin(ctx context.Context) (int64, error)
	ClearPlatformRegistry(ctx context.Context) error
	// Forget every saved position in a project, so the next render lays it out
	// again from the dependencies.
	ClearProjectPositions(ctx context.Context, arg ClearProjectPositionsParams) (int64, error)
	// Marking consumed and reading the user are one statement, so there is no
	// window between the two in which a second request can also find the link
	// unconsumed. Expiry is in the same condition for the same reason: a link that
	// has just expired must fail here rather than in whatever checks it later.
	ConsumeMagicLink(ctx context.Context, tokenHash []byte) (User, error)
	CountApps(ctx context.Context, ownerID string) (int64, error)
	CountOwnersOfTeam(ctx context.Context, ownerID string) (int64, error)
	CountPendingReleaseBackfills(ctx context.Context) (int64, error)
	CreateApp(ctx context.Context, arg CreateAppParams) (App, error)
	CreateAppLink(ctx context.Context, arg CreateAppLinkParams) error
	// Release snapshots are owner-scoped at every read and write, like every
	// other resource. There is intentionally no update query: a release is a fact
	// about a past deployment, not editable configuration.
	CreateAppRelease(ctx context.Context, arg CreateAppReleaseParams) (AppRelease, error)
	// Builds. Owner-scoped in the row rather than through the deployment, because
	// the log is readable output and the scoping has to be checkable in the query
	// that reads it.
	CreateBuild(ctx context.Context, arg CreateBuildParams) (Build, error)
	// ---------------------------------------------------------- custom domains
	// Claims a hostname for an app, unverified.
	//
	// Deliberately not an upsert on host: the global unique index is what makes two
	// teams claiming one name an error rather than a silent transfer, and papering
	// over it here is exactly how a domain gets stolen.
	//
	// next_check_at defaults to now(), so a claim is picked up by the checker on its
	// next pass rather than waiting for somebody to press a button. That is the
	// whole difference between this and what it replaced.
	CreateCustomDomain(ctx context.Context, arg CreateCustomDomainParams) (Domain, error)
	CreateDeployment(ctx context.Context, arg CreateDeploymentParams) (Deployment, error)
	CreateDeploymentOperation(ctx context.Context, arg CreateDeploymentOperationParams) (DeploymentOperation, error)
	CreateMagicLink(ctx context.Context, arg CreateMagicLinkParams) (MagicLink, error)
	// Every query filters by owner_id, for the reason apps.sql gives: the scope is
	// the check, not a duplicate of one.
	CreateProject(ctx context.Context, arg CreateProjectParams) (Project, error)
	CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
	CreateTeam(ctx context.Context, arg CreateTeamParams) (Team, error)
	// Every query filters by owner_id.
	//
	// This is not defensive duplication of an application-level check — it is the
	// check. A handler that forgets to scope produces no rows here rather than
	// another owner's data, and sqlc makes the parameter impossible to omit
	// because the generated signature requires it.
	CreateTeamRow(ctx context.Context, arg CreateTeamRowParams) (Team, error)
	// Storage attached to an app. Scoped by owner_id like every other resource
	// query: a handler that forgets to scope produces no rows here rather than
	// another team's storage.
	CreateVolume(ctx context.Context, arg CreateVolumeParams) (Volume, error)
	CreateVolumeAndBump(ctx context.Context, arg CreateVolumeAndBumpParams) (CreateVolumeAndBumpRow, error)
	DeleteApp(ctx context.Context, arg DeleteAppParams) error
	DeleteAppHook(ctx context.Context, arg DeleteAppHookParams) (int64, error)
	DeleteCustomDomain(ctx context.Context, arg DeleteCustomDomainParams) (int64, error)
	DeleteExpiredInvitations(ctx context.Context) error
	DeleteExpiredMagicLinks(ctx context.Context) error
	DeleteExpiredSessions(ctx context.Context) error
	// Scoped by owner_id as well as id: an id from another team must not be
	// reachable by someone who happens to administer this one.
	DeleteInvitation(ctx context.Context, arg DeleteInvitationParams) (int64, error)
	// Withdraws the invitations somebody issued, used when they lose the authority
	// to have issued them. An administrator who leaves must not keep a live token
	// for an address they control.
	DeleteInvitationsByInviter(ctx context.Context, arg DeleteInvitationsByInviterParams) error
	// Releases an app's platform hostname.
	//
	// Deleting rather than leaving the row is what makes the feature reversible:
	// hostnames are globally unique, so a retired row keeps the name reserved
	// against every other app forever.
	DeleteManagedDomain(ctx context.Context, appID uuid.UUID) error
	DeleteMembership(ctx context.Context, arg DeleteMembershipParams) error
	// Ends every session but the one asking.
	//
	// DeleteSessionsForUser cannot serve here: it takes out the caller's own, so
	// changing a password from the account page would sign the person out of the
	// browser they are looking at, and they would read that as the change having
	// failed rather than having worked.
	// The surviving session is named `keep` rather than `except`, which is a
	// reserved word the query parser will not take as an identifier.
	DeleteOtherSessionsForUser(ctx context.Context, arg DeleteOtherSessionsForUserParams) error
	// execrows so that "there was nothing to remove" is distinguishable from
	// success. Reporting a credential withdrawn when none existed is how somebody
	// stops looking for the one that is still there.
	DeletePassword(ctx context.Context, userID uuid.UUID) (int64, error)
	DeleteProject(ctx context.Context, arg DeleteProjectParams) (int64, error)
	DeleteSessionByHash(ctx context.Context, tokenHash []byte) error
	DeleteSessionsForUser(ctx context.Context, userID uuid.UUID) error
	DeleteVariable(ctx context.Context, arg DeleteVariableParams) (int64, error)
	DeleteVariableAndBump(ctx context.Context, arg DeleteVariableAndBumpParams) (DeleteVariableAndBumpRow, error)
	DeleteVolume(ctx context.Context, arg DeleteVolumeParams) (int64, error)
	DeleteVolumeAndBump(ctx context.Context, arg DeleteVolumeAndBumpParams) (DeleteVolumeAndBumpRow, error)
	// Deploys per day and outcome, for the overview chart.
	//
	// Counted in the database rather than by reading rows and tallying them in Go:
	// a busy month is thousands of deployments, and none of them are wanted here
	// except as a number.
	//
	// Days with no deploys are absent from this result. The caller fills them in;
	// see app.DeployActivity for why that cannot be skipped.
	DeployActivity(ctx context.Context, arg DeployActivityParams) ([]DeployActivityRow, error)
	FailQueuedBuildOperation(ctx context.Context, arg FailQueuedBuildOperationParams) (int64, error)
	FinishBuild(ctx context.Context, arg FinishBuildParams) (Build, error)
	FinishDeployment(ctx context.Context, arg FinishDeploymentParams) (Deployment, error)
	FinishDeploymentOperation(ctx context.Context, arg FinishDeploymentOperationParams) (int64, error)
	GetApp(ctx context.Context, arg GetAppParams) (App, error)
	GetAppByID(ctx context.Context, arg GetAppByIDParams) (App, error)
	GetAppForReleaseBackfill(ctx context.Context, arg GetAppForReleaseBackfillParams) (App, error)
	GetAppHook(ctx context.Context, arg GetAppHookParams) (AppHook, error)
	GetAppRelease(ctx context.Context, arg GetAppReleaseParams) (AppRelease, error)
	GetBuild(ctx context.Context, arg GetBuildParams) (Build, error)
	GetBuildForDeployment(ctx context.Context, arg GetBuildForDeploymentParams) (Build, error)
	GetBuildRecoveryOperation(ctx context.Context, arg GetBuildRecoveryOperationParams) (DeploymentOperation, error)
	// The join settings are install-wide, so unlike every other query here these
	// take no owner_id. See the 00012 migration for why.
	GetClusterJoin(ctx context.Context) (ClusterJoin, error)
	GetCustomDomain(ctx context.Context, arg GetCustomDomainParams) (Domain, error)
	GetDeployment(ctx context.Context, arg GetDeploymentParams) (Deployment, error)
	GetDeploymentOperation(ctx context.Context, arg GetDeploymentOperationParams) (DeploymentOperation, error)
	GetDeploymentOperationByDeployment(ctx context.Context, arg GetDeploymentOperationByDeploymentParams) (DeploymentOperation, error)
	// By app id alone: a delivery carries no session and no owner. The signature,
	// checked against the secret read here, is what authorises it.
	GetHookForDelivery(ctx context.Context, appID uuid.UUID) (GetHookForDeliveryRow, error)
	// Reads an invitation without spending it, so a signed-out visitor can be sent
	// a sign-in link to the address it names. token_hash is not among the columns,
	// for the same reason it is absent from ListPendingInvitations.
	GetInvitationByHash(ctx context.Context, tokenHash []byte) (GetInvitationByHashRow, error)
	GetLatestSuccessfulBuildForApp(ctx context.Context, arg GetLatestSuccessfulBuildForAppParams) (Build, error)
	// The live operation is the only candidate allowed to displace an app's
	// active release. Steady-state convergence must stand down while one exists.
	GetLiveDeploymentOperationForApp(ctx context.Context, arg GetLiveDeploymentOperationForAppParams) (DeploymentOperation, error)
	// ---------------------------------------------------------------------------
	// Step-up and session revocation
	// ---------------------------------------------------------------------------
	// Reads a session that is still alive, for a caller about to change how the
	// account it belongs to can be signed in to.
	//
	// GetSession has no expiry filter, so an expired row comes back from it looking
	// valid. GetSessionByHash filters expiry in SQL precisely so that a caller
	// cannot forget, and this is the caller that would: a session that ended an hour
	// ago must not be able to set a password. FOR UPDATE serialises two tabs
	// changing one at the same moment.
	//
	// Columns are named because the row exists to answer three questions — whose it
	// is, how recently it was proved, whether it is still alive — and starring it
	// would hand the caller a struct that grows every time `sessions` does.
	GetLiveSession(ctx context.Context, id uuid.UUID) (GetLiveSessionRow, error)
	GetManagedDomain(ctx context.Context, appID uuid.UUID) (Domain, error)
	GetMembership(ctx context.Context, arg GetMembershipParams) (Membership, error)
	// ---------------------------------------------------------------------------
	// Passwords
	//
	// Every query below either names its columns or returns an id. `secret` appears
	// in two of them — the sign-in lookup and the locking read that a change or a
	// removal goes through — and both row types are consumed inside the account
	// package and never returned from it. That is the whole storage rule, and it is
	// easier to keep by making the leak impossible than by remembering not to write
	// it. Anything added here that does not need the hash must not select it.
	// ---------------------------------------------------------------------------
	// The only query that returns a hash, and the only one that ever should.
	//
	// The join is INNER, so an unknown address and a known address with no password
	// come back as the same pgx.ErrNoRows. There is no branch in Go that could tell
	// them apart, which is what makes the equal-cost verify in AuthenticatePassword
	// structural rather than something a caller has to remember to write.
	//
	// The user's columns are named rather than starred, so this cannot quietly start
	// returning whatever is added to `users` next.
	GetPasswordByEmail(ctx context.Context, email string) (GetPasswordByEmailRow, error)
	// Install-wide DNS settings. No owner_id, for the reason cluster_join has
	// none: they configure one controller shared by every team.
	GetPlatformDNS(ctx context.Context) (PlatformDn, error)
	// The install's image registry. No owner_id, for the reason platform_dns has
	// none: one registry serves every team's builds.
	GetPlatformRegistry(ctx context.Context) (PlatformRegistry, error)
	GetProjectByID(ctx context.Context, arg GetProjectByIDParams) (Project, error)
	GetProjectBySlug(ctx context.Context, arg GetProjectBySlugParams) (Project, error)
	GetReleaseBackfillState(ctx context.Context, arg GetReleaseBackfillStateParams) (AppReleaseBackfill, error)
	// Expiry is filtered here for the reason GetSessionByHash gives: so that an
	// expired row can never be treated as valid by a caller that forgets to check.
	// This one used to be the caller that forgot. It was not reachable with a dead
	// session — the route gate resolves a live one first — but "not reachable"
	// is a property of today's routing rather than of this query, and the whole
	// point of putting the condition in SQL is that it does not depend on that.
	GetSession(ctx context.Context, id uuid.UUID) (Session, error)
	// The team is joined in because the request that carries this cookie needs the
	// owner it resolves to, and a second round trip per request buys nothing. The
	// join is LEFT: a session whose team was deleted still exists, it just has no
	// owner to act as.
	//
	// Expiry is filtered in SQL rather than in Go so that an expired row can never
	// be treated as valid by a caller that forgets to check.
	// Resolves a session only while the membership behind it still exists.
	//
	// The join to memberships is the security boundary, not decoration. Revoking
	// sessions imperatively when someone is removed would work only for the call
	// sites that remember to do it, and would still miss membership lost by
	// cascade. Joining makes a departed member's cookie stop resolving the instant
	// the row goes, by whatever route it went.
	//
	// INNER JOIN on teams too: a session with no active team resolves to no owner,
	// and returning a row the caller must then remember to reject is how that
	// check gets skipped.
	GetSessionByHash(ctx context.Context, tokenHash []byte) (GetSessionByHashRow, error)
	GetSuccessfulBuildForImage(ctx context.Context, arg GetSuccessfulBuildForImageParams) (Build, error)
	GetTeam(ctx context.Context, id string) (Team, error)
	GetTeamRow(ctx context.Context, id string) (Team, error)
	GetUserByEmail(ctx context.Context, email string) (User, error)
	GetUserByID(ctx context.Context, id uuid.UUID) (User, error)
	GetVariable(ctx context.Context, arg GetVariableParams) (Variable, error)
	GetVolume(ctx context.Context, arg GetVolumeParams) (Volume, error)
	// Expansion only, enforced in the WHERE clause rather than by reading the row
	// and comparing in Go: a check the caller performs is one a caller can skip,
	// and Kubernetes cannot shrink a claim afterwards to undo it.
	GrowVolume(ctx context.Context, arg GrowVolumeParams) (int64, error)
	GrowVolumeAndBump(ctx context.Context, arg GrowVolumeAndBumpParams) (GrowVolumeAndBumpRow, error)
	HasPassword(ctx context.Context, userID uuid.UUID) (bool, error)
	HasVerifiedDomainsForApp(ctx context.Context, arg HasVerifiedDomainsForAppParams) (bool, error)
	IncrementAppConfigVersion(ctx context.Context, arg IncrementAppConfigVersionParams) (int64, error)
	// The platform CNAME target is an install-wide live overlay, but it only
	// renders into apps that explicitly opted into CNAME routing.
	IncrementCNAMEAppConfigVersions(ctx context.Context) error
	// Registry credentials are a live overlay for every Git-built image. They are
	// install-wide, so one settings mutation invalidates each Git app exactly
	// once without manufacturing release history.
	IncrementGitAppConfigVersions(ctx context.Context) error
	// Pushes waiting behind a deploy that has since ended. An app whose deploy is
	// still live is left out, rather than tried and refused every half second.
	ListAdmissiblePushes(ctx context.Context, resultLimit int32) ([]ListAdmissiblePushesRow, error)
	ListAppLinks(ctx context.Context, ownerID string) ([]ListAppLinksRow, error)
	ListAppReleases(ctx context.Context, arg ListAppReleasesParams) ([]AppRelease, error)
	ListApps(ctx context.Context, ownerID string) ([]App, error)
	// Apps whose database pointer names the workload the cluster must converge to.
	// This is intentionally install-scoped: the reconciler acts from stored
	// ownership rather than from an authenticated request.
	ListAppsForReconciliation(ctx context.Context) ([]App, error)
	ListAppsInProject(ctx context.Context, arg ListAppsInProjectParams) ([]App, error)
	// Every app, with how its most recent deployment ended.
	//
	// A failed deploy leaves the previous workload running, so the app's live
	// status stays green and nothing in a list of apps says the last attempt to
	// change it did not take. That is exactly the deploy somebody needs to find,
	// and until this query existed the only way to find it was to open each app.
	//
	// LATERAL rather than a window function or a join on max(started_at): one index
	// lookup per app, and it reads as what it is — the latest row for this app.
	ListAppsWithLastDeploy(ctx context.Context, ownerID string) ([]ListAppsWithLastDeployRow, error)
	// Apps that predate projects, or whose project was deleted.
	//
	// Returned separately rather than folded into a default project by the query,
	// because assigning one is a write and a read should not have side effects
	// that a caller cannot see.
	ListAppsWithoutProject(ctx context.Context, ownerID string) ([]App, error)
	ListCustomDomains(ctx context.Context, arg ListCustomDomainsParams) ([]Domain, error)
	// Every custom domain on the install, worst first.
	//
	// Nothing answered "which domains are stuck" before this. A domain that is not
	// routed is the only kind anybody needs to find, so it sorts to the top.
	ListCustomDomainsForOwner(ctx context.Context, ownerID string) ([]ListCustomDomainsForOwnerRow, error)
	ListDeploymentOperations(ctx context.Context, arg ListDeploymentOperationsParams) ([]DeploymentOperation, error)
	ListDeployments(ctx context.Context, arg ListDeploymentsParams) ([]Deployment, error)
	ListDomainsByApp(ctx context.Context, appID uuid.UUID) ([]Domain, error)
	ListMembersOfTeam(ctx context.Context, ownerID string) ([]ListMembersOfTeamRow, error)
	ListMembershipsForUser(ctx context.Context, userID uuid.UUID) ([]ListMembershipsForUserRow, error)
	// The columns are named rather than starred, and token_hash is not among them.
	// This list feeds the team page, and a hash that never leaves the database
	// cannot be rendered into it by a template that innocently prints a struct.
	ListPendingInvitations(ctx context.Context, ownerID string) ([]ListPendingInvitationsRow, error)
	ListPendingReleaseBackfills(ctx context.Context, resultLimit int32) ([]ListPendingReleaseBackfillsRow, error)
	ListProjects(ctx context.Context, ownerID string) ([]ListProjectsRow, error)
	// Joined to apps so the activity feed can name the workload without a second
	// round trip per row. The join is on app_id AND owner_id: joining on app_id
	// alone would be correct today and wrong the moment more than one owner exists.
	ListRecentDeployments(ctx context.Context, arg ListRecentDeploymentsParams) ([]ListRecentDeploymentsRow, error)
	// Every build still claiming to run, oldest first. Not owner-scoped: this
	// feeds the reconciler, which is the platform settling its own records rather
	// than a team reading theirs.
	ListRunningBuilds(ctx context.Context) ([]Build, error)
	ListVariablesForApp(ctx context.Context, appID uuid.UUID) ([]Variable, error)
	ListVolumesForApp(ctx context.Context, appID uuid.UUID) ([]Volume, error)
	// Claim counting and selection must share this transaction-wide lock. Row
	// locks alone protect candidates, not the cluster-wide count: two connections
	// can otherwise lock different rows after both observed one free build slot.
	LockDeploymentAdmission(ctx context.Context) error
	// Reads and locks the person's password, for a caller inside a transaction that
	// is about to replace or remove it.
	//
	// Returns the secret as well as the id because one row answers two questions the
	// caller needs at the same moment: whether this is an add or a replace, since
	// only a replace revokes the person's other sessions, and whether a current
	// password offered as proof of recent authentication is the right one. Asking
	// twice would be two round trips and one more chance for the second to read a
	// different row than the first.
	//
	// FOR UPDATE is what serialises two tabs. Read outside the transaction this
	// would be check-then-act: both see no password, both insert, one upserts over
	// the other, and neither revokes.
	LockPassword(ctx context.Context, userID uuid.UUID) (LockPasswordRow, error)
	// A role change reads the owner count and then writes; taking the team row
	// first serialises those pairs, so two concurrent demotions cannot both see
	// two owners and both proceed.
	LockTeam(ctx context.Context, id string) (Team, error)
	// Moves a proven domain to routed, once the Ingress actually carries it.
	//
	// Guarded on the state it is coming from, so a check that has since found drift
	// is not overwritten by an apply that started before it.
	MarkDomainRouted(ctx context.Context, id uuid.UUID) (int64, error)
	MarkHookPending(ctx context.Context, arg MarkHookPendingParams) error
	// A verified domain becomes routed only after the app reconciler has observed
	// or produced the matching workload convergence key. This app-scoped form
	// closes the asynchronous handoff from the DNS checker.
	MarkVerifiedDomainsRoutedForApp(ctx context.Context, arg MarkVerifiedDomainsRoutedForAppParams) (int64, error)
	MoveAppsWithoutProject(ctx context.Context, arg MoveAppsWithoutProjectParams) (int64, error)
	NormalizeLegacyDeploymentStatuses(ctx context.Context) (int64, error)
	ReclaimExpiredDeploymentOperations(ctx context.Context) ([]DeploymentOperation, error)
	// Records what a check saw.
	//
	// Not scoped by owner, and deliberately: the background checker works through
	// every install's rows by id, having already claimed them below. Owner scoping
	// protects a request that names a row; this is not one. Every path that reaches
	// here from a request goes through GetCustomDomain first, which is scoped.
	//
	// The schedule arrives already computed rather than being worked out in SQL, so
	// the backoff can be tested against an injected clock instead of against now().
	RecordDomainCheck(ctx context.Context, arg RecordDomainCheckParams) (int64, error)
	RecordHookDelivery(ctx context.Context, arg RecordHookDeliveryParams) error
	RecoverBuiltDeploymentOperation(ctx context.Context, arg RecoverBuiltDeploymentOperationParams) (DeploymentOperation, error)
	// A cluster outage is not a deployment failure. Give observation recovery
	// back to the queue without changing its checkpoint or verification budget.
	ReleaseRecoverableDeploymentOperation(ctx context.Context, arg ReleaseRecoverableDeploymentOperationParams) (int64, error)
	RenameProject(ctx context.Context, arg RenameProjectParams) (Project, error)
	RenewDeploymentOperationLease(ctx context.Context, arg RenewDeploymentOperationLeaseParams) (int64, error)
	ReplaceAppLinks(ctx context.Context, arg ReplaceAppLinksParams) error
	// Brings a domain's next check forward. What the "Check now" button does.
	//
	// It resets the attempt count as well, because somebody pressing it is telling
	// us the situation changed — and a domain that had backed off to a fifteen
	// minute interval should not go straight back to one.
	RequestDomainCheck(ctx context.Context, arg RequestDomainCheckParams) (int64, error)
	// Rollback makes the app's desired state the release's again, so the next edit
	// builds on what is running rather than quietly rolling forward to what was
	// replaced. Only release-owned fields: hostnames, networking, storage and the
	// repository are current state and stay as they are. The uid is a build's
	// discovery for a Git app, and belongs to the image being restored.
	RestoreAppFromRelease(ctx context.Context, arg RestoreAppFromReleaseParams) (App, error)
	// Hostnames that may actually be routed to.
	//
	// A managed host is routable because the platform issued it; a custom one only
	// once it is proven. This is the query the Ingress is built from, so the gate
	// lives here rather than in a caller that might forget it.
	RoutableHostsForApp(ctx context.Context, appID uuid.UUID) ([]string, error)
	SetActiveRelease(ctx context.Context, arg SetActiveReleaseParams) (int64, error)
	SetAppHealth(ctx context.Context, arg SetAppHealthParams) (App, error)
	// The image a build produced. Separate from UpdateApp because a build sets
	// only this: the replicas and limits a person configured are not a build's to
	// overwrite, and passing them through would make every build a chance to.
	SetAppImage(ctx context.Context, arg SetAppImageParams) (App, error)
	SetAppNetworking(ctx context.Context, arg SetAppNetworkingParams) (int64, error)
	SetAppPosition(ctx context.Context, arg SetAppPositionParams) (int64, error)
	SetAppProject(ctx context.Context, arg SetAppProjectParams) (int64, error)
	SetAppReplicas(ctx context.Context, arg SetAppReplicasParams) (App, error)
	// Recorded by a build, which is the only thing that can discover it. The
	// image update owns the build operation's single config_version increment.
	SetAppRunAsUser(ctx context.Context, arg SetAppRunAsUserParams) error
	SetBuildJob(ctx context.Context, arg SetBuildJobParams) error
	SetClaimedOperationRelease(ctx context.Context, arg SetClaimedOperationReleaseParams) (int64, error)
	SetClusterJoin(ctx context.Context, arg SetClusterJoinParams) (ClusterJoin, error)
	SetDeploymentRelease(ctx context.Context, arg SetDeploymentReleaseParams) (int64, error)
	SetPlatformDNS(ctx context.Context, arg SetPlatformDNSParams) (PlatformDn, error)
	SetPlatformRegistry(ctx context.Context, arg SetPlatformRegistryParams) (PlatformRegistry, error)
	SetReleaseBackfillState(ctx context.Context, arg SetReleaseBackfillStateParams) (int64, error)
	SetSessionTeam(ctx context.Context, arg SetSessionTeamParams) error
	// Cleared in the same transaction that admits the deploy, so a push is either
	// still waiting or has a deployment — never neither.
	TakeHookPending(ctx context.Context, appID uuid.UUID) (int64, error)
	// Opens the step-up window. Scoped by expiry so an expired session cannot be
	// revived into a recently-authenticated one; execrows so the caller can tell
	// that it was not.
	TouchSessionAuthentication(ctx context.Context, id uuid.UUID) (int64, error)
	TransitionDeploymentOperation(ctx context.Context, arg TransitionDeploymentOperationParams) (DeploymentOperation, error)
	// Everything about an app a person is allowed to change after creating it.
	//
	// Deliberately not replicas: scaling has its own query because it has its own
	// rule about storage, and folding it in here would make every settings save a
	// chance to silently reset a scale somebody had chosen.
	//
	// Nor the health probe, the networking toggles or run_as_user — each of those
	// already has a query shaped to what it means, and this one exists for the
	// fields that had no way to be changed at all.
	UpdateApp(ctx context.Context, arg UpdateAppParams) (App, error)
	// Rehash-on-login, for a stored hash made at a cost this build has moved past.
	// Best effort and never on the critical path: the sign-in has already succeeded
	// by the time this runs.
	//
	// Conditional on the old value, which makes it a compare-and-swap. Between the
	// verify and this update the person may have changed their password in another
	// tab; without the condition, the rehash of the OLD password would overwrite the
	// new one and lock them out of an account they had just secured. With it, a
	// stale rehash matches no rows and nothing happens.
	UpdatePasswordSecret(ctx context.Context, arg UpdatePasswordSecretParams) (int64, error)
	// Deploy-on-push webhooks. See migration 00028.
	// A new secret replaces the old one outright, so regenerating is also how a
	// leaked secret is revoked.
	UpsertAppHook(ctx context.Context, arg UpsertAppHookParams) (AppHook, error)
	// Re-inviting replaces the pending invitation rather than adding a second one,
	// so the token in the older mail stops working. Two live tokens for one address
	// would mean revoking the invitation on screen leaves the other one usable.
	UpsertInvitation(ctx context.Context, arg UpsertInvitationParams) (uuid.UUID, error)
	// Platform-issued hostnames. Custom domains get their own queries when that
	// sub-project lands; keeping them in one file rather than in apps.sql is so
	// that apps.sql stays about apps.
	// Issues or reissues the platform hostname for an app.
	//
	// The conflict target is the partial index, so a second call for the same app
	// moves its hostname rather than adding one. A collision on the global host
	// index is a different conflict and is deliberately left to raise, because two
	// apps claiming one hostname is a real error, not something to paper over.
	//
	// The state is 'routed' because a name the platform issued needs no proof of
	// ownership; requiring proof would mean inventing a verification step for a
	// name we already control. verified follows from it and is not written here —
	// it is generated from state, so that the routing gate and the state on screen
	// cannot disagree.
	UpsertManagedDomain(ctx context.Context, arg UpsertManagedDomainParams) (Domain, error)
	UpsertMembership(ctx context.Context, arg UpsertMembershipParams) (Membership, error)
	// Returns an id and not the row. RETURNING * here would put the hash into a Go
	// struct for no reason at all, which is the shortest route to it being logged.
	UpsertPassword(ctx context.Context, arg UpsertPasswordParams) (uuid.UUID, error)
	// Users, sessions and credentials carry no owner_id: a person exists before they
	// belong to any team, and what proves who they are is not a fact about a tenant.
	// Memberships and invitations do, and stay scoped by it like everything else.
	UpsertUser(ctx context.Context, arg UpsertUserParams) (User, error)
	// Environment variables, one row each so a secret can be sealed while its
	// neighbour stays readable.
	// Upsert rather than insert: setting a variable that already exists is what a
	// person means by editing one, and a separate update path would need the
	// caller to know which case they are in.
	UpsertVariable(ctx context.Context, arg UpsertVariableParams) (Variable, error)
	UpsertVariableAndBump(ctx context.Context, arg UpsertVariableAndBumpParams) (UpsertVariableAndBumpRow, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AcceptInvitation

func (q *Queries) AcceptInvitation(ctx context.Context, tokenHash []byte) (AcceptInvitationRow, error)

One conditional UPDATE, like the magic link: checking first and writing after leaves a window in which the same invitation is accepted twice.

func (*Queries) AppendBuildLog

func (q *Queries) AppendBuildLog(ctx context.Context, arg AppendBuildLogParams) error

Appended rather than replaced, so a build streaming its output does not have to hold the whole log in memory to write any of it.

func (*Queries) CancelDeploymentOperation

func (q *Queries) CancelDeploymentOperation(ctx context.Context, arg CancelDeploymentOperationParams) (DeploymentOperation, error)

func (*Queries) ClaimDeploymentOperation

func (q *Queries) ClaimDeploymentOperation(ctx context.Context, arg ClaimDeploymentOperationParams) (DeploymentOperation, error)

func (*Queries) ClaimDomainsDueForCheck

func (q *Queries) ClaimDomainsDueForCheck(ctx context.Context, arg ClaimDomainsDueForCheckParams) ([]Domain, error)

Claims the domains whose next check is due, and leases them.

Two things at once, and both matter.

FOR UPDATE SKIP LOCKED is what lets the checker run on every replica without those replicas agreeing on anything: each takes rows nobody else holds, and a row already being worked on is skipped rather than waited for. The build reconciler is safe on several replicas for the same reason.

Pushing next_check_at forward in the same statement is what keeps the lock short. The alternative — holding the transaction open while the lookups run — would hold row locks for as long as DNS takes to answer, which is unbounded and occasionally seconds. Leasing instead means the claim is committed immediately and the network happens outside any transaction; a checker that dies mid-pass simply lets the lease expire, and the next pass picks the row up again.

func (*Queries) ClaimNextDeploymentOperation

func (q *Queries) ClaimNextDeploymentOperation(ctx context.Context, arg ClaimNextDeploymentOperationParams) (DeploymentOperation, error)

func (*Queries) ClaimRecoverableDeploymentOperation

func (q *Queries) ClaimRecoverableDeploymentOperation(ctx context.Context, arg ClaimRecoverableDeploymentOperationParams) (DeploymentOperation, error)

Applying and verifying are recovered from workload observation, never by the ordinary admission worker. The checkpoint tells this claimant which stage the dead worker had durably entered.

func (*Queries) ClearClusterJoin

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

func (*Queries) ClearPlatformRegistry

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

func (*Queries) ClearProjectPositions

func (q *Queries) ClearProjectPositions(ctx context.Context, arg ClearProjectPositionsParams) (int64, error)

Forget every saved position in a project, so the next render lays it out again from the dependencies.

func (q *Queries) ConsumeMagicLink(ctx context.Context, tokenHash []byte) (User, error)

Marking consumed and reading the user are one statement, so there is no window between the two in which a second request can also find the link unconsumed. Expiry is in the same condition for the same reason: a link that has just expired must fail here rather than in whatever checks it later.

func (*Queries) CountApps

func (q *Queries) CountApps(ctx context.Context, ownerID string) (int64, error)

func (*Queries) CountOwnersOfTeam

func (q *Queries) CountOwnersOfTeam(ctx context.Context, ownerID string) (int64, error)

func (*Queries) CountPendingReleaseBackfills

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

func (*Queries) CreateApp

func (q *Queries) CreateApp(ctx context.Context, arg CreateAppParams) (App, error)
func (q *Queries) CreateAppLink(ctx context.Context, arg CreateAppLinkParams) error

func (*Queries) CreateAppRelease

func (q *Queries) CreateAppRelease(ctx context.Context, arg CreateAppReleaseParams) (AppRelease, error)

Release snapshots are owner-scoped at every read and write, like every other resource. There is intentionally no update query: a release is a fact about a past deployment, not editable configuration.

func (*Queries) CreateBuild

func (q *Queries) CreateBuild(ctx context.Context, arg CreateBuildParams) (Build, error)

Builds. Owner-scoped in the row rather than through the deployment, because the log is readable output and the scoping has to be checkable in the query that reads it.

func (*Queries) CreateCustomDomain

func (q *Queries) CreateCustomDomain(ctx context.Context, arg CreateCustomDomainParams) (Domain, error)

---------------------------------------------------------- custom domains Claims a hostname for an app, unverified.

Deliberately not an upsert on host: the global unique index is what makes two teams claiming one name an error rather than a silent transfer, and papering over it here is exactly how a domain gets stolen.

next_check_at defaults to now(), so a claim is picked up by the checker on its next pass rather than waiting for somebody to press a button. That is the whole difference between this and what it replaced.

func (*Queries) CreateDeployment

func (q *Queries) CreateDeployment(ctx context.Context, arg CreateDeploymentParams) (Deployment, error)

func (*Queries) CreateDeploymentOperation

func (q *Queries) CreateDeploymentOperation(ctx context.Context, arg CreateDeploymentOperationParams) (DeploymentOperation, error)
func (q *Queries) CreateMagicLink(ctx context.Context, arg CreateMagicLinkParams) (MagicLink, error)

func (*Queries) CreateProject

func (q *Queries) CreateProject(ctx context.Context, arg CreateProjectParams) (Project, error)

Every query filters by owner_id, for the reason apps.sql gives: the scope is the check, not a duplicate of one.

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)

func (*Queries) CreateTeam

func (q *Queries) CreateTeam(ctx context.Context, arg CreateTeamParams) (Team, error)

func (*Queries) CreateTeamRow

func (q *Queries) CreateTeamRow(ctx context.Context, arg CreateTeamRowParams) (Team, error)

Every query filters by owner_id.

This is not defensive duplication of an application-level check — it is the check. A handler that forgets to scope produces no rows here rather than another owner's data, and sqlc makes the parameter impossible to omit because the generated signature requires it.

func (*Queries) CreateVolume

func (q *Queries) CreateVolume(ctx context.Context, arg CreateVolumeParams) (Volume, error)

Storage attached to an app. Scoped by owner_id like every other resource query: a handler that forgets to scope produces no rows here rather than another team's storage.

func (*Queries) CreateVolumeAndBump

func (q *Queries) CreateVolumeAndBump(ctx context.Context, arg CreateVolumeAndBumpParams) (CreateVolumeAndBumpRow, error)

func (*Queries) DeleteApp

func (q *Queries) DeleteApp(ctx context.Context, arg DeleteAppParams) error

func (*Queries) DeleteAppHook added in v0.2.0

func (q *Queries) DeleteAppHook(ctx context.Context, arg DeleteAppHookParams) (int64, error)

func (*Queries) DeleteCustomDomain

func (q *Queries) DeleteCustomDomain(ctx context.Context, arg DeleteCustomDomainParams) (int64, error)

func (*Queries) DeleteExpiredInvitations

func (q *Queries) DeleteExpiredInvitations(ctx context.Context) error
func (q *Queries) DeleteExpiredMagicLinks(ctx context.Context) error

func (*Queries) DeleteExpiredSessions

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

func (*Queries) DeleteInvitation

func (q *Queries) DeleteInvitation(ctx context.Context, arg DeleteInvitationParams) (int64, error)

Scoped by owner_id as well as id: an id from another team must not be reachable by someone who happens to administer this one.

func (*Queries) DeleteInvitationsByInviter

func (q *Queries) DeleteInvitationsByInviter(ctx context.Context, arg DeleteInvitationsByInviterParams) error

Withdraws the invitations somebody issued, used when they lose the authority to have issued them. An administrator who leaves must not keep a live token for an address they control.

func (*Queries) DeleteManagedDomain

func (q *Queries) DeleteManagedDomain(ctx context.Context, appID uuid.UUID) error

Releases an app's platform hostname.

Deleting rather than leaving the row is what makes the feature reversible: hostnames are globally unique, so a retired row keeps the name reserved against every other app forever.

func (*Queries) DeleteMembership

func (q *Queries) DeleteMembership(ctx context.Context, arg DeleteMembershipParams) error

func (*Queries) DeleteOtherSessionsForUser

func (q *Queries) DeleteOtherSessionsForUser(ctx context.Context, arg DeleteOtherSessionsForUserParams) error

Ends every session but the one asking.

DeleteSessionsForUser cannot serve here: it takes out the caller's own, so changing a password from the account page would sign the person out of the browser they are looking at, and they would read that as the change having failed rather than having worked. The surviving session is named `keep` rather than `except`, which is a reserved word the query parser will not take as an identifier.

func (*Queries) DeletePassword

func (q *Queries) DeletePassword(ctx context.Context, userID uuid.UUID) (int64, error)

execrows so that "there was nothing to remove" is distinguishable from success. Reporting a credential withdrawn when none existed is how somebody stops looking for the one that is still there.

func (*Queries) DeleteProject

func (q *Queries) DeleteProject(ctx context.Context, arg DeleteProjectParams) (int64, error)

func (*Queries) DeleteSessionByHash

func (q *Queries) DeleteSessionByHash(ctx context.Context, tokenHash []byte) error

func (*Queries) DeleteSessionsForUser

func (q *Queries) DeleteSessionsForUser(ctx context.Context, userID uuid.UUID) error

func (*Queries) DeleteVariable

func (q *Queries) DeleteVariable(ctx context.Context, arg DeleteVariableParams) (int64, error)

func (*Queries) DeleteVariableAndBump

func (q *Queries) DeleteVariableAndBump(ctx context.Context, arg DeleteVariableAndBumpParams) (DeleteVariableAndBumpRow, error)

func (*Queries) DeleteVolume

func (q *Queries) DeleteVolume(ctx context.Context, arg DeleteVolumeParams) (int64, error)

func (*Queries) DeleteVolumeAndBump

func (q *Queries) DeleteVolumeAndBump(ctx context.Context, arg DeleteVolumeAndBumpParams) (DeleteVolumeAndBumpRow, error)

func (*Queries) DeployActivity

func (q *Queries) DeployActivity(ctx context.Context, arg DeployActivityParams) ([]DeployActivityRow, error)

Deploys per day and outcome, for the overview chart.

Counted in the database rather than by reading rows and tallying them in Go: a busy month is thousands of deployments, and none of them are wanted here except as a number.

Days with no deploys are absent from this result. The caller fills them in; see app.DeployActivity for why that cannot be skipped.

func (*Queries) FailQueuedBuildOperation

func (q *Queries) FailQueuedBuildOperation(ctx context.Context, arg FailQueuedBuildOperationParams) (int64, error)

func (*Queries) FinishBuild

func (q *Queries) FinishBuild(ctx context.Context, arg FinishBuildParams) (Build, error)

func (*Queries) FinishDeployment

func (q *Queries) FinishDeployment(ctx context.Context, arg FinishDeploymentParams) (Deployment, error)

func (*Queries) FinishDeploymentOperation

func (q *Queries) FinishDeploymentOperation(ctx context.Context, arg FinishDeploymentOperationParams) (int64, error)

func (*Queries) GetApp

func (q *Queries) GetApp(ctx context.Context, arg GetAppParams) (App, error)

func (*Queries) GetAppByID

func (q *Queries) GetAppByID(ctx context.Context, arg GetAppByIDParams) (App, error)

func (*Queries) GetAppForReleaseBackfill

func (q *Queries) GetAppForReleaseBackfill(ctx context.Context, arg GetAppForReleaseBackfillParams) (App, error)

func (*Queries) GetAppHook added in v0.2.0

func (q *Queries) GetAppHook(ctx context.Context, arg GetAppHookParams) (AppHook, error)

func (*Queries) GetAppRelease

func (q *Queries) GetAppRelease(ctx context.Context, arg GetAppReleaseParams) (AppRelease, error)

func (*Queries) GetBuild

func (q *Queries) GetBuild(ctx context.Context, arg GetBuildParams) (Build, error)

func (*Queries) GetBuildForDeployment

func (q *Queries) GetBuildForDeployment(ctx context.Context, arg GetBuildForDeploymentParams) (Build, error)

func (*Queries) GetBuildRecoveryOperation

func (q *Queries) GetBuildRecoveryOperation(ctx context.Context, arg GetBuildRecoveryOperationParams) (DeploymentOperation, error)

func (*Queries) GetClusterJoin

func (q *Queries) GetClusterJoin(ctx context.Context) (ClusterJoin, error)

The join settings are install-wide, so unlike every other query here these take no owner_id. See the 00012 migration for why.

func (*Queries) GetCustomDomain

func (q *Queries) GetCustomDomain(ctx context.Context, arg GetCustomDomainParams) (Domain, error)

func (*Queries) GetDeployment

func (q *Queries) GetDeployment(ctx context.Context, arg GetDeploymentParams) (Deployment, error)

func (*Queries) GetDeploymentOperation

func (q *Queries) GetDeploymentOperation(ctx context.Context, arg GetDeploymentOperationParams) (DeploymentOperation, error)

func (*Queries) GetDeploymentOperationByDeployment

func (q *Queries) GetDeploymentOperationByDeployment(ctx context.Context, arg GetDeploymentOperationByDeploymentParams) (DeploymentOperation, error)

func (*Queries) GetHookForDelivery added in v0.2.0

func (q *Queries) GetHookForDelivery(ctx context.Context, appID uuid.UUID) (GetHookForDeliveryRow, error)

By app id alone: a delivery carries no session and no owner. The signature, checked against the secret read here, is what authorises it.

func (*Queries) GetInvitationByHash

func (q *Queries) GetInvitationByHash(ctx context.Context, tokenHash []byte) (GetInvitationByHashRow, error)

Reads an invitation without spending it, so a signed-out visitor can be sent a sign-in link to the address it names. token_hash is not among the columns, for the same reason it is absent from ListPendingInvitations.

func (*Queries) GetLatestSuccessfulBuildForApp

func (q *Queries) GetLatestSuccessfulBuildForApp(ctx context.Context, arg GetLatestSuccessfulBuildForAppParams) (Build, error)

func (*Queries) GetLiveDeploymentOperationForApp

func (q *Queries) GetLiveDeploymentOperationForApp(ctx context.Context, arg GetLiveDeploymentOperationForAppParams) (DeploymentOperation, error)

The live operation is the only candidate allowed to displace an app's active release. Steady-state convergence must stand down while one exists.

func (*Queries) GetLiveSession

func (q *Queries) GetLiveSession(ctx context.Context, id uuid.UUID) (GetLiveSessionRow, error)

--------------------------------------------------------------------------- Step-up and session revocation --------------------------------------------------------------------------- Reads a session that is still alive, for a caller about to change how the account it belongs to can be signed in to.

GetSession has no expiry filter, so an expired row comes back from it looking valid. GetSessionByHash filters expiry in SQL precisely so that a caller cannot forget, and this is the caller that would: a session that ended an hour ago must not be able to set a password. FOR UPDATE serialises two tabs changing one at the same moment.

Columns are named because the row exists to answer three questions — whose it is, how recently it was proved, whether it is still alive — and starring it would hand the caller a struct that grows every time `sessions` does.

func (*Queries) GetManagedDomain

func (q *Queries) GetManagedDomain(ctx context.Context, appID uuid.UUID) (Domain, error)

func (*Queries) GetMembership

func (q *Queries) GetMembership(ctx context.Context, arg GetMembershipParams) (Membership, error)

func (*Queries) GetPasswordByEmail

func (q *Queries) GetPasswordByEmail(ctx context.Context, email string) (GetPasswordByEmailRow, error)

--------------------------------------------------------------------------- Passwords

Every query below either names its columns or returns an id. `secret` appears in two of them — the sign-in lookup and the locking read that a change or a removal goes through — and both row types are consumed inside the account package and never returned from it. That is the whole storage rule, and it is easier to keep by making the leak impossible than by remembering not to write it. Anything added here that does not need the hash must not select it. --------------------------------------------------------------------------- The only query that returns a hash, and the only one that ever should.

The join is INNER, so an unknown address and a known address with no password come back as the same pgx.ErrNoRows. There is no branch in Go that could tell them apart, which is what makes the equal-cost verify in AuthenticatePassword structural rather than something a caller has to remember to write.

The user's columns are named rather than starred, so this cannot quietly start returning whatever is added to `users` next.

func (*Queries) GetPlatformDNS

func (q *Queries) GetPlatformDNS(ctx context.Context) (PlatformDn, error)

Install-wide DNS settings. No owner_id, for the reason cluster_join has none: they configure one controller shared by every team.

func (*Queries) GetPlatformRegistry

func (q *Queries) GetPlatformRegistry(ctx context.Context) (PlatformRegistry, error)

The install's image registry. No owner_id, for the reason platform_dns has none: one registry serves every team's builds.

func (*Queries) GetProjectByID

func (q *Queries) GetProjectByID(ctx context.Context, arg GetProjectByIDParams) (Project, error)

func (*Queries) GetProjectBySlug

func (q *Queries) GetProjectBySlug(ctx context.Context, arg GetProjectBySlugParams) (Project, error)

func (*Queries) GetReleaseBackfillState

func (q *Queries) GetReleaseBackfillState(ctx context.Context, arg GetReleaseBackfillStateParams) (AppReleaseBackfill, error)

func (*Queries) GetSession

func (q *Queries) GetSession(ctx context.Context, id uuid.UUID) (Session, error)

Expiry is filtered here for the reason GetSessionByHash gives: so that an expired row can never be treated as valid by a caller that forgets to check. This one used to be the caller that forgot. It was not reachable with a dead session — the route gate resolves a live one first — but "not reachable" is a property of today's routing rather than of this query, and the whole point of putting the condition in SQL is that it does not depend on that.

func (*Queries) GetSessionByHash

func (q *Queries) GetSessionByHash(ctx context.Context, tokenHash []byte) (GetSessionByHashRow, error)

The team is joined in because the request that carries this cookie needs the owner it resolves to, and a second round trip per request buys nothing. The join is LEFT: a session whose team was deleted still exists, it just has no owner to act as.

Expiry is filtered in SQL rather than in Go so that an expired row can never be treated as valid by a caller that forgets to check. Resolves a session only while the membership behind it still exists.

The join to memberships is the security boundary, not decoration. Revoking sessions imperatively when someone is removed would work only for the call sites that remember to do it, and would still miss membership lost by cascade. Joining makes a departed member's cookie stop resolving the instant the row goes, by whatever route it went.

INNER JOIN on teams too: a session with no active team resolves to no owner, and returning a row the caller must then remember to reject is how that check gets skipped.

func (*Queries) GetSuccessfulBuildForImage

func (q *Queries) GetSuccessfulBuildForImage(ctx context.Context, arg GetSuccessfulBuildForImageParams) (Build, error)

func (*Queries) GetTeam

func (q *Queries) GetTeam(ctx context.Context, id string) (Team, error)

func (*Queries) GetTeamRow

func (q *Queries) GetTeamRow(ctx context.Context, id string) (Team, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id uuid.UUID) (User, error)

func (*Queries) GetVariable

func (q *Queries) GetVariable(ctx context.Context, arg GetVariableParams) (Variable, error)

func (*Queries) GetVolume

func (q *Queries) GetVolume(ctx context.Context, arg GetVolumeParams) (Volume, error)

func (*Queries) GrowVolume

func (q *Queries) GrowVolume(ctx context.Context, arg GrowVolumeParams) (int64, error)

Expansion only, enforced in the WHERE clause rather than by reading the row and comparing in Go: a check the caller performs is one a caller can skip, and Kubernetes cannot shrink a claim afterwards to undo it.

func (*Queries) GrowVolumeAndBump

func (q *Queries) GrowVolumeAndBump(ctx context.Context, arg GrowVolumeAndBumpParams) (GrowVolumeAndBumpRow, error)

func (*Queries) HasPassword

func (q *Queries) HasPassword(ctx context.Context, userID uuid.UUID) (bool, error)

func (*Queries) HasVerifiedDomainsForApp

func (q *Queries) HasVerifiedDomainsForApp(ctx context.Context, arg HasVerifiedDomainsForAppParams) (bool, error)

func (*Queries) IncrementAppConfigVersion

func (q *Queries) IncrementAppConfigVersion(ctx context.Context, arg IncrementAppConfigVersionParams) (int64, error)

func (*Queries) IncrementCNAMEAppConfigVersions

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

The platform CNAME target is an install-wide live overlay, but it only renders into apps that explicitly opted into CNAME routing.

func (*Queries) IncrementGitAppConfigVersions

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

Registry credentials are a live overlay for every Git-built image. They are install-wide, so one settings mutation invalidates each Git app exactly once without manufacturing release history.

func (*Queries) ListAdmissiblePushes added in v0.2.0

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

Pushes waiting behind a deploy that has since ended. An app whose deploy is still live is left out, rather than tried and refused every half second.

func (q *Queries) ListAppLinks(ctx context.Context, ownerID string) ([]ListAppLinksRow, error)

func (*Queries) ListAppReleases

func (q *Queries) ListAppReleases(ctx context.Context, arg ListAppReleasesParams) ([]AppRelease, error)

func (*Queries) ListApps

func (q *Queries) ListApps(ctx context.Context, ownerID string) ([]App, error)

func (*Queries) ListAppsForReconciliation

func (q *Queries) ListAppsForReconciliation(ctx context.Context) ([]App, error)

Apps whose database pointer names the workload the cluster must converge to. This is intentionally install-scoped: the reconciler acts from stored ownership rather than from an authenticated request.

func (*Queries) ListAppsInProject

func (q *Queries) ListAppsInProject(ctx context.Context, arg ListAppsInProjectParams) ([]App, error)

func (*Queries) ListAppsWithLastDeploy

func (q *Queries) ListAppsWithLastDeploy(ctx context.Context, ownerID string) ([]ListAppsWithLastDeployRow, error)

Every app, with how its most recent deployment ended.

A failed deploy leaves the previous workload running, so the app's live status stays green and nothing in a list of apps says the last attempt to change it did not take. That is exactly the deploy somebody needs to find, and until this query existed the only way to find it was to open each app.

LATERAL rather than a window function or a join on max(started_at): one index lookup per app, and it reads as what it is — the latest row for this app.

func (*Queries) ListAppsWithoutProject

func (q *Queries) ListAppsWithoutProject(ctx context.Context, ownerID string) ([]App, error)

Apps that predate projects, or whose project was deleted.

Returned separately rather than folded into a default project by the query, because assigning one is a write and a read should not have side effects that a caller cannot see.

func (*Queries) ListCustomDomains

func (q *Queries) ListCustomDomains(ctx context.Context, arg ListCustomDomainsParams) ([]Domain, error)

func (*Queries) ListCustomDomainsForOwner

func (q *Queries) ListCustomDomainsForOwner(ctx context.Context, ownerID string) ([]ListCustomDomainsForOwnerRow, error)

Every custom domain on the install, worst first.

Nothing answered "which domains are stuck" before this. A domain that is not routed is the only kind anybody needs to find, so it sorts to the top.

func (*Queries) ListDeploymentOperations

func (q *Queries) ListDeploymentOperations(ctx context.Context, arg ListDeploymentOperationsParams) ([]DeploymentOperation, error)

func (*Queries) ListDeployments

func (q *Queries) ListDeployments(ctx context.Context, arg ListDeploymentsParams) ([]Deployment, error)

func (*Queries) ListDomainsByApp

func (q *Queries) ListDomainsByApp(ctx context.Context, appID uuid.UUID) ([]Domain, error)

func (*Queries) ListMembersOfTeam

func (q *Queries) ListMembersOfTeam(ctx context.Context, ownerID string) ([]ListMembersOfTeamRow, error)

func (*Queries) ListMembershipsForUser

func (q *Queries) ListMembershipsForUser(ctx context.Context, userID uuid.UUID) ([]ListMembershipsForUserRow, error)

func (*Queries) ListPendingInvitations

func (q *Queries) ListPendingInvitations(ctx context.Context, ownerID string) ([]ListPendingInvitationsRow, error)

The columns are named rather than starred, and token_hash is not among them. This list feeds the team page, and a hash that never leaves the database cannot be rendered into it by a template that innocently prints a struct.

func (*Queries) ListPendingReleaseBackfills

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

func (*Queries) ListProjects

func (q *Queries) ListProjects(ctx context.Context, ownerID string) ([]ListProjectsRow, error)

func (*Queries) ListRecentDeployments

func (q *Queries) ListRecentDeployments(ctx context.Context, arg ListRecentDeploymentsParams) ([]ListRecentDeploymentsRow, error)

Joined to apps so the activity feed can name the workload without a second round trip per row. The join is on app_id AND owner_id: joining on app_id alone would be correct today and wrong the moment more than one owner exists.

func (*Queries) ListRunningBuilds

func (q *Queries) ListRunningBuilds(ctx context.Context) ([]Build, error)

Every build still claiming to run, oldest first. Not owner-scoped: this feeds the reconciler, which is the platform settling its own records rather than a team reading theirs.

func (*Queries) ListVariablesForApp

func (q *Queries) ListVariablesForApp(ctx context.Context, appID uuid.UUID) ([]Variable, error)

func (*Queries) ListVolumesForApp

func (q *Queries) ListVolumesForApp(ctx context.Context, appID uuid.UUID) ([]Volume, error)

func (*Queries) LockDeploymentAdmission

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

Claim counting and selection must share this transaction-wide lock. Row locks alone protect candidates, not the cluster-wide count: two connections can otherwise lock different rows after both observed one free build slot.

func (*Queries) LockPassword

func (q *Queries) LockPassword(ctx context.Context, userID uuid.UUID) (LockPasswordRow, error)

Reads and locks the person's password, for a caller inside a transaction that is about to replace or remove it.

Returns the secret as well as the id because one row answers two questions the caller needs at the same moment: whether this is an add or a replace, since only a replace revokes the person's other sessions, and whether a current password offered as proof of recent authentication is the right one. Asking twice would be two round trips and one more chance for the second to read a different row than the first.

FOR UPDATE is what serialises two tabs. Read outside the transaction this would be check-then-act: both see no password, both insert, one upserts over the other, and neither revokes.

func (*Queries) LockTeam

func (q *Queries) LockTeam(ctx context.Context, id string) (Team, error)

A role change reads the owner count and then writes; taking the team row first serialises those pairs, so two concurrent demotions cannot both see two owners and both proceed.

func (*Queries) MarkDomainRouted

func (q *Queries) MarkDomainRouted(ctx context.Context, id uuid.UUID) (int64, error)

Moves a proven domain to routed, once the Ingress actually carries it.

Guarded on the state it is coming from, so a check that has since found drift is not overwritten by an apply that started before it.

func (*Queries) MarkHookPending added in v0.2.0

func (q *Queries) MarkHookPending(ctx context.Context, arg MarkHookPendingParams) error

func (*Queries) MarkVerifiedDomainsRoutedForApp

func (q *Queries) MarkVerifiedDomainsRoutedForApp(ctx context.Context, arg MarkVerifiedDomainsRoutedForAppParams) (int64, error)

A verified domain becomes routed only after the app reconciler has observed or produced the matching workload convergence key. This app-scoped form closes the asynchronous handoff from the DNS checker.

func (*Queries) MoveAppsWithoutProject

func (q *Queries) MoveAppsWithoutProject(ctx context.Context, arg MoveAppsWithoutProjectParams) (int64, error)

func (*Queries) NormalizeLegacyDeploymentStatuses

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

func (*Queries) ReclaimExpiredDeploymentOperations

func (q *Queries) ReclaimExpiredDeploymentOperations(ctx context.Context) ([]DeploymentOperation, error)

func (*Queries) RecordDomainCheck

func (q *Queries) RecordDomainCheck(ctx context.Context, arg RecordDomainCheckParams) (int64, error)

Records what a check saw.

Not scoped by owner, and deliberately: the background checker works through every install's rows by id, having already claimed them below. Owner scoping protects a request that names a row; this is not one. Every path that reaches here from a request goes through GetCustomDomain first, which is scoped.

The schedule arrives already computed rather than being worked out in SQL, so the backoff can be tested against an injected clock instead of against now().

func (*Queries) RecordHookDelivery added in v0.2.0

func (q *Queries) RecordHookDelivery(ctx context.Context, arg RecordHookDeliveryParams) error

func (*Queries) RecoverBuiltDeploymentOperation

func (q *Queries) RecoverBuiltDeploymentOperation(ctx context.Context, arg RecoverBuiltDeploymentOperationParams) (DeploymentOperation, error)

func (*Queries) ReleaseRecoverableDeploymentOperation

func (q *Queries) ReleaseRecoverableDeploymentOperation(ctx context.Context, arg ReleaseRecoverableDeploymentOperationParams) (int64, error)

A cluster outage is not a deployment failure. Give observation recovery back to the queue without changing its checkpoint or verification budget.

func (*Queries) RenameProject

func (q *Queries) RenameProject(ctx context.Context, arg RenameProjectParams) (Project, error)

func (*Queries) RenewDeploymentOperationLease

func (q *Queries) RenewDeploymentOperationLease(ctx context.Context, arg RenewDeploymentOperationLeaseParams) (int64, error)
func (q *Queries) ReplaceAppLinks(ctx context.Context, arg ReplaceAppLinksParams) error

func (*Queries) RequestDomainCheck

func (q *Queries) RequestDomainCheck(ctx context.Context, arg RequestDomainCheckParams) (int64, error)

Brings a domain's next check forward. What the "Check now" button does.

It resets the attempt count as well, because somebody pressing it is telling us the situation changed — and a domain that had backed off to a fifteen minute interval should not go straight back to one.

func (*Queries) RestoreAppFromRelease

func (q *Queries) RestoreAppFromRelease(ctx context.Context, arg RestoreAppFromReleaseParams) (App, error)

Rollback makes the app's desired state the release's again, so the next edit builds on what is running rather than quietly rolling forward to what was replaced. Only release-owned fields: hostnames, networking, storage and the repository are current state and stay as they are. The uid is a build's discovery for a Git app, and belongs to the image being restored.

func (*Queries) RoutableHostsForApp

func (q *Queries) RoutableHostsForApp(ctx context.Context, appID uuid.UUID) ([]string, error)

Hostnames that may actually be routed to.

A managed host is routable because the platform issued it; a custom one only once it is proven. This is the query the Ingress is built from, so the gate lives here rather than in a caller that might forget it.

func (*Queries) SetActiveRelease

func (q *Queries) SetActiveRelease(ctx context.Context, arg SetActiveReleaseParams) (int64, error)

func (*Queries) SetAppHealth

func (q *Queries) SetAppHealth(ctx context.Context, arg SetAppHealthParams) (App, error)

func (*Queries) SetAppImage

func (q *Queries) SetAppImage(ctx context.Context, arg SetAppImageParams) (App, error)

The image a build produced. Separate from UpdateApp because a build sets only this: the replicas and limits a person configured are not a build's to overwrite, and passing them through would make every build a chance to.

func (*Queries) SetAppNetworking

func (q *Queries) SetAppNetworking(ctx context.Context, arg SetAppNetworkingParams) (int64, error)

func (*Queries) SetAppPosition

func (q *Queries) SetAppPosition(ctx context.Context, arg SetAppPositionParams) (int64, error)

func (*Queries) SetAppProject

func (q *Queries) SetAppProject(ctx context.Context, arg SetAppProjectParams) (int64, error)

func (*Queries) SetAppReplicas

func (q *Queries) SetAppReplicas(ctx context.Context, arg SetAppReplicasParams) (App, error)

func (*Queries) SetAppRunAsUser

func (q *Queries) SetAppRunAsUser(ctx context.Context, arg SetAppRunAsUserParams) error

Recorded by a build, which is the only thing that can discover it. The image update owns the build operation's single config_version increment.

func (*Queries) SetBuildJob

func (q *Queries) SetBuildJob(ctx context.Context, arg SetBuildJobParams) error

func (*Queries) SetClaimedOperationRelease

func (q *Queries) SetClaimedOperationRelease(ctx context.Context, arg SetClaimedOperationReleaseParams) (int64, error)

func (*Queries) SetClusterJoin

func (q *Queries) SetClusterJoin(ctx context.Context, arg SetClusterJoinParams) (ClusterJoin, error)

func (*Queries) SetDeploymentRelease

func (q *Queries) SetDeploymentRelease(ctx context.Context, arg SetDeploymentReleaseParams) (int64, error)

func (*Queries) SetPlatformDNS

func (q *Queries) SetPlatformDNS(ctx context.Context, arg SetPlatformDNSParams) (PlatformDn, error)

func (*Queries) SetPlatformRegistry

func (q *Queries) SetPlatformRegistry(ctx context.Context, arg SetPlatformRegistryParams) (PlatformRegistry, error)

func (*Queries) SetReleaseBackfillState

func (q *Queries) SetReleaseBackfillState(ctx context.Context, arg SetReleaseBackfillStateParams) (int64, error)

func (*Queries) SetSessionTeam

func (q *Queries) SetSessionTeam(ctx context.Context, arg SetSessionTeamParams) error

func (*Queries) TakeHookPending added in v0.2.0

func (q *Queries) TakeHookPending(ctx context.Context, appID uuid.UUID) (int64, error)

Cleared in the same transaction that admits the deploy, so a push is either still waiting or has a deployment — never neither.

func (*Queries) TouchSessionAuthentication

func (q *Queries) TouchSessionAuthentication(ctx context.Context, id uuid.UUID) (int64, error)

Opens the step-up window. Scoped by expiry so an expired session cannot be revived into a recently-authenticated one; execrows so the caller can tell that it was not.

func (*Queries) TransitionDeploymentOperation

func (q *Queries) TransitionDeploymentOperation(ctx context.Context, arg TransitionDeploymentOperationParams) (DeploymentOperation, error)

func (*Queries) UpdateApp

func (q *Queries) UpdateApp(ctx context.Context, arg UpdateAppParams) (App, error)

Everything about an app a person is allowed to change after creating it.

Deliberately not replicas: scaling has its own query because it has its own rule about storage, and folding it in here would make every settings save a chance to silently reset a scale somebody had chosen.

Nor the health probe, the networking toggles or run_as_user — each of those already has a query shaped to what it means, and this one exists for the fields that had no way to be changed at all.

func (*Queries) UpdatePasswordSecret

func (q *Queries) UpdatePasswordSecret(ctx context.Context, arg UpdatePasswordSecretParams) (int64, error)

Rehash-on-login, for a stored hash made at a cost this build has moved past. Best effort and never on the critical path: the sign-in has already succeeded by the time this runs.

Conditional on the old value, which makes it a compare-and-swap. Between the verify and this update the person may have changed their password in another tab; without the condition, the rehash of the OLD password would overwrite the new one and lock them out of an account they had just secured. With it, a stale rehash matches no rows and nothing happens.

func (*Queries) UpsertAppHook added in v0.2.0

func (q *Queries) UpsertAppHook(ctx context.Context, arg UpsertAppHookParams) (AppHook, error)

Deploy-on-push webhooks. See migration 00028. A new secret replaces the old one outright, so regenerating is also how a leaked secret is revoked.

func (*Queries) UpsertInvitation

func (q *Queries) UpsertInvitation(ctx context.Context, arg UpsertInvitationParams) (uuid.UUID, error)

Re-inviting replaces the pending invitation rather than adding a second one, so the token in the older mail stops working. Two live tokens for one address would mean revoking the invitation on screen leaves the other one usable.

func (*Queries) UpsertManagedDomain

func (q *Queries) UpsertManagedDomain(ctx context.Context, arg UpsertManagedDomainParams) (Domain, error)

Platform-issued hostnames. Custom domains get their own queries when that sub-project lands; keeping them in one file rather than in apps.sql is so that apps.sql stays about apps. Issues or reissues the platform hostname for an app.

The conflict target is the partial index, so a second call for the same app moves its hostname rather than adding one. A collision on the global host index is a different conflict and is deliberately left to raise, because two apps claiming one hostname is a real error, not something to paper over.

The state is 'routed' because a name the platform issued needs no proof of ownership; requiring proof would mean inventing a verification step for a name we already control. verified follows from it and is not written here — it is generated from state, so that the routing gate and the state on screen cannot disagree.

func (*Queries) UpsertMembership

func (q *Queries) UpsertMembership(ctx context.Context, arg UpsertMembershipParams) (Membership, error)

func (*Queries) UpsertPassword

func (q *Queries) UpsertPassword(ctx context.Context, arg UpsertPasswordParams) (uuid.UUID, error)

Returns an id and not the row. RETURNING * here would put the hash into a Go struct for no reason at all, which is the shortest route to it being logged.

func (*Queries) UpsertUser

func (q *Queries) UpsertUser(ctx context.Context, arg UpsertUserParams) (User, error)

Users, sessions and credentials carry no owner_id: a person exists before they belong to any team, and what proves who they are is not a fact about a tenant. Memberships and invitations do, and stay scoped by it like everything else.

func (*Queries) UpsertVariable

func (q *Queries) UpsertVariable(ctx context.Context, arg UpsertVariableParams) (Variable, error)

Environment variables, one row each so a secret can be sealed while its neighbour stays readable. Upsert rather than insert: setting a variable that already exists is what a person means by editing one, and a separate update path would need the caller to know which case they are in.

func (*Queries) UpsertVariableAndBump

func (q *Queries) UpsertVariableAndBump(ctx context.Context, arg UpsertVariableAndBumpParams) (UpsertVariableAndBumpRow, error)

func (*Queries) WithTx

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

type RecordDomainCheckParams

type RecordDomainCheckParams struct {
	State         string
	Observed      string
	LastError     string
	CheckedAt     pgtype.Timestamptz
	NextCheckAt   time.Time
	CheckAttempts int32
	ID            uuid.UUID
}

type RecordHookDeliveryParams added in v0.2.0

type RecordHookDeliveryParams struct {
	Result string
	AppID  uuid.UUID
}

type RecoverBuiltDeploymentOperationParams

type RecoverBuiltDeploymentOperationParams struct {
	ReleaseID     pgtype.UUID
	LeaseDuration pgtype.Interval
	OwnerID       string
	DeploymentID  uuid.UUID
}

type ReleaseRecoverableDeploymentOperationParams

type ReleaseRecoverableDeploymentOperationParams struct {
	OwnerID        string
	ID             uuid.UUID
	ExpectedStatus string
	ClaimToken     pgtype.UUID
}

type RenameProjectParams

type RenameProjectParams struct {
	OwnerID string
	ID      uuid.UUID
	Name    string
}

type RenewDeploymentOperationLeaseParams

type RenewDeploymentOperationLeaseParams struct {
	LeaseDuration pgtype.Interval
	OwnerID       string
	ID            uuid.UUID
	ClaimToken    pgtype.UUID
}

type ReplaceAppLinksParams

type ReplaceAppLinksParams struct {
	FromAppID uuid.UUID
	ViaKey    string
}

type RequestDomainCheckParams

type RequestDomainCheckParams struct {
	Due     time.Time
	OwnerID string
	ID      uuid.UUID
}

type RestoreAppFromReleaseParams

type RestoreAppFromReleaseParams struct {
	OwnerID   string
	AppID     uuid.UUID
	ReleaseID uuid.UUID
}

type Session

type Session struct {
	ID              uuid.UUID
	UserID          uuid.UUID
	TokenHash       []byte
	ActiveTeamID    *string
	UserAgent       string
	Ip              string
	ExpiresAt       time.Time
	CreatedAt       time.Time
	AuthenticatedAt time.Time
}

type SetActiveReleaseParams

type SetActiveReleaseParams struct {
	ReleaseID pgtype.UUID
	OwnerID   string
	AppID     uuid.UUID
}

type SetAppHealthParams

type SetAppHealthParams struct {
	HealthPath     string
	HealthLiveness bool
	OwnerID        string
	ID             uuid.UUID
}

type SetAppImageParams

type SetAppImageParams struct {
	OwnerID string
	ID      uuid.UUID
	Image   string
}

type SetAppNetworkingParams

type SetAppNetworkingParams struct {
	HttpsOnly bool
	CnameOnly bool
	OwnerID   string
	Name      string
}

type SetAppPositionParams

type SetAppPositionParams struct {
	OwnerID string
	Name    string
	CanvasX *int32
	CanvasY *int32
}

type SetAppProjectParams

type SetAppProjectParams struct {
	OwnerID   string
	ID        uuid.UUID
	ProjectID pgtype.UUID
}

type SetAppReplicasParams

type SetAppReplicasParams struct {
	OwnerID  string
	ID       uuid.UUID
	Replicas int32
}

type SetAppRunAsUserParams

type SetAppRunAsUserParams struct {
	RunAsUser int64
	OwnerID   string
	ID        uuid.UUID
}

type SetBuildJobParams

type SetBuildJobParams struct {
	JobName string
	ID      uuid.UUID
}

type SetClaimedOperationReleaseParams

type SetClaimedOperationReleaseParams struct {
	ReleaseID      pgtype.UUID
	OwnerID        string
	ID             uuid.UUID
	ExpectedStatus string
	ClaimToken     pgtype.UUID
}

type SetClusterJoinParams

type SetClusterJoinParams struct {
	ServerUrl   string
	TokenSealed []byte
	UpdatedBy   pgtype.UUID
}

type SetDeploymentReleaseParams

type SetDeploymentReleaseParams struct {
	ReleaseID    pgtype.UUID
	OwnerID      string
	DeploymentID uuid.UUID
}

type SetPlatformDNSParams

type SetPlatformDNSParams struct {
	CnameTarget string
	TxtPrefix   string
}

type SetPlatformRegistryParams

type SetPlatformRegistryParams struct {
	Host           string
	Repository     string
	Username       string
	PasswordSealed []byte
	Insecure       bool
	UpdatedBy      pgtype.UUID
}

type SetReleaseBackfillStateParams

type SetReleaseBackfillStateParams struct {
	State     string
	LastError string
	OwnerID   string
	AppID     uuid.UUID
}

type SetSessionTeamParams

type SetSessionTeamParams struct {
	ActiveTeamID *string
	ID           uuid.UUID
}

type Team

type Team struct {
	ID          string
	DisplayName string
	Email       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type TransitionDeploymentOperationParams

type TransitionDeploymentOperationParams struct {
	NextStatus     string
	OwnerID        string
	ID             uuid.UUID
	ExpectedStatus string
	ClaimToken     pgtype.UUID
}

type UpdateAppParams

type UpdateAppParams struct {
	Image         string
	Port          int32
	CpuRequest    string
	CpuLimit      string
	MemoryRequest string
	MemoryLimit   string
	Internal      bool
	RepoUrl       string
	RepoBranch    string
	RepoSubdir    string
	OwnerID       string
	ID            uuid.UUID
}

type UpdatePasswordSecretParams

type UpdatePasswordSecretParams struct {
	Secret    string
	UserID    uuid.UUID
	OldSecret string
}

type UpsertAppHookParams added in v0.2.0

type UpsertAppHookParams struct {
	AppID   uuid.UUID
	OwnerID string
	Secret  []byte
}

type UpsertInvitationParams

type UpsertInvitationParams struct {
	OwnerID   string
	Email     string
	Role      string
	TokenHash []byte
	InvitedBy uuid.UUID
	ExpiresAt time.Time
}

type UpsertManagedDomainParams

type UpsertManagedDomainParams struct {
	OwnerID string
	AppID   uuid.UUID
	Host    string
	Tls     bool
}

type UpsertMembershipParams

type UpsertMembershipParams struct {
	UserID  uuid.UUID
	OwnerID string
	Role    string
}

type UpsertPasswordParams

type UpsertPasswordParams struct {
	UserID uuid.UUID
	Secret string
}

type UpsertUserParams

type UpsertUserParams struct {
	Email       string
	DisplayName string
}

type UpsertVariableAndBumpParams

type UpsertVariableAndBumpParams struct {
	OwnerID string
	AppID   uuid.UUID
	Key     string
	Value   string
	Sealed  []byte
	Secret  bool
}

type UpsertVariableAndBumpRow

type UpsertVariableAndBumpRow struct {
	ID            uuid.UUID
	OwnerID       string
	AppID         uuid.UUID
	Key           string
	Value         string
	Sealed        []byte
	Secret        bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
	ConfigVersion int64
}

type UpsertVariableParams

type UpsertVariableParams struct {
	OwnerID string
	AppID   uuid.UUID
	Key     string
	Value   string
	Sealed  []byte
	Secret  bool
}

type User

type User struct {
	ID            uuid.UUID
	Email         string
	DisplayName   string
	TotpSecret    *string
	TotpConfirmed bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type UserCredential

type UserCredential struct {
	ID        uuid.UUID
	UserID    uuid.UUID
	Kind      string
	Secret    string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Variable

type Variable struct {
	ID        uuid.UUID
	OwnerID   string
	AppID     uuid.UUID
	Key       string
	Value     string
	Sealed    []byte
	Secret    bool
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Volume

type Volume struct {
	ID        uuid.UUID
	OwnerID   string
	AppID     uuid.UUID
	Name      string
	MountPath string
	SizeBytes int64
	Class     string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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