Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecutionPageSize = 10
ExecutionPageSize defaults
View Source
var Gdb *gorm.DB
Gdb connection
View Source
var MasterCron *cron.Cron
MasterCron system
Functions ¶
func ValidStruct ¶
func ValidStruct(s interface{}) (bool, validator.ValidationErrors)
ValidStruct a given one
Types ¶
type Execution ¶
type Execution struct { ID int `gorm:"primary_key" json:"id"` CPU int `json:"cpu"` RAM int `json:"ram"` Bandwith int `json:"bandwith"` Seconds int `json:"seconds"` Machine string `json:"machine"` TaskID string `json:"task_id"` CreatedAt time.Time `json:"created_at"` }
Execution on the system
type Task ¶
type Task struct { ID string `sql:"type:varchar(100)" gorm:"primary_key" json:"id"` Name string `json:"name" validate:"required"` Periodicity string `json:"periodicity" validate:"required"` CronID int `json:"-"` Command string `json:"command" validate:"required"` CreatedAt time.Time `json:"created_at"` }
Task executed recurrently
Click to show internal directories.
Click to hide internal directories.