inventory

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Collect(ctx context.Context, target string) ([]model.Component, error)
}

Collector collects software components from a target.

type GoModCollector

type GoModCollector struct{}

GoModCollector collects components from go.mod and go.sum files.

func (*GoModCollector) Collect

func (c *GoModCollector) Collect(_ context.Context, target string) ([]model.Component, error)

type MultiCollector

type MultiCollector struct{}

MultiCollector discovers package manifests in a directory and dispatches to the appropriate collector for each one.

func (*MultiCollector) Collect

func (c *MultiCollector) Collect(ctx context.Context, dir string) ([]model.Component, error)

type NPMCollector

type NPMCollector struct{}

NPMCollector collects components from package-lock.json.

func (*NPMCollector) Collect

func (c *NPMCollector) Collect(_ context.Context, target string) ([]model.Component, error)

type PipCollector

type PipCollector struct{}

PipCollector collects components from requirements.txt.

func (*PipCollector) Collect

func (c *PipCollector) Collect(_ context.Context, target string) ([]model.Component, error)

type SBOMCollector

type SBOMCollector struct {
	Format string // "cyclonedx" or "spdx"
}

SBOMCollector collects components from CycloneDX or SPDX SBOM files.

func (*SBOMCollector) Collect

func (c *SBOMCollector) Collect(_ context.Context, target string) ([]model.Component, error)

type SyftCollector

type SyftCollector struct{}

SyftCollector collects components from a container image using syft.

func (*SyftCollector) Collect

func (c *SyftCollector) Collect(ctx context.Context, imageRef string) ([]model.Component, error)

Jump to

Keyboard shortcuts

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