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