Documentation ¶
Overview ¶
Package app provides the functionality to generate SBOMs for applications.
Please refer to the CLI documentation for further details about this mode.
Index ¶
- func NewGenerator(moduleDir string, opts ...Option) (generate.Generator, error)
- type Option
- func WithIncludeFiles(enable bool) Option
- func WithIncludePackages(enable bool) Option
- func WithIncludePaths(enable bool) Option
- func WithIncludeStdlib(enable bool) Option
- func WithLicenseDetector(detector licensedetect.Detector) Option
- func WithLogger(logger zerolog.Logger) Option
- func WithMainDir(dir string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(g *generator) error
func WithIncludeFiles ¶
WithIncludeFiles toggles the inclusion of files. Has no effect when packages are not included as well.
func WithIncludePackages ¶
WithIncludePackages toggles the inclusion of packages.
func WithIncludePaths ¶ added in v1.6.0
WithIncludePaths toggles the inclusion of file paths. Has no effect when files are not included as well.
func WithIncludeStdlib ¶
WithIncludeStdlib toggles the inclusion of a std component representing the Go standard library in the generated BOM.
When enabled, the std component will be represented as a direct dependency of the main module.
func WithLicenseDetector ¶
func WithLicenseDetector(detector licensedetect.Detector) Option
WithLicenseDetector sets the license detector.
When nil, no license detection will be performed. Default is nil.
func WithLogger ¶
WithLogger overrides the default logger of the generator.
func WithMainDir ¶
WithMainDir overrides the main directory of the application.