Пример #1
0
// HandleSubrouter uses the subrouter for a specific calls and creates a tree of sorts
// handling each route with a different subrouter
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	serviceSubrouter := s.StrictSlash(false).PathPrefix("/{report_name}").Subrouter()
	serviceSubrouter = respond.PrepAppRoutes(serviceSubrouter, confhandler, appServiceRoutes)

	groupSubrouter := s.StrictSlash(false).PathPrefix("/{report_name}").Subrouter()
	groupSubrouter = respond.PrepAppRoutes(groupSubrouter, confhandler, appGroupRoutes)

	s = respond.PrepAppRoutes(s, confhandler, appRoutesV2)
}
Пример #2
0
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	// s.Methods("GET").
	// 	Path("/factors").
	// 	Name("List Factors").
	// 	Handler(respond.WrapAll(confhandler.Respond(List), confhandler.Config))
	//
	// s.Methods("OPTIONS").
	// 	Path("/factors").
	// 	Name("List Options of Resource").
	// 	Handler(confhandler.Respond(Options))

	s = respond.PrepAppRoutes(s, confhandler, appRoutesV2)

}
Пример #3
0
// HandleSubrouter contains the different paths to follow during subrouting
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	s = respond.PrepAppRoutes(s, confhandler, appRoutesV2)

}