diff options
Diffstat (limited to 'lib/xdsserver/apiv1.go')
-rw-r--r-- | lib/xdsserver/apiv1.go | 15 |
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 } |