registerWorkflowRoutes registers all workflow-related routes
(rg *gin.RouterGroup)
| 96 | |
| 97 | // registerWorkflowRoutes registers all workflow-related routes |
| 98 | func (s *Server) registerWorkflowRoutes(rg *gin.RouterGroup) { |
| 99 | // Create workflow handler |
| 100 | h := handlers.NewWorkflowHandler(s.store) |
| 101 | |
| 102 | workflows := rg.Group("/workflows") |
| 103 | { |
| 104 | workflows.POST("", h.Create) |
| 105 | workflows.GET("", h.List) |
| 106 | workflows.GET("/:id", h.Get) |
| 107 | workflows.PATCH("/:id", h.Update) |
| 108 | workflows.DELETE("/:id", h.Delete) |
| 109 | workflows.POST("/:id/execute", h.Execute) |
| 110 | workflows.POST("/:id/suspend", h.Suspend) |
| 111 | workflows.POST("/:id/resume", h.Resume) |
| 112 | workflows.GET("/:id/executions", h.GetExecutions) |
| 113 | workflows.GET("/:id/executions/:eid", h.GetExecutionDetails) |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // registerToolRoutes registers all tool-related routes |
| 118 | func (s *Server) registerToolRoutes(rg *gin.RouterGroup) { |
no test coverage detected