Documentation ¶
Index ¶
Constants ¶
View Source
const ( STATUS_STOP = "stop" STATUS_RUN = "run" STATUS_DEL = "del" GET = "GET" POST = "POST" PUT = "PUT" DELETE = "DELETE" )
Variables ¶
View Source
var SORT_MAP = map[string]string{
"createTime": "create_time",
"start_time": "start_time",
"duration": "duration",
}
Functions ¶
This section is empty.
Types ¶
type TaskService ¶
type TaskService interface { RunTask(ctx context.Context) Add(ctx context.Context, task *model.Task) error Update(ctx context.Context, userId int64, task *model.Task) error PageByOption(ctx context.Context, opt *types.TaskOption) (*types.Page[*types.TaskDTO], error) Start(ctx context.Context, userId int64, id int64) error Stop(ctx context.Context, userId int64, id int64) error Del(ctx context.Context, userId int64, id int64) error DoOnce(ctx context.Context, uid int64, id int64) error RunTaskById(ctx context.Context, taskId int64) error DelEntry(ctx context.Context, taskId int64) UpdateUser(ctx context.Context, tcu *types.TaskChangeUser) (int64, error) StartBatch(ctx context.Context, userId int64, tbatch *types.TaskBatch) (int64, error) StopBatch(ctx context.Context, userId int64, tbatch *types.TaskBatch) (int64, error) DelBatch(ctx context.Context, userId int64, tbatch *types.TaskBatch) (int64, error) AddExcute(ctx context.Context, taskExcute *model.TaskExcute) error ExcutePageByOption(ctx context.Context, opt *types.TaskExcuteOption) (*types.Page[*types.TaskExcuteDTO], error) CleanLog(ctx context.Context, day int64) Dashboard(ctx context.Context) *types.Dashboard }
func NewService ¶
func NewService() TaskService
Click to show internal directories.
Click to hide internal directories.