Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create() gin.HandlerFunc
@Summary Create a task @Schemes @Description Create a task @Tags tasks @Accept application/json @Produce application/json @Param task body apicontracts.Task true "Add a task" @Success 200 {array} apicontracts.Task @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v1/tasks [post] @Security ApiKey || AccessToken
func Delete ¶
func Delete() gin.HandlerFunc
@Summary Delete a task @Schemes @Description Delete a task by id @Tags tasks @Accept application/json @Produce application/json @Param id path string true "id" @Success 200 {bool} true @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v1/tasks/:id [delete] @Security ApiKey || AccessToken
func GetAll ¶
func GetAll() gin.HandlerFunc
@Summary Get tasks @Schemes @Description Get all tasks @Tags tasks @Accept application/json @Produce application/json @Success 200 {array} apicontracts.Task @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v1/tasks [get] @Security ApiKey || AccessToken
func GetById ¶
func GetById() gin.HandlerFunc
@Summary Get a task @Schemes @Description Get a task by id @Tags tasks @Accept application/json @Produce application/json @Param id path string true "id" @Param task body apicontracts.Task true "Get a task" @Success 200 {object} apicontracts.Task @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v1/tasks/:id [get] @Security ApiKey || AccessToken
func Update ¶
func Update() gin.HandlerFunc
@Summary Update a task @Schemes @Description Update a task by id @Tags tasks @Accept application/json @Produce application/json @Param id path string true "id" @Param task body apicontracts.Task true "Update task" @Success 200 {object} apicontracts.Task @Failure 403 {string} Forbidden @Failure 401 {string} Unauthorized @Failure 500 {string} Failure message @Router /v1/tasks/:id [put] @Security ApiKey || AccessToken
Types ¶
This section is empty.