Skip to content

Commit

Permalink
Cleanup: Add Digest to the SignedEntity interface.
Browse files Browse the repository at this point in the history
🧹 We have worked around the absence of this in the core interface (while implemented in both `Signed{Entity,Image}`) a variety of places.

This allows us to clean up those workarounds downstream.

/kind cleanup

Signed-off-by: Matt Moore <[email protected]>
  • Loading branch information
mattmoor committed May 8, 2023
1 parent 3121a17 commit a6ac4a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/oci/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@

package oci

import v1 "github.com/google/go-containerregistry/pkg/v1"

type SignedEntity interface {
// Digest returns the sha256 of this image's manifest.
Digest() (v1.Hash, error)

// Signatures returns the set of signatures currently associated with this
// entity, or the empty equivalent if none are found.
Signatures() (Signatures, error)
Expand Down

0 comments on commit a6ac4a2

Please sign in to comment.