Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidator ¶ added in v0.1.0
func GetValidator() *validator.Validate
GetValidator gin 集成了 validator,但是标签用的是 binding,这里获取的 validator 是为标签为 validate 准备的
Types ¶
type BaseController ¶
type BaseController struct{}
func (*BaseController) CheckParams ¶
func (c *BaseController) CheckParams(ctx *gin.Context, params interface{}) bool
CheckParams check params, params must be a pointer
type CodeWithErr ¶ added in v0.1.0
func NewCodeWithErr ¶ added in v0.1.0
func NewCodeWithErr(code RetCode, err error) *CodeWithErr
func (CodeWithErr) Error ¶ added in v0.1.0
func (c CodeWithErr) Error() string
Click to show internal directories.
Click to hide internal directories.