Documentation ¶
Index ¶
- Variables
- func AllowCrossOrigin(h http.Handler) http.Handler
- func BadRequest(w http.ResponseWriter, message string)
- func Block()
- func Forbidden(w http.ResponseWriter, message string)
- func InternalServerError(w http.ResponseWriter, message string)
- func InternalServerErrorHandler(message string) http.Handler
- func IsWideCast(pattern string) bool
- func MethodNotAllowed(w http.ResponseWriter, message string)
- func PathResolver(pattern string) (resolve func(pattern string) string)
- func PermanentRedirect(w http.ResponseWriter, r *http.Request, u string)
- func PermanentRedirectHandler(u string) http.Handler
- func RedirectHandler(u string, code int) http.Handler
- func RedirectToSlashHandler() http.Handler
- func StartServer(srv *http.Server, tls bool)
- func StopServer(srv *http.Server)
- func Teapot(w http.ResponseWriter, message string)
- func TeapotHandler(message string) http.Handler
- func TemporaryRedirect(w http.ResponseWriter, r *http.Request, u string)
- func TemporaryRedirectHandler(u string) http.Handler
- func TrimPattern(path string, pattern string) string
- func Unauthorized(w http.ResponseWriter, message string)
- func WarmupHandler() http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWideCastPatternNeeded = errors.New("handler needs wide cast pattern(end with `/`)")
View Source
var (
ShutdownTimeout = time.Second * 5
)
Functions ¶
func BadRequest ¶
func BadRequest(w http.ResponseWriter, message string)
func Forbidden ¶
func Forbidden(w http.ResponseWriter, message string)
func InternalServerError ¶
func InternalServerError(w http.ResponseWriter, message string)
func IsWideCast ¶
func MethodNotAllowed ¶
func MethodNotAllowed(w http.ResponseWriter, message string)
func PathResolver ¶
func PermanentRedirect ¶
func PermanentRedirect(w http.ResponseWriter, r *http.Request, u string)
func RedirectToSlashHandler ¶
func StartServer ¶
func StopServer ¶
func Teapot ¶
func Teapot(w http.ResponseWriter, message string)
func TeapotHandler ¶
func TemporaryRedirect ¶
func TemporaryRedirect(w http.ResponseWriter, r *http.Request, u string)
func TrimPattern ¶
func Unauthorized ¶
func Unauthorized(w http.ResponseWriter, message string)
func WarmupHandler ¶ added in v0.8.1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.