Documentation
¶
Index ¶
- func CreatePostRequest(url string, input interface{}) (*http.Request, error)
- func DisallowMethod(w http.ResponseWriter, methods []string) int
- func DispatchRequest(req *http.Request, output interface{}) (int, error)
- func EnableCORS(w http.ResponseWriter, r *http.Request)
- func IsOK(status int) bool
- func LogRequest(w http.ResponseWriter, r *http.Request)
- func LogResponse(w http.ResponseWriter, r *http.Request, status int)
- func WrapHandler(fn LoggedHandlerFunc, methods []string) http.HandlerFunc
- type LoggedHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePostRequest ¶
func DisallowMethod ¶
func DisallowMethod(w http.ResponseWriter, methods []string) int
func EnableCORS ¶
func EnableCORS(w http.ResponseWriter, r *http.Request)
func LogRequest ¶
func LogRequest(w http.ResponseWriter, r *http.Request)
func LogResponse ¶
func LogResponse(w http.ResponseWriter, r *http.Request, status int)
func WrapHandler ¶
func WrapHandler(fn LoggedHandlerFunc, methods []string) http.HandlerFunc
Types ¶
type LoggedHandlerFunc ¶
type LoggedHandlerFunc func(http.ResponseWriter, *http.Request) int
Click to show internal directories.
Click to hide internal directories.