generator

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGenerator added in v1.0.0

func RegisterGenerator(key string, factory GeneratorFactory)

RegisterGenerator registers a custom generator factory under the given key. This allows external systems to plug in their own SBOM generator types. If a generator with the same key already exists, it will be overwritten.

Types

type Generator

type Generator interface {
	Key() string
	Ext() string
	PredicateType() string
	Generate(context.Context, *options.Options, string) error
	GenerateIndex(*options.Options, string) error
}

Generator defines the interface for SBOM generators.

func Generators

func Generators(names ...string) []Generator

Generators returns a map of registered generators. If names are provided, only generators with those keys will be returned.

type GeneratorFactory added in v1.0.0

type GeneratorFactory func() Generator

GeneratorFactory is a function that creates a Generator.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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