Documentation
¶
Overview ¶
Package requirementsenhancable provides an extractor for requirements.txt that can both do offline and transitive scanning.
Index ¶
- Constants
- func EnhanceIfPossible(plug plugin.Plugin, config requirementsnet.Config)
- func New() filesystem.Extractor
- type Extractor
- func (e *Extractor) Enhance(config requirementsnet.Config)
- func (e *Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) (inventory.Inventory, error)
- func (e *Extractor) FileRequired(api filesystem.FileAPI) bool
- func (e *Extractor) Name() string
- func (e *Extractor) Requirements() *plugin.Capabilities
- func (e *Extractor) Version() int
Constants ¶
View Source
const (
// Name is the unique name of this extractor.
Name = "python/requirementsenhanceable"
)
Variables ¶
This section is empty.
Functions ¶
func EnhanceIfPossible ¶
func EnhanceIfPossible(plug plugin.Plugin, config requirementsnet.Config)
EnhanceIfPossible calls Extractor.Enhance with the given config if the provided plug(in) is an Extractor
Types ¶
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor extracts python packages from requirements.txt files.
func (*Extractor) Enhance ¶
func (e *Extractor) Enhance(config requirementsnet.Config)
Enhance uses the given config to improve the abilities of this extractor, at the cost of additional requirements such as networking and direct fs access
func (*Extractor) Extract ¶
func (e *Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) (inventory.Inventory, error)
Extract extracts packages using the internal extractor
func (*Extractor) FileRequired ¶
func (e *Extractor) FileRequired(api filesystem.FileAPI) bool
FileRequired returns true if the specified file matches using the underlying requirements extractor
func (*Extractor) Requirements ¶
func (e *Extractor) Requirements() *plugin.Capabilities
Requirements of the extractor
Click to show internal directories.
Click to hide internal directories.