Documentation ¶
Index ¶
- type Affected
- type Indexer
- type Mock
- func (i *Mock) AffectedManifests(ctx context.Context, vulns []claircore.Vulnerability) (*claircore.AffectedManifests, error)
- func (i *Mock) Index(ctx context.Context, manifest *claircore.Manifest) (*claircore.IndexReport, error)
- func (i *Mock) IndexReport(ctx context.Context, digest claircore.Digest) (*claircore.IndexReport, bool, error)
- func (i *Mock) State(ctx context.Context) (string, error)
- type Reporter
- type Service
- type StateIndexer
- type StateReporter
- type Stater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Affected ¶
type Affected interface {
AffectedManifests(ctx context.Context, vulns []claircore.Vulnerability) (*claircore.AffectedManifests, error)
}
Affected is an interface for reporting the manifests affected by a set of vulnerabilities.
type Indexer ¶
type Indexer interface {
Index(ctx context.Context, manifest *claircore.Manifest) (*claircore.IndexReport, error)
}
Indexer is an interface for computing a IndexReport given a Manifest.
type Mock ¶
type Mock struct { Index_ func(ctx context.Context, manifest *claircore.Manifest) (*claircore.IndexReport, error) IndexReport_ func(ctx context.Context, digest claircore.Digest) (*claircore.IndexReport, bool, error) State_ func(ctx context.Context) (string, error) AffectedManifests_ func(ctx context.Context, vulns []claircore.Vulnerability) (*claircore.AffectedManifests, error) }
Mock implements a mock indexer Service
If a particular method is not provided an implementation to a constructed Mock an "unexpected call" panic will occur.
func (*Mock) AffectedManifests ¶
func (i *Mock) AffectedManifests(ctx context.Context, vulns []claircore.Vulnerability) (*claircore.AffectedManifests, error)
func (*Mock) IndexReport ¶
type Reporter ¶
type Reporter interface {
IndexReport(ctx context.Context, digest claircore.Digest) (*claircore.IndexReport, bool, error)
}
Reporter is an interface for retreiving an IndexReport given a manifest digest.
type Service ¶
Service is an aggregate interface wrapping claircore.Libindex functionality.
Implementation may use a local instance of claircore.Libindex or a remote instance via http or grpc client.
type StateIndexer ¶
StateIndexer is an aggregate interface providing both a Indexer and a Stater method set
type StateReporter ¶
StateReporter is an aggregate interface providing both a Reporter and a Stater method set