Documentation
¶
Index ¶
- func MiddlewareChain(mid ...RequestMiddleware) middlewareChain
- type MiddlewareGroup
- type PipeFunc
- type PipeHandler
- type Pipeline
- func (p *Pipeline) Send(r contracts.RequestContract) *Pipeline
- func (p *Pipeline) Then(handler PipeHandler) contracts.ResponseContract
- func (p *Pipeline) Through(pipe interface{}) *Pipeline
- func (p *Pipeline) ThroughFunc(pipe PipeFunc) *Pipeline
- func (p *Pipeline) ThroughMiddleware(pipe RequestMiddleware) *Pipeline
- type RequestMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MiddlewareChain ¶
func MiddlewareChain(mid ...RequestMiddleware) middlewareChain
Types ¶
type MiddlewareGroup ¶
type MiddlewareGroup map[string][]RequestMiddleware
type PipeFunc ¶
type PipeFunc func(r contracts.RequestContract, next PipeHandler) contracts.ResponseContract
PipeFunc request middleware function
type PipeHandler ¶
type PipeHandler func(r contracts.RequestContract) contracts.ResponseContract
PipeHandler destination handler
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline is request pipeline prepare for request middleware
func (*Pipeline) Send ¶
func (p *Pipeline) Send(r contracts.RequestContract) *Pipeline
Send request to pipeline
func (*Pipeline) Then ¶
func (p *Pipeline) Then(handler PipeHandler) contracts.ResponseContract
Then final destination
func (*Pipeline) ThroughFunc ¶
ThroughFunc through middleware function
func (*Pipeline) ThroughMiddleware ¶
func (p *Pipeline) ThroughMiddleware(pipe RequestMiddleware) *Pipeline
ThroughMiddleware through middleware struct
type RequestMiddleware ¶
type RequestMiddleware interface {
Handle(r contracts.RequestContract, next PipeHandler) contracts.ResponseContract
}
RequestMiddleware request middleware
Click to show internal directories.
Click to hide internal directories.