components

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(detector Detector)

Register adds a component detector to the registry

func SetUseLockFiles

func SetUseLockFiles(use bool)

SetUseLockFiles sets whether lock files should be used for dependency resolution

func UseLockFiles

func UseLockFiles() bool

UseLockFiles returns whether lock files should be used for dependency resolution

Types

type DependencyDetector

type DependencyDetector interface {
	MatchDependencies(dependencies []string, depType string) map[string][]string
	AddPrimaryTechIfNeeded(payload *types.Payload, tech string)
}

DependencyDetector interface for matching dependencies

type Detector

type Detector interface {
	// Name returns the name of this detector (e.g., "nodejs", "python")
	Name() string

	// Detect scans files in the current directory and returns detected components
	// Returns nil if no components are detected
	Detect(files []types.File, currentPath, basePath string, provider types.Provider, depDetector DependencyDetector) []*types.Payload
}

Detector is the interface that all component detectors must implement

func GetDetectors

func GetDetectors() []Detector

GetDetectors returns all registered component detectors

Directories

Path Synopsis
Package githubactions implements GitHub Actions workflow detection as a plugin-based component detector.
Package githubactions implements GitHub Actions workflow detection as a plugin-based component detector.

Jump to

Keyboard shortcuts

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