Documentation
¶
Index ¶
- Constants
- type RepositoryClient
- func (c *RepositoryClient) Get(ctx context.Context, signatureDigest digest.Digest) ([]byte, error)
- func (c *RepositoryClient) GetManifestDescriptor(ctx context.Context, ref string) (notation.Descriptor, error)
- func (c *RepositoryClient) Link(ctx context.Context, manifest, signature notation.Descriptor) (notation.Descriptor, error)
- func (c *RepositoryClient) Lookup(ctx context.Context, manifestDigest digest.Digest) ([]digest.Digest, error)
- func (c *RepositoryClient) Put(ctx context.Context, signature []byte) (notation.Descriptor, error)
- type SignatureRepository
Constants ¶
View Source
const ArtifactTypeNotation = "application/vnd.cncf.notary.v2.signature"
ArtifactTypeNotation specifies the artifact type for a notation object.
View Source
const MediaTypeNotationSignature = "application/jose+json"
MediaTypeNotationSignature specifies the media type for the notation signature.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) GetManifestDescriptor ¶
func (c *RepositoryClient) GetManifestDescriptor(ctx context.Context, ref string) (notation.Descriptor, error)
GetManifestDescriptor returns signature manifest information by tag or digest.
func (*RepositoryClient) Link ¶
func (c *RepositoryClient) Link(ctx context.Context, manifest, signature notation.Descriptor) (notation.Descriptor, error)
Link creates an signature artifact linking the manifest and the signature
func (*RepositoryClient) Lookup ¶
func (c *RepositoryClient) Lookup(ctx context.Context, manifestDigest digest.Digest) ([]digest.Digest, error)
Lookup finds all signatures for the specified manifest
func (*RepositoryClient) Put ¶
func (c *RepositoryClient) Put(ctx context.Context, signature []byte) (notation.Descriptor, error)
Put uploads the signature to the registry
type SignatureRepository ¶
type SignatureRepository interface {
// Lookup finds all signatures for the specified manifest
Lookup(ctx context.Context, manifestDigest digest.Digest) ([]digest.Digest, error)
// Get downloads the signature by the specified digest
Get(ctx context.Context, signatureDigest digest.Digest) ([]byte, error)
// Put uploads the signature to the registry
Put(ctx context.Context, signature []byte) (notation.Descriptor, error)
// Link creates an signature artifact linking the manifest and the signature
Link(ctx context.Context, manifest, signature notation.Descriptor) (notation.Descriptor, error)
}
SignatureRepository provides a storage for signatures
Click to show internal directories.
Click to hide internal directories.