Documentation ¶
Overview ¶
Package common provides generic utilities used by multiple catalogers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericCataloger ¶
type GenericCataloger struct {
// contains filtered or unexported fields
}
GenericCataloger 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 NewGenericCataloger ¶
func NewGenericCataloger(pathParsers map[string]ParserFn, globParsers map[string]ParserFn, upstreamCataloger string) *GenericCataloger
NewGenericCataloger if provided path-to-parser-function and glob-to-parser-function lookups creates a GenericCataloger
func (*GenericCataloger) Catalog ¶
func (c *GenericCataloger) Catalog(resolver source.FileResolver) ([]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 (*GenericCataloger) Name ¶
func (c *GenericCataloger) Name() string
Name returns a string that uniquely describes the upstream cataloger that this Generic Cataloger represents.