(c *gin.Context)
| 58 | } |
| 59 | |
| 60 | func (handler *ClusterHandler) List(c *gin.Context) { |
| 61 | namespace := c.Param("namespace") |
| 62 | clusters, err := handler.s.ListCluster(c, namespace) |
| 63 | if err != nil && !errors.Is(err, consts.ErrNotFound) { |
| 64 | helper.ResponseError(c, err) |
| 65 | return |
| 66 | } |
| 67 | helper.ResponseOK(c, gin.H{"clusters": clusters}) |
| 68 | } |
| 69 | |
| 70 | func (handler *ClusterHandler) Get(c *gin.Context) { |
| 71 | cluster, _ := c.MustGet(consts.ContextKeyCluster).(*store.Cluster) |