summaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/apiv1.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-23 18:45:15 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-23 18:45:15 +0100
commit65e09e831cf13343ac713fbf15281174d1f13a94 (patch)
tree0176a263ecf6d1059a272007c6f450770f5792ca /lib/xdsserver/apiv1.go
parente97eebc18d726aa55738d7e19513491cf58a6e3a (diff)
Added target and terminal support.v1.1.0
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/xdsserver/apiv1.go')
-rw-r--r--lib/xdsserver/apiv1.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/xdsserver/apiv1.go b/lib/xdsserver/apiv1.go
index 67d09b5..e0bfa7f 100644
--- a/lib/xdsserver/apiv1.go
+++ b/lib/xdsserver/apiv1.go
@@ -63,5 +63,20 @@ func NewAPIV1(ctx *Context) *APIService {
s.apiRouter.POST("/events/register", s.eventsRegister)
s.apiRouter.POST("/events/unregister", s.eventsUnRegister)
+ s.apiRouter.GET("/targets", s.getTargets)
+ s.apiRouter.GET("/targets/:id", s.getTarget)
+ s.apiRouter.POST("/targets", s.addTarget)
+ s.apiRouter.DELETE("/targets/:id", s.delTarget)
+ s.apiRouter.GET("/targets/:id/terminals", s.getTgtTerms)
+ s.apiRouter.GET("/targets/:id/terminals/:tid", s.getTgtTerm)
+ s.apiRouter.POST("/targets/:id/terminals", s.createTgtTerm)
+ s.apiRouter.PUT("/targets/:id/terminals/:tid", s.updateTgtTerm)
+ s.apiRouter.DELETE("/targets/:id/terminals/:tid", s.delTgtTerm)
+ s.apiRouter.POST("/targets/:id/terminals/:tid/open", s.openTgtTerm)
+ s.apiRouter.POST("/targets/:id/terminals/:tid/close", s.closeTgtTerm)
+ s.apiRouter.POST("/targets/:id/terminals/:tid/resize", s.resizeTgtTerm)
+ s.apiRouter.POST("/targets/:id/terminals/:tid/signal", s.signalTgtTerm)
+ s.apiRouter.POST("/targets/:id/terminals/:tid/signal/:sig", s.signalTgtTerm)
+
return s
}