Documentation
¶
Index ¶
- func InsertPrefix(h http.Handler, prefix string) http.Handler
- func LogRequest(msg string, log logging.Logger, next http.HandlerFunc) http.HandlerFunc
- func NewStatusCapturingResponseWriter(w http.ResponseWriter) *statusCapturingResponseWriter
- func PanicRecovery(log logging.Logger, next http.HandlerFunc) http.HandlerFunc
- func RootRedirect(rootPath, targetPath string, next http.HandlerFunc) http.HandlerFunc
- func ServeIndexOn404(h http.Handler, location string) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertPrefix ¶
A modified version of http.StripPrefix
func LogRequest ¶
func LogRequest(msg string, log logging.Logger, next http.HandlerFunc) http.HandlerFunc
LogRequest logs request info to the specified logger.
func NewStatusCapturingResponseWriter ¶
func NewStatusCapturingResponseWriter(w http.ResponseWriter) *statusCapturingResponseWriter
func PanicRecovery ¶
func PanicRecovery(log logging.Logger, next http.HandlerFunc) http.HandlerFunc
func RootRedirect ¶
func RootRedirect(rootPath, targetPath string, next http.HandlerFunc) http.HandlerFunc
RootRedirect redirects root requests to a specified path
func ServeIndexOn404 ¶
func ServeIndexOn404(h http.Handler, location string) http.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.