5.02 Context-Beego Context设计分析
PART1. Beego Context设计
1.1 Context
Contexttype Context struct {
Input *BeegoInput
Output *BeegoOutput
Request *http.Request
ResponseWriter *Response
_xsrfToken string
}1.2 BeegoInput
BeegoInput1.3 BeegoOutput
BeegoOutput1.4 Response
ResponsePART2. Beego 处理输入的方法
2.1 负责处理来自http.Request.Body输入的方法
http.Request.Body输入的方法2.1.1 Context的Bind族方法
Context的Bind族方法
2.1.2 Input的Bind()方法
Input的Bind()方法2.2 负责处理来自其他部位的方法


2.3 各种判断的方法

PART3. Beego 处理输出的方法
3.1 将输入序列化之后输出的方法

3.2 渲染模板输出的方法

3.3 输出各种格式数据的方法

Last updated