complete.go 570 B

123456789101112131415161718192021222324
  1. package router
  2. import "github.com/gorilla/mux"
  3. // constant names for the named routes
  4. const (
  5. CompleteIndex = "Complete:index"
  6. CompleteAbout = "Complete:about"
  7. )
  8. // CompleteApp constructs a mux.Router containing the routes for batch Complete html frontend
  9. func CompleteApp() *mux.Router {
  10. m := mux.NewRouter()
  11. FeedApp(m.PathPrefix("/feed").Subrouter())
  12. ProfileApp(m.PathPrefix("/profile").Subrouter())
  13. NewsApp(m.PathPrefix("/news").Subrouter())
  14. m.Path("/").Methods("GET").Name(CompleteIndex)
  15. m.Path("/about").Methods("GET").Name(CompleteAbout)
  16. return m
  17. }