MCPcopy Create free account
hub / github.com/containers/image / NewImage

Method NewImage

types/types.go:83–83  ·  view source on GitHub ↗

NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport. The caller must call .Close() on the returned ImageCloser. NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource, verify that U

(ctx context.Context, sys *SystemContext)

Source from the content-addressed store, hash-verified

81 // verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.
82 // WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.
83 NewImage(ctx context.Context, sys *SystemContext) (ImageCloser, error)
84 // NewImageSource returns a types.ImageSource for this reference.
85 // The caller must call .Close() on the returned ImageSource.
86 NewImageSource(ctx context.Context, sys *SystemContext) (ImageSource, error)

Callers 10

TestWriteReadFunction · 0.65
TestSizeFunction · 0.65
TestDuplicateBlobFunction · 0.65
TestReferenceNewImageFunction · 0.65
TestReferenceNewImageFunction · 0.65
TestReferenceNewImageFunction · 0.65
TestReferenceNewImageFunction · 0.65
TestReferenceNewImageFunction · 0.65
TestReferenceNewImageFunction · 0.65

Implementers 12

tarballReferencetarball/tarball_reference.go
BlobCachepkg/blobcache/blobcache.go
storageReferencestorage/storage_reference.go
ociReferenceoci/layout/oci_transport.go
ociArchiveReferenceoci/archive/oci_transport.go
dirReferencedirectory/directory_transport.go
ForbiddenImageReferenceinternal/testing/mocks/image_reference
sifReferencesif/transport.go
openshiftReferenceopenshift/openshift_transport.go
dockerReferencedocker/docker_transport.go
daemonReferencedocker/daemon/daemon_transport.go
archiveReferencedocker/archive/transport.go

Calls

no outgoing calls

Tested by 10

TestWriteReadFunction · 0.52
TestSizeFunction · 0.52
TestDuplicateBlobFunction · 0.52
TestReferenceNewImageFunction · 0.52
TestReferenceNewImageFunction · 0.52
TestReferenceNewImageFunction · 0.52
TestReferenceNewImageFunction · 0.52
TestReferenceNewImageFunction · 0.52
TestReferenceNewImageFunction · 0.52