Documentation ¶
Index ¶
- Variables
- func Hash(s string) uint32
- func ListContainerOption(flag int) docker.ListContainersOptions
- func RemoveDockerClient(id string) bool
- func RemoveDockerClientByEndpoint(endpoint string)
- type DockerClient
- type DockerContainer
- type DockerContainers
- type DockerImage
- type DockerImages
- type DockerStats
Constants ¶
This section is empty.
Variables ¶
var DockerClientSavePath string
DockerClientSavePath is the path to save clients
Functions ¶
func ListContainerOption ¶
func ListContainerOption(flag int) docker.ListContainersOptions
ListContainerOption returns docker.ListContainersOptions according to the flag @param flag int (0: all, 1: created, 2: restarting, 3: running, 4: paused, 5&6: exited)
func RemoveDockerClient ¶
RemoveDockerClient removes your specified configuration
func RemoveDockerClientByEndpoint ¶
func RemoveDockerClientByEndpoint(endpoint string)
RemoveDockerClientByEndpoint removes your specified configuration
Types ¶
type DockerClient ¶
type DockerClient struct { ID string `json:"id"` Endpoint string `json:"endpoint"` CertPath string `json:"certPath"` IsActive bool `json:"isActive"` }
DockerClient represents a Docker client
func LoadDockerClients ¶
func LoadDockerClients() (clients []*DockerClient, err error)
LoadDockerClients returns registered clients
type DockerContainer ¶
type DockerContainer struct { ID string `json:"id"` Image string `json:"image,omitempty"` Command string `json:"command,omitempty"` Created int64 `json:"created,omitempty"` Status string `json:"status,omitempty"` Ports []docker.APIPort `json:"ports,omitempty"` SizeRw int64 `json:"sizeRw,omitempty"` SizeRootFs int64 `json:"sizeRootFs,omitempty"` Names []string `json:"names,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
DockerContainer represents a container
type DockerContainers ¶
type DockerContainers []DockerContainer
DockerContainers represents list of DockerContainer
func SearchContainers ¶
func SearchContainers(containers []docker.APIContainers, words []string) DockerContainers
SearchContainers checks whether it contains key word or not
func (DockerContainers) Len ¶
func (cons DockerContainers) Len() int
func (DockerContainers) Less ¶
func (cons DockerContainers) Less(i, j int) bool
func (DockerContainers) Swap ¶
func (cons DockerContainers) Swap(i, j int)
type DockerImage ¶
type DockerImage struct { ID string `json:"id"` RepoTags []string `json:"repoTags,omitempty"` Created int64 `json:"created,omitempty"` Size int64 `json:"size,omitempty"` VirtualSize int64 `json:"virtualSize,omitempty"` ParentID string `json:"parentId,omitempty"` RepoDigests []string `json:"repoDigests,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
DockerImage represents a Image
type DockerImages ¶
type DockerImages []DockerImage
DockerImages represents list of DockerImage
func SearchImages ¶
func SearchImages(images []docker.APIImages, words []string) DockerImages
SearchImages checks whether it contains key word or not
func (DockerImages) Len ¶
func (imgs DockerImages) Len() int
func (DockerImages) Less ¶
func (imgs DockerImages) Less(i, j int) bool
func (DockerImages) Swap ¶
func (imgs DockerImages) Swap(i, j int)