admin/api: use gorilla/mux instead of Go router

This commit is contained in:
nemunaire 2016-12-08 09:12:18 +01:00 committed by Pierre-Olivier Mercier
parent 0e30259b7e
commit 1054dd7086
18 changed files with 642 additions and 762 deletions

11
admin/api/version.go Normal file
View file

@ -0,0 +1,11 @@
package api
import ()
func init() {
router.Path("/version").Methods("GET").HandlerFunc(apiHandler(showVersion))
}
func showVersion(args map[string]string, body []byte) (interface{}, error) {
return map[string]interface{}{"version": 0.1}, nil
}