Documentation ¶
Index ¶
- Constants
- Variables
- func IsTable(format string) bool
- func LabelsToString(labels map[string]string) string
- func LocalVolumes(mount []types.MountPoint) string
- func MountPointToString(mount []types.MountPoint) string
- func PortBindingsToString(portMap types.PortMap) string
- func PreFormat(format string) string
- func SizeToString(sizeRw int64, sizeRootFs int64) string
- type ContainerContext
Constants ¶
View Source
const ( TableFormat = "table" RawFormat = "raw" )
Format key to output
Variables ¶
View Source
var ContainerHeader = map[string]string{
"Names": "Name",
"ID": "ID",
"Status": "Status",
"RunningFor": "Created",
"Image": "Image",
"Runtime": "Runtime",
"Command": "Command",
"ImageID": "ImageID",
"Labels": "Labels",
"Mounts": "Mounts",
"State": "State",
"Ports": "Ports",
"Size": "Size",
"LocalVolumes": "LocalVolumes",
"Networks": "Networks",
"CreatedAt": "CreatedAt",
}
ContainerHeader is the map to show container head
Functions ¶
func LabelsToString ¶
LabelsToString is to transform the labels from map to string
func LocalVolumes ¶
func LocalVolumes(mount []types.MountPoint) string
LocalVolumes is get the count of local volumes
func MountPointToString ¶
func MountPointToString(mount []types.MountPoint) string
MountPointToString is to transform the MountPoint from array to string
func PortBindingsToString ¶
PortBindingsToString is to transform the portbindings from map to string
func SizeToString ¶
SizeToString is to get the size related output
Types ¶
type ContainerContext ¶
ContainerContext is the map to show container context detail
func NewContainerContext ¶
func NewContainerContext(c *types.Container, flagNoTrunc bool) (containerContext ContainerContext, err error)
NewContainerContext is to generate a ContainerContext to be show
Click to show internal directories.
Click to hide internal directories.