sqlc

package
v0.0.0-...-dfed899 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddWorkerToJobBlocklistParams

type AddWorkerToJobBlocklistParams struct {
	CreatedAt time.Time
	JobID     int64
	WorkerID  int64
	TaskType  string
}

type AddWorkerToTaskFailedListParams

type AddWorkerToTaskFailedListParams struct {
	CreatedAt time.Time
	TaskID    int64
	WorkerID  int64
}

type AssignTaskToWorkerParams

type AssignTaskToWorkerParams struct {
	WorkerID sql.NullInt64
	Now      sql.NullTime
	TaskID   int64
}

type CountTaskFailuresOfWorkerParams

type CountTaskFailuresOfWorkerParams struct {
	WorkerID int64
	JobID    int64
	TaskType string
}

type CreateJobParams

type CreateJobParams struct {
	CreatedAt               time.Time
	UUID                    string
	Name                    string
	JobType                 string
	Priority                int64
	Status                  string
	Activity                string
	Settings                json.RawMessage
	Metadata                json.RawMessage
	StorageShamanCheckoutID string
	WorkerTagID             sql.NullInt64
}

type CreateTaskParams

type CreateTaskParams struct {
	CreatedAt  time.Time
	UUID       string
	Name       string
	Type       string
	JobID      int64
	IndexInJob int64
	Priority   int64
	Status     string
	Commands   json.RawMessage
}

type CreateWorkerParams

type CreateWorkerParams struct {
	CreatedAt          time.Time
	UUID               string
	Secret             string
	Name               string
	Address            string
	Platform           string
	Software           string
	Status             string
	LastSeenAt         sql.NullTime
	StatusRequested    string
	LazyStatusRequest  bool
	SupportedTaskTypes string
	DeletedAt          sql.NullTime
	CanRestart         bool
}

type CreateWorkerTagParams

type CreateWorkerTagParams struct {
	CreatedAt   time.Time
	UUID        string
	Name        string
	Description string
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type FetchAssignedAndRunnableTaskOfWorkerParams

type FetchAssignedAndRunnableTaskOfWorkerParams struct {
	ActiveTaskStatus  string
	WorkerID          sql.NullInt64
	ActiveJobStatuses []string
}

type FetchAssignedAndRunnableTaskOfWorkerRow

type FetchAssignedAndRunnableTaskOfWorkerRow struct {
	Task Task
}

type FetchJobBlocklistRow

type FetchJobBlocklistRow struct {
	JobBlock JobBlock
	Worker   Worker
}

type FetchTaskFailureListRow

type FetchTaskFailureListRow struct {
	Worker Worker
}

type FetchTaskRow

type FetchTaskRow struct {
	Task       Task
	JobUUID    sql.NullString
	WorkerUUID sql.NullString
}

type FetchTasksOfJobInStatusParams

type FetchTasksOfJobInStatusParams struct {
	JobID      int64
	TaskStatus []string
}

type FetchTasksOfJobInStatusRow

type FetchTasksOfJobInStatusRow struct {
	Task       Task
	WorkerUUID sql.NullString
}

type FetchTasksOfJobRow

type FetchTasksOfJobRow struct {
	Task       Task
	WorkerUUID sql.NullString
}

type FetchTasksOfWorkerInStatusOfJobParams

type FetchTasksOfWorkerInStatusOfJobParams struct {
	WorkerID   sql.NullInt64
	JobID      int64
	TaskStatus string
}

type FetchTasksOfWorkerInStatusOfJobRow

type FetchTasksOfWorkerInStatusOfJobRow struct {
	Task Task
}

type FetchTasksOfWorkerInStatusParams

type FetchTasksOfWorkerInStatusParams struct {
	WorkerID   sql.NullInt64
	TaskStatus string
}

type FetchTasksOfWorkerInStatusRow

type FetchTasksOfWorkerInStatusRow struct {
	Task    Task
	JobUUID sql.NullString
}

type FetchTimedOutTasksParams

type FetchTimedOutTasksParams struct {
	TaskStatus     string
	UntouchedSince sql.NullTime
}

type FetchTimedOutWorkersParams

type FetchTimedOutWorkersParams struct {
	LastSeenBefore          sql.NullTime
	WorkerStatusesNoTimeout []string
}

type FetchWorkerTaskParams

type FetchWorkerTaskParams struct {
	TaskStatusActive string
	JobStatusActive  string
	WorkerID         sql.NullInt64
}

type FetchWorkerTaskRow

type FetchWorkerTaskRow struct {
	Task     Task
	Job      Job
	IsActive interface{}
}

type FetchWorkersRow

type FetchWorkersRow struct {
	Worker Worker
}

type FindRunnableTaskParams

type FindRunnableTaskParams struct {
	WorkerID                int64
	TaskStatusCompleted     string
	WorkerTags              []sql.NullInt64
	SchedulableTaskStatuses []string
	SchedulableJobStatuses  []string
	SupportedTaskTypes      []string
}

type FindRunnableTaskRow

type FindRunnableTaskRow struct {
	Task Task
}

type Job

type Job struct {
	ID                      int64
	CreatedAt               time.Time
	UpdatedAt               sql.NullTime
	UUID                    string
	Name                    string
	JobType                 string
	Priority                int64
	Status                  string
	Activity                string
	Settings                json.RawMessage
	Metadata                json.RawMessage
	DeleteRequestedAt       sql.NullTime
	StorageShamanCheckoutID string
	WorkerTagID             sql.NullInt64
}

type JobBlock

type JobBlock struct {
	ID        int64
	CreatedAt time.Time
	JobID     int64
	WorkerID  int64
	TaskType  string
}

type JobCountTaskStatusesRow

type JobCountTaskStatusesRow struct {
	Status   string
	NumTasks int64
}

type JobCountTasksInStatusParams

type JobCountTasksInStatusParams struct {
	JobID      int64
	TaskStatus string
}

type LastRendered

type LastRendered struct {
	ID        int64
	CreatedAt time.Time
	UpdatedAt sql.NullTime
	JobID     int64
}

type PragmaForeignKeyCheckResult

type PragmaForeignKeyCheckResult struct {
	Table  string
	RowID  int
	Parent string
	FKID   int
}

type PragmaIntegrityCheckResult

type PragmaIntegrityCheckResult struct {
	Description string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddWorkerToJobBlocklist

func (q *Queries) AddWorkerToJobBlocklist(ctx context.Context, arg AddWorkerToJobBlocklistParams) error

Add a worker to a job's blocklist.

func (*Queries) AddWorkerToTaskFailedList

func (q *Queries) AddWorkerToTaskFailedList(ctx context.Context, arg AddWorkerToTaskFailedListParams) error

func (*Queries) AssignTaskToWorker

func (q *Queries) AssignTaskToWorker(ctx context.Context, arg AssignTaskToWorkerParams) error

func (*Queries) ClearFailureListOfJob

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

SQLite doesn't support JOIN in DELETE queries, so use a sub-query instead.

func (*Queries) ClearFailureListOfTask

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

func (*Queries) ClearJobBlocklist

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

func (*Queries) CountTaskFailuresOfWorker

func (q *Queries) CountTaskFailuresOfWorker(ctx context.Context, arg CountTaskFailuresOfWorkerParams) (int64, error)

func (*Queries) CountWorkerTags

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

func (*Queries) CountWorkersFailingTask

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

Count how many workers have failed a given task.

func (*Queries) CreateJob

func (q *Queries) CreateJob(ctx context.Context, arg CreateJobParams) (int64, error)

func (*Queries) CreateTask

func (q *Queries) CreateTask(ctx context.Context, arg CreateTaskParams) (int64, error)

func (*Queries) CreateWorker

func (q *Queries) CreateWorker(ctx context.Context, arg CreateWorkerParams) (int64, error)

func (*Queries) CreateWorkerTag

func (q *Queries) CreateWorkerTag(ctx context.Context, arg CreateWorkerTagParams) (int64, error)

func (*Queries) DeleteJob

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

func (*Queries) DeleteWorkerTag

func (q *Queries) DeleteWorkerTag(ctx context.Context, uuid string) (int64, error)

func (*Queries) FetchAssignedAndRunnableTaskOfWorker

Fetch a task that's assigned to this worker, and is in a runnable state.

func (*Queries) FetchJob

func (q *Queries) FetchJob(ctx context.Context, uuid string) (Job, error)

Fetch a job by its UUID.

func (*Queries) FetchJobBlocklist

func (q *Queries) FetchJobBlocklist(ctx context.Context, jobuuid string) ([]FetchJobBlocklistRow, error)

func (*Queries) FetchJobByID

func (q *Queries) FetchJobByID(ctx context.Context, id int64) (Job, error)

Fetch a job by its numerical ID.

func (*Queries) FetchJobShamanCheckoutID

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

func (*Queries) FetchJobUUIDsUpdatedBefore

func (q *Queries) FetchJobUUIDsUpdatedBefore(ctx context.Context, updatedAtMax sql.NullTime) ([]string, error)

func (*Queries) FetchJobs

func (q *Queries) FetchJobs(ctx context.Context) ([]Job, error)

Fetch all jobs in the database.

func (*Queries) FetchJobsDeletionRequested

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

func (*Queries) FetchJobsInStatus

func (q *Queries) FetchJobsInStatus(ctx context.Context, statuses []string) ([]Job, error)

func (*Queries) FetchSleepSchedulesToCheck

func (q *Queries) FetchSleepSchedulesToCheck(ctx context.Context, nextCheck sql.NullTime) ([]SleepSchedule, error)

func (*Queries) FetchTagsOfWorker

func (q *Queries) FetchTagsOfWorker(ctx context.Context, uuid string) ([]WorkerTag, error)

func (*Queries) FetchTask

func (q *Queries) FetchTask(ctx context.Context, uuid string) (FetchTaskRow, error)

func (*Queries) FetchTaskFailureList

func (q *Queries) FetchTaskFailureList(ctx context.Context, taskID int64) ([]FetchTaskFailureListRow, error)

func (*Queries) FetchTaskJobUUID

func (q *Queries) FetchTaskJobUUID(ctx context.Context, uuid string) (sql.NullString, error)

func (*Queries) FetchTasksOfJob

func (q *Queries) FetchTasksOfJob(ctx context.Context, jobID int64) ([]FetchTasksOfJobRow, error)

func (*Queries) FetchTasksOfJobInStatus

func (q *Queries) FetchTasksOfJobInStatus(ctx context.Context, arg FetchTasksOfJobInStatusParams) ([]FetchTasksOfJobInStatusRow, error)

func (*Queries) FetchTasksOfWorkerInStatus

func (q *Queries) FetchTasksOfWorkerInStatus(ctx context.Context, arg FetchTasksOfWorkerInStatusParams) ([]FetchTasksOfWorkerInStatusRow, error)

func (*Queries) FetchTimedOutTasks

func (q *Queries) FetchTimedOutTasks(ctx context.Context, arg FetchTimedOutTasksParams) ([]Task, error)

func (*Queries) FetchTimedOutWorkers

func (q *Queries) FetchTimedOutWorkers(ctx context.Context, arg FetchTimedOutWorkersParams) ([]Worker, error)

func (*Queries) FetchWorker

func (q *Queries) FetchWorker(ctx context.Context, uuid string) (Worker, error)

FetchWorker only returns the worker if it wasn't soft-deleted.

func (*Queries) FetchWorkerByID

func (q *Queries) FetchWorkerByID(ctx context.Context, workerID int64) (Worker, error)

FetchWorkerByID only returns the worker if it wasn't soft-deleted.

func (*Queries) FetchWorkerSleepSchedule

func (q *Queries) FetchWorkerSleepSchedule(ctx context.Context, workeruuid string) (SleepSchedule, error)

func (*Queries) FetchWorkerTagByID

func (q *Queries) FetchWorkerTagByID(ctx context.Context, workerTagID int64) (WorkerTag, error)

func (*Queries) FetchWorkerTagByUUID

func (q *Queries) FetchWorkerTagByUUID(ctx context.Context, uuid string) (WorkerTag, error)

func (*Queries) FetchWorkerTags

func (q *Queries) FetchWorkerTags(ctx context.Context) ([]WorkerTag, error)

func (*Queries) FetchWorkerTagsByUUIDs

func (q *Queries) FetchWorkerTagsByUUIDs(ctx context.Context, uuids []string) ([]WorkerTag, error)

func (*Queries) FetchWorkerTask

func (q *Queries) FetchWorkerTask(ctx context.Context, arg FetchWorkerTaskParams) (FetchWorkerTaskRow, error)

Find the currently-active task assigned to a Worker. If not found, find the last task this Worker worked on.

func (*Queries) FetchWorkerUnconditional

func (q *Queries) FetchWorkerUnconditional(ctx context.Context, uuid string) (Worker, error)

FetchWorkerUnconditional ignores soft-deletion status and just returns the worker.

func (*Queries) FetchWorkerUnconditionalByID

func (q *Queries) FetchWorkerUnconditionalByID(ctx context.Context, workerID int64) (Worker, error)

FetchWorkerUnconditional ignores soft-deletion status and just returns the worker.

func (*Queries) FetchWorkers

func (q *Queries) FetchWorkers(ctx context.Context) ([]FetchWorkersRow, error)

func (*Queries) FindRunnableTask

func (q *Queries) FindRunnableTask(ctx context.Context, arg FindRunnableTaskParams) (FindRunnableTaskRow, error)

Find a task to be run by a worker. This is the core of the task scheduler.

Note that this query doesn't check for the assigned worker. Tasks that have a 'schedulable' status might have been assigned to a worker, representing the last worker to touch it -- it's not meant to indicate "ownership" of the task.

The order in the WHERE clause is important, slices should come last. See https://github.com/sqlc-dev/sqlc/issues/2452 for more info.

func (*Queries) GetLastRenderedJobUUID

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

func (*Queries) JobCountTaskStatuses

func (q *Queries) JobCountTaskStatuses(ctx context.Context, jobID int64) ([]JobCountTaskStatusesRow, error)

Fetch (status, num tasks in that status) rows for the given job.

func (*Queries) JobCountTasksInStatus

func (q *Queries) JobCountTasksInStatus(ctx context.Context, arg JobCountTasksInStatusParams) (int64, error)

Fetch number of tasks in the given status, of the given job.

func (*Queries) PragmaBusyTimeout

func (q *Queries) PragmaBusyTimeout(ctx context.Context, busyTimeout time.Duration) error

func (*Queries) PragmaForeignKeyCheck

func (q *Queries) PragmaForeignKeyCheck(ctx context.Context) ([]PragmaForeignKeyCheckResult, error)

func (*Queries) PragmaForeignKeysGet

func (q *Queries) PragmaForeignKeysGet(ctx context.Context) (bool, error)

func (*Queries) PragmaForeignKeysSet

func (q *Queries) PragmaForeignKeysSet(ctx context.Context, enable bool) error

func (*Queries) PragmaIntegrityCheck

func (q *Queries) PragmaIntegrityCheck(ctx context.Context) ([]PragmaIntegrityCheckResult, error)

func (*Queries) PragmaJournalModeWAL

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

func (*Queries) PragmaSynchronousNormal

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

func (*Queries) QueryJobTaskSummaries

func (q *Queries) QueryJobTaskSummaries(ctx context.Context, jobUuid string) ([]QueryJobTaskSummariesRow, error)

func (*Queries) RemoveFromJobBlocklist

func (q *Queries) RemoveFromJobBlocklist(ctx context.Context, arg RemoveFromJobBlocklistParams) error

func (*Queries) RequestJobDeletion

func (q *Queries) RequestJobDeletion(ctx context.Context, arg RequestJobDeletionParams) error

func (*Queries) RequestMassJobDeletion

func (q *Queries) RequestMassJobDeletion(ctx context.Context, arg RequestMassJobDeletionParams) error

func (*Queries) SaveJobPriority

func (q *Queries) SaveJobPriority(ctx context.Context, arg SaveJobPriorityParams) error

func (*Queries) SaveJobStatus

func (q *Queries) SaveJobStatus(ctx context.Context, arg SaveJobStatusParams) error

func (*Queries) SaveJobStorageInfo

func (q *Queries) SaveJobStorageInfo(ctx context.Context, arg SaveJobStorageInfoParams) error

func (*Queries) SaveWorker

func (q *Queries) SaveWorker(ctx context.Context, arg SaveWorkerParams) error

func (*Queries) SaveWorkerStatus

func (q *Queries) SaveWorkerStatus(ctx context.Context, arg SaveWorkerStatusParams) error

func (*Queries) SaveWorkerTag

func (q *Queries) SaveWorkerTag(ctx context.Context, arg SaveWorkerTagParams) error

func (*Queries) SetLastRendered

func (q *Queries) SetLastRendered(ctx context.Context, arg SetLastRenderedParams) error

Set the 'last rendered' job info.

Note that the use of ?2 and ?3 in the SQL is not desirable, and should be replaced with @updated_at and @job_id as soon as sqlc issue #3334 is fixed. See https://github.com/sqlc-dev/sqlc/issues/3334 for more info.

func (*Queries) SetWorkerSleepSchedule

func (q *Queries) SetWorkerSleepSchedule(ctx context.Context, arg SetWorkerSleepScheduleParams) (int64, error)

Note that the use of ?2 and ?3 in the SQL is not desirable, and should be replaced with @updated_at and @job_id as soon as sqlc issue #3334 is fixed. See https://github.com/sqlc-dev/sqlc/issues/3334 for more info.

func (*Queries) SetWorkerSleepScheduleNextCheck

func (q *Queries) SetWorkerSleepScheduleNextCheck(ctx context.Context, arg SetWorkerSleepScheduleNextCheckParams) (int64, error)

func (*Queries) SoftDeleteWorker

func (q *Queries) SoftDeleteWorker(ctx context.Context, arg SoftDeleteWorkerParams) (int64, error)

func (*Queries) StoreTaskDependency

func (q *Queries) StoreTaskDependency(ctx context.Context, arg StoreTaskDependencyParams) error

func (*Queries) SummarizeJobStatuses

func (q *Queries) SummarizeJobStatuses(ctx context.Context) ([]SummarizeJobStatusesRow, error)

func (*Queries) SummarizeWorkerStatuses

func (q *Queries) SummarizeWorkerStatuses(ctx context.Context) ([]SummarizeWorkerStatusesRow, error)

func (*Queries) TaskAssignToWorker

func (q *Queries) TaskAssignToWorker(ctx context.Context, arg TaskAssignToWorkerParams) error

func (*Queries) TaskTouchedByWorker

func (q *Queries) TaskTouchedByWorker(ctx context.Context, arg TaskTouchedByWorkerParams) error

func (*Queries) Test_CountJobs

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

Count the number of jobs in the database. Only used in unit tests.

func (*Queries) Test_CountTaskFailures

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

Count the number of task failures in the database. Only used in unit tests.

func (*Queries) Test_CountTasks

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

Count the number of tasks in the database. Only used in unit tests.

func (*Queries) Test_CreateWorkerSleepSchedule

func (q *Queries) Test_CreateWorkerSleepSchedule(ctx context.Context, arg Test_CreateWorkerSleepScheduleParams) (int64, error)

func (*Queries) Test_FetchJobBlocklist

func (q *Queries) Test_FetchJobBlocklist(ctx context.Context) ([]JobBlock, error)

Fetch all job block list entries. Used only in unit tests.

func (*Queries) Test_FetchLastRendered

func (q *Queries) Test_FetchLastRendered(ctx context.Context) ([]LastRendered, error)

Fetch all 'last rendered' in the database (even though there should only be one at most). Only used in unit tests.

func (*Queries) Test_FetchTaskFailures

func (q *Queries) Test_FetchTaskFailures(ctx context.Context) ([]TaskFailure, error)

Fetch all task failures in the database. Only used in unit tests.

func (*Queries) UpdateJobsTaskStatuses

func (q *Queries) UpdateJobsTaskStatuses(ctx context.Context, arg UpdateJobsTaskStatusesParams) error

func (*Queries) UpdateJobsTaskStatusesConditional

func (q *Queries) UpdateJobsTaskStatusesConditional(ctx context.Context, arg UpdateJobsTaskStatusesConditionalParams) error

func (*Queries) UpdateTask

func (q *Queries) UpdateTask(ctx context.Context, arg UpdateTaskParams) error

Update a Task, except its id, created_at, uuid, or job_id fields.

func (*Queries) UpdateTaskActivity

func (q *Queries) UpdateTaskActivity(ctx context.Context, arg UpdateTaskActivityParams) error

func (*Queries) UpdateTaskStatus

func (q *Queries) UpdateTaskStatus(ctx context.Context, arg UpdateTaskStatusParams) error

func (*Queries) Vacuum

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

func (*Queries) WithTx

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

func (*Queries) WorkerAddTagMembership

func (q *Queries) WorkerAddTagMembership(ctx context.Context, arg WorkerAddTagMembershipParams) error

func (*Queries) WorkerRemoveTagMemberships

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

func (*Queries) WorkerSeen

func (q *Queries) WorkerSeen(ctx context.Context, arg WorkerSeenParams) error

func (*Queries) WorkersLeftToRun

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

func (*Queries) WorkersLeftToRunWithWorkerTag

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

type QueryJobTaskSummariesRow

type QueryJobTaskSummariesRow struct {
	ID         int64
	UUID       string
	Name       string
	IndexInJob int64
	Priority   int64
	Status     string
	Type       string
	UpdatedAt  sql.NullTime
}

type RemoveFromJobBlocklistParams

type RemoveFromJobBlocklistParams struct {
	JobUUID    string
	WorkerUUID string
	TaskType   string
}

type RequestJobDeletionParams

type RequestJobDeletionParams struct {
	Now   sql.NullTime
	JobID int64
}

type RequestMassJobDeletionParams

type RequestMassJobDeletionParams struct {
	Now   sql.NullTime
	UUIDs []string
}

type SaveJobPriorityParams

type SaveJobPriorityParams struct {
	Now      sql.NullTime
	Priority int64
	ID       int64
}

type SaveJobStatusParams

type SaveJobStatusParams struct {
	Now      sql.NullTime
	Status   string
	Activity string
	ID       int64
}

type SaveJobStorageInfoParams

type SaveJobStorageInfoParams struct {
	StorageShamanCheckoutID string
	ID                      int64
}

type SaveWorkerParams

type SaveWorkerParams struct {
	UpdatedAt          sql.NullTime
	UUID               string
	Secret             string
	Name               string
	Address            string
	Platform           string
	Software           string
	Status             string
	LastSeenAt         sql.NullTime
	StatusRequested    string
	LazyStatusRequest  bool
	SupportedTaskTypes string
	CanRestart         bool
	ID                 int64
}

type SaveWorkerStatusParams

type SaveWorkerStatusParams struct {
	UpdatedAt         sql.NullTime
	Status            string
	StatusRequested   string
	LazyStatusRequest bool
	ID                int64
}

type SaveWorkerTagParams

type SaveWorkerTagParams struct {
	UpdatedAt   sql.NullTime
	UUID        string
	Name        string
	Description string
	WorkerTagID int64
}

type SetLastRenderedParams

type SetLastRenderedParams struct {
	CreatedAt time.Time
	UpdatedAt sql.NullTime
	JobID     int64
}

type SetWorkerSleepScheduleNextCheckParams

type SetWorkerSleepScheduleNextCheckParams struct {
	NextCheck  sql.NullTime
	ScheduleID int64
}

type SetWorkerSleepScheduleParams

type SetWorkerSleepScheduleParams struct {
	CreatedAt  time.Time
	UpdatedAt  sql.NullTime
	WorkerID   int64
	IsActive   bool
	DaysOfWeek string
	StartTime  string
	EndTime    string
	NextCheck  sql.NullTime
}

type SleepSchedule

type SleepSchedule struct {
	ID         int64
	CreatedAt  time.Time
	UpdatedAt  sql.NullTime
	WorkerID   int64
	IsActive   bool
	DaysOfWeek string
	StartTime  string
	EndTime    string
	NextCheck  sql.NullTime
}

type SoftDeleteWorkerParams

type SoftDeleteWorkerParams struct {
	DeletedAt sql.NullTime
	UUID      string
}

type StoreTaskDependencyParams

type StoreTaskDependencyParams struct {
	TaskID       int64
	DependencyID int64
}

type SummarizeJobStatusesRow

type SummarizeJobStatusesRow struct {
	Status      string
	StatusCount int64
}

type SummarizeWorkerStatusesRow

type SummarizeWorkerStatusesRow struct {
	Status      string
	StatusCount int64
}

type Task

type Task struct {
	ID            int64
	CreatedAt     time.Time
	UpdatedAt     sql.NullTime
	UUID          string
	Name          string
	Type          string
	JobID         int64
	IndexInJob    int64
	Priority      int64
	Status        string
	WorkerID      sql.NullInt64
	LastTouchedAt sql.NullTime
	Commands      json.RawMessage
	Activity      string
}

type TaskAssignToWorkerParams

type TaskAssignToWorkerParams struct {
	UpdatedAt sql.NullTime
	WorkerID  sql.NullInt64
	ID        int64
}

type TaskDependency

type TaskDependency struct {
	TaskID       int64
	DependencyID int64
}

type TaskFailure

type TaskFailure struct {
	CreatedAt time.Time
	TaskID    int64
	WorkerID  int64
}

type TaskTouchedByWorkerParams

type TaskTouchedByWorkerParams struct {
	UpdatedAt     sql.NullTime
	LastTouchedAt sql.NullTime
	ID            int64
}

type Test_CreateWorkerSleepScheduleParams

type Test_CreateWorkerSleepScheduleParams struct {
	CreatedAt  time.Time
	WorkerID   int64
	IsActive   bool
	DaysOfWeek string
	StartTime  string
	EndTime    string
	NextCheck  sql.NullTime
}

type UpdateJobsTaskStatusesConditionalParams

type UpdateJobsTaskStatusesConditionalParams struct {
	UpdatedAt        sql.NullTime
	Status           string
	Activity         string
	JobID            int64
	StatusesToUpdate []string
}

type UpdateJobsTaskStatusesParams

type UpdateJobsTaskStatusesParams struct {
	UpdatedAt sql.NullTime
	Status    string
	Activity  string
	JobID     int64
}

type UpdateTaskActivityParams

type UpdateTaskActivityParams struct {
	UpdatedAt sql.NullTime
	Activity  string
	ID        int64
}

type UpdateTaskParams

type UpdateTaskParams struct {
	UpdatedAt     sql.NullTime
	Name          string
	Type          string
	Priority      int64
	Status        string
	WorkerID      sql.NullInt64
	LastTouchedAt sql.NullTime
	Commands      json.RawMessage
	Activity      string
	ID            int64
}

type UpdateTaskStatusParams

type UpdateTaskStatusParams struct {
	UpdatedAt sql.NullTime
	Status    string
	ID        int64
}

type Worker

type Worker struct {
	ID                 int64
	CreatedAt          time.Time
	UpdatedAt          sql.NullTime
	UUID               string
	Secret             string
	Name               string
	Address            string
	Platform           string
	Software           string
	Status             string
	LastSeenAt         sql.NullTime
	StatusRequested    string
	LazyStatusRequest  bool
	SupportedTaskTypes string
	DeletedAt          sql.NullTime
	CanRestart         bool
}

type WorkerAddTagMembershipParams

type WorkerAddTagMembershipParams struct {
	WorkerTagID int64
	WorkerID    int64
}

type WorkerSeenParams

type WorkerSeenParams struct {
	UpdatedAt  sql.NullTime
	LastSeenAt sql.NullTime
	ID         int64
}

type WorkerTag

type WorkerTag struct {
	ID          int64
	CreatedAt   time.Time
	UpdatedAt   sql.NullTime
	UUID        string
	Name        string
	Description string
}

type WorkerTagMembership

type WorkerTagMembership struct {
	WorkerTagID int64
	WorkerID    int64
}

type WorkersLeftToRunParams

type WorkersLeftToRunParams struct {
	JobID    int64
	TaskType string
}

type WorkersLeftToRunWithWorkerTagParams

type WorkersLeftToRunWithWorkerTagParams struct {
	JobID       int64
	TaskType    string
	WorkerTagID int64
}

Jump to

Keyboard shortcuts

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