Documentation
¶
Index ¶
- func GetValues(ctx context.Context) (map[string]string, bool)
- type Framework
- func (fw *Framework) Attach(middlewares ...middleware.Middleware) *Framework
- func (fw *Framework) Clear()
- func (fw *Framework) Delete(path string, handler http.HandlerFunc)
- func (fw *Framework) Get(path string, handler http.HandlerFunc)
- func (fw *Framework) Head(path string, handler http.HandlerFunc)
- func (fw *Framework) Options(path string, handler http.HandlerFunc)
- func (fw *Framework) Patch(path string, handler http.HandlerFunc)
- func (fw *Framework) Post(path string, handler http.HandlerFunc)
- func (fw *Framework) Put(path string, handler http.HandlerFunc)
- func (fw *Framework) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (fw *Framework) WithPrefix(prefix string, route Route) *Framework
- type Route
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Framework ¶
type Framework struct {
// contains filtered or unexported fields
}
Framework is a web framework main data structure
func (*Framework) Attach ¶
func (fw *Framework) Attach(middlewares ...middleware.Middleware) *Framework
Attach adds middleware to the chain
func (*Framework) Delete ¶
func (fw *Framework) Delete(path string, handler http.HandlerFunc)
Delete adds handler for DELETE requests
func (*Framework) Get ¶
func (fw *Framework) Get(path string, handler http.HandlerFunc)
Get adds handler for GET requests
func (*Framework) Head ¶
func (fw *Framework) Head(path string, handler http.HandlerFunc)
Head adds handler for PATCH requests
func (*Framework) Options ¶
func (fw *Framework) Options(path string, handler http.HandlerFunc)
Options adds handler for PATCH requests
func (*Framework) Patch ¶
func (fw *Framework) Patch(path string, handler http.HandlerFunc)
Patch adds handler for PATCH requests
func (*Framework) Post ¶
func (fw *Framework) Post(path string, handler http.HandlerFunc)
Post adds handler for POST requests
func (*Framework) Put ¶
func (fw *Framework) Put(path string, handler http.HandlerFunc)
Put adds handler for PUT requests
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is a URI path router object
func (*Router) Handle ¶
func (rt *Router) Handle(path string, handler http.HandlerFunc) (err error)
Handle add a route and a handler
func (*Router) Lookup ¶
Lookup for a handler in the path, a handler, pattern values and error is returned.
func (*Router) RouterHandler ¶
func (rt *Router) RouterHandler(w http.ResponseWriter, r *http.Request)
RouterHandler is a http.HandlerFunc router that dispatches the request based on saved routes and handlers
Click to show internal directories.
Click to hide internal directories.