mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-10 02:45:44 +00:00
This requires updating all import paths throughout, and a matching buildah update to interoperate. I can't figure out the reason for go.mod tracking github.com/containers/image v3.0.2+incompatible // indirect ((go mod graph) lists it as a direct dependency of libpod, but (go list -json -m all) lists it as an indirect dependency), but at least looking at the vendor subdirectory, it doesn't seem to be actually used in the built binaries. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
23 lines
896 B
Go
23 lines
896 B
Go
package docker
|
|
|
|
import (
|
|
"github.com/containers/image/v4/docker/reference"
|
|
"github.com/containers/image/v4/types"
|
|
)
|
|
|
|
// bicTransportScope returns a BICTransportScope appropriate for ref.
|
|
func bicTransportScope(ref dockerReference) types.BICTransportScope {
|
|
// Blobs can be reused across the whole registry.
|
|
return types.BICTransportScope{Opaque: reference.Domain(ref.ref)}
|
|
}
|
|
|
|
// newBICLocationReference returns a BICLocationReference appropriate for ref.
|
|
func newBICLocationReference(ref dockerReference) types.BICLocationReference {
|
|
// Blobs are scoped to repositories (the tag/digest are not necessary to reuse a blob).
|
|
return types.BICLocationReference{Opaque: ref.ref.Name()}
|
|
}
|
|
|
|
// parseBICLocationReference returns a repository for encoded lr.
|
|
func parseBICLocationReference(lr types.BICLocationReference) (reference.Named, error) {
|
|
return reference.ParseNormalizedNamed(lr.Opaque)
|
|
}
|