Documentation ¶
Index ¶
- Constants
- func EnsureTables(db *sqlx.DB) error
- func InputGetOne(e sqlx.Ext, id int, input *Input) error
- func JobGetOne(e sqlx.Ext, id int, job *Job) error
- func NewDB(driverName string, dataSourceName string) (*sqlx.DB, error)
- func ResultGetOne(e sqlx.Ext, id int, result *Result) error
- func ResultGetOneByUUID(e sqlx.Ext, uuid string, result *Result) error
- func ResultGetOneByUUIDWithItems(e sqlx.Ext, uuid string, result *Result) error
- func ResultItemGetOne(e sqlx.Ext, id int, resultItem *ResultItem) error
- func TaskGetOne(e sqlx.Ext, id int, task *Task) error
- func TaskSwapSeq(e sqlx.Ext, t1 *Task, t2 *Task) error
- type Input
- type Job
- type Result
- type ResultItem
- type ResultStatus
- type Task
Constants ¶
View Source
const ( ResultStatusWaiting = "waiting" ResultStatusSuccess = "success" ResultStatusError = "error" )
Variables ¶
This section is empty.
Functions ¶
func EnsureTables ¶
func ResultItemGetOne ¶
func ResultItemGetOne(e sqlx.Ext, id int, resultItem *ResultItem) error
Types ¶
type Input ¶
type Input struct { ID int `json:"id"` TaskID int `json:"taskID" db:"task_id"` Name string `json:"name"` Value *watchful.InputValue `json:"value"` Type watchful.ParamType `json:"type" db:"type"` CreatedAt time.Time `json:"createdAt" db:"created_at" ` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` }
type Job ¶
type Job struct { ID int `json:"id"` Name string `json:"name"` Active bool `json:"active"` Status *ResultStatus `json:"status" db:"status"` Cron string `json:"cron" db:"cron"` LastRun *time.Time `json:"lastRun" db:"last_run"` CreatedAt time.Time `json:"createdAt" db:"created_at" ` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` }
type Result ¶
type Result struct { ID int `json:"id"` UUID string `json:"uuid" db:"uuid"` TestRun bool `json:"testRun" db:"test_run"` JobID int `json:"jobID" db:"job_id"` Status ResultStatus `json:"status" db:"status"` ResultItems []*ResultItem `json:"resultItems"` CreatedAt time.Time `json:"createdAt" db:"created_at" ` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` }
func ResultAllByJobID ¶
type ResultItem ¶
type ResultItem struct { ID int `json:"id"` ResultID int `json:"resultID" db:"result_id"` TaskID int `json:"taskID" db:"task_id"` Output string `json:"output" db:"output"` Error string `json:"error"` Status ResultStatus `json:"status"` CreatedAt time.Time `json:"createdAt" db:"created_at" ` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` }
func ResultItemAllByResultID ¶
func ResultItemAllByResultID(e sqlx.Ext, resultID int) ([]*ResultItem, error)
type ResultStatus ¶
type ResultStatus string
type Task ¶
type Task struct { ID int `json:"id"` JobID int `json:"jobID" db:"job_id"` Executable string `json:"executable"` Inputs []*Input `json:"inputs"` Seq int `json:"seq"` CreatedAt time.Time `json:"createdAt" db:"created_at" ` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.