Documentation ¶
Index ¶
- Constants
- func Body() dispatcher.HandlerFunc
- func ContextHandler(exhandler interface{}, name string, engine string, service string, ...) dispatcher.HandlerFunc
- func Delay() dispatcher.HandlerFunc
- func Header(cnf *conf.MetadataConf) dispatcher.HandlerFunc
- func Host(cnf *conf.MetadataConf) dispatcher.HandlerFunc
- func JwtAuth(cnf *conf.MetadataConf) dispatcher.HandlerFunc
- func JwtWriter(cnf *conf.MetadataConf) dispatcher.HandlerFunc
- func Logging(conf *conf.MetadataConf) dispatcher.HandlerFunc
- func NoResponse(conf *conf.MetadataConf) dispatcher.HandlerFunc
- func Recovery() dispatcher.HandlerFunc
- func RecoveryWithWriter() dispatcher.HandlerFunc
- func Response(conf *conf.MetadataConf) dispatcher.HandlerFunc
- type HandlerFunc
- type HeaderData
- type IHeaderData
- type IInputData
- type InputData
- type Metric
- type ParamData
Constants ¶
View Source
const DELAY_HEADER_KEY = "X-Add-Delay"
DELAY_HEADER_KEY 延时请求头名称
Variables ¶
This section is empty.
Functions ¶
func ContextHandler ¶
func ContextHandler(exhandler interface{}, name string, engine string, service string, mSetting map[string]string, ext map[string]interface{}) dispatcher.HandlerFunc
ContextHandler api请求处理程序
func JwtWriter ¶
func JwtWriter(cnf *conf.MetadataConf) dispatcher.HandlerFunc
func NoResponse ¶
func NoResponse(conf *conf.MetadataConf) dispatcher.HandlerFunc
NoResponse 处理无响应的返回结果
func Recovery ¶
func Recovery() dispatcher.HandlerFunc
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
func RecoveryWithWriter ¶
func RecoveryWithWriter() dispatcher.HandlerFunc
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(ctx *dispatcher.Context)
func (HandlerFunc) Handle ¶
func (h HandlerFunc) Handle(ctx *dispatcher.Context)
type HeaderData ¶
type HeaderData struct {
// contains filtered or unexported fields
}
type IHeaderData ¶
InputData 输入参数
type IInputData ¶
InputData 输入参数
Click to show internal directories.
Click to hide internal directories.