Example #1
0
// Backend plugin routes
func handlePluginBackendRoutes(pr *mux.Router) {
	pr.PathPrefix("/{plugin-name}").HandlerFunc(pluginHandler)
}
Example #2
0
func handleApiRoutes(ar *mux.Router) {
	ar.PathPrefix("/users").HandlerFunc(userHandler)
	ar.PathPrefix("/wikis").HandlerFunc(wikiHandler)
}
Example #3
0
// Plugin "Resources" -- static files and such
func handlePluginRoutes(pr *mux.Router) {
	pr.StrictSlash(true).HandleFunc("/", getPluginList).Methods("GET")
	pr.PathPrefix("/{plugin-name}/resource/").
		Methods("GET").
		HandlerFunc(servePluginResource)
}