mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
27 lines
725 B
Go
27 lines
725 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Task struct {
|
|
ID int `db:"id" json:"id"`
|
|
TemplateID int `db:"template_id" json:"template_id" binding:"required"`
|
|
|
|
Status string `db:"status" json:"status"`
|
|
Debug bool `db:"debug" json:"debug"`
|
|
|
|
// override variables
|
|
Playbook string `db:"playbook" json:"playbook"`
|
|
Environment string `db:"environment" json:"environment"`
|
|
|
|
Created time.Time `db:"created" json:"created"`
|
|
Start *time.Time `db:"start" json:"start"`
|
|
End *time.Time `db:"end" json:"end"`
|
|
}
|
|
|
|
type TaskOutput struct {
|
|
TaskID int `db:"task_id" json:"task_id"`
|
|
Task string `db:"task" json:"task"`
|
|
Time time.Time `db:"time" json:"time"`
|
|
Output string `db:"output" json:"output"`
|
|
}
|