apicontrollers

package
v0.0.0-...-329f2e7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppId int

Functions

This section is empty.

Types

type BaseApiController

type BaseApiController struct {
	beego.Controller
}

TODO 另一版的api验证 废弃 基类

func (*BaseApiController) Prepare

func (c *BaseApiController) Prepare()

Prepare implemented Prepare method for baseRouter.

type ProjectController

type ProjectController struct {
	BaseApiController
}

oprations for Project

func (*ProjectController) Delete

func (c *ProjectController) Delete()

@Title Delete @Description delete the Project @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 (*ProjectController) GetAll

func (c *ProjectController) GetAll()

@Title Get All @Description get Project @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} models.Project @Failure 403 @router / [get]

func (*ProjectController) GetOne

func (c *ProjectController) GetOne()

@Title Get @Description get Project by id @Param id path string true "The key for staticblock" @Success 200 {object} models.Project @Failure 403 :id is empty @router /:id [get]

func (*ProjectController) Post

func (c *ProjectController) Post()

@Title Post @Description create Project @Param body body models.Project true "body for Project content" @Success 201 {int} models.Project @Failure 403 body is empty @router / [post]

func (*ProjectController) Put

func (c *ProjectController) Put()

@Title Update @Description update the Project @Param id path string true "The id you want to update" @Param body body models.Project true "body for Project content" @Success 200 {object} models.Project @Failure 403 :id is not int @router /:id [put]

func (*ProjectController) URLMapping

func (c *ProjectController) URLMapping()

type TaskController

type TaskController struct {
	BaseApiController
}

oprations for Task

func (*TaskController) Delete

func (c *TaskController) 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 (*TaskController) GetAll

func (c *TaskController) GetAll()

@Title Get All @Description get Task @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} models.Task @Failure 403 @router / [get]

func (*TaskController) GetAllAndProName

func (c *TaskController) GetAllAndProName()

@Title Get All @Description get Task @Param pro_name query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param startTime query string false "Fields returned. e.g. col1,col2 ..." @Param endTime query string false "Sorted-by fields. e.g. col1,col2 ..." @Success 200 {object} models.Task @Failure 403 @router / [get]

func (*TaskController) GetOne

func (c *TaskController) GetOne()

@Title Get @Description get Task by id @Param id path string true "The key for staticblock" @Success 200 {object} models.Task @Failure 403 :id is empty @router /:id [get]

func (*TaskController) Post

func (c *TaskController) Post()

@Title Post @Description create Task @Param body body models.Task true "body for Task content" @Success 201 {int} models.Task @Failure 403 body is empty @router / [post]

func (*TaskController) Put

func (c *TaskController) 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]

func (*TaskController) URLMapping

func (c *TaskController) URLMapping()

type TokenController

type TokenController struct {
	beego.Controller
}

访问Token管理

func (*TokenController) IssueToken

func (c *TokenController) IssueToken()

@Title 生成访问Token @Description 生成Json Web Token @Param appid query string false "appid" @Param appsecret query string false "appsecret" @Success 200 {"access_token":"ACCESS_TOKEN","expires_in":"7200"} @Failure 200 {"errcode":"100","errmsg":"invalid appid"} @router / [get]

func (*TokenController) URLMapping

func (c *TokenController) URLMapping()

Jump to

Keyboard shortcuts

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