task

package
v0.0.0-...-d4e5dbb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detail

func Detail(ctx *macaron.Context) string

Detail 任务详情

func Disable

func Disable(ctx *macaron.Context) string

暂停任务

func Enable

func Enable(ctx *macaron.Context) string

激活任务

func Index

func Index(ctx *macaron.Context) string

首页

func Remove

func Remove(ctx *macaron.Context) string

删除任务

func Run

func Run(ctx *macaron.Context) string

手动运行任务

func Store

func Store(ctx *macaron.Context, form TaskForm) string

保存任务 todo 拆分为多个方法

Types

type TaskForm

type TaskForm struct {
	Id               int
	Level            models.TaskLevel `binding:"Required;In(1,2)"`
	DependencyStatus models.TaskDependencyStatus
	DependencyTaskId string
	Name             string `binding:"Required;MaxSize(32)"`
	Spec             string
	Protocol         models.TaskProtocol   `binding:"In(1,2)"`
	Command          string                `binding:"Required"`
	HttpMethod       models.TaskHTTPMethod `binding:"In(1,2,3)"`
	Timeout          int                   `binding:"Range(0,86400)"`
	Multi            int8                  `binding:"In(1,2)"`
	RetryTimes       int8
	RetryInterval    int16
	HostId           string
	Tag              string
	Remark           string
	NotifyStatus     int8 `binding:"In(1,2,3,4)"`
	NotifyType       int8 `binding:"In(1,2,3,4)"`
	NotifyReceiverId string
	NotifyKeyword    string
}

func (TaskForm) Error

func (f TaskForm) Error(ctx *macaron.Context, errs binding.Errors)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL