New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement private.ImageSource in all transports, improve transport helpers #1590
Commits on Jul 5, 2022
-
Move storageImageSource into a separate storage/storage_src.go
storage_image.go is becoming too large, and we'd like to have easy access to both internal/imagesource/impl and internal/imagedestination/impl, which is easier with separate files. Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Move storageImageDestination into a separate storage/storage_dest.go
storage_image.go is becoming too large, and we'd like to have easy access to both internal/imagesource/impl and internal/imagedestination/impl, which is easier with separate files. Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Move openshiftImageSource into a separate openshift/openshift_src.go
We'd like to have easy access to both internal/imagesource/impl and internal/imagedestination/impl, which is easier with separate files. Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Move openshiftImageDestination into a separate openshift/openshift_de…
…st.go We'd like to have easy access to both internal/imagesource/impl and internal/imagedestination/impl, which is easier with separate files. Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Declare the data structure before using it, so that reading the file top-down is a bit easier. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Add internal/imagesource/stubs.NoGetBlobAt
... so that we can have two lines instead of copy&pasted methods. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Add a transportName parameter to docker/internal/tarfile.NewSource
This will allow using it in error messages in the future. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Implement private.ImageSource in non-forwarding transports
This sets up the precedent that all transports should primarily implement the private interface; that will allow us to make future changes to the private interface easier, because we can just change the public interface wrappers in a single place instead of modifying transports - especially as more stubs are added soonish. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Implement private.ImageSource in oci/archive and openshift
For forwarding, we use imagesource.FromPublic although we know that the transport implements the private interface, mostly for consistency. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Add internal/imagesource/impl.Properties, use it to reduce boilerplate
This matches internal/imagedestination/impl.Properties; it's not quite worth it for the single value, but the consistency is attractive. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
This is not locally worth it, but it is a proof of the concept, and consistent with stubs.ImplementsPutBlobPartial. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Add impl.DoesNotAffectLayerInfosForCopy, use it to reduce boilerplate
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-
Add internal/imagesource/impl.NoSignatures, use it to reduce boilerplate
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>