Redesign data structures and implement PVC management of create and delete
This commit is contained in:
@@ -18,15 +18,21 @@ func NewServer(clientset *kubernetes.Clientset) *gin.Engine {
|
||||
})
|
||||
})
|
||||
|
||||
v1 := r.Group("/api/v1")
|
||||
workspaces := r.Group("/workspaces")
|
||||
{
|
||||
workspaces := v1.Group("/workspaces")
|
||||
{
|
||||
workspaces.POST("", h.createWorkspace)
|
||||
workspaces.DELETE("/:workspaceID", h.deleteWorkspace)
|
||||
workspaces.GET("/:workspaceID", h.getWorkspace)
|
||||
workspaces.PATCH("/:workspaceID", h.extendWorkspace)
|
||||
}
|
||||
workspaces.POST("", h.createWorkspace)
|
||||
workspaces.DELETE("/:ID", h.deleteWorkspace)
|
||||
workspaces.GET("/:ID", h.getWorkspaceByID)
|
||||
workspaces.GET("", h.getWorkspace)
|
||||
// workspaces.PATCH("/:workspaceID", h.extendWorkspace)
|
||||
}
|
||||
|
||||
pvcs := r.Group("/pvcs")
|
||||
{
|
||||
pvcs.POST("", h.createPvc)
|
||||
pvcs.DELETE("/:ID", h.deletePvc)
|
||||
pvcs.GET("/:ID", h.getPvcByID)
|
||||
pvcs.GET("", h.getPvc)
|
||||
}
|
||||
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user