flores/lib/model/basic.go
2025-03-25 18:28:06 +08:00

176 lines
6.7 KiB
Go

package model
import "time"
type Version struct {
Platform struct {
Name string `json:"Name"`
} `json:"Platform"`
Components []struct {
Name string `json:"Name"`
Version string `json:"Version"`
Details struct {
APIVersion string `json:"APIVersion,omitempty"`
Arch string `json:"Arch,omitempty"`
BuildTime time.Time `json:"BuildTime,omitempty"`
Experimental string `json:"Experimental,omitempty"`
GitCommit string `json:"GitCommit,omitempty"`
GoVersion string `json:"GoVersion,omitempty"`
KernelVersion string `json:"KernelVersion,omitempty"`
MinAPIVersion string `json:"MinAPIVersion,omitempty"`
Os string `json:"Os,omitempty"`
Package string `json:"Package,omitempty"`
} `json:"Details"`
} `json:"Components"`
Version string `json:"Version"`
ApiVersion string `json:"ApiVersion"`
MinAPIVersion string `json:"MinAPIVersion"`
GitCommit string `json:"GitCommit"`
GoVersion string `json:"GoVersion"`
Os string `json:"Os"`
Arch string `json:"Arch"`
KernelVersion string `json:"KernelVersion"`
BuildTime time.Time `json:"BuildTime"`
}
type Info struct {
ID string `json:"ID"`
Containers int `json:"Containers"`
ContainersRunning int `json:"ContainersRunning"`
ContainersPaused int `json:"ContainersPaused"`
ContainersStopped int `json:"ContainersStopped"`
Images int `json:"Images"`
Driver string `json:"Driver"`
DriverStatus [][]string `json:"DriverStatus"`
Plugins struct {
Volume []string `json:"Volume"`
Network []string `json:"Network"`
Authorization interface{} `json:"Authorization"`
Log []string `json:"Log"`
} `json:"Plugins"`
MemoryLimit bool `json:"MemoryLimit"`
SwapLimit bool `json:"SwapLimit"`
CpuCfsPeriod bool `json:"CpuCfsPeriod"`
CpuCfsQuota bool `json:"CpuCfsQuota"`
CPUShares bool `json:"CPUShares"`
CPUSet bool `json:"CPUSet"`
PidsLimit bool `json:"PidsLimit"`
IPv4Forwarding bool `json:"IPv4Forwarding"`
BridgeNfIptables bool `json:"BridgeNfIptables"`
BridgeNfIp6Tables bool `json:"BridgeNfIp6tables"`
Debug bool `json:"Debug"`
NFd int `json:"NFd"`
OomKillDisable bool `json:"OomKillDisable"`
NGoroutines int `json:"NGoroutines"`
SystemTime time.Time `json:"SystemTime"`
LoggingDriver string `json:"LoggingDriver"`
CgroupDriver string `json:"CgroupDriver"`
NEventsListener int `json:"NEventsListener"`
KernelVersion string `json:"KernelVersion"`
OperatingSystem string `json:"OperatingSystem"`
OSVersion string `json:"OSVersion"`
OSType string `json:"OSType"`
Architecture string `json:"Architecture"`
IndexServerAddress string `json:"IndexServerAddress"`
RegistryConfig struct {
AllowNondistributableArtifactsCIDRs []interface{} `json:"AllowNondistributableArtifactsCIDRs"`
AllowNondistributableArtifactsHostnames []interface{} `json:"AllowNondistributableArtifactsHostnames"`
InsecureRegistryCIDRs []interface{} `json:"InsecureRegistryCIDRs"`
IndexConfigs struct {
} `json:"IndexConfigs"`
Mirrors []interface{} `json:"Mirrors"`
} `json:"RegistryConfig"`
NCPU int `json:"NCPU"`
MemTotal int64 `json:"MemTotal"`
GenericResources interface{} `json:"GenericResources"`
DockerRootDir string `json:"DockerRootDir"`
HttpProxy string `json:"HttpProxy"`
HttpsProxy string `json:"HttpsProxy"`
NoProxy string `json:"NoProxy"`
Name string `json:"Name"`
Labels interface{} `json:"Labels"`
ExperimentalBuild bool `json:"ExperimentalBuild"`
ServerVersion string `json:"ServerVersion"`
Runtimes struct {
Crun struct {
Path string `json:"path"`
} `json:"crun"`
CrunVm struct {
Path string `json:"path"`
} `json:"crun-vm"`
CrunWasm struct {
Path string `json:"path"`
} `json:"crun-wasm"`
Kata struct {
Path string `json:"path"`
} `json:"kata"`
Krun struct {
Path string `json:"path"`
} `json:"krun"`
Ocijail struct {
Path string `json:"path"`
} `json:"ocijail"`
Runc struct {
Path string `json:"path"`
} `json:"runc"`
Runj struct {
Path string `json:"path"`
} `json:"runj"`
Runsc struct {
Path string `json:"path"`
} `json:"runsc"`
Youki struct {
Path string `json:"path"`
} `json:"youki"`
} `json:"Runtimes"`
DefaultRuntime string `json:"DefaultRuntime"`
Swarm struct {
NodeID string `json:"NodeID"`
NodeAddr string `json:"NodeAddr"`
LocalNodeState string `json:"LocalNodeState"`
ControlAvailable bool `json:"ControlAvailable"`
Error string `json:"Error"`
RemoteManagers interface{} `json:"RemoteManagers"`
} `json:"Swarm"`
LiveRestoreEnabled bool `json:"LiveRestoreEnabled"`
Isolation string `json:"Isolation"`
InitBinary string `json:"InitBinary"`
ContainerdCommit struct {
ID string `json:"ID"`
Expected string `json:"Expected"`
} `json:"ContainerdCommit"`
RuncCommit struct {
ID string `json:"ID"`
Expected string `json:"Expected"`
} `json:"RuncCommit"`
InitCommit struct {
ID string `json:"ID"`
Expected string `json:"Expected"`
} `json:"InitCommit"`
SecurityOptions []string `json:"SecurityOptions"`
ProductLicense string `json:"ProductLicense"`
CDISpecDirs interface{} `json:"CDISpecDirs"`
Warnings []interface{} `json:"Warnings"`
BuildahVersion string `json:"BuildahVersion"`
CPURealtimePeriod bool `json:"CPURealtimePeriod"`
CPURealtimeRuntime bool `json:"CPURealtimeRuntime"`
CgroupVersion string `json:"CgroupVersion"`
Rootless bool `json:"Rootless"`
SwapFree int64 `json:"SwapFree"`
SwapTotal int64 `json:"SwapTotal"`
Uptime string `json:"Uptime"`
}
type BasicInfo struct {
Platform struct {
Name string `json:"Name"`
} `json:"Platform"`
Uptime string `json:"Uptime"`
DefaultRuntime string `json:"DefaultRuntime"`
NCPU int `json:"NCPU"`
MemTotal int64 `json:"MemTotal"`
OperatingSystem string `json:"OperatingSystem"`
Images int `json:"Images"`
Containers int `json:"Containers"`
Networks int `json:"Networks"`
Volumes int `json:"Volumes"`
}