api

package
v2.0.77 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	JobService *service.Job
}

Job 定时任务管理

func NewJob

func NewJob() *Job

NewJob 定时任务实例化

func (*Job) Create

func (d *Job) Create(c *gin.Context)

Create 创建数据 @Tags 定时任务 @Security Bearer @Summary 添加定时任务 @Param body body model.Job true "定时任务" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/jobs [post]

func (*Job) Delete

func (d *Job) Delete(c *gin.Context)

Delete 删除数据 @Tags 定时任务 @Security Bearer @Summary 删除定时任务 @Param id path string true "任务ID" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/jobs/{id} [delete]

func (*Job) Get

func (d *Job) Get(c *gin.Context)

Get 查询指定数据 @Tags 定时任务 @Security Bearer @Summary 通过任务ID获取定时任务信息 @Param id path int true "定时任务ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/jobs/{id} [get]

func (*Job) Query

func (d *Job) Query(c *gin.Context)

Query 查询数据 @Tags 定时任务 @Security Bearer @Summary 定时任务列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param status query string false "status" @Param jobName query string false "jobName" @Param jobGroup query string false "jobGroup" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/jobs [get]

func (*Job) Remove

func (d *Job) Remove(c *gin.Context)

Remove 移除定时任务 @Tags 定时任务 @Security Bearer @Summary 通过任务ID移除定时任务 @Param id path int true "任务ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/job/remove/{id} [get]

func (*Job) Start

func (d *Job) Start(c *gin.Context)

Start 启动定时任务 @Tags 定时任务 @Security Bearer @Summary 通过任务ID启动定时任务 @Param id path int true "任务ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/job/start/{id} [get]

func (*Job) Update

func (d *Job) Update(c *gin.Context)

Update 更新数据 @Tags 定时任务 @Security Bearer @Summary 更新定时任务 @Param body body model.Job true "定时任务" @Success 200 string string "{code: 200, msg: 更新成功}" @Failure 200 string string "{code: -1, msg: 更新失败}" @Router /api/v1/jobs [put]

Jump to

Keyboard shortcuts

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