github.com/AbhinandanKurakure/podman/v3@v3.4.10/libpod/define/info.go (about) 1 package define 2 3 import "github.com/containers/storage/pkg/idtools" 4 5 // Info is the overall struct that describes the host system 6 // running libpod/podman 7 type Info struct { 8 Host *HostInfo `json:"host"` 9 Store *StoreInfo `json:"store"` 10 Registries map[string]interface{} `json:"registries"` 11 Plugins Plugins `json:"plugins"` 12 Version Version `json:"version"` 13 } 14 15 //HostInfo describes the libpod host 16 type SecurityInfo struct { 17 AppArmorEnabled bool `json:"apparmorEnabled"` 18 DefaultCapabilities string `json:"capabilities"` 19 Rootless bool `json:"rootless"` 20 SECCOMPEnabled bool `json:"seccompEnabled"` 21 SECCOMPProfilePath string `json:"seccompProfilePath"` 22 SELinuxEnabled bool `json:"selinuxEnabled"` 23 } 24 25 // HostInfo describes the libpod host 26 type HostInfo struct { 27 Arch string `json:"arch"` 28 BuildahVersion string `json:"buildahVersion"` 29 CgroupManager string `json:"cgroupManager"` 30 CGroupsVersion string `json:"cgroupVersion"` 31 CgroupControllers []string `json:"cgroupControllers"` 32 Conmon *ConmonInfo `json:"conmon"` 33 CPUs int `json:"cpus"` 34 Distribution DistributionInfo `json:"distribution"` 35 EventLogger string `json:"eventLogger"` 36 Hostname string `json:"hostname"` 37 IDMappings IDMappings `json:"idMappings,omitempty"` 38 Kernel string `json:"kernel"` 39 LogDriver string `json:"logDriver"` 40 MemFree int64 `json:"memFree"` 41 MemTotal int64 `json:"memTotal"` 42 OCIRuntime *OCIRuntimeInfo `json:"ociRuntime"` 43 OS string `json:"os"` 44 // RemoteSocket returns the UNIX domain socket the Podman service is listening on 45 RemoteSocket *RemoteSocket `json:"remoteSocket,omitempty"` 46 RuntimeInfo map[string]interface{} `json:"runtimeInfo,omitempty"` 47 // ServiceIsRemote is true when the podman/libpod service is remote to the client 48 ServiceIsRemote bool `json:"serviceIsRemote"` 49 Security SecurityInfo `json:"security"` 50 Slirp4NetNS SlirpInfo `json:"slirp4netns,omitempty"` 51 SwapFree int64 `json:"swapFree"` 52 SwapTotal int64 `json:"swapTotal"` 53 Uptime string `json:"uptime"` 54 Linkmode string `json:"linkmode"` 55 } 56 57 // RemoteSocket describes information about the API socket 58 type RemoteSocket struct { 59 Path string `json:"path,omitempty"` 60 Exists bool `json:"exists,omitempty"` 61 } 62 63 // SlirpInfo describes the slirp executable that 64 // is being being used. 65 type SlirpInfo struct { 66 Executable string `json:"executable"` 67 Package string `json:"package"` 68 Version string `json:"version"` 69 } 70 71 // IDMappings describe the GID and UID mappings 72 type IDMappings struct { 73 GIDMap []idtools.IDMap `json:"gidmap"` 74 UIDMap []idtools.IDMap `json:"uidmap"` 75 } 76 77 // DistributionInfo describes the host distribution 78 // for libpod 79 type DistributionInfo struct { 80 Distribution string `json:"distribution"` 81 Variant string `json:"variant,omitempty"` 82 Version string `json:"version"` 83 Codename string `json:"codename,omitempty"` 84 } 85 86 // ConmonInfo describes the conmon executable being used 87 type ConmonInfo struct { 88 Package string `json:"package"` 89 Path string `json:"path"` 90 Version string `json:"version"` 91 } 92 93 // OCIRuntimeInfo describes the runtime (crun or runc) being 94 // used with podman 95 type OCIRuntimeInfo struct { 96 Name string `json:"name"` 97 Package string `json:"package"` 98 Path string `json:"path"` 99 Version string `json:"version"` 100 } 101 102 // StoreInfo describes the container storage and its 103 // attributes 104 type StoreInfo struct { 105 ConfigFile string `json:"configFile"` 106 ContainerStore ContainerStore `json:"containerStore"` 107 GraphDriverName string `json:"graphDriverName"` 108 GraphOptions map[string]interface{} `json:"graphOptions"` 109 GraphRoot string `json:"graphRoot"` 110 GraphStatus map[string]string `json:"graphStatus"` 111 ImageStore ImageStore `json:"imageStore"` 112 RunRoot string `json:"runRoot"` 113 VolumePath string `json:"volumePath"` 114 } 115 116 // ImageStore describes the image store. Right now only the number 117 // of images present 118 type ImageStore struct { 119 Number int `json:"number"` 120 } 121 122 // ContainerStore describes the quantity of containers in the 123 // store by status 124 type ContainerStore struct { 125 Number int `json:"number"` 126 Paused int `json:"paused"` 127 Running int `json:"running"` 128 Stopped int `json:"stopped"` 129 } 130 131 type Plugins struct { 132 Volume []string `json:"volume"` 133 Network []string `json:"network"` 134 Log []string `json:"log"` 135 // FIXME what should we do with Authorization, docker seems to return nothing by default 136 // Authorization []string `json:"authorization"` 137 }