mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
fix: MetaDB fixes related to Docker media types (#2934)
* fix: update download counters for docker media types closes #2929 Signed-off-by: Andrei Aaron <aaaron@luxoft.com> * fix: handle docker config mediatype in MetaDB The OS/Arch/Layer History information was not written to MetaDB Signed-off-by: Andrei Aaron <aaaron@luxoft.com> --------- Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -45,6 +45,20 @@ func IsCompatibleManifestListMediaType(mediatype string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func CompatibleConfigMediaTypes() []string {
|
||||
return []string{docker.MediaTypeImageConfig}
|
||||
}
|
||||
|
||||
func IsCompatibleConfigMediaType(mediatype string) bool {
|
||||
for _, mt := range CompatibleConfigMediaTypes() {
|
||||
if mt == mediatype {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func Validate(body []byte, mediaType string) ([]v1.Descriptor, error) {
|
||||
switch mediaType {
|
||||
case docker.MediaTypeManifest:
|
||||
|
||||
Reference in New Issue
Block a user