Documentation
¶
Index ¶
- type ErrorPage
- func (e *ErrorPage) IgnoreStatus(status int) *ErrorPage
- func (e *ErrorPage) MiddlewareDisable(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (e *ErrorPage) OnError(f func(w http.ResponseWriter, r *http.Request, status int)) *ErrorPage
- func (e *ErrorPage) OnStatus(status int, f func(w http.ResponseWriter, r *http.Request, status int)) *ErrorPage
- func (e *ErrorPage) ServeMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorPage ¶
type ErrorPage struct {
// contains filtered or unexported fields
}
ErrorPage error page middleware main struct
func (*ErrorPage) IgnoreStatus ¶
IgnoreStatus configure ignore given status.
func (*ErrorPage) MiddlewareDisable ¶
func (e *ErrorPage) MiddlewareDisable(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
MiddlewareDisable middleware which disable previous installed error page middleware
func (*ErrorPage) OnError ¶
OnError configure default error page when statuscode >399 and statuscode <600
func (*ErrorPage) OnStatus ¶
func (e *ErrorPage) OnStatus(status int, f func(w http.ResponseWriter, r *http.Request, status int)) *ErrorPage
OnStatus configure error page by status code.
func (*ErrorPage) ServeMiddleware ¶
func (e *ErrorPage) ServeMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeMiddleware serve as middleware
Click to show internal directories.
Click to hide internal directories.