Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock wraps the Now method. Introduced to allow replacing the global state with fixed clocks to facilitate testing. Now returns the current time.
type Controller ¶
type Controller interface {
Scan(scanJobID string, request harbor.ScanRequest) error
}
func NewController ¶
func NewController(store persistence.Store, wrapper trivy.Wrapper, transformer Transformer) Controller
type SystemClock ¶
type SystemClock struct { }
func (*SystemClock) Now ¶
func (c *SystemClock) Now() time.Time
type Transformer ¶
type Transformer interface {
Transform(artifact harbor.Artifact, source *trivyType.Report) harbor.ScanReport
}
Transformer wraps the Transform method. Transform transforms Trivy's scan report into Harbor's packages vulnerabilities report.
func NewTransformer ¶
func NewTransformer(clock Clock) Transformer
NewTransformer constructs a Transformer with the given Clock.
Click to show internal directories.
Click to hide internal directories.