ospkg

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: AGPL-3.0 Imports: 15 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 {
	OSFamily string
	OSName   string
	Pkgs     []analyzer.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, pkgs []analyzer.Package) ([]types.DetectedVulnerability, bool, error)

type Driver

type Driver interface {
	Detect(string, []analyzer.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, []analyzer.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