예제 #1
0
// Backend plugin routes
func handlePluginBackendRoutes(pr *mux.Router) {
	pr.PathPrefix("/{plugin-name}").HandlerFunc(pluginHandler)
}
예제 #2
0
func handleApiRoutes(ar *mux.Router) {
	ar.PathPrefix("/users").HandlerFunc(userHandler)
	ar.PathPrefix("/wikis").HandlerFunc(wikiHandler)
}
예제 #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)
}