mirror of
https://github.com/distribution/distribution.git
synced 2025-09-08 02:09:39 +00:00
Move MediaType into manifest.Versioned
This makes content type sniffing cleaner. The document just needs to be decoded into a manifest.Versioned structure. It's no longer a two-step process. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
package manifest
|
||||
|
||||
// Versioned provides a struct with just the manifest schemaVersion. Incoming
|
||||
// Versioned provides a struct with the manifest schemaVersion and . Incoming
|
||||
// content with unknown schema version can be decoded against this struct to
|
||||
// check the version.
|
||||
type Versioned struct {
|
||||
// SchemaVersion is the image manifest schema that this image follows
|
||||
SchemaVersion int `json:"schemaVersion"`
|
||||
|
||||
// MediaType is the media type of this schema.
|
||||
MediaType string `json:"mediaType,omitempty"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user