task

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx *macaron.Context)

新增页面

func Disable

func Disable(ctx *macaron.Context) string

暂停任务

func Edit

func Edit(ctx *macaron.Context)

编辑页面

func Enable

func Enable(ctx *macaron.Context) string

激活任务

func Index

func Index(ctx *macaron.Context)

首页

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

保存任务

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;MaxSize(256)"`
	Timeout          int                 `binding:"Range(0,86400)"`
	Multi            int8                `binding:"In(1,2)"`
	RetryTimes       int8
	HostId           string
	Tag              string
	Remark           string
	NotifyStatus     int8 `binding:"In(1,2,3)"`
	NotifyType       int8 `binding:"In(1,2,3)"`
	NotifyReceiverId 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