Documentation
¶
Index ¶
- func AddDefaultRegistries(images []string, registry string) []string
- func AddDefaultRegistry(imageToChange string, registry string) (string, error)
- func AdvanceTarToPath(tarReader *tar.Reader, filePath string) error
- func ChangeImageDomain(imageString string, newDomain string) (types.ImageReference, error)
- func Copy(src string, dest string, arch string, imageSelection copy.ImageListSelection) error
- func EnsureBaseQcow2Image(imageName string, arch string) (*tar.Reader, func(), error)
- func GetImageLayers(imgRef types.ImageReference, arch string) ([]types.BlobInfo, error)
- func GetImageSpec(imageName string, arch string) (types.Image, error)
- func GetImageSpecFromRef(imgRef types.ImageReference, arch string) (types.Image, error)
- func GetOrPull(imageName string, arch string) (types.ImageReference, error)
- func GetSystemContext(arch string) *types.SystemContext
- func GetTarFromLayerById(imgRef types.ImageReference, layerId string, mediaType string) (*tar.Reader, func(), error)
- func Login(registry string) error
- func MakeOstreeReference(img string) (string, error)
- func ParseOstreeReference(img string) (string, string, string, error)
- func SplitImage(imageArg string) (ocneTypes.ImageInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultRegistries ¶
AddDefaultRegistries takes a list of absolute, relative (without domain), and malformed images and returns a list of absolute and malformed images.
func AddDefaultRegistry ¶
func AdvanceTarToPath ¶
AdvanceTarToPath searches a tar stream until it finds the header for the given file. If the file is not found, the tar stream is advanced to the end, and it is no longer possible to read from it.
For large archives, this can take a while. The archive is usually read from disk, and is usually compressed.
func ChangeImageDomain ¶
func ChangeImageDomain(imageString string, newDomain string) (types.ImageReference, error)
ChangeImageDomain takes an image with a valid transport and domain and changes the domain
func EnsureBaseQcow2Image ¶
EnsureBaseQcow2Image ensures that the base image is downloaded. Return a tar stream of the image.
func GetImageLayers ¶
GetImageLayers fetches the BlobInfos for all the layers of the given ImageReference.
func GetImageSpec ¶
GetImageSpec gets the OCI image specification for a container image
func GetImageSpecFromRef ¶
GetImageSpecFromRef gets the OCI image specification from an image reference.
func GetOrPull ¶
func GetOrPull(imageName string, arch string) (types.ImageReference, error)
GetOrPull image ensures that a container image is on the filesystem of the local machine and returns a reference to that image. If the image is already available locally, a reference to the existing image is returned. If it is not present, then the image is pulled and then a reference is returned.
func GetSystemContext ¶
func GetSystemContext(arch string) *types.SystemContext
GetSystemContext returns a SystemContext that makes sense for the system that the function is called on. The specific behavior is undefined. It should "do the right thing".
func GetTarFromLayerById ¶
func GetTarFromLayerById(imgRef types.ImageReference, layerId string, mediaType string) (*tar.Reader, func(), error)
GetTarFromLayerById opens a tar stream that reads the contents of the given layer for the given image. The backing readers for the tar stream are a gzip stream and a file stream. Both of these have to be closed. The second return value is a function that closes each of these streams in the proper order.
func MakeOstreeReference ¶
MakeOstreeReference does its level best to take a container image reference and turn it into an ostree reference. If there is no ostree transport present, it will add "ostree-unverified-registry".
func ParseOstreeReference ¶
ParseOstreeReference returns three strings: the ostree transport, registry, and tag for an ostree container image. For example, "ostree-unverified-image:container-registry.oracle.com/olcne/ock-ostree:1.30" returns "ostree-unverified-image", "container-registry.oracle.com/olcne/ock-ostree" and "1.30". It is not necessary that a tag is present, but all the rest of the fields are required.
Types ¶
This section is empty.