Documentation
¶
Index ¶
- func Annotate(annotators ...ngamux.Annotator) *ngamux.Annotation
- func Configure(c *config.Web)
- func Delete(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
- func Get(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
- func Group(path string) *ngamux.HttpServeMux
- func HandleFunc(method, path string, handlerFunc http.HandlerFunc, ...)
- func Patch(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
- func Post(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
- func Put(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
- func Resource(path string, resource ResourceHandler, opts ...func(*ngamux.HttpServeMux))
- func Router() *ngamux.HttpServeMux
- func Server() *http.Server
- func Use(middleware ...ngamux.MiddlewareFunc)
- func WithResourceMiddleware(middlewares ...ngamux.MiddlewareFunc) func(*ngamux.HttpServeMux)
- type ResourceHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
func Get ¶
func Get(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
func Group ¶
func Group(path string) *ngamux.HttpServeMux
func HandleFunc ¶
func HandleFunc(method, path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
func Patch ¶
func Patch(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
func Post ¶
func Post(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
func Put ¶
func Put(path string, handlerFunc http.HandlerFunc, middleware ...ngamux.MiddlewareFunc)
func Resource ¶
func Resource(path string, resource ResourceHandler, opts ...func(*ngamux.HttpServeMux))
func Router ¶
func Router() *ngamux.HttpServeMux
func Use ¶
func Use(middleware ...ngamux.MiddlewareFunc)
func WithResourceMiddleware ¶
func WithResourceMiddleware(middlewares ...ngamux.MiddlewareFunc) func(*ngamux.HttpServeMux)
Types ¶
type ResourceHandler ¶
type ResourceHandler interface {
Index(http.ResponseWriter, *http.Request)
Show(http.ResponseWriter, *http.Request)
Store(http.ResponseWriter, *http.Request)
Update(http.ResponseWriter, *http.Request)
Destroy(http.ResponseWriter, *http.Request)
}
Click to show internal directories.
Click to hide internal directories.