Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
Types ¶
type CustomTime ¶
func (*CustomTime) MarshalJSON ¶
func (ct *CustomTime) MarshalJSON() ([]byte, error)
func (*CustomTime) Scan ¶
func (ct *CustomTime) Scan(value interface{}) error
Scan 实现 Scanner 接口,将数据库中的时间值转换为 CustomTime
func (*CustomTime) UnmarshalJSON ¶
func (ct *CustomTime) UnmarshalJSON(b []byte) error
UnmarshalJSON 解析 JSON 数据到 CustomTime
type DataSource ¶
type EncryptionSerializer ¶
type EncryptionSerializer struct {
}
EncryptionSerializer 加解密序列化器
type Model ¶
type Model struct {
ID string `gorm:"size:36;primarykey" json:"id"`
UpdatedAt *CustomTime `json:"updated_at"`
CreatedAt *CustomTime `json:"created_at"`
}
type Task ¶
type Task struct {
Model
DeletedAt gorm.DeletedAt `gorm:"index"`
Name string `json:"mission_name" gorm:"size:255"`
Cron string `json:"cron" gorm:"size:40"`
Data *_type.TaskData `json:"data" gorm:"type:json"`
Status int `json:"status" gorm:"default:0;size:2"` // 0:暂存 1:调度中 2:错误
LastRunTime *CustomTime `json:"last_run_time"`
LastSuccessTime *CustomTime `json:"last_success_time"`
LastEndTime *CustomTime `json:"last_end_time"`
ErrMsg string `json:"err_msg"`
IsRunning bool
EntryID *int // cron.EntryID
}
type TaskRecord ¶
type TaskRecord struct {
Model
CreatedAt *CustomTime
RunBy string `json:"run_by"`
TaskID string `json:"task_id"`
Task Task `json:"task"`
Status int `json:"status"` //0运行中;1运行成功;2运行失败
StartTime *CustomTime `json:"start_time"`
EndTime *CustomTime `json:"end_time"`
Message string `json:"message"`
Data *_type.TaskData `json:"data" gorm:"type:json"`
}
type TaskRecordFile ¶
type Variable ¶
type Variable struct {
Model
Name string `json:"name" gorm:"size:255"`
Type string `json:"type" gorm:"size:255"`
Description string `json:"description" gorm:"size:255"`
DataSourceID *string `json:"datasource_id" gorm:"size:36"`
DataSource *DataSource `json:"datasource"`
Value *_type.KeyValues `json:"value" gorm:"type:json"`
}
Click to show internal directories.
Click to hide internal directories.