func SetRoute(router *mux.Router, path, name, method string, handlerFunc func(w http.ResponseWriter, r *http.Request)) *mux.Router { var handler http.HandlerFunc handler = handlerFunc handler = logger.Logger(handler, name) router.HandleFunc(path, handler).Methods(method) return router }
func SetProtectedRoute(router *mux.Router, path, name, method string, handlerFunc func(w http.ResponseWriter, r *http.Request)) *mux.Router { var handler http.HandlerFunc handler = handlerFunc handler = jwt.JWTTokenAuthentication(handler) handler = logger.Logger(handler, name) router.HandleFunc(path, handler).Methods(method) return router }