6d17423a6d
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>
12 lines
430 B
Go
12 lines
430 B
Go
package manifest
|
|
|
|
// 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"`
|
|
}
|