module

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrModuleIgnored = errors.New("module ignored")

ErrModuleIgnored is returned when a module is ignored for version check.

View Source
var ErrNoVersionAvailable = errors.New("no version available")

ErrNoVersionAvailable is returned when no version found for a module.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Ctx context.Context
}

Checker is exported

func (*Checker) Check

func (c *Checker) Check(path string) (map[string]internal.CheckResult, error)

Check is exported.

type ModParser added in v0.3.0

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

ModParser parses go.mod.

func NewModParser added in v0.3.0

func NewModParser(ctx context.Context) *ModParser

NewModParser creates a new ModParser.

func (*ModParser) Parse added in v0.3.0

func (v *ModParser) Parse(path string) ([]PackageResult, error)

Parse is exported

type PackageResult

type PackageResult struct {
	Path              string
	LocalVersion      *semver.Version
	AvailableVersions []*semver.Version
	Dir               string
}

PackageResult contains module specific information.

type Scanner added in v0.2.0

type Scanner struct {
	Ctx context.Context
}

Scanner is exported.

func (*Scanner) Scan added in v0.2.0

func (c *Scanner) Scan(path string) (map[string]internal.VulnerabilityResult, error)

Scan is exported.

type Updater added in v0.1.0

type Updater struct {
	Ctx context.Context
}

Updater is exported

func (*Updater) Update added in v0.1.0

func (u *Updater) Update(path string) (map[string]internal.CheckResult, error)

Update is exported

Jump to

Keyboard shortcuts

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