Documentation ¶
Index ¶
- func NewAggregatedDependencySource(logger *slog.Logger) *aggregatedDependencySource
- func NewCacheProjectSource(delegatedDependencySource dependencySource, logger *slog.Logger) *cacheDependencySource
- func NewDepDependencySource() *depDependencySource
- func NewGoModDependencySource(logger *slog.Logger) *gomodDependencySource
- func NewJSONListView(output io.Writer) *jsonListView
- func NewTableListView(output io.Writer) *tableListView
- func WriteCache(w io.Writer, dependencies []Dependency) error
- type Dependency
- type HeaderChecker
- type HeaderViolations
- type LicenseDetector
- type ListDependencyItem
- type ListViewModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAggregatedDependencySource ¶ added in v0.1.0
func NewCacheProjectSource ¶
func NewDepDependencySource ¶
func NewDepDependencySource() *depDependencySource
func NewGoModDependencySource ¶ added in v0.1.0
func NewJSONListView ¶ added in v0.2.0
NewJSONListView returns a view that outputs a license list as JSON.
func NewTableListView ¶
NewTableListView returns a view that outputs a license list as JSON.
func WriteCache ¶
func WriteCache(w io.Writer, dependencies []Dependency) error
WriteCache writes the generated cache to file.
Types ¶
type Dependency ¶
type HeaderChecker ¶ added in v0.2.0
func (HeaderChecker) Check ¶ added in v0.2.0
func (c HeaderChecker) Check(root string, template string) (HeaderViolations, error)
nolint: gocognit
type HeaderViolations ¶ added in v0.2.0
type LicenseDetector ¶
type LicenseDetector struct {
// contains filtered or unexported fields
}
func NewLicenseDetector ¶
func NewLicenseDetector(githubToken string, logger *slog.Logger) *LicenseDetector
func (*LicenseDetector) Detect ¶
func (d *LicenseDetector) Detect(dependencies []Dependency) ([]Dependency, error)
type ListDependencyItem ¶
type ListDependencyItem struct { Name string `json:"name"` License string `json:"license"` Confidence float32 `json:"confidence"` }
ListDependencyItem represents an item in the list view.
type ListViewModel ¶
type ListViewModel struct {
Dependencies []ListDependencyItem `json:"dependencies"`
}
ListViewModel holds information for a list view.
Click to show internal directories.
Click to hide internal directories.