ospkg

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 16 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedOS = xerrors.New("unsupported os")

	SuperSet = wire.NewSet(
		wire.Struct(new(Detector)),
		wire.Bind(new(Operation), new(Detector)),
	)
)

Functions

This section is empty.

Types

type DetectExpectation

type DetectExpectation struct {
	Args       DetectInput
	ReturnArgs DetectOutput
}

type DetectInput

type DetectInput struct {
	ImageName string
	OSFamily  string
	OSName    string
	Created   time.Time
	Pkgs      []ftypes.Package
}

type DetectOutput

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

type Detector

type Detector struct{}

func (Detector) Detect

func (d Detector) Detect(_, osFamily, osName string, _ time.Time, pkgs []ftypes.Package) ([]types.DetectedVulnerability, bool, error)

type Driver

type Driver interface {
	Detect(string, []ftypes.Package) ([]types.DetectedVulnerability, error)
	IsSupportedVersion(string, string) bool
}

type MockDetector

type MockDetector struct {
	mock.Mock
}

func NewMockDetector

func NewMockDetector(detectExpectations []DetectExpectation) *MockDetector

func (*MockDetector) Detect

type Operation

type Operation interface {
	Detect(string, string, string, time.Time, []ftypes.Package) ([]types.DetectedVulnerability, bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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