scanner

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: AGPL-3.0 Imports: 14 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

RemoteSuperSet is used in the client mode

StandaloneSuperSet is used in the standalone mode

Functions

This section is empty.

Types

type Analyzer added in v0.5.0

type Analyzer interface {
	Analyze(ctx context.Context) (info ftypes.ImageReference, err error)
}

type AnalyzerAnalyzeArgs added in v0.5.0

type AnalyzerAnalyzeArgs struct {
	Ctx         context.Context
	CtxAnything bool
}

type AnalyzerAnalyzeExpectation added in v0.5.0

type AnalyzerAnalyzeExpectation struct {
	Args    AnalyzerAnalyzeArgs
	Returns AnalyzerAnalyzeReturns
}

type AnalyzerAnalyzeReturns added in v0.5.0

type AnalyzerAnalyzeReturns struct {
	Info types.ImageReference
	Err  error
}

type Driver added in v0.5.0

type Driver interface {
	Scan(target string, imageID digest.Digest, layerIDs []string, options types.ScanOptions) (results report.Results, osFound *ftypes.OS, eols bool, err error)
}

type MockAnalyzer added in v0.5.0

type MockAnalyzer struct {
	mock.Mock
}

MockAnalyzer is an autogenerated mock type for the Analyzer type

func (*MockAnalyzer) Analyze added in v0.5.0

func (_m *MockAnalyzer) Analyze(ctx context.Context) (types.ImageReference, error)

Analyze provides a mock function with given fields: ctx

func (*MockAnalyzer) ApplyAnalyzeExpectation added in v0.5.0

func (_m *MockAnalyzer) ApplyAnalyzeExpectation(e AnalyzerAnalyzeExpectation)

func (*MockAnalyzer) ApplyAnalyzeExpectations added in v0.5.0

func (_m *MockAnalyzer) ApplyAnalyzeExpectations(expectations []AnalyzerAnalyzeExpectation)

type MockDriver added in v0.5.0

type MockDriver struct {
	mock.Mock
}

MockDriver is an autogenerated mock type for the Driver type

func (*MockDriver) ApplyScanExpectation added in v0.5.0

func (_m *MockDriver) ApplyScanExpectation(e ScanExpectation)

func (*MockDriver) ApplyScanExpectations added in v0.5.0

func (_m *MockDriver) ApplyScanExpectations(expectations []ScanExpectation)

func (*MockDriver) Scan added in v0.5.0

func (_m *MockDriver) Scan(target string, imageID digest.Digest, layerIDs []string, options types.ScanOptions) (report.Results, *fanaltypes.OS, bool, error)

Scan provides a mock function with given fields: target, imageID, layerIDs, options

type ScanArgs added in v0.5.0

type ScanArgs struct {
	Target           string
	TargetAnything   bool
	ImageID          digest.Digest
	ImageIDAnything  bool
	LayerIDs         []string
	LayerIDsAnything bool
	Options          types.ScanOptions
	OptionsAnything  bool
}

type ScanExpectation added in v0.5.0

type ScanExpectation struct {
	Args    ScanArgs
	Returns ScanReturns
}

type ScanReturns added in v0.5.0

type ScanReturns struct {
	Results report.Results
	OsFound *fanaltypes.OS
	Eols    bool
	Err     error
}

type Scanner added in v0.3.0

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner added in v0.3.0

func NewScanner(driver Driver, ac Analyzer) Scanner

func (Scanner) ScanImage added in v0.3.0

func (s Scanner) ScanImage(options types.ScanOptions) (report.Results, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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