handlers

package
v0.0.0-...-1a65ef4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(c *gin.Context)

Types

type JobHandler

type JobHandler struct {
	// contains filtered or unexported fields
}

func NewJobHandler

func NewJobHandler() *JobHandler

func (*JobHandler) CreateJob

func (h *JobHandler) CreateJob(c *gin.Context)

CreateJob godoc @Summary Create a job. @Description create a job. @Tags job @Accept json @Produce json @Param config body job.JobConfiguration true "job configuration" @Success 201 {object} JobResponse @Failure 400 @Failure 500 @Router /jobs [post]

func (*JobHandler) DeleteJob

func (h *JobHandler) DeleteJob(c *gin.Context)

DeleteJob godoc @Summary delete job by id. @Description delete job by id. @Tags job @Accept json @Produce json @Param id path string true "job id" @Success 204 @Failure 404 @Router /jobs/{id} [delete]

func (*JobHandler) GetJob

func (h *JobHandler) GetJob(c *gin.Context)

GetJob godoc @Summary get job by id. @Description get job by id. @Tags job @Accept json @Produce json @Param id path string true "job id" @Success 200 {object} job.Job @Failure 404 @Router /jobs/{id} [get]

func (*JobHandler) ListJob

func (h *JobHandler) ListJob(c *gin.Context)

ListJob godoc @Summary list all jobs. @Description list all jobs. @Tags job @Accept json @Produce json @Success 200 {array} job.Job @Router /jobs [get]

func (*JobHandler) StartJob

func (h *JobHandler) StartJob(c *gin.Context)

StartJob godoc @Summary start to run a job. @Description start to run a job. @Tags job @Accept json @Produce json @Param id path string true "job id" @Success 204 @Failure 404 @Router /jobs/{id}/start [post]

func (*JobHandler) StopJob

func (h *JobHandler) StopJob(c *gin.Context)

StopJob godoc @Summary stop a running job. @Description stop a running job. @Tags job @Accept json @Produce json @Param id path string true "job id" @Success 204 @Failure 404 @Router /jobs/{id}/stop [post]

type JobResponse

type JobResponse struct {
	Id     string               `json:"id"`
	Name   string               `json:"name"`
	Status job.JobStatus        `json:"status"`
	Config job.JobConfiguration `json:"config"`
}

type PreviewHandler

type PreviewHandler struct {
	// contains filtered or unexported fields
}

func NewPreviewHandler

func NewPreviewHandler() *PreviewHandler

func (*PreviewHandler) Preview

func (h *PreviewHandler) Preview(c *gin.Context)

Preview godoc @Summary Preview a generated data. @Description Preview a generated data. @Tags preview @Accept json @Produce json @Param config body PreviewRequest true "preview request" @Success 201 {object} PreviewResponse @Failure 400 @Router /previews [post]

type PreviewRequest

type PreviewRequest struct {
	Type string `json:"type"`
	Rule string `json:"rule"`
}

type PreviewResponse

type PreviewResponse struct {
	Data string `json:"data"`
}

Jump to

Keyboard shortcuts

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