Documentation
¶
Overview ¶
Package archive extracts Java archive files.
Index ¶
Constants ¶
View Source
const (
// Name is the unique name of this extractor.
Name = "java/archive"
)
Variables ¶
This section is empty.
Functions ¶
func IsArchive ¶ added in v0.1.7
IsArchive returns true if the file path ends with one of the supported archive extensions.
func New ¶
func New(cfg *cpb.PluginConfig) (filesystem.Extractor, error)
New returns a Java archive extractor.
Types ¶
type Extractor ¶
Extractor extracts Java packages from archive files.
func (Extractor) Extract ¶
func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) (inventory.Inventory, error)
Extract extracts java packages from archive files passed through input.
func (Extractor) FileRequired ¶
func (e Extractor) FileRequired(api filesystem.FileAPI) bool
FileRequired returns true if the specified file matches java archive file patterns.
func (Extractor) Requirements ¶ added in v0.1.3
func (e Extractor) Requirements() *plugin.Capabilities
Requirements of the extractor.
type JarProps ¶
JarProps stores the name, version, and group ID of a Java archive.
func ParseFilename ¶
ParseFilename attempts to figure out the package name, version, and group ID of a Java archive based on its filename. Returns nil if parsing was unsuccessful.
Click to show internal directories.
Click to hide internal directories.