package vulnerability

import (
	"github.com/anchore/grype/grype/distro"
	"github.com/anchore/grype/grype/pkg"
	"github.com/anchore/syft/syft/cpe"
	syftPkg "github.com/anchore/syft/syft/pkg"
)

type Provider interface {
	Get(id, namespace string) ([]Vulnerability, error)
	ProviderByDistro
	ProviderByLanguage
	ProviderByCPE
}

type ProviderByDistro interface {
	GetByDistro(*distro.Distro, pkg.Package) ([]Vulnerability, error)
}

type ProviderByLanguage interface {
	GetByLanguage(syftPkg.Language, pkg.Package) ([]Vulnerability, error)
}

type ProviderByCPE interface {
	GetByCPE(cpe.CPE) ([]Vulnerability, error)
}

type MetadataProvider interface {
	GetMetadata(id, namespace string) (*Metadata, error)
}
