Documentation
¶
Index ¶
- Constants
- type Repository
- type RepositoryClient
- func (c *RepositoryClient) GetBlob(ctx context.Context, digest digest.Digest) ([]byte, error)
- func (c *RepositoryClient) ListSignatureManifests(ctx context.Context, manifestDigest digest.Digest) ([]SignatureManifest, error)
- func (c *RepositoryClient) PutSignatureManifest(ctx context.Context, signature []byte, signatureMediaType string, ...) (notation.Descriptor, SignatureManifest, error)
- func (c *RepositoryClient) Resolve(ctx context.Context, reference string) (notation.Descriptor, error)
- type SignatureManifest
- type SignatureRepository
Constants ¶
View Source
const ArtifactTypeNotation = "application/vnd.cncf.notary.v2.signature"
ArtifactTypeNotation specifies the artifact type for a notation object.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface {
SignatureRepository
// Resolve resolves a reference(tag or digest) to a manifest descriptor
Resolve(ctx context.Context, reference string) (notation.Descriptor, error)
}
Repository provides functions for verification and signing workflows
type RepositoryClient ¶
type RepositoryClient struct {
remote.Repository
}
func NewRepositoryClient ¶
func NewRepositoryClient(client remote.Client, ref registry.Reference, plainHTTP bool) *RepositoryClient
NewRepositoryClient creates a new registry client.
func (*RepositoryClient) ListSignatureManifests ¶
func (c *RepositoryClient) ListSignatureManifests(ctx context.Context, manifestDigest digest.Digest) ([]SignatureManifest, error)
ListSignatureManifests returns all signature manifests given the manifest digest
func (*RepositoryClient) PutSignatureManifest ¶
func (c *RepositoryClient) PutSignatureManifest(ctx context.Context, signature []byte, signatureMediaType string, subjectManifest notation.Descriptor, annotations map[string]string) (notation.Descriptor, SignatureManifest, error)
PutSignatureManifest creates and uploads an signature artifact linking the manifest and the signature
func (*RepositoryClient) Resolve ¶
func (c *RepositoryClient) Resolve(ctx context.Context, reference string) (notation.Descriptor, error)
Resolve resolves a reference(tag or digest) to a manifest descriptor
type SignatureManifest ¶
type SignatureManifest struct {
Blob notation.Descriptor
Annotations map[string]string
}
type SignatureRepository ¶
type SignatureRepository interface {
// ListSignatureManifests returns all signature manifests given the manifest digest
ListSignatureManifests(ctx context.Context, manifestDigest digest.Digest) ([]SignatureManifest, error)
// GetBlob downloads the content of the specified digest's Blob
GetBlob(ctx context.Context, digest digest.Digest) ([]byte, error)
// PutSignatureManifest creates and uploads an signature artifact linking the manifest and the signature
PutSignatureManifest(ctx context.Context, signature []byte, signatureMediaType string, manifest notation.Descriptor, annotations map[string]string) (notation.Descriptor, SignatureManifest, error)
}
SignatureRepository provides a storage for signatures
Click to show internal directories.
Click to hide internal directories.