library

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: AGPL-3.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type DetectExpectation

type DetectExpectation struct {
	Args       DetectInput
	ReturnArgs DetectOutput
}

type DetectInput

type DetectInput struct {
	ImageName string
	FilePath  string
	Created   time.Time
	Libs      []ptypes.Library
}

type DetectOutput

type DetectOutput struct {
	Vulns []types.DetectedVulnerability
	Err   error
}

type Detector

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

func NewDetector

func NewDetector(factory Factory) Detector

func (Detector) Detect

func (d Detector) Detect(_ string, filePath string, _ time.Time, pkgs []ptypes.Library) ([]types.DetectedVulnerability, error)

type Driver

type Driver interface {
	ParseLockfile(*os.File) ([]ptypes.Library, error)
	Detect(string, *version.Version) ([]types.DetectedVulnerability, error)
	Type() string
}

type DriverFactory

type DriverFactory struct{}

func (DriverFactory) NewDriver

func (d DriverFactory) NewDriver(filename string) Driver

type Factory

type Factory interface {
	NewDriver(filename string) Driver
}

type MockDetector

type MockDetector struct {
	mock.Mock
}

func NewMockDetector

func NewMockDetector(detectExpectations []DetectExpectation) *MockDetector

func (*MockDetector) Detect

func (_m *MockDetector) Detect(a, b string, c time.Time, d []ptypes.Library) ([]types.DetectedVulnerability, error)

type Operation

type Operation interface {
	Detect(string, string, time.Time, []ptypes.Library) ([]types.DetectedVulnerability, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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