Documentation ¶
Index ¶
- type Cataloger
- func (c *Cataloger) Catalog(resolver source.FileResolver) ([]pkg.Package, []artifact.Relationship, error)
- func (c *Cataloger) Name() string
- func (c *Cataloger) WithParserByGlobs(parser Parser, globs ...string) *Cataloger
- func (c *Cataloger) WithParserByMimeTypes(parser Parser, types ...string) *Cataloger
- func (c *Cataloger) WithParserByPath(parser Parser, paths ...string) *Cataloger
- type Environment
- type Parser
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 ¶
NewCataloger if provided path-to-parser-function and glob-to-parser-function lookups creates a Cataloger
func (*Cataloger) Catalog ¶
func (c *Cataloger) 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 (*Cataloger) Name ¶
Name returns a string that uniquely describes the upstream cataloger that this Generic Cataloger represents.
func (*Cataloger) WithParserByGlobs ¶
func (*Cataloger) WithParserByMimeTypes ¶
type Environment ¶
type Parser ¶
type Parser func(source.FileResolver, *Environment, source.LocationReadCloser) ([]pkg.Package, []artifact.Relationship, error)
Click to show internal directories.
Click to hide internal directories.