Documentation
¶
Overview ¶
Package gobinary extracts packages from buildinfo inside go binaries files.
Index ¶
- Constants
- func New(cfg *cpb.PluginConfig) filesystem.Extractor
- type Extractor
- func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) (inventory.Inventory, error)
- func (e Extractor) FileRequired(api filesystem.FileAPI) bool
- func (e *Extractor) MaxFileSizeBytes() int64
- func (e Extractor) Name() string
- func (e Extractor) Requirements() *plugin.Capabilities
- func (e Extractor) Version() int
- func (e *Extractor) VersionFromContent() bool
Constants ¶
View Source
const (
// Name is the unique name of this extractor.
Name = "go/binary"
)
Variables ¶
This section is empty.
Functions ¶
func New ¶ added in v0.1.2
func New(cfg *cpb.PluginConfig) filesystem.Extractor
New returns a Go binary extractor.
Types ¶
type Extractor ¶
type Extractor struct {
// Stats is a stats collector for reporting metrics.
Stats stats.Collector
// contains filtered or unexported fields
}
Extractor extracts packages from buildinfo inside go binaries files.
func (Extractor) Extract ¶
func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) (inventory.Inventory, error)
Extract returns a list of installed third party dependencies in a Go binary.
func (Extractor) FileRequired ¶
func (e Extractor) FileRequired(api filesystem.FileAPI) bool
FileRequired returns true if the specified file is marked executable.
func (*Extractor) MaxFileSizeBytes ¶ added in v0.4.0
MaxFileSizeBytes returns the maximum size of a file that can be extracted.
func (Extractor) Requirements ¶ added in v0.1.3
func (e Extractor) Requirements() *plugin.Capabilities
Requirements of the extractor.
func (*Extractor) VersionFromContent ¶ added in v0.2.0
VersionFromContent returns whether module version extraction from binary content is enabled.
Click to show internal directories.
Click to hide internal directories.