Documentation
¶
Index ¶
- Constants
- func DeleteManifest(username string, pass string, name string, tag string) *Error
- func DirectDownloadFilefromGithub(filename string, url string, folder string) *Error
- func DownloadBlob(repository, token, sha256 string) (io.ReadCloser, *Error)
- func DownloadFilefromGithub(name string, tag string, filename string, url string, folder string) *Error
- func DownloadFilefromGithubPlus(name, tag, filename, url, folder, yaml string) *Error
- func DownloadLayers(username string, pass string, name string, tag string, folder string) (map[string]int64, []string, *Error)
- func GenGithubURLfromYaml(name, tag, url, yaml, target_file string) (string, *Error)
- func GetDigest(username string, pass string, name string, tag string) (string, *Error)
- func GetToken(repository, username, password, action string) (string, *Error)
- func HasBlob(repository, token, sha256 string) (bool, *Error)
- func ListRepositories(username string, pass string) ([]string, *Error)
- func ListTags(username string, pass string, name string) ([]string, *Error)
- func LoadDockerTar(dir, imagedir string) (string, map[string]int64, []string, *Error)
- func LoadSkopeoTar(dir, imagedir string) (map[string]int64, []string, *Error)
- func MakeManifestV1(registry *registry.Registry, name, tag, layer_sha, base_image string) (*schema1.SignedManifest, *Error)
- func UploadBlob(repository, token, file string) (bool, *Error)
- func UploadLayers(username, pass, name, tag, file, base_image string) (string, *Error)
- func UploadManifests(username, pass, name, tag, layer_sha, base_image string) *Error
- type DockerHubToken
- type DockerSaveInfo
- type SkopeoManifest
- type SkopeoManifestItem
Constants ¶
View Source
const ( DOCKER_URL = "https://registry-1.docker.io" SETTING_URL = "https://raw.githubusercontent.com/JasonYangShadow/LPMXSettingRepository/master/v1.9" )
Variables ¶
This section is empty.
Functions ¶
func DeleteManifest ¶
func DirectDownloadFilefromGithub ¶
url is github url
func DownloadBlob ¶
func DownloadBlob(repository, token, sha256 string) (io.ReadCloser, *Error)
func DownloadFilefromGithub ¶
func DownloadFilefromGithubPlus ¶
func DownloadFilefromGithubPlus(name, tag, filename, url, folder, yaml string) *Error
a patched version that could search file from different level and auto-select the closet one name: is the name of distro, tag: version of distro, filename: the target request file on github, url: fixed github prefix, folder: local folder saving downloaded file, yaml: yaml file saving distro info located on github
func DownloadLayers ¶
func GenGithubURLfromYaml ¶
find correct download url based on the yaml description file
func ListRepositories ¶
func LoadDockerTar ¶
dir is temp dir used for tarball extraction, image dir is used for the storage of image data
func LoadSkopeoTar ¶ added in v1.8.1
func MakeManifestV1 ¶
func MakeManifestV1(registry *registry.Registry, name, tag, layer_sha, base_image string) (*schema1.SignedManifest, *Error)
func UploadBlob ¶
func UploadLayers ¶
func UploadManifests ¶
func UploadManifests(username, pass, name, tag, layer_sha, base_image string) *Error
Types ¶
type DockerHubToken ¶
type DockerSaveInfo ¶
type DockerSaveInfo struct { Config string //config json file name RepoTags []string //tag list Layers []string //layers included inside this image, from lower to higher layers }
Docker load image structure
type SkopeoManifest ¶ added in v1.8.1
type SkopeoManifest struct { SchemaVersion int `json:"schemaVersion"` MediaType string `json:"mediaType"` Config SkopeoManifestItem `json:"config"` Layers []SkopeoManifestItem `json:"layers"` }
Skopeo manifest structure
type SkopeoManifestItem ¶ added in v1.8.1
type SkopeoManifestItem struct { MediaType string `json:"mediaType"` Size uint `json:"size"` Digest string `json:"digest"` }
Skopeo manifest item structure
Click to show internal directories.
Click to hide internal directories.