Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TaskManager models.Tasks
Functions ¶
This section is empty.
Types ¶
type MainController ¶
type MainController struct { // Anonymous field, so the MainController has all methods that beego.Controller has. beego.Controller }
func (*MainController) Get ¶
func (c *MainController) Get()
func (*MainController) Prepare ¶
func (c *MainController) Prepare()
type TaskController ¶
type TaskController struct {
MainController
}
func (*TaskController) Edit ¶
func (c *TaskController) Edit()
@router /tasks/edit/:id [GET] @router /tasks/edit/:id [POST]
func (*TaskController) Index ¶
func (c *TaskController) Index()
func (*TaskController) Post ¶
func (c *TaskController) Post()
type V1TaskController ¶
type V1TaskController struct {
MainController
}
func (*V1TaskController) Delete ¶
func (c *V1TaskController) Delete()
@Title Delete @Description delete the task @Param id path string true "The id you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:id [delete]
func (*V1TaskController) Get ¶
func (c *V1TaskController) Get()
@Title Get @Description Get Task by Id @Param id path string true "The key for staticblock" @Success 200 {object} models.Task @Failure 403 :uid is empty @router /:id [get]
func (*V1TaskController) GetAll ¶
func (c *V1TaskController) GetAll()
@Title GetAll @Description Get all Tasks @Success 200 {object} models.Task @router / [get]
func (*V1TaskController) Post ¶
func (c *V1TaskController) Post()
@Title CreateTask @Description create tasks @Param body body models.Task true "body for task content" @Success 200 {int} models.Task.Id @Failure 403 body is empty @router / [post]
func (*V1TaskController) Put ¶
func (c *V1TaskController) Put()
@Title Update @Description update the task @Param id path string true "The id you want to update" @Param body body models.Task true "body for task content" @Success 200 {object} models.Task @Failure 403 :id is not int @router /:id [put]