Documentation ¶
Index ¶
- Constants
- func DownloadImage(ctx context.Context, manifest APIResponse, filePath, shubRef string, ...) error
- func Pull(ctx context.Context, imgCache *cache.Handle, pullFrom, tmpDir string, ...) (imagePath string, err error)
- func PullToFile(ctx context.Context, imgCache *cache.Handle, pullTo, pullFrom string, ...) (imagePath string, err error)
- type APIResponse
- type URI
Constants ¶
View Source
const ( // URINotSupported if we are using a non default registry error out for now URINotSupported string = "Only the default Singularity Hub registry is supported for now" )
Variables ¶
This section is empty.
Functions ¶
func DownloadImage ¶
func DownloadImage(ctx context.Context, manifest APIResponse, filePath, shubRef string, force, noHTTPS bool) error
DownloadImage image will download a shub image to a path. This will not try to cache it, or use cache.
Types ¶
type APIResponse ¶
type APIResponse struct { Image string `json:"image"` Name string `json:"name"` Tag string `json:"tag"` Version string `json:"version"` Commit string `json:"commit"` }
APIResponse holds the information returned from the Shub API
func GetManifest ¶
func GetManifest(uri URI, noHTTPS bool) (APIResponse, error)
GetManifest will return the image manifest for a container uri from Singularity Hub.
type URI ¶
type URI struct {
// contains filtered or unexported fields
}
URI stores the various components of a singularityhub URI
func ParseReference ¶
ParseReference accepts a valid Shub reference string and parses its content It will return an error if the given URI is not valid, otherwise it will parse the contents into a URI struct
Click to show internal directories.
Click to hide internal directories.