Documentation ¶
Index ¶
- func Use(e ICtx) gin.HandlerFunc
- type Flow
- func (f *Flow) CloseColor()
- func (f *Flow) FlowHandle() *replyx.T
- func (f *Flow) FlowLogic() *replyx.T
- func (f *Flow) FlowValidate() *replyx.T
- func (f *Flow) GetAuthor() string
- func (f *Flow) GetCtx() *gin.Context
- func (f *Flow) GetReq() interface{}
- func (f *Flow) LogErrorf(format string, a ...interface{})
- func (f *Flow) LogInfof(format string, a ...interface{})
- func (f *Flow) ReturnJson(data *replyx.T)
- func (f *Flow) ReturnSucc(data interface{})
- func (f *Flow) SetHttpCode(code int)
- func (f *Flow) SetReq(obj interface{})
- func (f *Flow) ShouldBind(obj interface{}) error
- func (f *Flow) ShouldBindJSON(obj interface{}) error
- type ICtx
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Use ¶
func Use(e ICtx) gin.HandlerFunc
Types ¶
type Flow ¶
type Flow struct {
// contains filtered or unexported fields
}
func (*Flow) CloseColor ¶ added in v0.8.0
func (f *Flow) CloseColor()
func (*Flow) FlowHandle ¶ added in v0.7.0
func (*Flow) FlowValidate ¶ added in v0.7.0
func (*Flow) ReturnJson ¶
func (*Flow) ReturnSucc ¶ added in v0.7.0
func (f *Flow) ReturnSucc(data interface{})
func (*Flow) SetHttpCode ¶ added in v0.7.0
func (*Flow) ShouldBind ¶ added in v0.7.0
func (*Flow) ShouldBindJSON ¶ added in v0.7.0
type ICtx ¶ added in v0.5.7
type ICtx interface { GetAuthor() string // 获取作者 SetHttpCode(code int) // 设置 http code ReturnJson(data *replyx.T) // 返回 json ReturnSucc(obj interface{}) // 返回成功 LogErrorf(format string, args ...interface{}) // 打印错误日志 LogInfof(format string, args ...interface{}) // 打印信息日志 ShouldBind(obj interface{}) error // 绑定form ShouldBindJSON(obj interface{}) error // 绑定json GetCtx() *gin.Context // 获取 gin 上下文 SetReq(obj interface{}) // 绑定请求参数 GetReq() interface{} // 获取请求参数 CloseColor() // 关闭颜色 FlowHandle() *replyx.T // 业务逻辑-控制器句柄 FlowValidate() *replyx.T // 业务逻辑-参数校验 FlowLogic() *replyx.T // 业务逻辑-业务逻辑 // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.