Documentation
¶
Index ¶
- func AddGenOne(handleFuncName, routerPath string, methods []string)
- func FindTag(obj interface{}, field, tag string) string
- func GetStringList(list []string) string
- func UnMarshal(name string) string
- type APIFunc
- type Base
- type BeforeAfter
- type DefaultBeforeAfter
- type ErrorFunc
- type Hook
- type RespBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
func Annotation ¶
func Annotation() *Base
type BeforeAfter ¶
type BeforeAfter struct { C *gin.Context FuncName string // 函数名 Param interface{} // 调用前的请求参数 Response interface{} // 调用后的返回数据 Error error Ctx context.Context // 占位参数,可用于存储其他参数,前后连接可用 }
对象调用前后执行中间件参数
type DefaultBeforeAfter ¶
type DefaultBeforeAfter struct{}
func (*DefaultBeforeAfter) Before ¶
func (d *DefaultBeforeAfter) Before(r *BeforeAfter) bool
call之前调用
type Hook ¶
type Hook interface { Before(r *BeforeAfter) bool After(r *BeforeAfter) bool }
对象调用前后执行中间件(支持总的跟对象单独添加)
Click to show internal directories.
Click to hide internal directories.