Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
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 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 PreviewResponse ¶
type PreviewResponse struct {
Data string `json:"data"`
}