add routes and stubs for dashboard API endpoints
parent
fa8edf94c5
commit
9a2e49b4d2
|
@ -0,0 +1,28 @@
|
|||
package server
|
||||
|
||||
import "net/http"
|
||||
|
||||
// Dashboards returns all dashboards within the store
|
||||
func (s *Service) Dashboards(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
// DashboardID returns a single specified dashboard
|
||||
func (s *Service) DashboardID(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
// NewDashboard creates and returns a new dashboard object
|
||||
func (s *Service) NewDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
// RemoveDashboard deletes a dashboard
|
||||
func (s *Service) RemoveDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
// UpdateDashboard updates a dashboard
|
||||
func (s *Service) UpdateDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
|
@ -109,6 +109,14 @@ func NewMux(opts MuxOpts, service Service) http.Handler {
|
|||
router.PATCH("/chronograf/v1/users/:id/explorations/:eid", service.UpdateExploration)
|
||||
router.DELETE("/chronograf/v1/users/:id/explorations/:eid", service.RemoveExploration)
|
||||
|
||||
// Dashboards
|
||||
router.GET("/chronograf/v1/dashboards", service.Dashboards)
|
||||
router.POST("/chronograf/v1/dashboards", service.NewDashboard)
|
||||
|
||||
router.GET("/chronograf/v1/dashboards/:id", service.DashboardID)
|
||||
router.DELETE("/chronograf/v1/dashboard/:id", service.RemoveDashboard)
|
||||
router.PUT("/chronograf/v1/dashboard/:id", service.UpdateDashboard)
|
||||
|
||||
/* Authentication */
|
||||
if opts.UseAuth {
|
||||
auth := AuthAPI(opts, router)
|
||||
|
|
Loading…
Reference in New Issue