scan

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StateInitialize in this state the handler will initialize the job context.
	StateInitialize = "initialize"
	// StateScanLayer in this state the handler will POST layer  of clair to scan layer by layer of the image.
	StateScanLayer = "scanlayer"
	// StateSummarize in this state, the layers are scanned by clair it will call clair API to update vulnerability overview in Harbor DB. After this state, the job is finished.
	StateSummarize = "summarize"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Initializer

type Initializer struct {
	Context *JobContext
}

Initializer will handle the initialise state pull the manifest, prepare token.

func (*Initializer) Enter

func (iz *Initializer) Enter() (string, error)

Enter ...

func (*Initializer) Exit

func (iz *Initializer) Exit() error

Exit ...

type JobContext

type JobContext struct {
	JobID      int64
	Repository string
	Tag        string
	Digest     string

	Logger *log.Logger
	// contains filtered or unexported fields
}

JobContext is for sharing data across handlers in a execution of a scan job.

type LayerScanHandler

type LayerScanHandler struct {
	Context *JobContext
}

LayerScanHandler will call clair API to trigger scanning.

func (*LayerScanHandler) Enter

func (ls *LayerScanHandler) Enter() (string, error)

Enter ...

func (*LayerScanHandler) Exit

func (ls *LayerScanHandler) Exit() error

Exit ...

type SummarizeHandler

type SummarizeHandler struct {
	Context *JobContext
}

SummarizeHandler will summarize the vulnerability and feature information of Clair, and store into Harbor's DB.

func (*SummarizeHandler) Enter

func (sh *SummarizeHandler) Enter() (string, error)

Enter ...

func (*SummarizeHandler) Exit

func (sh *SummarizeHandler) Exit() error

Exit ...

Jump to

Keyboard shortcuts

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