Documentation ¶
Index ¶
- type BaseController
- func (that *BaseController) AjaxData(data interface{}, status int)
- func (that *BaseController) GetHeader() http.Header
- func (that *BaseController) GetHeaderByKey(key string) string
- func (that *BaseController) GetIp() string
- func (that *BaseController) GetMethod() string
- func (that *BaseController) GetRequestBody() []byte
- func (that *BaseController) GetRequestBodyToJson(object interface{}) error
- func (that *BaseController) GetRequestBodyToJsonUseNumber(object interface{}) error
- func (that *BaseController) GetRequestBodyToXml(object interface{}) error
- func (that *BaseController) GetRequestJsonToMap() (map[string]interface{}, error)
- func (that *BaseController) GetRequestParam(key string) string
- func (that *BaseController) GetRequestParams() map[string]string
- func (that *BaseController) GetRequestUrl() string
- func (that *BaseController) GetToken() string
- func (that *BaseController) NowUnixNano() int64
- func (that *BaseController) NowUnixTime() int64
- func (that *BaseController) Query(key string) string
- func (that *BaseController) QueryToInt64(key string) (int64, error)
- func (that *BaseController) WriteList(data interface{}, status int, msg string)
- func (that *BaseController) WriteMsg(data interface{}, status int, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct {
beego.Controller
}
@作者:Ven @类型详情:基础控制器类型用于“继承” @备注信息:无 @时间:2018-07-08
func (*BaseController) AjaxData ¶ added in v1.0.2
func (that *BaseController) AjaxData(data interface{}, status int)
@作者:Ven @函数详情:ajax请求返回数据统一函数 @备注信息:该函数会终结Controller 的运行 @参数:[data]{interface{}类型传入返回客户端的数据体,[status]{int类型 为状态码} @返回值:无 @时间:2018-07-08
func (*BaseController) GetHeader ¶
func (that *BaseController) GetHeader() http.Header
@作者:Ven @函数详情:获取请求头的 Header结构 @备注信息:无 @参数:无 @返回值:http.Header @时间:2018-07-08
func (*BaseController) GetHeaderByKey ¶
func (that *BaseController) GetHeaderByKey(key string) string
@作者:Ven @函数详情:获取header里制定的key值 @备注信息:无 @参数:[key]{string} @返回值:header内key对应的value @时间:2018-07-08
func (*BaseController) GetIp ¶
func (that *BaseController) GetIp() string
@作者:Ven @函数详情:获取客户端ip @备注信息:无 @参数:无 @返回值:string @时间:2018-07-08
func (*BaseController) GetMethod ¶
func (that *BaseController) GetMethod() string
@作者:Ven @函数详情:获取客户端方法 @备注信息:无 @参数:无 @返回值:string @时间:2018-07-08
func (*BaseController) GetRequestBody ¶
func (that *BaseController) GetRequestBody() []byte
@作者:Ven @函数详情:获取当前请求的Body体 @备注信息:无 @参数: @返回值:包体字节数组 @时间:2018-07-08
func (*BaseController) GetRequestBodyToJson ¶
func (that *BaseController) GetRequestBodyToJson(object interface{}) error
@作者:Ven @函数详情:传入数据容器将请求体内容以json形式解析 @备注信息:无 @参数:object为传入传出参数 @返回值:error @时间:2018-07-08
func (*BaseController) GetRequestBodyToJsonUseNumber ¶
func (that *BaseController) GetRequestBodyToJsonUseNumber(object interface{}) error
@作者:LXW @函数详情:传入数据容器将请求体内容以json形式解析,并不需使用科学计数法 @备注信息:无 @参数:object为传入传出参数 @返回值:error @时间:2018-07-08
func (*BaseController) GetRequestBodyToXml ¶
func (that *BaseController) GetRequestBodyToXml(object interface{}) error
@作者:Ven @函数详情:传入数据容器将请求体内容以xml形式解析 @备注信息:无 @参数:object为传入传出参数 @返回值:error @时间:2018-07-08
func (*BaseController) GetRequestJsonToMap ¶
func (that *BaseController) GetRequestJsonToMap() (map[string]interface{}, error)
@作者:Ven @函数详情:将请求体内容以json形式解析返回map[string]interface{}数据 @备注信息:无 @参数:无 @返回值:map 和 error @时间:2018-07-08
func (*BaseController) GetRequestParam ¶
func (that *BaseController) GetRequestParam(key string) string
@作者:Ven @函数详情: @备注信息:无 @参数: @返回值: @时间:2018-07-08
func (*BaseController) GetRequestParams ¶
func (that *BaseController) GetRequestParams() map[string]string
@作者:Ven @函数详情: @备注信息:无 @参数: @返回值: @时间:2018-07-08
func (*BaseController) GetRequestUrl ¶
func (that *BaseController) GetRequestUrl() string
@作者:Ven @函数详情:获取请求的url @备注信息:无 @参数: @返回值: @时间:2018-07-08
func (*BaseController) GetToken ¶
func (that *BaseController) GetToken() string
@作者:Ven @函数详情:获取请求头头部为tk的token 信息 @备注信息:无 @参数:无 @返回值:string @时间:2018-07-08
func (*BaseController) NowUnixNano ¶
func (that *BaseController) NowUnixNano() int64
@作者:Ven @函数详情:当前系统时间戳纳秒数 @备注信息:无 @参数: @返回值:当前系统时间戳毫秒数 @时间:2018-07-08
func (*BaseController) NowUnixTime ¶
func (that *BaseController) NowUnixTime() int64
@作者:Ven @函数详情:当前系统时间戳毫秒数 @备注信息:无 @参数: @返回值:当前系统时间戳毫秒数 @时间:2018-07-08
func (*BaseController) Query ¶
func (that *BaseController) Query(key string) string
@作者:Ven @函数详情: @备注信息:无 @参数: @返回值: @时间:2018-07-08
func (*BaseController) QueryToInt64 ¶
func (that *BaseController) QueryToInt64(key string) (int64, error)
@作者:Ven @函数详情:获取客户端ip @备注信息:无 @参数:无 @返回值:string @时间:2018-07-08
func (*BaseController) WriteList ¶
func (that *BaseController) WriteList(data interface{}, status int, msg string)
*
- @作者: Ven
- @详情: 无
- @备注信息: 无
- @param {interface{}} data
- @param {int} status
- @param {string} msg
- @返回值: {*}
- @时间: 2021-01-14 15:17:51
func (*BaseController) WriteMsg ¶
func (that *BaseController) WriteMsg(data interface{}, status int, msg string)
*
- @作者: Ven
- @详情: 无
- @备注信息: 无
- @param {interface{}} data
- @param {int} status
- @param {string} msg
- @返回值: {*}
- @时间: 2021-01-14 15:17:48