Documentation ¶
Index ¶
- func MethodNotAllowed(remainingPath string, resp http.ResponseWriter, req *http.Request) bool
- func RouteHandlerFunc(matcher Matcher) func(http.ResponseWriter, *http.Request)
- func TestPrefix(t *testing.T)
- type Matcher
- func Any(handler http.Handler) Matcher
- func AnyFunc(handler func(http.ResponseWriter, *http.Request)) Matcher
- func DELETE(handler http.Handler) Matcher
- func DELETEFunc(handler func(http.ResponseWriter, *http.Request)) Matcher
- func End(subMatcher Matcher) Matcher
- func EndSeq(subMatchers ...Matcher) Matcher
- func GET(handler http.Handler) Matcher
- func GETFunc(handler func(http.ResponseWriter, *http.Request)) Matcher
- func IntPart(matcherForPart func(int) Matcher) Matcher
- func Method(method string, handler http.Handler) Matcher
- func POST(handler http.Handler) Matcher
- func POSTFunc(handler func(http.ResponseWriter, *http.Request)) Matcher
- func PUT(handler http.Handler) Matcher
- func PUTFunc(handler func(http.ResponseWriter, *http.Request)) Matcher
- func Prefix(prefix string, subMatcher Matcher) Matcher
- func PrefixSeq(prefix string, subMatchers ...Matcher) Matcher
- func Sequence(matchers ...Matcher) Matcher
- func StringPart(matcherForPart func(string) Matcher) Matcher
- type RouteHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MethodNotAllowed ¶
func RouteHandlerFunc ¶
func RouteHandlerFunc(matcher Matcher) func(http.ResponseWriter, *http.Request)
func TestPrefix ¶
Types ¶
type Matcher ¶
func DELETEFunc ¶
func DELETEFunc(handler func(http.ResponseWriter, *http.Request)) Matcher
func StringPart ¶
type RouteHandler ¶
type RouteHandler struct {
Matcher Matcher
}
func NewRouteHandler ¶
func NewRouteHandler(matchers ...Matcher) *RouteHandler
func (*RouteHandler) ServeHTTP ¶
func (r *RouteHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.