Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chain ¶
type Chain []Filter
Chain is a chain of Filters that acts as an http.Handler.
func Join ¶
Join constructs a new chain of filters that executes the filters in order until it encounters a filter that returns false.
type Filter ¶
type Filter interface { // Apply is like the function on http.Handler but also gets a Next which // allows it to continue execution along the current filter chain. If Apply // returns an error, we will write an appropriate status code to the response. // Tip - use filters.Fail() to provide an error with a description. Apply(w http.ResponseWriter, req *http.Request, next Next) error }
Filter is like an http.Handler that
Click to show internal directories.
Click to hide internal directories.