Documentation
¶
Index ¶
- func ToComponent(logger zerolog.Logger, module gomod.Module, options ...Option) (*cdx.Component, error)
- func ToComponents(logger zerolog.Logger, modules []gomod.Module, options ...Option) ([]cdx.Component, error)
- type Option
- func WithComponentType(ctype cdx.ComponentType) Option
- func WithLicenses(detector licensedetect.Detector) Option
- func WithModuleHashes() Option
- func WithPackages(enabled bool, options ...pkgConv.Option) Option
- func WithScope(scope cdx.Scope) Option
- func WithShortPURL(enabled bool) Option
- func WithTestScope(scope cdx.Scope) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
func WithComponentType ¶
func WithComponentType(ctype cdx.ComponentType) Option
WithComponentType overrides the type of the component.
func WithLicenses ¶
func WithLicenses(detector licensedetect.Detector) Option
WithLicenses attempts to detect licenses for the module using a provided license detector and attach them to the component's license evidence.
func WithModuleHashes ¶
func WithModuleHashes() Option
func WithPackages ¶ added in v1.1.0
func WithShortPURL ¶ added in v1.10.0
WithShortPURL configures the component to use short PURLs without query parameters.
func WithTestScope ¶
WithTestScope overrides the scope of the component, if the corresponding module has the TestOnly flag set.
Click to show internal directories.
Click to hide internal directories.