Documentation
¶
Overview ¶
Package chain provides a way to chain multiple http.Handler together.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain interface {
ServeHTTP(w http.ResponseWriter, r *http.Request)
WithStatus(status http.Handler)
}
Chain is a chain of handlers.
type ChainHandler ¶
ChainHandler is a handler that can be chained.
type Status ¶
type Status struct {
// Return is a flag that tells the chain to return. If Return is true, the
// chain will return a 403 (e.g., the ip is in the denylist)
Return bool
// Break is a flag that tells the chain to break. If Break is true, the chain
// will stop (e.g., the ip is in the allowlist)
Break bool
}
Status is a status that can be returned by a handler.
Click to show internal directories.
Click to hide internal directories.