Documentation ¶
Index ¶
- type BaseController
- func (m *BaseController) BindJSONIgnoreCase(ctx *gin.Context, req interface{}) (err error)
- func (m *BaseController) GetContentUnLogin(ctx *gin.Context) (*request.Context, error)
- func (m *BaseController) GetRequestContext(ctx *gin.Context) (*request.Context, error)
- func (m *BaseController) LimitLock(ctx *gin.Context) error
- func (m *BaseController) Response(ctx *gin.Context, code int, msg string, data interface{})
- func (m *BaseController) Response500(ctx *gin.Context, res interface{})
- func (m *BaseController) ResponseError(ctx *gin.Context, err error)
- func (m *BaseController) ResponseOk(ctx *gin.Context, data interface{})
- func (m *BaseController) ShouldBind(ctx *gin.Context, req interface{}) error
- func (m *BaseController) ShouldBindJSON(ctx *gin.Context, req interface{}) error
- func (m *BaseController) ShouldBindQuery(ctx *gin.Context, req interface{}) error
- type IsValidChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
func NewBaseController ¶
func NewBaseController(svc *svc.ControllerContext) BaseController
func (*BaseController) BindJSONIgnoreCase ¶
func (m *BaseController) BindJSONIgnoreCase(ctx *gin.Context, req interface{}) (err error)
把请求参数转换为小写
func (*BaseController) GetContentUnLogin ¶
func (*BaseController) GetRequestContext ¶
func (*BaseController) Response ¶
func (m *BaseController) Response(ctx *gin.Context, code int, msg string, data interface{})
func (*BaseController) Response500 ¶
func (m *BaseController) Response500(ctx *gin.Context, res interface{})
func (*BaseController) ResponseError ¶
func (m *BaseController) ResponseError(ctx *gin.Context, err error)
func (*BaseController) ResponseOk ¶
func (m *BaseController) ResponseOk(ctx *gin.Context, data interface{})
func (*BaseController) ShouldBind ¶
func (m *BaseController) ShouldBind(ctx *gin.Context, req interface{}) error
func (*BaseController) ShouldBindJSON ¶
func (m *BaseController) ShouldBindJSON(ctx *gin.Context, req interface{}) error
func (*BaseController) ShouldBindQuery ¶
func (m *BaseController) ShouldBindQuery(ctx *gin.Context, req interface{}) error
type IsValidChecker ¶
type IsValidChecker interface {
IsValid() error
}
Click to show internal directories.
Click to hide internal directories.