Versions in this module Expand all Collapse all v1 v1.0.0 Mar 1, 2024 Changes in this version + var ErrAllNotAllowed = fmt.Errorf("cannot use the 'all' operand in this context") + var ErrEmptyToken = fmt.Errorf("no value given") + var ErrInvalidOperator = fmt.Errorf("invalid operator given") + var ErrInvalidToken = fmt.Errorf("invalid token given: only alphanumeric characters and hyphens are allowed") + var ErrNamesNotAllowed = fmt.Errorf("names are not allowed with this operation (must use tags)") + var ErrTagsNotAllowed = fmt.Errorf("tags are not allowed with this operation (must use exact names)") + var ErrUnknownNameOrTag = fmt.Errorf("unknown name or tag given") + func Select(allTasks []Task, selectionRequest pkgcataloging.SelectionRequest) ([]Task, Selection, error) + type CatalogingFactoryConfig struct + DataGenerationConfig cataloging.DataGenerationConfig + PackagesConfig pkgcataloging.Config + RelationshipsConfig cataloging.RelationshipsConfig + SearchConfig cataloging.SearchConfig + func DefaultCatalogingFactoryConfig() CatalogingFactoryConfig + type ErrInvalidExpression struct + Err error + Expression string + Operation Operation + func (e ErrInvalidExpression) Error() string + type Executor struct + func NewTaskExecutor(tasks []Task, numWorkers int) *Executor + func (p *Executor) Execute(ctx context.Context, resolver file.Resolver, s sbomsync.Builder, ...) error + type Expression struct + Errors []error + Operand string + Operation Operation + func (e Expression) String() string + type Expressions []Expression + func (e Expressions) Clone() Expressions + func (e Expressions) Errors() (errs []error) + func (e Expressions) Len() int + func (e Expressions) Less(i, j int) bool + func (e Expressions) Swap(i, j int) + func (e Expressions) Validate() error + type Operation string + const AddOperation + const RemoveOperation + const SetOperation + const SubSelectOperation + type PackageTaskFactories []packageTaskFactory + func DefaultPackageTaskFactories() PackageTaskFactories + func (f PackageTaskFactories) Tasks(cfg CatalogingFactoryConfig) ([]Task, error) + type Selection struct + Request pkgcataloging.SelectionRequest + Result *strset.Set + TokensByTask map[string]TokenSelection + type Selector interface + HasAllSelectors func(...string) bool + Selectors func() []string + type Task interface + Execute func(context.Context, file.Resolver, sbomsync.Builder) error + Name func() string + func NewEnvironmentTask() Task + func NewExecutableCatalogerTask(selection file.Selection, cfg executable.Config) Task + func NewFileContentCatalogerTask(cfg filecontent.Config) Task + func NewFileDigestCatalogerTask(selection file.Selection, hashers ...crypto.Hash) Task + func NewFileMetadataCatalogerTask(selection file.Selection) Task + func NewPackageTask(cfg CatalogingFactoryConfig, c pkg.Cataloger, tags ...string) Task + func NewRelationshipsTask(cfg cataloging.RelationshipsConfig, src source.Description) Task + func NewTask(name string, tsk func(context.Context, file.Resolver, sbomsync.Builder) error, ...) Task + type TokenSelection struct + DeselectedOn *strset.Set + SelectedOn *strset.Set