github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/syft/pkg/cataloger.go (about)

     1  package pkg
     2  
     3  import (
     4  	"github.com/anchore/syft/syft/artifact"
     5  	"github.com/anchore/syft/syft/file"
     6  )
     7  
     8  // Cataloger describes behavior for an object to participate in parsing container image or file system
     9  // contents for the purpose of discovering Packages. Each concrete implementation should focus on discovering Packages
    10  // for a specific Package Type or ecosystem.
    11  type Cataloger interface {
    12  	// Name returns a string that uniquely describes a cataloger
    13  	Name() string
    14  	// Catalog is given an object to resolve file references and content, this function returns any discovered Packages after analyzing the catalog source.
    15  	Catalog(resolver file.Resolver) ([]Package, []artifact.Relationship, error)
    16  }