Documentation ¶
Overview ¶
Package registry provides access to signatures in a registry
Index ¶
Constants ¶
const ArtifactTypeNotation = "application/vnd.cncf.notary.signature"
ArtifactTypeNotation specifies the artifact type for a notation object. spec: https://github.com/notaryproject/notaryproject/blob/efc828223710f99ab9639d2d0f72d59036a8e80c/specs/signature-specification.md#storage
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { // Resolve resolves a reference(tag or digest) to a manifest descriptor Resolve(ctx context.Context, reference string) (ocispec.Descriptor, error) // ListSignatures returns signature manifests filtered by fn given the // target artifact's manifest descriptor ListSignatures(ctx context.Context, desc ocispec.Descriptor, fn func(signatureManifests []ocispec.Descriptor) error) error // FetchSignatureBlob returns signature envelope blob and descriptor for // given signature manifest descriptor FetchSignatureBlob(ctx context.Context, desc ocispec.Descriptor) ([]byte, ocispec.Descriptor, error) // PushSignature creates and uploads an signature manifest along with its // linked signature envelope blob. PushSignature(ctx context.Context, mediaType string, blob []byte, subject ocispec.Descriptor, annotations map[string]string) (blobDesc, manifestDesc ocispec.Descriptor, err error) }
Repository provides registry functionalities for storage and retrieval of signature.
func NewOCIRepository ¶
func NewOCIRepository(path string, opts RepositoryOptions) (Repository, error)
NewOCIRepository returns a new Repository with oci.Store as its oras.GraphTarget. `path` denotes directory path to the target OCI layout.
func NewRepository ¶
func NewRepository(target oras.GraphTarget) Repository
NewRepository returns a new Repository. Known implementations of oras.GraphTarget: - [remote.Repository](https://pkg.go.dev/oras.land/oras-go/v2/registry/remote#Repository) - oci.Store(https://pkg.go.dev/oras.land/oras-go/v2/content/oci#Store)
func NewRepositoryWithOptions ¶
func NewRepositoryWithOptions(target oras.GraphTarget, opts RepositoryOptions) Repository
NewRepositoryWithOptions returns a new Repository with user specified options.
type RepositoryOptions ¶
type RepositoryOptions struct{}
RepositoryOptions provides user options when creating a Repository it is kept for future extensibility