-
Notifications
You must be signed in to change notification settings - Fork 395
*: add SupportedImageDestinationMIMEType to types.ImageDestination #26
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
Conversation
image/image.go
Outdated
| // private cache for Signatures(); nil if not yet known. | ||
| cachedSignatures [][]byte | ||
| cachedSignatures [][]byte | ||
| supportedDestMIMEType []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to myself, should be plural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually isn’t this more requestedManifestMIMETypes? the Image has no concept of a destination, and the MIME types mostly affect what we read and serve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be requestedManifestMIMETypes indeed
|
I'm sure design needs a better look - I integrated this code in containers/skopeo#102 in commit containers/skopeo@7624571 but I'm still unsure about the missing or nil arg in I'm wondering if the |
|
EDIT: the above patch fixed the issue in skopeo :) - now, on design review here :) |
types/types.go
Outdated
| PutSignatures(signatures [][]byte) error | ||
| // SupportedImageDestinationMIMEType tells which mime types the destination support when uploading | ||
| // If an empty slice or nil it's returned, then any mime type can be tried to upload | ||
| SupportedImageDestinationMIMEType() []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Destinationis redundant, and so isImage(and are we talking about manifests only, or blobs as well?)- Return a slice, so this should be plural.
{Supported,Accepted}{Manifest,}MIMETypes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's valid only for manifests also
It would be nice to have class methods instead of plain interfaces in Go. … but in this case, actually it is desirable to have it as a method on |
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
96d970a to
aa53132
Compare
|
Updated PTAL @mtrmac |
|
I'm going to rebase #23 and then go for the containers/skopeo#102 rebase as the final step |
This is an attempt to fix containers/skopeo#102 (comment) so we can move on with #23 w/o breaking
skopeo copywhen working with the Atomic Registry.@mtrmac PTAL
Signed-off-by: Antonio Murdaca runcom@redhat.com