MCPcopy Create free account
hub / github.com/astercloud/aster / registerWorkflowRoutes

Method registerWorkflowRoutes

server/routes.go:98–115  ·  view source on GitHub ↗

registerWorkflowRoutes registers all workflow-related routes

(rg *gin.RouterGroup)

Source from the content-addressed store, hash-verified

96
97// registerWorkflowRoutes registers all workflow-related routes
98func (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
118func (s *Server) registerToolRoutes(rg *gin.RouterGroup) {

Callers 1

setupRoutesMethod · 0.95

Calls 1

NewWorkflowHandlerFunction · 0.92

Tested by

no test coverage detected