Documentation ¶
Index ¶
- Variables
- type AutoRouteCellParam
- type AutoRouteHandler
- type Controller
- type CronChild
- type CronChildArr
- type FilterMapStruct
- type JsonMapData
- type ReqHandler
- func (r ReqHandler) Form(s string) reqParam
- func (r ReqHandler) FormByPost(s string) reqParam
- func (r ReqHandler) Get(s string) reqParam
- func (r ReqHandler) Json(obj interface{})
- func (r ReqHandler) JsonMap() map[string]interface{}
- func (r ReqHandler) JsonMapInit() JsonMapData
- func (r ReqHandler) Route(s string) reqParam
- type ResError
- type ResHandler
- type ResJson
- type RouteMethodType
- type RouteRegistMap
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //2000 RES_ERROR_LOGIN = ResError{Code: 2001, Msg: "登录受限"} //4000 RES_ERROR_PARAM = ResError{Code: 4000, Msg: "参数不存在"} RES_ERROR_PERMIT = ResError{Code: 4001, Msg: "权限异常"} RES_ERROR_AUTH = ResError{Code: 4002, Msg: "身份验证失败"} RES_ERROR_NOACCESS = ResError{Code: 4003, Msg: "无权限"} RES_ERROR_API = ResError{Code: 4004, Msg: "接口不存在"} RES_ERROR_PARSER = ResError{Code: 4005, Msg: "数据解析失败"} //5000 RES_ERROR_SERVER = ResError{Code: 5001, Msg: "服务器错误"} )
抛出异常选项
View Source
var ( ROUTE_METHOS_GET RouteMethodType = []byte{0, 1} //GET ROUTE_METHOS_POST RouteMethodType = []byte{0, 2} //POST ROUTE_METHOS_PUT RouteMethodType = []byte{0, 3} //PUT ROUTE_METHOS_DELETE RouteMethodType = []byte{0, 4} //DELETE ROUTE_METHOS_ALL RouteMethodType = []byte{0, 0} //GET,POST,PUT,DELETE AutoRoute AutoRouteHandler )
定义请求方式可选参数
Functions ¶
This section is empty.
Types ¶
type AutoRouteCellParam ¶
type AutoRouteCellParam struct { Class beego.ControllerInterface //beego控制器 Action string //路由对应控制器执行方法 Method RouteMethodType //请求方式 }
单切面路由参数集结构
type AutoRouteHandler ¶
type AutoRouteHandler struct{}
func (AutoRouteHandler) Cell ¶
func (au AutoRouteHandler) Cell(c beego.ControllerInterface, a string, t ...RouteMethodType) AutoRouteCellParam
单切面路由参数集
type Controller ¶
type Controller struct {
beego.Controller
}
Operations about Users
func (Controller) Handler ¶
func (t Controller) Handler() *controllerHandler
func (Controller) Options ¶
func (t Controller) Options()
type CronChildArr ¶
type CronChildArr []CronChild
type FilterMapStruct ¶
type FilterMapStruct map[filterCyc]map[path]filterFunc
type JsonMapData ¶
type JsonMapData map[string]interface{}
func (JsonMapData) Get ¶
func (r JsonMapData) Get(s string) reqParam
type ReqHandler ¶
type ReqHandler struct {
// contains filtered or unexported fields
}
* 获取参数 工具 *
func (ReqHandler) Form ¶
func (r ReqHandler) Form(s string) reqParam
func (ReqHandler) FormByPost ¶
func (r ReqHandler) FormByPost(s string) reqParam
func (ReqHandler) Get ¶
func (r ReqHandler) Get(s string) reqParam
func (ReqHandler) Json ¶
func (r ReqHandler) Json(obj interface{})
func (ReqHandler) JsonMap ¶
func (r ReqHandler) JsonMap() map[string]interface{}
func (ReqHandler) JsonMapInit ¶
func (r ReqHandler) JsonMapInit() JsonMapData
func (ReqHandler) Route ¶
func (r ReqHandler) Route(s string) reqParam
type ResHandler ¶
type ResHandler struct {
// contains filtered or unexported fields
}
* Response 工具 *
func (ResHandler) Error ¶
func (r ResHandler) Error(t ResError, m ...string)
func (ResHandler) Fail ¶
func (r ResHandler) Fail(c int, m string)
func (ResHandler) Response ¶
func (r ResHandler) Response(c int, m string, d interface{})
func (ResHandler) Success ¶
func (r ResHandler) Success(d interface{})
Click to show internal directories.
Click to hide internal directories.