Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is an object that handles classifying a license.
func NewBackend ¶
New creates a new backend working on the local filesystem.
func (*Backend) ClassifyLicenses ¶
ClassifyLicenses runs the license classifier over the given file.
func (*Backend) ClassifyLicensesWithContext ¶
func (b *Backend) ClassifyLicensesWithContext(ctx context.Context, filenames []string) (errors []error)
ClassifyLicensesWithContext runs the license classifier over the given file; ensure that it will respect the timeout in the provided context.
func (*Backend) GetResults ¶
func (b *Backend) GetResults() results.LicenseTypes
GetResults returns the results of the classifications.
type BackendInterface ¶
type BackendInterface interface {
ClassifyLicenses(filenames []string, headers bool) []error
ClassifyLicensesWithContext(ctx context.Context, filenames []string, headers bool) []error
GetResults() results.LicenseTypes
}
BackendInterface is the interface each backend must implement.
type Classifier ¶
type Classifier struct {
// contains filtered or unexported fields
}
func New ¶
func New(configFile string, fileNames []string) *Classifier
Click to show internal directories.
Click to hide internal directories.