Example #1
0
File: gogo.go Project: pilwon/gogo
func MiddlewareFromRouteHandler(h router.Handler) middleware.Handler {
	return router.MiddlewareFromRouterHandler(h)
}
Example #2
0
func (s *Server) Delete(path string, h router.HandlerFunc) {
	registeredRouter.AddRoute(s.Context, "DELETE", path, router.MiddlewareFromRouterHandler(h))
}
Example #3
0
func (s *Server) DeleteAll(h router.HandlerFunc) {
	registeredRouter.AddRouteAll(s.Context, "DELETE", router.MiddlewareFromRouterHandler(h))
}
Example #4
0
func (s *Server) PutAll(h router.HandlerFunc) {
	registeredRouter.AddRouteAll(s.Context, "PUT", router.MiddlewareFromRouterHandler(h))
}
Example #5
0
func (s *Server) Put(path string, h router.HandlerFunc) {
	registeredRouter.AddRoute(s.Context, "PUT", path, router.MiddlewareFromRouterHandler(h))
}
Example #6
0
func (s *Server) OptionsAll(h router.HandlerFunc) {
	registeredRouter.AddRouteAll(s.Context, "OPTIONS", router.MiddlewareFromRouterHandler(h))
}
Example #7
0
func (s *Server) Options(path string, h router.HandlerFunc) {
	registeredRouter.AddRoute(s.Context, "OPTIONS", path, router.MiddlewareFromRouterHandler(h))
}
Example #8
0
func (s *Server) HeadAll(h router.HandlerFunc) {
	registeredRouter.AddRouteAll(s.Context, "HEAD", router.MiddlewareFromRouterHandler(h))
}