todo:finish list netns containers
This commit is contained in:
@@ -3,31 +3,23 @@ package network
|
||||
import (
|
||||
"encoding/json"
|
||||
"floares/config"
|
||||
"floares/lib/model"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Inspect struct {
|
||||
Name string `json:"Name"`
|
||||
Id string `json:"Id"`
|
||||
Created time.Time `json:"Created"`
|
||||
Scope string `json:"Scope"`
|
||||
Driver string `json:"Driver"`
|
||||
EnableIPv6 bool `json:"EnableIPv6"`
|
||||
IPAM struct {
|
||||
Driver string `json:"Driver"`
|
||||
Options struct {
|
||||
Driver string `json:"driver"`
|
||||
} `json:"Options"`
|
||||
Config []struct {
|
||||
Subnet string `json:"Subnet"`
|
||||
Gateway string `json:"Gateway"`
|
||||
} `json:"Config"`
|
||||
} `json:"IPAM"`
|
||||
Internal bool `json:"Internal"`
|
||||
Attachable bool `json:"Attachable"`
|
||||
Ingress bool `json:"Ingress"`
|
||||
Name string `json:"Name"`
|
||||
Id string `json:"Id"`
|
||||
Created time.Time `json:"Created"`
|
||||
Scope string `json:"Scope"`
|
||||
Driver string `json:"Driver"`
|
||||
EnableIPv6 bool `json:"EnableIPv6"`
|
||||
IPAM model.IPAM `json:"IPAM"`
|
||||
Internal bool `json:"Internal"`
|
||||
Attachable bool `json:"Attachable"`
|
||||
Ingress bool `json:"Ingress"`
|
||||
ConfigFrom struct {
|
||||
Network string `json:"Network"`
|
||||
} `json:"ConfigFrom"`
|
||||
@@ -55,5 +47,6 @@ func GetInspect(ns string) (net Inspect) {
|
||||
return
|
||||
}
|
||||
err = json.NewDecoder(res.Body).Decode(&net)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user