detection

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LicenceDetector

type LicenceDetector interface {
	Detect(paths []string) ([]Result, error)
}

LicenceDetector defines the behaviour for Licence detectors

func NewLicenceDetector added in v0.1.1

func NewLicenceDetector() LicenceDetector

NewLicenceDetector creates a new LicenceDetector

type LicenceMatch

type LicenceMatch struct {
	Licence    string  `json:"license"`
	Confidence float32 `json:"confidence"`
}

LicenceMatch describes the level of confidence for the detected Licence

type Result

type Result struct {
	Project string         `json:"project,omitempty"`
	Matches []LicenceMatch `json:"matches,omitempty"`
	ErrStr  string         `json:"error,omitempty"`
}

Result is a representation of the Licence detection outcome for a project

Jump to

Keyboard shortcuts

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