scanner

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LicenseChecker

type LicenseChecker struct {
	OkStateHandler              StateHandlerFn
	ExceptionedStateHandler     StateHandlerFn
	CriteriaUnknownStateHandler StateHandlerFn
	CriticalStateHandler        StateHandlerFn
	// contains filtered or unexported fields
}

func NewLicenseChecker

func NewLicenseChecker(configuration *config.Config) (*LicenseChecker, error)

func (*LicenseChecker) Check

func (c *LicenseChecker) Check(pkgName string, licenseSearchResult LicenseSearchResult)

type LicenseSearchResult added in v0.4.0

type LicenseSearchResult struct {
	License *license.License
	Error   error
	Direct  bool
}

type LicensesOutputHandler

type LicensesOutputHandler struct {
	Printer *OutputPrinter
	// contains filtered or unexported fields
}

func NewLicensesOutputHandler

func NewLicensesOutputHandler(settings config.OutputSettings, handler licensesOutputHandlerFn) *LicensesOutputHandler

func (*LicensesOutputHandler) GetPrinter

func (h *LicensesOutputHandler) GetPrinter() (*OutputPrinter, error)

func (*LicensesOutputHandler) HandleLicensesOutput

func (h *LicensesOutputHandler) HandleLicensesOutput() (err error)

type LicensesScanner

type LicensesScanner struct{}

func NewLicenseScanner

func NewLicenseScanner() *LicensesScanner

func (*LicensesScanner) GetLicenses

func (l *LicensesScanner) GetLicenses(root string) (licenses map[string]LicenseSearchResult, err error)

type OutputPrinter

type OutputPrinter struct {
	Lines []*outputLine
	// contains filtered or unexported fields
}

func NewOutputPrinter

func NewOutputPrinter(outputTemplate string) (*OutputPrinter, error)

func (*OutputPrinter) AddData

func (l *OutputPrinter) AddData(level, message, pkgName, license string, direct bool)

func (*OutputPrinter) Print

func (l *OutputPrinter) Print() (err error)

func (*OutputPrinter) PrintJSON

func (l *OutputPrinter) PrintJSON() (err error)

type PackageInfo added in v0.6.0

type PackageInfo struct {
	FromVendor bool
}

type PackagesScanner

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

func NewPackagesScanner

func NewPackagesScanner() *PackagesScanner

func (*PackagesScanner) GetPackages

func (s *PackagesScanner) GetPackages(root string) (map[string]*PackageInfo, error)

type StateHandlerFn

type StateHandlerFn func(pkgName string, licenseSearchResult LicenseSearchResult)

Jump to

Keyboard shortcuts

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