update list containers
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"floares/lib/http/network"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func ListConnect(c *gin.Context) {
|
||||
ns := c.Param("ns")
|
||||
if ns == "" {
|
||||
c.JSON(http.StatusBadRequest, gin.H{
|
||||
"code": http.StatusBadRequest,
|
||||
"msg": "namespace is required",
|
||||
})
|
||||
}
|
||||
inspect := network.GetInspect(ns)
|
||||
c.JSON(http.StatusOK, inspect)
|
||||
|
||||
}
|
||||
@@ -4,4 +4,5 @@ import "github.com/gin-gonic/gin"
|
||||
|
||||
func RegisterRouter(r *gin.RouterGroup) {
|
||||
r.GET("/", ListNetwork)
|
||||
r.GET("/:ns/containers", ListConnect)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user