scan

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Threshold  *float64   `yaml:"threshold"`
	Allow      []string   `yaml:"allow"`
	Exceptions Exceptions `yaml:"exceptions"`
	Overrides  []Override `yaml:"override"`
}

type Decision

type Decision int
const (
	DecisionAllowed Decision = 1 + iota
	DecisionNotAllowedUnresolvableLicense
	DecisionNotAllowedLicenseNotPermitted
)

func (Decision) MarshalText

func (d Decision) MarshalText() ([]byte, error)

type EvaluatedModule

type EvaluatedModule struct {
	model.Module
	Decision     Decision
	NotPermitted []string `json:",omitempty"`
	UsedBy       []string
}

func (EvaluatedModule) Allowed

func (r EvaluatedModule) Allowed() bool

func (EvaluatedModule) ExplainDecision

func (r EvaluatedModule) ExplainDecision() string

type Exceptions added in v0.1.0

type Exceptions struct {
	LicenseNotPermitted []LicenseNotPermitted `yaml:"licenseNotPermitted"`
	UnresolvableLicense []UnresolvableLicense `yaml:"unresolvableLicense"`
}

type LicenseNotPermitted added in v0.1.0

type LicenseNotPermitted struct {
	Path     string   `yaml:"path"`
	Version  string   `yaml:"version"`
	Licenses []string `yaml:"licenses"`
}

type Override

type Override struct {
	Path     string   `yaml:"path"`
	Version  string   `yaml:"version"`
	Licenses []string `yaml:"licenses"`
}

type Summary

type Summary struct {
	Modules  []EvaluatedModule
	Binaries []model.BuildInfo
}

func Run

func Run(ctx context.Context, conf Config, binPaths ...string) (Summary, error)

type UnresolvableLicense added in v0.1.0

type UnresolvableLicense struct {
	Path    string `yaml:"path"`
	Version string `yaml:"version"`
}

Jump to

Keyboard shortcuts

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