...
1 package storage
2
3 import (
4 "context"
5
6 "github.com/docker/distribution"
7 digest "github.com/opencontainers/go-digest"
8 )
9
10
11
12 type v1UnsupportedHandler struct {
13 innerHandler ManifestHandler
14 }
15
16 var _ ManifestHandler = &v1UnsupportedHandler{}
17
18 func (v *v1UnsupportedHandler) Unmarshal(ctx context.Context, dgst digest.Digest, content []byte) (distribution.Manifest, error) {
19 return v.innerHandler.Unmarshal(ctx, dgst, content)
20 }
21 func (v *v1UnsupportedHandler) Put(ctx context.Context, manifest distribution.Manifest, skipDependencyVerification bool) (digest.Digest, error) {
22 return digest.Digest(""), distribution.ErrSchemaV1Unsupported
23 }
24
View as plain text