Documentation
¶
Index ¶
- type AppUser
- type AuditLog
- type AutoPauseScheduleParams
- type ClearScheduleOverridesParams
- type CreateUserParams
- type DBTX
- type DeleteMissingSkillsParams
- type DeleteRepoConnectionParams
- type DeleteSecretParams
- type DeleteUserIfNotLastParams
- type DeleteUserParams
- type DisableMissingSchedulesParams
- type FinalizeRunParams
- type GetRepoConnectionByOwnerNameParams
- type GetRunForAdminRow
- type GetRunForContextRow
- type GetRunWritebackConfigRow
- type GetScheduleAutoPauseConfigRow
- type GetScheduleForTriggerRow
- type GetSecretByNameParams
- type GetUserRoleParams
- type InsertAuditLogParams
- type InsertRepoConnectionParams
- type InsertRunEventParams
- type InsertRunParams
- type InsertRunRow
- type ListAuditLogByOrgParams
- type ListDueSchedulesWithShaRow
- type ListRecentTerminalScheduledRunsParams
- type ListRunEventsSinceParams
- type ListRunsForOrgParams
- type ListRunsForOrgRow
- type ListRunsForScheduleParams
- type ListRunsForScheduleRow
- type ListSchedulesByOrgRow
- type ListSecretNamesRow
- type ListSkillsByOrgRow
- type MarkRepoSyncErrorParams
- type MarkRepoSyncedOKParams
- type Organization
- type Queries
- func (q *Queries) AutoPauseSchedule(ctx context.Context, arg AutoPauseScheduleParams) (int64, error)
- func (q *Queries) ClearScheduleOverrides(ctx context.Context, arg ClearScheduleOverridesParams) (Schedule, error)
- func (q *Queries) CountAdmins(ctx context.Context, orgID pgtype.UUID) (int64, error)
- func (q *Queries) CountAuditLogByOrg(ctx context.Context, orgID pgtype.UUID) (int64, error)
- func (q *Queries) CountUsers(ctx context.Context, orgID pgtype.UUID) (int64, error)
- func (q *Queries) CreateOrganization(ctx context.Context, name string) (Organization, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (AppUser, error)
- func (q *Queries) DeleteMissingSkills(ctx context.Context, arg DeleteMissingSkillsParams) error
- func (q *Queries) DeleteRepoConnection(ctx context.Context, arg DeleteRepoConnectionParams) (int64, error)
- func (q *Queries) DeleteRun(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) DeleteSecret(ctx context.Context, arg DeleteSecretParams) (int64, error)
- func (q *Queries) DeleteUser(ctx context.Context, arg DeleteUserParams) (int64, error)
- func (q *Queries) DeleteUserIfNotLast(ctx context.Context, arg DeleteUserIfNotLastParams) (int64, error)
- func (q *Queries) DisableMissingSchedules(ctx context.Context, arg DisableMissingSchedulesParams) error
- func (q *Queries) FinalizeRun(ctx context.Context, arg FinalizeRunParams) (Run, error)
- func (q *Queries) GetFirstOrganization(ctx context.Context) (Organization, error)
- func (q *Queries) GetRepoConnection(ctx context.Context, id pgtype.UUID) (RepoConnection, error)
- func (q *Queries) GetRepoConnectionByOwnerName(ctx context.Context, arg GetRepoConnectionByOwnerNameParams) (RepoConnection, error)
- func (q *Queries) GetRun(ctx context.Context, id pgtype.UUID) (Run, error)
- func (q *Queries) GetRunForAdmin(ctx context.Context, id pgtype.UUID) (GetRunForAdminRow, error)
- func (q *Queries) GetRunForContext(ctx context.Context, id pgtype.UUID) (GetRunForContextRow, error)
- func (q *Queries) GetRunRepoID(ctx context.Context, id pgtype.UUID) (pgtype.UUID, error)
- func (q *Queries) GetRunWritebackConfig(ctx context.Context, id pgtype.UUID) (GetRunWritebackConfigRow, error)
- func (q *Queries) GetScheduleAutoPauseConfig(ctx context.Context, id pgtype.UUID) (GetScheduleAutoPauseConfigRow, error)
- func (q *Queries) GetScheduleByID(ctx context.Context, id pgtype.UUID) (Schedule, error)
- func (q *Queries) GetScheduleForTrigger(ctx context.Context, id pgtype.UUID) (GetScheduleForTriggerRow, error)
- func (q *Queries) GetSecretByName(ctx context.Context, arg GetSecretByNameParams) (Secret, error)
- func (q *Queries) GetUserRole(ctx context.Context, arg GetUserRoleParams) (string, error)
- func (q *Queries) InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) error
- func (q *Queries) InsertRepoConnection(ctx context.Context, arg InsertRepoConnectionParams) (RepoConnection, error)
- func (q *Queries) InsertRun(ctx context.Context, arg InsertRunParams) (InsertRunRow, error)
- func (q *Queries) InsertRunEvent(ctx context.Context, arg InsertRunEventParams) error
- func (q *Queries) ListActiveRunsForSchedule(ctx context.Context, scheduleID pgtype.UUID) ([]Run, error)
- func (q *Queries) ListAuditLogByOrg(ctx context.Context, arg ListAuditLogByOrgParams) ([]AuditLog, error)
- func (q *Queries) ListDueRepoConnections(ctx context.Context) ([]RepoConnection, error)
- func (q *Queries) ListDueSchedules(ctx context.Context) ([]Schedule, error)
- func (q *Queries) ListDueSchedulesWithSha(ctx context.Context) ([]ListDueSchedulesWithShaRow, error)
- func (q *Queries) ListRecentTerminalScheduledRuns(ctx context.Context, arg ListRecentTerminalScheduledRunsParams) ([]string, error)
- func (q *Queries) ListRepoConnections(ctx context.Context, orgID pgtype.UUID) ([]RepoConnection, error)
- func (q *Queries) ListRunEvents(ctx context.Context, runID pgtype.UUID) ([]RunEvent, error)
- func (q *Queries) ListRunEventsSince(ctx context.Context, arg ListRunEventsSinceParams) ([]RunEvent, error)
- func (q *Queries) ListRunsForOrg(ctx context.Context, arg ListRunsForOrgParams) ([]ListRunsForOrgRow, error)
- func (q *Queries) ListRunsForSchedule(ctx context.Context, arg ListRunsForScheduleParams) ([]ListRunsForScheduleRow, error)
- func (q *Queries) ListSchedulesByOrg(ctx context.Context, orgID pgtype.UUID) ([]ListSchedulesByOrgRow, error)
- func (q *Queries) ListSecretNames(ctx context.Context, orgID pgtype.UUID) ([]ListSecretNamesRow, error)
- func (q *Queries) ListSkillsByOrg(ctx context.Context, orgID pgtype.UUID) ([]ListSkillsByOrgRow, error)
- func (q *Queries) ListSkillsByRepo(ctx context.Context, repoID pgtype.UUID) ([]Skill, error)
- func (q *Queries) ListUsers(ctx context.Context, orgID pgtype.UUID) ([]AppUser, error)
- func (q *Queries) MarkRepoSyncError(ctx context.Context, arg MarkRepoSyncErrorParams) error
- func (q *Queries) MarkRepoSyncedOK(ctx context.Context, arg MarkRepoSyncedOKParams) error
- func (q *Queries) OrphanSweep(ctx context.Context) (int64, error)
- func (q *Queries) SetRunRunning(ctx context.Context, arg SetRunRunningParams) (Run, error)
- func (q *Queries) SetScheduleEnabled(ctx context.Context, arg SetScheduleEnabledParams) (Schedule, error)
- func (q *Queries) SetScheduleOverrides(ctx context.Context, arg SetScheduleOverridesParams) (Schedule, error)
- func (q *Queries) SetUserRole(ctx context.Context, arg SetUserRoleParams) error
- func (q *Queries) TouchSecret(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) UpdateScheduleNextFireAt(ctx context.Context, arg UpdateScheduleNextFireAtParams) error
- func (q *Queries) UpsertSchedule(ctx context.Context, arg UpsertScheduleParams) (Schedule, error)
- func (q *Queries) UpsertSecret(ctx context.Context, arg UpsertSecretParams) (Secret, error)
- func (q *Queries) UpsertSkill(ctx context.Context, arg UpsertSkillParams) (Skill, error)
- func (q *Queries) UpsertUserOnLogin(ctx context.Context, arg UpsertUserOnLoginParams) (AppUser, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RepoConnection
- type Run
- type RunEvent
- type Schedule
- type Secret
- type SetRunRunningParams
- type SetScheduleEnabledParams
- type SetScheduleOverridesParams
- type SetUserRoleParams
- type Skill
- type UpdateScheduleNextFireAtParams
- type UpsertScheduleParams
- type UpsertSecretParams
- type UpsertSkillParams
- type UpsertUserOnLoginParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppUser ¶
type AppUser struct {
ID pgtype.UUID
OrgID pgtype.UUID
GithubLogin string
Role string
CreatedAt pgtype.Timestamptz
LastLoginAt pgtype.Timestamptz
}
type AutoPauseScheduleParams ¶
type CreateUserParams ¶
type DeleteSecretParams ¶
type DeleteUserParams ¶
type FinalizeRunParams ¶
type GetRunForAdminRow ¶
type GetRunForAdminRow struct {
ID pgtype.UUID
OrgID pgtype.UUID
ScheduleID pgtype.UUID
SkillSha string
FireTime pgtype.Timestamptz
Status string
FireReason string
Actor *string
StartedAt pgtype.Timestamptz
FinishedAt pgtype.Timestamptz
DurationMs *int32
TokensIn *int32
TokensOut *int32
CostCents *int32
ErrorKind *string
ErrorMsg *string
WritebackCommitSha *string
CreatedAt pgtype.Timestamptz
ScheduleName string
Cron string
SkillPath string
Owner string
RepoName string
}
type GetRunForContextRow ¶
type GetRunForContextRow struct {
ID pgtype.UUID
OrgID pgtype.UUID
ScheduleID pgtype.UUID
SkillSha string
FireTime pgtype.Timestamptz
Status string
FireReason string
Actor *string
StartedAt pgtype.Timestamptz
FinishedAt pgtype.Timestamptz
DurationMs *int32
TokensIn *int32
TokensOut *int32
CostCents *int32
ErrorKind *string
ErrorMsg *string
WritebackCommitSha *string
RunnerPid *int32
RunnerTokenHash string
CreatedAt pgtype.Timestamptz
ScheduleName string
Cron string
Timezone string
TimeoutSec int32
Provider string
Model string
LlmSecretRef *string
LlmEndpoint *string
LlmDeployment *string
DestinationsJson []byte
WritebackJson []byte
EnvJson []byte
McpEnvJson []byte
MaxTurns *int32
SkillIDJoined pgtype.UUID
SkillPath string
SkillRepoID pgtype.UUID
FrontmatterJson []byte
Owner string
RepoName string
DefaultBranch string
GithubAppInstallID int64
}
type GetSecretByNameParams ¶
type GetUserRoleParams ¶
type InsertAuditLogParams ¶
type InsertRunEventParams ¶
type InsertRunParams ¶
type InsertRunRow ¶
type InsertRunRow struct {
ID pgtype.UUID
OrgID pgtype.UUID
ScheduleID pgtype.UUID
SkillSha string
FireTime pgtype.Timestamptz
Status string
FireReason string
Actor *string
StartedAt pgtype.Timestamptz
FinishedAt pgtype.Timestamptz
DurationMs *int32
TokensIn *int32
TokensOut *int32
CostCents *int32
ErrorKind *string
ErrorMsg *string
WritebackCommitSha *string
RunnerPid *int32
RunnerTokenHash string
CreatedAt pgtype.Timestamptz
Inserted bool
}
type ListAuditLogByOrgParams ¶
type ListDueSchedulesWithShaRow ¶
type ListDueSchedulesWithShaRow struct {
ID pgtype.UUID
OrgID pgtype.UUID
SkillID pgtype.UUID
Name string
Cron string
Timezone string
OverlapPolicy string
TimeoutSec int32
Enabled bool
Provider string
Model string
LlmSecretRef *string
LlmEndpoint *string
LlmDeployment *string
DestinationsJson []byte
WritebackJson []byte
EnvJson []byte
AutoPauseAfter *int32
AutoPausedAt pgtype.Timestamptz
AutoPauseReason *string
LastEnabledAt pgtype.Timestamptz
McpEnvJson []byte
UiOverridesJson []byte
MaxTurns *int32
CopilotTokenRefsJson []byte
NextFireAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
SkillSha string
InstallID int64
}
type ListRecentTerminalScheduledRunsParams ¶
type ListRecentTerminalScheduledRunsParams struct {
ScheduleID pgtype.UUID
CreatedAt pgtype.Timestamptz
Limit int32
}
type ListRunsForOrgParams ¶
type ListRunsForOrgRow ¶
type ListRunsForOrgRow struct {
ID pgtype.UUID
Status string
FireReason string
Actor *string
StartedAt pgtype.Timestamptz
FinishedAt pgtype.Timestamptz
DurationMs *int32
ErrorKind *string
ErrorMsg *string
CreatedAt pgtype.Timestamptz
ScheduleName string
SkillPath string
Owner string
RepoName string
}
type ListRunsForScheduleRow ¶
type ListRunsForScheduleRow struct {
ID pgtype.UUID
Status string
FireReason string
Actor *string
StartedAt pgtype.Timestamptz
FinishedAt pgtype.Timestamptz
DurationMs *int32
ErrorKind *string
ErrorMsg *string
CreatedAt pgtype.Timestamptz
ScheduleName string
SkillPath string
Owner string
RepoName string
}
type ListSchedulesByOrgRow ¶
type ListSchedulesByOrgRow struct {
ID pgtype.UUID
OrgID pgtype.UUID
SkillID pgtype.UUID
Name string
Cron string
Timezone string
OverlapPolicy string
TimeoutSec int32
Enabled bool
Provider string
Model string
LlmSecretRef *string
LlmEndpoint *string
LlmDeployment *string
DestinationsJson []byte
WritebackJson []byte
EnvJson []byte
AutoPauseAfter *int32
AutoPausedAt pgtype.Timestamptz
AutoPauseReason *string
LastEnabledAt pgtype.Timestamptz
McpEnvJson []byte
UiOverridesJson []byte
MaxTurns *int32
CopilotTokenRefsJson []byte
NextFireAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
SkillPath string
SkillName string
SkillFrontmatterJson []byte
Owner string
RepoName string
}
type ListSecretNamesRow ¶
type ListSecretNamesRow struct {
Name string
Version int32
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
}
type ListSkillsByOrgRow ¶
type MarkRepoSyncErrorParams ¶
type MarkRepoSyncedOKParams ¶
type Organization ¶
type Organization struct {
ID pgtype.UUID
Name string
CreatedAt pgtype.Timestamptz
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AutoPauseSchedule ¶
func (q *Queries) AutoPauseSchedule(ctx context.Context, arg AutoPauseScheduleParams) (int64, error)
Idempotent conditional pause. Returns the number of rows affected so the caller can distinguish "we paused it" (1) from "someone else already paused it" (0, in which case the caller must not emit duplicate audit rows).
func (*Queries) ClearScheduleOverrides ¶
func (*Queries) CountAdmins ¶
func (*Queries) CountAuditLogByOrg ¶
func (*Queries) CountUsers ¶
func (*Queries) CreateOrganization ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteMissingSkills ¶
func (q *Queries) DeleteMissingSkills(ctx context.Context, arg DeleteMissingSkillsParams) error
Removes skill rows under `repo_id` whose path is NOT in the given slice. Cascades to schedule rows.
func (*Queries) DeleteRepoConnection ¶
func (*Queries) DeleteRun ¶
Used when `skip` overlap policy discards the freshly-inserted pending row.
func (*Queries) DeleteSecret ¶
func (*Queries) DeleteUser ¶
func (*Queries) DeleteUserIfNotLast ¶
func (q *Queries) DeleteUserIfNotLast(ctx context.Context, arg DeleteUserIfNotLastParams) (int64, error)
Atomic guard for the last-user invariant. The subquery evaluates within the same statement, so two concurrent admin deletes can't both observe count=2 and both succeed — at most one wins, the loser sees affected=0.
func (*Queries) DisableMissingSchedules ¶
func (q *Queries) DisableMissingSchedules(ctx context.Context, arg DisableMissingSchedulesParams) error
Sets enabled=false on any schedule under `skill_id` whose name is NOT in the given slice. Schedules are soft-disabled (not deleted) to preserve run history.
func (*Queries) FinalizeRun ¶
Guarded against stale/duplicate finalization: the WHERE clause refuses to update a row already in a terminal state (succeeded / partial_failure / failed). A runner that crashed and restarted can't clobber the original finalization — the query returns zero rows (pgx.ErrNoRows) and the handler maps that to 409 Conflict.
func (*Queries) GetFirstOrganization ¶
func (q *Queries) GetFirstOrganization(ctx context.Context) (Organization, error)
func (*Queries) GetRepoConnection ¶
func (*Queries) GetRepoConnectionByOwnerName ¶
func (q *Queries) GetRepoConnectionByOwnerName(ctx context.Context, arg GetRepoConnectionByOwnerNameParams) (RepoConnection, error)
func (*Queries) GetRunForAdmin ¶
Used by `cronfoundry admin show-run`.
func (*Queries) GetRunForContext ¶
func (q *Queries) GetRunForContext(ctx context.Context, id pgtype.UUID) (GetRunForContextRow, error)
Returns the run + its schedule + skill + repo so the runner can assemble its full context in one query.
func (*Queries) GetRunRepoID ¶
Returns the repo_id the given run is bound to, via its schedule → skill. Used by the clone-url handler to enforce that a run can only fetch the clone URL for its own repo.
func (*Queries) GetRunWritebackConfig ¶
func (*Queries) GetScheduleAutoPauseConfig ¶
func (q *Queries) GetScheduleAutoPauseConfig(ctx context.Context, id pgtype.UUID) (GetScheduleAutoPauseConfigRow, error)
Returns the fields evaluateAutoPause needs to decide whether to trigger a pause and emit audit/run_event rows: org_id (for audit), the per-schedule threshold override (nullable), and the anti-flap window boundary. `enabled` is returned for tests/debug; the pause query guards on it independently via `WHERE enabled = true`.
func (*Queries) GetScheduleByID ¶
func (*Queries) GetScheduleForTrigger ¶
func (q *Queries) GetScheduleForTrigger(ctx context.Context, id pgtype.UUID) (GetScheduleForTriggerRow, error)
Used by the manual trigger endpoint to assemble a new run row. Returns the schedule plus the skill's current_sha so the INSERT can be atomic (rather than two round trips).
func (*Queries) GetSecretByName ¶
func (*Queries) GetUserRole ¶
func (*Queries) InsertAuditLog ¶
func (q *Queries) InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) error
func (*Queries) InsertRepoConnection ¶
func (q *Queries) InsertRepoConnection(ctx context.Context, arg InsertRepoConnectionParams) (RepoConnection, error)
func (*Queries) InsertRun ¶
func (q *Queries) InsertRun(ctx context.Context, arg InsertRunParams) (InsertRunRow, error)
Idempotent for scheduled fires (ON CONFLICT on the partial unique index run_schedule_firetime_unique). Manual runs always have fire_time=NULL and pass through without collision — the index predicate (WHERE fire_time IS NOT NULL) must be repeated on ON CONFLICT so Postgres matches the partial index rather than requiring a full unique constraint.
On conflict (i.e. another concurrent tick already inserted the same (schedule_id, fire_time) row), this query returns the existing row with `inserted=false`. This lets callers distinguish a brand-new insert (`inserted=true`) from a concurrent-duplicate outcome — without falling back to a zero-UUID sentinel that's easy to misuse.
func (*Queries) InsertRunEvent ¶
func (q *Queries) InsertRunEvent(ctx context.Context, arg InsertRunEventParams) error
func (*Queries) ListActiveRunsForSchedule ¶
func (q *Queries) ListActiveRunsForSchedule(ctx context.Context, scheduleID pgtype.UUID) ([]Run, error)
Used for overlap-policy decisions. Returns runs in non-terminal states.
func (*Queries) ListAuditLogByOrg ¶
func (*Queries) ListDueRepoConnections ¶
func (q *Queries) ListDueRepoConnections(ctx context.Context) ([]RepoConnection, error)
Returns repos whose last sync is older than sync_interval_sec, or which have never been synced.
func (*Queries) ListDueSchedules ¶
Returns schedules ready to fire: enabled AND next_fire_at <= now. Ordered by next_fire_at so we dispatch oldest-due first.
func (*Queries) ListDueSchedulesWithSha ¶
func (q *Queries) ListDueSchedulesWithSha(ctx context.Context) ([]ListDueSchedulesWithShaRow, error)
Like ListDueSchedules but joins the skill to include current_sha so the scheduler can set it on the new run row without a second query. Also joins repo_connection for the installation ID needed at dispatch.
func (*Queries) ListRecentTerminalScheduledRuns ¶
func (q *Queries) ListRecentTerminalScheduledRuns(ctx context.Context, arg ListRecentTerminalScheduledRunsParams) ([]string, error)
Used by evaluateAutoPause. Returns the last N terminal scheduled runs for a schedule, within the anti-flap window defined by last_enabled_at. Uses `created_at` (NOT NULL, matches the existing run_schedule_created_idx) so failed-before-dispatch runs (started_at NULL) are still counted. `id DESC` is a stable tie-breaker when two runs share created_at (tests and tight scheduler clocks can produce ties at microsecond resolution).
func (*Queries) ListRepoConnections ¶
func (*Queries) ListRunEvents ¶
func (*Queries) ListRunEventsSince ¶
func (*Queries) ListRunsForOrg ¶
func (q *Queries) ListRunsForOrg(ctx context.Context, arg ListRunsForOrgParams) ([]ListRunsForOrgRow, error)
Used by `cronfoundry admin list-runs`. Returns the most recent N runs, joined to schedule + skill names for display.
func (*Queries) ListRunsForSchedule ¶
func (q *Queries) ListRunsForSchedule(ctx context.Context, arg ListRunsForScheduleParams) ([]ListRunsForScheduleRow, error)
Same shape as ListRunsForOrg but filtered to a single schedule by name.
func (*Queries) ListSchedulesByOrg ¶
func (*Queries) ListSecretNames ¶
func (*Queries) ListSkillsByOrg ¶
func (*Queries) ListSkillsByRepo ¶
func (*Queries) MarkRepoSyncError ¶
func (q *Queries) MarkRepoSyncError(ctx context.Context, arg MarkRepoSyncErrorParams) error
func (*Queries) MarkRepoSyncedOK ¶
func (q *Queries) MarkRepoSyncedOK(ctx context.Context, arg MarkRepoSyncedOKParams) error
func (*Queries) OrphanSweep ¶
Marks non-terminal runs as failed if they've been sitting longer than their schedule's timeout + 5-minute grace. Recovers from runner crashes and service restarts.
func (*Queries) SetRunRunning ¶
func (*Queries) SetScheduleEnabled ¶
func (q *Queries) SetScheduleEnabled(ctx context.Context, arg SetScheduleEnabledParams) (Schedule, error)
On enable: clear any auto-pause state. last_enabled_at only advances on a real false→true transition (not on an idempotent enable-already-enabled call), so the anti-flap window isn't silently reset when, e.g., two UI tabs race to click Resume. On disable: leave the auto-pause columns untouched — a user-initiated pause doesn't touch auto-pause state.
func (*Queries) SetScheduleOverrides ¶
func (*Queries) SetUserRole ¶
func (q *Queries) SetUserRole(ctx context.Context, arg SetUserRoleParams) error
func (*Queries) TouchSecret ¶
func (*Queries) UpdateScheduleNextFireAt ¶
func (q *Queries) UpdateScheduleNextFireAt(ctx context.Context, arg UpdateScheduleNextFireAtParams) error
func (*Queries) UpsertSchedule ¶
func (*Queries) UpsertSecret ¶
func (*Queries) UpsertSkill ¶
func (*Queries) UpsertUserOnLogin ¶
type RepoConnection ¶
type Run ¶
type Run struct {
ID pgtype.UUID
OrgID pgtype.UUID
ScheduleID pgtype.UUID
SkillSha string
FireTime pgtype.Timestamptz
Status string
FireReason string
Actor *string
StartedAt pgtype.Timestamptz
FinishedAt pgtype.Timestamptz
DurationMs *int32
TokensIn *int32
TokensOut *int32
CostCents *int32
ErrorKind *string
ErrorMsg *string
WritebackCommitSha *string
RunnerPid *int32
RunnerTokenHash string
CreatedAt pgtype.Timestamptz
}
type Schedule ¶
type Schedule struct {
ID pgtype.UUID
OrgID pgtype.UUID
SkillID pgtype.UUID
Name string
Cron string
Timezone string
OverlapPolicy string
TimeoutSec int32
Enabled bool
Provider string
Model string
LlmSecretRef *string
LlmEndpoint *string
LlmDeployment *string
DestinationsJson []byte
WritebackJson []byte
EnvJson []byte
AutoPauseAfter *int32
AutoPausedAt pgtype.Timestamptz
AutoPauseReason *string
LastEnabledAt pgtype.Timestamptz
McpEnvJson []byte
UiOverridesJson []byte
MaxTurns *int32
CopilotTokenRefsJson []byte
NextFireAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type Secret ¶
type Secret struct {
ID pgtype.UUID
OrgID pgtype.UUID
Name string
DekWrapped []byte
Ciphertext []byte
Nonce []byte
Version int32
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
LastUsedAt pgtype.Timestamptz
}
type SetRunRunningParams ¶
type SetUserRoleParams ¶
type UpdateScheduleNextFireAtParams ¶
type UpdateScheduleNextFireAtParams struct {
ID pgtype.UUID
NextFireAt pgtype.Timestamptz
}
type UpsertScheduleParams ¶
type UpsertScheduleParams struct {
OrgID pgtype.UUID
SkillID pgtype.UUID
Name string
Cron string
Timezone string
OverlapPolicy string
TimeoutSec int32
Enabled bool
Provider string
Model string
LlmSecretRef *string
LlmEndpoint *string
LlmDeployment *string
DestinationsJson []byte
WritebackJson []byte
EnvJson []byte
AutoPauseAfter *int32
McpEnvJson []byte
MaxTurns *int32
CopilotTokenRefsJson []byte
}