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

This commit is contained in:
nemunaire 2016-12-08 09:12:18 +01:00
commit 173dafa69e
18 changed files with 643 additions and 720 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
}