Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { ID string `db:"id" json:"id" validate:"required" description:"The ID of the job."` Name string `db:"name" json:"name" validate:"required" description:"The name of the job."` Output *Output `db:"output" json:"output" description:"The output of the job."` Fields map[string]any `` /* 131-byte string literal not displayed */ Statuses []map[string]any `db:"statuses" json:"statuses" validate:"required" description:"The job statuses."` GuildID string `db:"guild_id" json:"guild_id" validate:"required" description:"The ID of the guild the job is for."` Expiry *time.Duration `db:"expiry" json:"expiry" validate:"required" description:"The job expiry."` State string `db:"state" json:"state" validate:"required" description:"The jobs' current state (pending/completed etc)."` Resumable bool `db:"resumable" json:"resumable" description:"Whether the job is resumable."` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the job was created."` }
@ci table=jobs
Jobs are background processes that can be run on a coordinator server.
type JobCreateResponse ¶
type JobCreateResponse struct {
ID string `json:"id" description:"The id of the job"`
}
type JobListResponse ¶
type JobListResponse struct {
Jobs []PartialJob `json:"jobs" description:"The list of (partial) jobs"`
}
type PartialJob ¶
type PartialJob struct { ID string `db:"id" json:"id" validate:"required" description:"The ID of the job."` Name string `db:"name" json:"name" validate:"required" description:"The name of the job."` Expiry *time.Duration `db:"expiry" json:"expiry" validate:"required" description:"The job expiry."` State string `db:"state" json:"state" validate:"required" description:"The jobs' current state (pending/completed etc)."` CreatedAt time.Time `db:"created_at" json:"created_at" description:"The time the job was created."` }
@ci table=jobs unfilled=1
A PartialJob represents a partial representation of a job.
Click to show internal directories.
Click to hide internal directories.