Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransformer ¶
func NewTransformer() *transformer
Types ¶
type Adapter ¶
type Adapter interface { // Scan adapts a Harbor ScanRequest to Clair API calls and then maps the response Clair layer to Harbor ScanReport. // Returns error in case of failures. Scan(req harbor.ScanRequest) (harbor.ScanReport, error) }
Adapter wraps the Scan method.
func NewAdapter ¶
func NewAdapter(registryClientFactory registry.ClientFactory, clairClient clair.Client, transformer Transformer) Adapter
type Enqueuer ¶
type Enqueuer interface {
Enqueue(request harbor.ScanRequest) (string, error)
}
Enqueuer wraps the Enqueue method. Enqueue enqueues the specify ScanRequest for async processing and returns the async job's identifier.
func NewEnqueuer ¶
NewEnqueuer constructs the default Enqueuer.
type Transformer ¶
type Transformer interface { ToClairLayers(req harbor.ScanRequest, manifest distribution.Manifest) []clair.Layer ToHarborScanReport(artifact harbor.Artifact, layer *clair.Layer) harbor.ScanReport }
Click to show internal directories.
Click to hide internal directories.