generic

package
v0.98.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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(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

type Environment

type Environment struct {
	LinuxRelease *linux.Release
}

Jump to

Keyboard shortcuts

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