summaryrefslogtreecommitdiffstats
path: root/lib/apiv1/apiv1.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-18 01:04:02 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-18 01:04:02 +0200
commit8f44cc7217ce48f3f94c8ea3f037cdf011c4493b (patch)
treea93c483370e6ad64a7440241cfb7c21beb6021ba /lib/apiv1/apiv1.go
parent4feef5296bf3aea331fdde4cd7b94ee2322a907e (diff)
Add folder synchronization status.
Also add ability to force re-synchronization.
Diffstat (limited to 'lib/apiv1/apiv1.go')
-rw-r--r--lib/apiv1/apiv1.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/apiv1/apiv1.go b/lib/apiv1/apiv1.go
index f32e53b..262f513 100644
--- a/lib/apiv1/apiv1.go
+++ b/lib/apiv1/apiv1.go
@@ -42,6 +42,7 @@ func New(r *gin.Engine, sess *session.Sessions, cfg *xdsconfig.Config, mfolders
s.apiRouter.GET("/folders", s.getFolders)
s.apiRouter.GET("/folder/:id", s.getFolder)
s.apiRouter.POST("/folder", s.addFolder)
+ s.apiRouter.POST("/folder/sync/:id", s.syncFolder)
s.apiRouter.DELETE("/folder/:id", s.delFolder)
s.apiRouter.GET("/sdks", s.getSdks)
@@ -54,5 +55,9 @@ func New(r *gin.Engine, sess *session.Sessions, cfg *xdsconfig.Config, mfolders
s.apiRouter.POST("/exec/:id", s.execCmd)
s.apiRouter.POST("/signal", s.execSignalCmd)
+ s.apiRouter.GET("/events", s.eventsList)
+ s.apiRouter.POST("/events/register", s.eventsRegister)
+ s.apiRouter.POST("/events/unregister", s.eventsUnRegister)
+
return s
}