Expose Signatures() on Repository

Add a SignatureService and expose it via Signatures() on Repository so
external integrations wrapping the registry can access signatures.

Move signature related code from revisionstore.go to signaturestore.go.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
This commit is contained in:
Andy Goldstein 2015-03-04 20:32:22 +00:00
parent 5b72d32265
commit 6b12e34a4b
4 changed files with 96 additions and 65 deletions

View file

@ -27,6 +27,9 @@ type Repository interface {
// Layers returns a reference to this repository's layers service.
Layers() LayerService
// Signatures returns a reference to this repository's signatures service.
Signatures() SignatureService
}
// ManifestService provides operations on image manifests.
@ -122,3 +125,12 @@ type LayerUpload interface {
// Cancel the layer upload process.
Cancel() error
}
// SignatureService provides operations on signatures.
type SignatureService interface {
// Get retrieves all of the signature blobs for the specified digest.
Get(dgst digest.Digest) ([][]byte, error)
// Put stores the signature for the provided digest.
Put(dgst digest.Digest, signatures ...[]byte) error
}