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:
parent
5b72d32265
commit
6b12e34a4b
4 changed files with 96 additions and 65 deletions
12
registry.go
12
registry.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue