bouncer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int
const (
	UnknownAction Action = iota
	AllowAction
	DenyAction
)

func (Action) String

func (o Action) String() string

type LicenseFinder

type LicenseFinder struct {
	Paths               []string
	ConfidenceThreshold float64
	GitRemotes          []string
}

func NewLicenseFinder

func NewLicenseFinder(paths, gitRemotes []string, threshold float64) LicenseFinder

func (LicenseFinder) Find

func (r LicenseFinder) Find() (<-chan LicenseResult, error)

type LicenseResult

type LicenseResult struct {
	Library string
	URL     string
	Path    string
	License string
	Type    string
	Errs    error
}

type Rules

type Rules struct {
	Action     Action
	Patterns   []*regexp.Regexp
	IgnorePkgs []*regexp.Regexp
}

func NewRules

func NewRules(act Action, patterns []string, ignore ...string) (Rules, error)

func (Rules) Evaluate

func (r Rules) Evaluate(results ...LicenseResult) (bool, []LicenseResult, error)

Directories

Path Synopsis
csv

Jump to

Keyboard shortcuts

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