Documentation
¶
Overview ¶
Package signaturediscovery contains functionalities to discover container image signatures.
Index ¶
Constants ¶
View Source
const ( // FakeRepoWithSignatures represents an OCI registry with container image signatures for testing. FakeRepoWithSignatures = "repo with signatures" // FakeRepoWithNoSignatures represents an OCI registry with no container image signatures for testing. FakeRepoWithNoSignatures = "repo with no signatures" // FakeNonExistRepo represents a non-exist OCI registry for testing. FakeNonExistRepo = "nonexist repo" // FakeRepoWithAllInvalidSignatures represents an OCI registry with all invalid container image signatures for testing. FakeRepoWithAllInvalidSignatures = "repo with all invalid signatures" // FakeRepoWithPartialValidSignatures represents an OCI registry with parital valid container image signatures for testing. FakeRepoWithPartialValidSignatures = "repo with parital valid signatures" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { OriginalImageDesc v1.Descriptor // contains filtered or unexported fields }
Client is a wrapper of containerd.Client to interact with signed image manifest.
type Fetcher ¶
type Fetcher interface {
FetchImageSignatures(ctx context.Context, targetRepository string) ([]oci.Signature, error)
}
Fetcher discovers and fetches OCI signatures from the target repository.
func New ¶
func New(originalImageDesc v1.Descriptor, resolverFetcher remoteResolverFetcher, imageFetcher imageFetcher) Fetcher
New creates a new client that implements Fetcher interface.
func NewFakeClient ¶
func NewFakeClient() Fetcher
NewFakeClient constructs a new fake signature discovery client.
Click to show internal directories.
Click to hide internal directories.