add db and rp routes to mux.go

pull/10616/head
Jade McGough 2017-03-20 14:23:29 -07:00
parent b354d80782
commit 073520060b
1 changed files with 13 additions and 0 deletions

View File

@ -131,6 +131,19 @@ func NewMux(opts MuxOpts, service Service) http.Handler {
router.PUT("/chronograf/v1/dashboards/:id", service.ReplaceDashboard)
router.PATCH("/chronograf/v1/dashboards/:id", service.UpdateDashboard)
// Databases
router.GET("/chronograf/v1/sources/:id/dbs", service.Databases)
router.POST("/chronograf/v1/sources/:id/dbs", service.NewDatabase)
router.DELETE("/chronograf/v1/sources/:id/dbs/:did", service.DropDatabase)
// Retention Policies
router.GET("/chronograf/v1/sources/:id/dbs/:did/rps", service.RetentionPolicies)
router.POST("/chronograf/v1/sources/:id/dbs/:did/rps", service.NewRetentionPolicy)
router.PATCH("/chronograf/v1/sources/:id/dbs/:did/rps/:rpid", service.UpdateRetentionPolicy)
router.DELETE("/chronograf/v1/sources/:id/dbs/:did/rps/:rpid", service.DropRetentionPolicy)
var authRoutes AuthRoutes
var out http.Handler