scan

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 10 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 vul.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 []vul.Vulnerability) harbor.ScanReport
}

Transformer wraps the Transform method. Transform transforms Vul'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