Documentation
¶
Index ¶
Constants ¶
View Source
const ( KeyHttpRequest = "HttpRequest" KeyRequestID = "RequestID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMiddleware ¶
type BaseMiddleware struct {
// contains filtered or unexported fields
}
func (*BaseMiddleware) SetNext ¶
func (mw *BaseMiddleware) SetNext(next droplet.Middleware)
type HttpInfoInjectorMiddleware ¶ added in v0.2.4
type HttpInfoInjectorMiddleware struct {
BaseMiddleware
// contains filtered or unexported fields
}
func NewHttpInfoInjectorMiddleware ¶ added in v0.2.4
func NewHttpInfoInjectorMiddleware(opt HttpInfoInjectorOption) *HttpInfoInjectorMiddleware
type HttpInfoInjectorOption ¶ added in v0.2.4
type HttpInputMiddleware ¶
type HttpInputMiddleware struct {
BaseMiddleware
// contains filtered or unexported fields
}
func NewHttpInputMiddleWare ¶
func NewHttpInputMiddleWare(opt HttpInputOption) *HttpInputMiddleware
type HttpInputOption ¶
type HttpRespReshapeMiddleware ¶
type HttpRespReshapeMiddleware struct {
BaseMiddleware
}
func NewRespReshapeMiddleware ¶
func NewRespReshapeMiddleware() *HttpRespReshapeMiddleware
type TrafficLog ¶
type TrafficLog struct {
RequestID string `json:"request_id,omitempty"`
Path string `json:"path,omitempty"`
Method string `json:"method,omitempty"`
ElapsedTime int64 `json:"elapsed_time,omitempty"`
Input interface{} `json:"request,omitempty"`
Output interface{} `json:"response,omitempty"`
Error error `json:"error,omitempty"`
}
type TrafficLogMiddleware ¶
type TrafficLogMiddleware struct {
BaseMiddleware
// contains filtered or unexported fields
}
func NewTrafficLogMiddleware ¶
func NewTrafficLogMiddleware(opt TrafficLogOpt) *TrafficLogMiddleware
type TrafficLogOpt ¶
type TrafficLogOpt struct {
IsLogReqAndResp bool
LogFunc func(log *TrafficLog)
}
Click to show internal directories.
Click to hide internal directories.