Documentation ¶
Index ¶
- Variables
- func MatchesWhen(whens Whens, r *http.Request, err error) error
- func NewErrErrorHandlerMisconfigured(a Handler, err error) *herodot.DefaultError
- func NewErrErrorHandlerNotEnabled(a Handler) *herodot.DefaultError
- type ErrorJSON
- type ErrorJSONConfig
- type ErrorRedirect
- func (a *ErrorRedirect) Config(config json.RawMessage) (*ErrorRedirectConfig, error)
- func (a *ErrorRedirect) GetID() string
- func (a *ErrorRedirect) Handle(w http.ResponseWriter, r *http.Request, config json.RawMessage, ...) error
- func (a *ErrorRedirect) RedirectURL(uri *url.URL, c *ErrorRedirectConfig) string
- func (a *ErrorRedirect) Validate(config json.RawMessage) error
- type ErrorRedirectConfig
- type ErrorRedirectDependencies
- type ErrorWWWAuthenticate
- func (a *ErrorWWWAuthenticate) Config(config json.RawMessage) (*ErrorWWWAuthenticateConfig, error)
- func (a *ErrorWWWAuthenticate) GetID() string
- func (a *ErrorWWWAuthenticate) Handle(w http.ResponseWriter, r *http.Request, config json.RawMessage, ...) error
- func (a *ErrorWWWAuthenticate) Validate(config json.RawMessage) error
- type ErrorWWWAuthenticateConfig
- type ErrorWWWAuthenticateDependencies
- type Handler
- type Handlers
- type Registry
- type When
- type WhenRequest
- type WhenRequestHeader
- type WhenRequestRemoteIP
- type Whens
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDoesNotMatchWhen = ErrHandlerNotResponsible
View Source
var ErrErrorHandlerNotEnabled = herodot.DefaultError{ ErrorField: "error handler matching this route is misconfigured or disabled", CodeField: http.StatusInternalServerError, StatusField: http.StatusText(http.StatusInternalServerError), }
View Source
var ErrHandlerNotResponsible = errors.New("error handler not responsible for this request")
Functions ¶
func NewErrErrorHandlerMisconfigured ¶
func NewErrErrorHandlerMisconfigured(a Handler, err error) *herodot.DefaultError
func NewErrErrorHandlerNotEnabled ¶
func NewErrErrorHandlerNotEnabled(a Handler) *herodot.DefaultError
Types ¶
type ErrorJSON ¶
type ErrorJSON struct {
// contains filtered or unexported fields
}
func NewErrorJSON ¶
func NewErrorJSON( c configuration.Provider, d errorJSONDependencies, ) *ErrorJSON
func (*ErrorJSON) Config ¶
func (a *ErrorJSON) Config(config json.RawMessage) (*ErrorJSONConfig, error)
type ErrorJSONConfig ¶
type ErrorJSONConfig struct {
Verbose bool `json:"verbose"`
}
type ErrorRedirect ¶
type ErrorRedirect struct {
// contains filtered or unexported fields
}
func NewErrorRedirect ¶
func NewErrorRedirect( c configuration.Provider, d ErrorRedirectDependencies, ) *ErrorRedirect
func (*ErrorRedirect) Config ¶
func (a *ErrorRedirect) Config(config json.RawMessage) (*ErrorRedirectConfig, error)
func (*ErrorRedirect) GetID ¶
func (a *ErrorRedirect) GetID() string
func (*ErrorRedirect) Handle ¶
func (a *ErrorRedirect) Handle(w http.ResponseWriter, r *http.Request, config json.RawMessage, _ pipeline.Rule, _ error) error
func (*ErrorRedirect) RedirectURL ¶
func (a *ErrorRedirect) RedirectURL(uri *url.URL, c *ErrorRedirectConfig) string
func (*ErrorRedirect) Validate ¶
func (a *ErrorRedirect) Validate(config json.RawMessage) error
type ErrorRedirectConfig ¶
type ErrorRedirectDependencies ¶
type ErrorRedirectDependencies interface { x.RegistryWriter }
type ErrorWWWAuthenticate ¶
type ErrorWWWAuthenticate struct {
// contains filtered or unexported fields
}
func NewErrorWWWAuthenticate ¶
func NewErrorWWWAuthenticate( c configuration.Provider, d ErrorWWWAuthenticateDependencies, ) *ErrorWWWAuthenticate
func (*ErrorWWWAuthenticate) Config ¶
func (a *ErrorWWWAuthenticate) Config(config json.RawMessage) (*ErrorWWWAuthenticateConfig, error)
func (*ErrorWWWAuthenticate) GetID ¶
func (a *ErrorWWWAuthenticate) GetID() string
func (*ErrorWWWAuthenticate) Handle ¶
func (a *ErrorWWWAuthenticate) Handle(w http.ResponseWriter, r *http.Request, config json.RawMessage, _ pipeline.Rule, _ error) error
func (*ErrorWWWAuthenticate) Validate ¶
func (a *ErrorWWWAuthenticate) Validate(config json.RawMessage) error
type ErrorWWWAuthenticateConfig ¶
type ErrorWWWAuthenticateConfig struct {
Realm string `json:"realm"`
}
type ErrorWWWAuthenticateDependencies ¶
type ErrorWWWAuthenticateDependencies interface { x.RegistryWriter }
type Handler ¶
type Handler interface { GetID() string Handle(w http.ResponseWriter, r *http.Request, config json.RawMessage, _ pipeline.Rule, err error) error Validate(config json.RawMessage) error }
type When ¶
type When struct { Error []string `json:"error"` Request *WhenRequest `json:"request"` }
type WhenRequest ¶
type WhenRequest struct { RemoteIP *WhenRequestRemoteIP `json:"remote_ip"` Header *WhenRequestHeader `json:"header"` }
type WhenRequestHeader ¶
type WhenRequestRemoteIP ¶
Click to show internal directories.
Click to hide internal directories.