Documentation ¶
Index ¶
- func ContextParam(r *http.Request, key string) interface{}
- func QueryParam(r *http.Request, key string) string
- func SetContextParam(r *http.Request, key string, value interface{}) *http.Request
- type Endpoint
- func (e *Endpoint) Any(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Delete(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Endpoint(pattern string) *Endpoint
- func (e *Endpoint) Get(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Head(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Methods() []string
- func (e *Endpoint) Options(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Patch(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Post(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Put(f http.HandlerFunc) *Endpoint
- func (e *Endpoint) Use(f func(http.Handler) http.Handler) *Endpoint
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextParam ¶
ContextParam returns a request context parameter given its name.
func QueryParam ¶
QueryParam returns a request query parameter given its name.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint represents an HTTP router endpoint.
func (*Endpoint) Any ¶
func (e *Endpoint) Any(f http.HandlerFunc) *Endpoint
Any registers a handler for any method.
func (*Endpoint) Delete ¶
func (e *Endpoint) Delete(f http.HandlerFunc) *Endpoint
Delete registers a DELETE method handler.
func (*Endpoint) Get ¶
func (e *Endpoint) Get(f http.HandlerFunc) *Endpoint
Get registers a GET method handler.
func (*Endpoint) Head ¶
func (e *Endpoint) Head(f http.HandlerFunc) *Endpoint
Head registers a HEAD method handler.
func (*Endpoint) Methods ¶
Methods returns the list of methods available from the HTTP router endpoint.
func (*Endpoint) Options ¶
func (e *Endpoint) Options(f http.HandlerFunc) *Endpoint
Options registers a OPTIONS method handler.
func (*Endpoint) Patch ¶
func (e *Endpoint) Patch(f http.HandlerFunc) *Endpoint
Patch registers a PATCH method handler.
func (*Endpoint) Post ¶
func (e *Endpoint) Post(f http.HandlerFunc) *Endpoint
Post registers a POST method handler.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router represents an HTTP router instance.
Click to show internal directories.
Click to hide internal directories.