images: Extract ImageInspect from GetImage#48240
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jul 29, 2024
Merged
Conversation
Remove a special `Details` parameter from the `GetImage` options and
extract its behavior to a `ImageInspect` method as it was only used by
the `/images/{name}/json` endpoint (`docker image inspect`).
This makes it easier for the containerd image service to output an image
inspect output without having to use the same data structures as the
graphdrivers.
Signed-off-by: Paweł Gronowski <[email protected]>
0d4b9a3 to
cd11843
Compare
cpuguy83
approved these changes
Jul 25, 2024
cpuguy83
reviewed
Jul 25, 2024
| @@ -26,6 +26,7 @@ type imageBackend interface { | |||
| ImageHistory(ctx context.Context, imageName string) ([]*image.HistoryResponseItem, error) | |||
| Images(ctx context.Context, opts image.ListOptions) ([]*image.Summary, error) | |||
| GetImage(ctx context.Context, refOrID string, options backend.GetImageOpts) (*dockerimage.Image, error) | |||
Member
There was a problem hiding this comment.
Is this still needed on the backend?
Member
There was a problem hiding this comment.
Oh it is for ImageTag still (though it should be factored out).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove a special
Detailsparameter from theGetImageoptions and extract its behavior to aImageInspectmethod as it was only used by the/images/{name}/jsonendpoint (docker image inspect).This makes it easier for the containerd image service to output an image inspect output without having to use the same data structures as the graphdrivers.