Documentation
¶
Index ¶
- Variables
- func LoadManifestDescriptor(imgRef types.ImageReference) (imgspecv1.Descriptor, error)
- func NewIndexReference(dir string, sourceIndex int) (types.ImageReference, error)
- func NewReference(dir, image string) (types.ImageReference, error)
- func ParseReference(reference string) (types.ImageReference, error)
- func PutBlobFromLocalFile(ctx context.Context, dest types.ImageDestination, file string, ...) (digest.Digest, int64, error)
- type ImageNotFoundError
- type ListResult
- type PutBlobFromLocalFileOption
Constants ¶
This section is empty.
Variables ¶
var ( // Transport is an ImageTransport for OCI directories. Transport = ociTransport{} // ErrMoreThanOneImage is an error returned when the manifest includes // more than one image and the user should choose which one to use. ErrMoreThanOneImage = errors.New("more than one image in oci, choose an image") )
Functions ¶
func LoadManifestDescriptor ¶
func LoadManifestDescriptor(imgRef types.ImageReference) (imgspecv1.Descriptor, error)
LoadManifestDescriptor loads the manifest descriptor to be used to retrieve the image name when pulling an image
func NewIndexReference ¶ added in v5.34.0
func NewIndexReference(dir string, sourceIndex int) (types.ImageReference, error)
NewIndexReference returns an OCI reference for a path and a zero-based source manifest index.
func NewReference ¶
func NewReference(dir, image string) (types.ImageReference, error)
NewReference returns an OCI reference for a directory and a image.
We do not expose an API supplying the resolvedDir; we could, but recomputing it is generally cheap enough that we prefer being confident about the properties of resolvedDir.
func ParseReference ¶
func ParseReference(reference string) (types.ImageReference, error)
ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an OCI ImageReference.
func PutBlobFromLocalFile ¶ added in v5.34.0
func PutBlobFromLocalFile(ctx context.Context, dest types.ImageDestination, file string, options ...PutBlobFromLocalFileOption) (digest.Digest, int64, error)
PutBlobFromLocalFile arranges the data from path to be used as blob with digest. It computes, and returns, the digest and size of the used file.
This function can be used instead of dest.PutBlob() where the ImageDestination requires PutBlob() to be called.
Types ¶
type ImageNotFoundError ¶ added in v5.24.0
type ImageNotFoundError struct {
// contains filtered or unexported fields
}
ImageNotFoundError is used when the OCI structure, in principle, exists and seems valid enough, but nothing matches the “image” part of the provided reference.
func (ImageNotFoundError) Error ¶ added in v5.24.0
func (e ImageNotFoundError) Error() string
type ListResult ¶ added in v5.34.0
type ListResult struct { Reference types.ImageReference ManifestDescriptor imgspecv1.Descriptor }
ListResult wraps the image reference and the manifest for loading
func List ¶ added in v5.34.0
func List(dir string) ([]ListResult, error)
List returns a slice of manifests included in the archive
type PutBlobFromLocalFileOption ¶ added in v5.34.0
type PutBlobFromLocalFileOption struct{}
PutBlobFromLocalFileOption is unused but may receive functionality in the future.