Documentation ¶
Index ¶
- Variables
- type Controller
- func (ctrl *Controller) AddError(err error)
- func (ctrl *Controller) Bind(d interface{}, bindings ...binding.Binding) *Controller
- func (ctrl Controller) Custom(data gin.H)
- func (ctrl Controller) Error(code int, err error, msg string)
- func (ctrl *Controller) MakeContext(c *gin.Context, params ...string) *Controller
- func (ctrl Controller) OK(data interface{}, msg string)
- func (ctrl Controller) PageOK(result interface{}, count int, pageIndex int, pageSize int, msg string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Chan channel controller
Chan chanCtrl
)
View Source
var Health healthCtrl
Health health controller
View Source
var (
// Trade trade controller
Trade tradeCtrl
)
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller server route controller
func (*Controller) Bind ¶
func (ctrl *Controller) Bind(d interface{}, bindings ...binding.Binding) *Controller
Bind 参数校验
func (Controller) Error ¶
func (ctrl Controller) Error(code int, err error, msg string)
Error 通常错误数据处理
func (*Controller) MakeContext ¶
func (ctrl *Controller) MakeContext(c *gin.Context, params ...string) *Controller
MakeContext 设置http上下文
Click to show internal directories.
Click to hide internal directories.