Documentation
¶
Index ¶
- func DownloadImage(token *TokenResponse, manifests *ManifestsResp, arch string, ...) (path *string, err error)
- func Execute(flag *Flag) (*string, error)
- func Package(path string, imageName string, tag string, arch string, operateSystem string, ...) (*string, error)
- func RemoveImageSaveDir(imageName, tag, arch, operateSystem string)
- type Annotations
- type Config
- type Flag
- type Layer
- type Manifest
- type ManifestsResp
- type Platform
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadImage ¶
func DownloadImage(token *TokenResponse, manifests *ManifestsResp, arch string, operateSystem string, imageName string, tag string) (path *string, err error)
DownloadImage 根据提供的manifests下载镜像层和配置
func Package ¶
func Package(path string, imageName string, tag string, arch string, operateSystem string, outputPath string, outputFile *string) (*string, error)
Package 打包为可load镜像
func RemoveImageSaveDir ¶
func RemoveImageSaveDir(imageName, tag, arch, operateSystem string)
Types ¶
type Annotations ¶
type Annotations struct {
ComDockerOfficialImagesBashbrewArch string `json:"com.docker.official-images.bashbrew.arch"`
OrgOpencontainersImageBaseName string `json:"org.opencontainers.image.base.name"`
OrgOpencontainersImageCreated string `json:"org.opencontainers.image.created"`
OrgOpencontainersImageRevision string `json:"org.opencontainers.image.revision"`
OrgOpencontainersImageSource string `json:"org.opencontainers.image.source"`
OrgOpencontainersImageUrl string `json:"org.opencontainers.image.url"`
OrgOpencontainersImageVersion string `json:"org.opencontainers.image.version"`
VndDockerReferenceDigest string `json:"vnd.docker.reference.digest"`
VndDockerReferenceType string `json:"vnd.docker.reference.type"`
}
type Manifest ¶
type Manifest struct {
Annotations Annotations `json:"annotations"`
Digest string `json:"digest"`
MediaType string `json:"mediaType"`
Platform Platform `json:"platform"`
Size int `json:"size"`
}
type ManifestsResp ¶
type ManifestsResp struct {
Manifests []Manifest `json:"manifests"`
MediaType string `json:"mediaType"`
SchemaVersion int `json:"schemaVersion"`
Config Config `json:"config"`
Layers []Layer `json:"layers"`
Annotations Annotations `json:"annotations"`
}
func GetManifest ¶
func GetManifest(token *TokenResponse, imageName, tag string, arch string, os string) (*ManifestsResp, error)
func GetManifestByDigest ¶
func GetManifestByDigest(token *TokenResponse, imageName, digest string) (*ManifestsResp, error)
Click to show internal directories.
Click to hide internal directories.