scanner

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Scan(req harbor.ScanRequest) (harbor.ScanReport, error)
}

func NewAdapter

func NewAdapter(command aqua.Command, 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

func NewEnqueuer(pool *work.Pool, adapter Adapter, store persistence.Store) Enqueuer

NewEnqueuer constructs the default Enqueuer.

type MockEnqueuer

type MockEnqueuer struct {
	mock.Mock
}

func (*MockEnqueuer) Enqueue

func (e *MockEnqueuer) Enqueue(request harbor.ScanRequest) (string, error)

type MockTransformer

type MockTransformer struct {
	mock.Mock
}

func (*MockTransformer) Transform

func (t *MockTransformer) Transform(artifact harbor.Artifact, source aqua.ScanReport) harbor.ScanReport

type Transformer

type Transformer interface {
	Transform(artifact harbor.Artifact, source aqua.ScanReport) harbor.ScanReport
}

func NewTransformer

func NewTransformer(clock ext.Clock) Transformer

Jump to

Keyboard shortcuts

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