github.com/quay/claircore@v1.5.28/rpm/ecosystem.go (about)

     1  package rpm
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/quay/claircore/aws"
     7  	"github.com/quay/claircore/indexer"
     8  	"github.com/quay/claircore/linux"
     9  	"github.com/quay/claircore/oracle"
    10  	"github.com/quay/claircore/photon"
    11  	"github.com/quay/claircore/suse"
    12  )
    13  
    14  // NewEcosystem provides the set of scanners and coalescers for the rpm ecosystem
    15  func NewEcosystem(_ context.Context) *indexer.Ecosystem {
    16  	return &indexer.Ecosystem{
    17  		PackageScanners: func(ctx context.Context) ([]indexer.PackageScanner, error) {
    18  			return []indexer.PackageScanner{&Scanner{}}, nil
    19  		},
    20  		DistributionScanners: func(ctx context.Context) ([]indexer.DistributionScanner, error) {
    21  			return []indexer.DistributionScanner{
    22  				&aws.DistributionScanner{},
    23  				&oracle.DistributionScanner{},
    24  				&suse.DistributionScanner{},
    25  				&photon.DistributionScanner{},
    26  			}, nil
    27  		},
    28  		RepositoryScanners: func(ctx context.Context) ([]indexer.RepositoryScanner, error) {
    29  			return []indexer.RepositoryScanner{}, nil
    30  		},
    31  		Coalescer: func(ctx context.Context) (indexer.Coalescer, error) {
    32  			return linux.NewCoalescer(), nil
    33  		},
    34  	}
    35  }