Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseContext ¶
type BaseContext struct {
fc.Context
Index int8
Filters fc.FilterChain
Timeout time.Duration
Ctx context.Context
// the response context will return.
TargetResp *client.Response
// client call response.
SourceResp interface{}
// happen error
Err error
}
BaseContext
func (*BaseContext) Abort ¶
func (c *BaseContext) Abort()
Abort filter chain break , filter after the current filter will not executed.
func (*BaseContext) AbortWithError ¶
func (c *BaseContext) AbortWithError(message string, err error)
AbortWithError filter chain break , filter after the current filter will not executed. And log will print.
func (*BaseContext) AppendFilterFunc ¶
func (c *BaseContext) AppendFilterFunc(ff ...fc.FilterFunc)
AppendFilterFunc append filter func.
func (*BaseContext) Next ¶
func (c *BaseContext) Next()
Next should be used only inside middleware. It executes the pending handlers in the chain inside the calling handler. See example in GitHub.
Click to show internal directories.
Click to hide internal directories.