package db
import "golang.org/x/build/internal/relui/db"
Index ¶
- type ApproveTaskParams
- type CreateScheduleParams
- type CreateTaskLogParams
- type CreateTaskParams
- type CreateWorkflowParams
- type DBTX
- type FailUnfinishedTasksParams
- type PGDBTX
- type Queries
- func New(db DBTX) *Queries
- func (q *Queries) ApproveTask(ctx context.Context, arg ApproveTaskParams) (Task, error)
- func (q *Queries) ClearWorkflowSchedule(ctx context.Context, dollar_1 int32) ([]uuid.UUID, error)
- func (q *Queries) CreateSchedule(ctx context.Context, arg CreateScheduleParams) (Schedule, error)
- func (q *Queries) CreateTask(ctx context.Context, arg CreateTaskParams) (Task, error)
- func (q *Queries) CreateTaskLog(ctx context.Context, arg CreateTaskLogParams) (TaskLog, error)
- func (q *Queries) CreateWorkflow(ctx context.Context, arg CreateWorkflowParams) (Workflow, error)
- func (q *Queries) DeleteSchedule(ctx context.Context, id int32) (Schedule, error)
- func (q *Queries) FailUnfinishedTasks(ctx context.Context, arg FailUnfinishedTasksParams) error
- func (q *Queries) Schedules(ctx context.Context) ([]Schedule, error)
- func (q *Queries) SchedulesLastRun(ctx context.Context) ([]SchedulesLastRunRow, error)
- func (q *Queries) Task(ctx context.Context, arg TaskParams) (Task, error)
- func (q *Queries) TaskLogs(ctx context.Context) ([]TaskLog, error)
- func (q *Queries) TaskLogsForTask(ctx context.Context, arg TaskLogsForTaskParams) ([]TaskLog, error)
- func (q *Queries) TaskLogsForWorkflow(ctx context.Context, workflowID uuid.UUID) ([]TaskLog, error)
- func (q *Queries) Tasks(ctx context.Context) ([]TasksRow, error)
- func (q *Queries) TasksForWorkflow(ctx context.Context, workflowID uuid.UUID) ([]Task, error)
- func (q *Queries) TasksForWorkflowSorted(ctx context.Context, workflowID uuid.UUID) ([]TasksForWorkflowSortedRow, error)
- func (q *Queries) UnfinishedWorkflows(ctx context.Context) ([]Workflow, error)
- func (q *Queries) UpdateTaskReadyForApproval(ctx context.Context, arg UpdateTaskReadyForApprovalParams) (Task, error)
- func (q *Queries) UpsertTask(ctx context.Context, arg UpsertTaskParams) (Task, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- func (q *Queries) Workflow(ctx context.Context, id uuid.UUID) (Workflow, error)
- func (q *Queries) WorkflowCount(ctx context.Context) (int64, error)
- func (q *Queries) WorkflowFinished(ctx context.Context, arg WorkflowFinishedParams) (Workflow, error)
- func (q *Queries) WorkflowNames(ctx context.Context) ([]string, error)
- func (q *Queries) WorkflowSidebar(ctx context.Context) ([]WorkflowSidebarRow, error)
- func (q *Queries) Workflows(ctx context.Context) ([]Workflow, error)
- func (q *Queries) WorkflowsByName(ctx context.Context, name sql.NullString) ([]Workflow, error)
- func (q *Queries) WorkflowsByNames(ctx context.Context, names []string) ([]Workflow, error)
- type Schedule
- type SchedulesLastRunRow
- type Task
- type TaskLog
- type TaskLogsForTaskParams
- type TaskParams
- type TasksForWorkflowSortedRow
- type TasksRow
- type UpdateTaskReadyForApprovalParams
- type UpsertTaskParams
- type Workflow
- type WorkflowFinishedParams
- type WorkflowSidebarRow
Types ¶
type ApproveTaskParams ¶
type CreateScheduleParams ¶
type CreateScheduleParams struct { WorkflowName string WorkflowParams sql.NullString Spec string Once time.Time IntervalMinutes int32 CreatedAt time.Time UpdatedAt time.Time }
type CreateTaskLogParams ¶
type CreateTaskParams ¶
type CreateTaskParams struct { WorkflowID uuid.UUID Name string Finished bool Result sql.NullString Error sql.NullString CreatedAt time.Time UpdatedAt time.Time ApprovedAt sql.NullTime ReadyForApproval bool }
type CreateWorkflowParams ¶
type CreateWorkflowParams struct { ID uuid.UUID Params sql.NullString Name sql.NullString ScheduleID sql.NullInt32 CreatedAt time.Time UpdatedAt time.Time }
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 FailUnfinishedTasksParams ¶
type PGDBTX ¶
type PGDBTX interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row BeginFunc(ctx context.Context, f func(pgx.Tx) error) error Close() }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func New ¶
func (*Queries) ApproveTask ¶
func (*Queries) ClearWorkflowSchedule ¶
func (*Queries) CreateSchedule ¶
func (*Queries) CreateTask ¶
func (*Queries) CreateTaskLog ¶
func (*Queries) CreateWorkflow ¶
func (*Queries) DeleteSchedule ¶
func (*Queries) FailUnfinishedTasks ¶
func (q *Queries) FailUnfinishedTasks(ctx context.Context, arg FailUnfinishedTasksParams) error
func (*Queries) Schedules ¶
func (*Queries) SchedulesLastRun ¶
func (q *Queries) SchedulesLastRun(ctx context.Context) ([]SchedulesLastRunRow, error)
func (*Queries) Task ¶
func (*Queries) TaskLogs ¶
func (*Queries) TaskLogsForTask ¶
func (q *Queries) TaskLogsForTask(ctx context.Context, arg TaskLogsForTaskParams) ([]TaskLog, error)
func (*Queries) TaskLogsForWorkflow ¶
func (*Queries) Tasks ¶
func (*Queries) TasksForWorkflow ¶
func (*Queries) TasksForWorkflowSorted ¶
func (q *Queries) TasksForWorkflowSorted(ctx context.Context, workflowID uuid.UUID) ([]TasksForWorkflowSortedRow, error)
func (*Queries) UnfinishedWorkflows ¶
func (*Queries) UpdateTaskReadyForApproval ¶
func (q *Queries) UpdateTaskReadyForApproval(ctx context.Context, arg UpdateTaskReadyForApprovalParams) (Task, error)
func (*Queries) UpsertTask ¶
func (*Queries) WithTx ¶
func (*Queries) Workflow ¶
func (*Queries) WorkflowCount ¶
func (*Queries) WorkflowFinished ¶
func (q *Queries) WorkflowFinished(ctx context.Context, arg WorkflowFinishedParams) (Workflow, error)
func (*Queries) WorkflowNames ¶
func (*Queries) WorkflowSidebar ¶
func (q *Queries) WorkflowSidebar(ctx context.Context) ([]WorkflowSidebarRow, error)
func (*Queries) Workflows ¶
Copyright 2021 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
func (*Queries) WorkflowsByName ¶
func (*Queries) WorkflowsByNames ¶
type Schedule ¶
type Schedule struct { ID int32 WorkflowName string WorkflowParams sql.NullString Spec string Once time.Time IntervalMinutes int32 CreatedAt time.Time UpdatedAt time.Time }
type SchedulesLastRunRow ¶
type SchedulesLastRunRow struct { ID int32 WorkflowID uuid.UUID WorkflowCreatedAt sql.NullTime WorkflowError sql.NullString WorkflowFinished sql.NullBool }
type Task ¶
type Task struct { WorkflowID uuid.UUID Name string Finished bool Result sql.NullString Error sql.NullString CreatedAt time.Time UpdatedAt time.Time ApprovedAt sql.NullTime ReadyForApproval bool Started bool RetryCount int32 }
type TaskLog ¶
type TaskLog struct { ID int32 WorkflowID uuid.UUID TaskName string Body string CreatedAt time.Time UpdatedAt time.Time }
type TaskLogsForTaskParams ¶
type TaskParams ¶
type TasksForWorkflowSortedRow ¶
type TasksForWorkflowSortedRow struct { WorkflowID uuid.UUID Name string Finished bool Result sql.NullString Error sql.NullString CreatedAt time.Time UpdatedAt time.Time ApprovedAt sql.NullTime ReadyForApproval bool Started bool RetryCount int32 MostRecentUpdate time.Time }
type TasksRow ¶
type TasksRow struct { WorkflowID uuid.UUID Name string Finished bool Result sql.NullString Error sql.NullString CreatedAt time.Time UpdatedAt time.Time ApprovedAt sql.NullTime ReadyForApproval bool Started bool RetryCount int32 MostRecentUpdate time.Time }
type UpdateTaskReadyForApprovalParams ¶
type UpdateTaskReadyForApprovalParams struct { WorkflowID uuid.UUID Name string ReadyForApproval bool }
type UpsertTaskParams ¶
type UpsertTaskParams struct { WorkflowID uuid.UUID Name string Started bool Finished bool Result sql.NullString Error sql.NullString CreatedAt time.Time UpdatedAt time.Time RetryCount int32 }
type Workflow ¶
type Workflow struct { ID uuid.UUID Params sql.NullString Name sql.NullString CreatedAt time.Time UpdatedAt time.Time Finished bool Output string Error string ScheduleID sql.NullInt32 }
type WorkflowFinishedParams ¶
type WorkflowFinishedParams struct { ID uuid.UUID Finished bool Output string Error string UpdatedAt time.Time }
type WorkflowSidebarRow ¶
type WorkflowSidebarRow struct { Name sql.NullString Count int64 }
Source Files ¶
db.go models.go pgdbtx.go workflows.sql.go
- Version
- v0.0.0-20250421191922-3619c213cff3 (latest)
- Published
- Apr 21, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 3 months ago –
Tools for package owners.