Documentation
¶
Index ¶
- type Params
- type RouteID
- type Router
- func (r *Router) Add(method, pattern string) (RouteID, error)
- func (r *Router) AddWithHost(method, host, pattern string) (RouteID, error)
- func (r *Router) Allowed(path string) []string
- func (r *Router) AllowedHost(host, path string) []string
- func (r *Router) Match(method, path string) (RouteID, Params, bool)
- func (r *Router) MatchHost(method, host, path string) (RouteID, Params, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router matches HTTP methods and paths.
func (*Router) AddWithHost ¶
AddWithHost registers a route scoped to a host (or wildcard) and returns its id.
func (*Router) AllowedHost ¶
AllowedHost returns allowed methods for a given host/path.
Click to show internal directories.
Click to hide internal directories.