scan

package
v0.0.0-...-46fbbb1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL