generic

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cataloger

type Cataloger struct {
	// contains filtered or unexported fields
}

Cataloger implements the Catalog interface and is responsible for dispatching the proper parser function for a given path or glob pattern. This is intended to be reusable across many package cataloger types.

func NewCataloger

func NewCataloger(upstreamCataloger string) *Cataloger

NewCataloger if provided path-to-parser-function and glob-to-parser-function lookups creates a Cataloger

func (*Cataloger) Catalog

func (c *Cataloger) Catalog(ctx context.Context, resolver file.Resolver) ([]pkg.Package, []artifact.Relationship, error)

Catalog is given an object to resolve file references and content, this function returns any discovered Packages after analyzing the catalog source.

func (*Cataloger) Name

func (c *Cataloger) Name() string

Name returns a string that uniquely describes the upstream cataloger that this Generic Cataloger represents.

func (*Cataloger) WithParserByGlobs

func (c *Cataloger) WithParserByGlobs(parser Parser, globs ...string) *Cataloger

func (*Cataloger) WithParserByMimeTypes

func (c *Cataloger) WithParserByMimeTypes(parser Parser, types ...string) *Cataloger

func (*Cataloger) WithParserByPath

func (c *Cataloger) WithParserByPath(parser Parser, paths ...string) *Cataloger

func (*Cataloger) WithProcessors added in v1.5.0

func (c *Cataloger) WithProcessors(processors ...Processor) *Cataloger

func (*Cataloger) WithResolvingProcessors added in v1.5.0

func (c *Cataloger) WithResolvingProcessors(processors ...ResolvingProcessor) *Cataloger

type Environment

type Environment struct {
	LinuxRelease *linux.Release
}

type Processor added in v1.5.0

Processor is a function that can filter or augment existing packages and relationships based on existing material.

type ResolvingProcessor added in v1.5.0

ResolvingProcessor is a Processor with the additional behavior of being able to reference additional material from a file resolver.

Jump to

Keyboard shortcuts

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