Documentation
¶
Index ¶
- func FatalErr(msg interface{})
- type AuthInfo
- type DockerCLI
- func (c *DockerCLI) Args(args ...string) *DockerCLI
- func (c *DockerCLI) CheckImageExist(imageIndex string) (bool, error)
- func (c *DockerCLI) ContainerCreate(imageName string, containerName string, entrypoint string, openStdin bool) (string, error)
- func (c *DockerCLI) ContainerRemove(id string) error
- func (c *DockerCLI) ContainerStart(id string) error
- func (c *DockerCLI) ContainerStop(id string) error
- func (c *DockerCLI) Exec(id string, cmd []string) (int, string, string, error)
- func (c *DockerCLI) GetImageID(imageTag string) (string, error)
- func (c *DockerCLI) GetImageList() ([]string, error)
- func (c *DockerCLI) ImageRemove(imageID string) error
- func (c *DockerCLI) Output() (string, error)
- func (c *DockerCLI) Run(commands ...string) *DockerCLI
- type ExitError
- type PodmanCLI
- func (c *PodmanCLI) Args(args ...string) *PodmanCLI
- func (c *PodmanCLI) CheckImageExist(imageIndex string) (bool, error)
- func (c *PodmanCLI) ContainerCreate(imageName string, containerName string, entrypoint string, openStdin bool) (string, error)
- func (c *PodmanCLI) ContainerRemove(id string) error
- func (c *PodmanCLI) ContainerStart(id string) error
- func (c *PodmanCLI) ContainerStop(id string) error
- func (c *PodmanCLI) CopyFile(id string, src string, target string) error
- func (c *PodmanCLI) Exec(id string, commands []string) (string, error)
- func (c *PodmanCLI) ExecBackgroud(id string, commands []string) (string, error)
- func (c *PodmanCLI) GetImageID(imageTag string) (string, error)
- func (c *PodmanCLI) GetImageList() ([]string, error)
- func (c *PodmanCLI) GetImages() ([]PodmanImage, error)
- func (c *PodmanCLI) GetImagesByJSON(jsonStr string) ([]PodmanImage, error)
- func (c *PodmanCLI) Output() (string, error)
- func (c *PodmanCLI) RemoveImage(imageIndex string) (bool, error)
- func (c *PodmanCLI) Run(commands ...string) *PodmanCLI
- type PodmanImage
- type QuayCLI
- func (c *QuayCLI) ChangeTag(imageTag, manifestDigest string) (bool, error)
- func (c *QuayCLI) CheckTagNotExist(imageIndex string) (bool, error)
- func (c *QuayCLI) DeleteTag(imageIndex string) (bool, error)
- func (c *QuayCLI) GetImageDigest(imageIndex string) (string, error)
- func (c *QuayCLI) GetTagNameList(imageIndex string) ([]string, error)
- func (c *QuayCLI) GetTags(imageIndex string) ([]TagInfo, error)
- func (c *QuayCLI) TryChangeTag(imageTag, manifestDigest string) (bool, error)
- func (c *QuayCLI) TryDeleteTag(imageIndex string) (bool, error)
- type TagInfo
- type TagsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthInfo ¶
type AuthInfo struct {
Authorization string `json:"authorization"`
}
AuthInfo returns the error info
type DockerCLI ¶
type DockerCLI struct {
CLI *client.Client
ExecCommandPath string
// contains filtered or unexported fields
}
DockerCLI provides function to run the docker command
func (*DockerCLI) CheckImageExist ¶
CheckImageExist check the image exist
func (*DockerCLI) ContainerCreate ¶
func (*DockerCLI) ContainerRemove ¶
func (*DockerCLI) ContainerStart ¶
func (*DockerCLI) ContainerStop ¶
func (*DockerCLI) GetImageID ¶
GetImageID is to get the image ID by image tag
func (*DockerCLI) GetImageList ¶
GetImageList is to get the image list
func (*DockerCLI) ImageRemove ¶
ImageRemove is to remove the image
type PodmanCLI ¶
type PodmanCLI struct {
ExecCommandPath string
UnsetProxy bool
// contains filtered or unexported fields
}
PodmanCLI provides function to run the docker command
func (*PodmanCLI) CheckImageExist ¶
CheckImageExist is to check the image is exist
func (*PodmanCLI) ContainerCreate ¶
func (*PodmanCLI) ContainerRemove ¶
func (*PodmanCLI) ContainerStart ¶
func (*PodmanCLI) ContainerStop ¶
func (*PodmanCLI) ExecBackgroud ¶
func (*PodmanCLI) GetImageID ¶
GetImageID is to get the image ID by image tag
func (*PodmanCLI) GetImageList ¶
GetImageList to get the image list
func (*PodmanCLI) GetImages ¶
func (c *PodmanCLI) GetImages() ([]PodmanImage, error)
func (*PodmanCLI) GetImagesByJSON ¶
func (c *PodmanCLI) GetImagesByJSON(jsonStr string) ([]PodmanImage, error)
func (*PodmanCLI) Output ¶
Output executes the command and returns stdout/stderr combined into one string
func (*PodmanCLI) RemoveImage ¶
RemoveImage is to remove image
type PodmanImage ¶
type PodmanImage struct {
ID string `json:"Id"`
Size int64 `json:"Size"`
Labels map[string]string `json:"Labels"`
Names []string `json:"Names"`
Digest string `json:"Digest"`
Digests []string `json:"Digests"`
Dangling bool `json:"Dangling"`
History []string `json:"History"`
Containers int64 `json:"Containers"`
}
PodmanImage podman image
type QuayCLI ¶
QuayCLI provides function to run the quay command
func (*QuayCLI) CheckTagNotExist ¶
CheckTagNotExist check the image exist
func (*QuayCLI) GetImageDigest ¶
GetImageDigest gets the ID of the specified image
func (*QuayCLI) GetTagNameList ¶
GetTagNameList get the tag name list in quay
func (*QuayCLI) TryChangeTag ¶
type TagInfo ¶
type TagInfo struct {
Name string `json:"name"`
Reversion bool `json:"reversion"`
StartTs int64 `json:"start_ts"`
EndTs int64 `json:"end_ts"`
ManifestDigest string `json:"manifest_digest"`
ImageID string `json:"image_id"`
LastModified string `json:"last_modified"`
Expiration string `json:"expiration"`
DockerImageID string `json:"docker_image_id"`
IsManifestList bool `json:"is_manifest_list"`
Size int64 `json:"size"`
}
TagInfo returns the images tag info
type TagsResult ¶
type TagsResult struct {
HasAdditional bool `json:"has_additional"`
Page int `json:"page"`
Tags []TagInfo `json:"tags"`
}
TagsResult returns the images tag info