list

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentResult

type ComponentResult struct {
	Name    string
	Version string
	Values  string
}

type DocumentResult

type DocumentResult struct {
	Key     string // e.g., "Authors", "Creation Timestamp"
	Value   string // e.g., "John Doe", "2023-01-12T22:06:03Z"
	Present bool   // Indicates if the property is present
}

type OptionList

type OptionList func(r *Report)

func WithColor

func WithColor(c bool) OptionList

func WithFormat

func WithFormat(c string) OptionList

func WithValues added in v1.0.8

func WithValues(s bool) OptionList

type Params

type Params struct {
	Path []string

	// input control
	Features []string

	// output control
	JSON     bool
	Basic    bool
	Detailed bool
	Color    bool
	Show     bool

	Missing bool

	Debug bool
}

type Report

type Report struct {
	Ctx     context.Context
	Results []*Result
	Format  string
	Color   bool
	Show    bool // show values for corresponding features
}

listReport holds the state for reporting the list command results

func NewListReport

func NewListReport(ctx context.Context, results []*Result, opts ...OptionList) *Report

func (*Report) Report

func (r *Report) Report()

Report renders the list command results in the specified format

type Result

type Result struct {
	FilePath         string
	Feature          string
	Missing          bool
	TotalComponents  int
	Components       []ComponentResult // For component-based features
	DocumentProperty DocumentResult    // For SBOM-based features
	Errors           []string
}

func ComponentsListResult

func ComponentsListResult(ctx context.Context, ep *Params) (*Result, error)

ComponentsListResult lists components or SBOM properties based on the specified features for multiple local SBOMs

Jump to

Keyboard shortcuts

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