Move layer interface definitions to distribution package

After consideration, it has been decided that the interfaces defined in the
storage package provide a good base for interacting with various registry
instances. Whether interacting with a remote API or a local, on-disk registry,
these types have proved flexible. By moving them here, they can become the
central components of interacting with distribution components.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2015-02-11 16:49:49 -08:00
parent 5a0f1ceeef
commit 553d48d618
20 changed files with 113 additions and 265 deletions

View file

@ -4,6 +4,7 @@ import (
"fmt"
"strings"
"github.com/docker/distribution"
ctxu "github.com/docker/distribution/context"
"github.com/docker/distribution/digest"
"github.com/docker/distribution/manifest"
@ -71,7 +72,7 @@ type manifestStore struct {
tagStore *tagStore
}
var _ ManifestService = &manifestStore{}
var _ distribution.ManifestService = &manifestStore{}
// func (ms *manifestStore) Repository() Repository {
// return ms.repository
@ -177,7 +178,7 @@ func (ms *manifestStore) verifyManifest(tag string, mnfst *manifest.SignedManife
}
if !exists {
errs = append(errs, ErrUnknownLayer{FSLayer: fsLayer})
errs = append(errs, distribution.ErrUnknownLayer{FSLayer: fsLayer})
}
}