Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { }
Controller struct
func (*Controller) AddJob ¶
func (c *Controller) AddJob(ctx *gin.Context)
AddJob function to add jobs to the API @Summary Add job @Description Add job to API for download @Tags jobs @Accept json @Produce json @Param url query string true "url to download" Format(str) @Success 200 {object} models.Job @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /jobs [post]
func (*Controller) GetJob ¶
func (c *Controller) GetJob(ctx *gin.Context)
GetJob ... Jobs function to get a specific job by UUID @Summary List jobs @Description Get a specific job by UUID @Tags jobs @Accept json @Produce json @Param uuid path string true "job uuid" Format(str) @Success 200 {array} models.Job @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /jobs/:uuid [get]
func (*Controller) Jobs ¶
func (c *Controller) Jobs(ctx *gin.Context)
Jobs ... Jobs function to list all jobs active in the API @Summary List jobs @Description List all jobs active in the API @Tags jobs @Accept json @Produce json @Success 200 {array} models.Job @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /jobs [get]
func (*Controller) Ping ¶
func (c *Controller) Ping(ctx *gin.Context)
Ping return pong @Summary ping common @Description do ping @Tags common @Accept json @Produce json @Success 200 {string} string "pong" @Failure 400 {string} string "ok" @Failure 404 {string} string "ok" @Failure 500 {string} string "ok" @Router /ping [get]
type ErrorResponse ¶
type ErrorResponse struct { Message string `json:"message" groups:"api" example:"status bad request"` Code int `json:"code" groups:"api" example:"400"` MoreInfo string `json:"more_info" groups:"api" example:"http://"` }
ErrorResponse used to descrive api error response