Documentation ¶
Index ¶
- Variables
- type BaseController
- func (this *BaseController) AssetNotEmpty(value interface{}, errmsg string)
- func (this *BaseController) CheckError(err error)
- func (this *BaseController) Fail(msg string, args ...interface{})
- func (this *BaseController) GetBool(key string, def ...bool) (bool, error)
- func (this *BaseController) GetBoolFromInputJson(field string, defaultValue ...bool) (bool, error)
- func (this *BaseController) GetFloat(key string, def ...float64) (float64, error)
- func (this *BaseController) GetFloat64FromInputJson(field string, defaultValue ...float64) float64
- func (this *BaseController) GetInt(key string, def ...int) (int, error)
- func (this *BaseController) GetIntFromInputJson(field string, defaultValue ...int) int
- func (this *BaseController) GetIpAddress() string
- func (this *BaseController) GetMapFromInputJson() (data map[string]interface{})
- func (this *BaseController) GetString(key string, def ...string) string
- func (this *BaseController) GetStringFromInputJson(field string, defaultValue ...string) string
- func (this *BaseController) GetUserExtraId(params ...bool) interface{}
- func (this *BaseController) GetUserExtraIdAsFloat(params ...bool) float64
- func (this *BaseController) GetUserExtraIdAsInt(params ...bool) int
- func (this *BaseController) GetUserExtraIdAsString(params ...bool) string
- func (this *BaseController) GetUserId(params ...bool) int
- func (this *BaseController) GetUserIdWithErr(params ...bool) (userId int, err error)
- func (this *BaseController) GetUserInfo(params ...bool) *utils.LoginUser
- func (this *BaseController) GetUserInfoWithErr(params ...bool) (loginUser *utils.LoginUser, err error)
- func (this *BaseController) IsNoRows(err error) bool
- func (this *BaseController) LogError(err error)
- func (c *BaseController) Options()
- func (this *BaseController) ParseInputJSON(data interface{})
- func (this *BaseController) RefreshUserInfo(loginUser *utils.LoginUser)
- func (this *BaseController) ResponseJson(errcode constants.ErrorCode, msg string, data interface{})
- func (this *BaseController) ResponseRawJson(data interface{})
- func (this *BaseController) SetUserInfo(loginUser *utils.LoginUser) (err error)
- func (this *BaseController) Success(data ...interface{})
- func (this *BaseController) SuccessEmpty()
- func (this *BaseController) Throw(args ...interface{})
- type ErrorController
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct {
beego.Controller
}
func (*BaseController) AssetNotEmpty ¶
func (this *BaseController) AssetNotEmpty(value interface{}, errmsg string)
func (*BaseController) CheckError ¶
func (this *BaseController) CheckError(err error)
func (*BaseController) Fail ¶
func (this *BaseController) Fail(msg string, args ...interface{})
func (*BaseController) GetBool ¶
func (this *BaseController) GetBool(key string, def ...bool) (bool, error)
func (*BaseController) GetBoolFromInputJson ¶
func (this *BaseController) GetBoolFromInputJson(field string, defaultValue ...bool) (bool, error)
func (*BaseController) GetFloat ¶
func (this *BaseController) GetFloat(key string, def ...float64) (float64, error)
func (*BaseController) GetFloat64FromInputJson ¶
func (this *BaseController) GetFloat64FromInputJson(field string, defaultValue ...float64) float64
func (*BaseController) GetInt ¶
func (this *BaseController) GetInt(key string, def ...int) (int, error)
func (*BaseController) GetIntFromInputJson ¶
func (this *BaseController) GetIntFromInputJson(field string, defaultValue ...int) int
func (*BaseController) GetMapFromInputJson ¶
func (this *BaseController) GetMapFromInputJson() (data map[string]interface{})
func (*BaseController) GetString ¶
func (this *BaseController) GetString(key string, def ...string) string
func (*BaseController) GetStringFromInputJson ¶
func (this *BaseController) GetStringFromInputJson(field string, defaultValue ...string) string
func (*BaseController) GetUserExtraId ¶
func (this *BaseController) GetUserExtraId(params ...bool) interface{}
func (*BaseController) GetUserExtraIdAsFloat ¶
func (this *BaseController) GetUserExtraIdAsFloat(params ...bool) float64
func (*BaseController) GetUserExtraIdAsInt ¶
func (this *BaseController) GetUserExtraIdAsInt(params ...bool) int
func (*BaseController) GetUserExtraIdAsString ¶
func (this *BaseController) GetUserExtraIdAsString(params ...bool) string
func (*BaseController) GetUserId ¶
func (this *BaseController) GetUserId(params ...bool) int
func (*BaseController) GetUserIdWithErr ¶
func (this *BaseController) GetUserIdWithErr(params ...bool) (userId int, err error)
func (*BaseController) GetUserInfo ¶
func (this *BaseController) GetUserInfo(params ...bool) *utils.LoginUser
func (*BaseController) GetUserInfoWithErr ¶
func (this *BaseController) GetUserInfoWithErr(params ...bool) (loginUser *utils.LoginUser, err error)
func (*BaseController) LogError ¶
func (this *BaseController) LogError(err error)
func (*BaseController) Options ¶
func (c *BaseController) Options()
func (*BaseController) ParseInputJSON ¶
func (this *BaseController) ParseInputJSON(data interface{})
func (*BaseController) RefreshUserInfo ¶
func (this *BaseController) RefreshUserInfo(loginUser *utils.LoginUser)
刷新jwt 用户信息
func (*BaseController) ResponseJson ¶
func (this *BaseController) ResponseJson(errcode constants.ErrorCode, msg string, data interface{})
func (*BaseController) ResponseRawJson ¶
func (this *BaseController) ResponseRawJson(data interface{})
func (*BaseController) SetUserInfo ¶
func (this *BaseController) SetUserInfo(loginUser *utils.LoginUser) (err error)
func (*BaseController) Success ¶
func (this *BaseController) Success(data ...interface{})
func (*BaseController) SuccessEmpty ¶
func (this *BaseController) SuccessEmpty()
type ErrorController ¶
type ErrorController struct {
BaseController
}
func (*ErrorController) Error403 ¶
func (this *ErrorController) Error403()
func (*ErrorController) Error404 ¶
func (this *ErrorController) Error404()
func (*ErrorController) Error501 ¶
func (this *ErrorController) Error501()
Click to show internal directories.
Click to hide internal directories.