Documentation ¶
Index ¶
- Constants
- type DepsClient
- func (d *DepsClient) GetDependencies(ctx context.Context, purls []string) ([]*PackageComponent, error)
- func (d *DepsClient) GetMetadata(ctx context.Context, purls []string) ([]*PackageComponent, error)
- func (d *DepsClient) RetrieveDependencies(ctx context.Context, purls []string) error
- func (d *DepsClient) RetrieveVersionsAndProjects(ctx context.Context, purls []string)
- type IsDepPackage
- type PackageComponent
Constants ¶
const ( DepsCollector = "deps.dev" GetProjectDurationHistogram = "http_deps_dev_project_duration" GetVersionErrorsCounter = "http_deps_dev_version_errors" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepsClient ¶
type DepsClient struct { Metrics metrics.MetricCollector // contains filtered or unexported fields }
func NewDepsClient ¶
func NewDepsClient(ctx context.Context) (*DepsClient, error)
func (*DepsClient) GetDependencies ¶
func (d *DepsClient) GetDependencies(ctx context.Context, purls []string) ([]*PackageComponent, error)
GetDependencies gets the information about dependencies for a PURL. This should be called after a call to RetrieveDependencies.
func (*DepsClient) GetMetadata ¶
func (d *DepsClient) GetMetadata(ctx context.Context, purls []string) ([]*PackageComponent, error)
GetMetadata gets the information about metadata for a PURL. This should be called after a call to RetrieveVersionsAndProjects. This does not return dependency information about a purl
func (*DepsClient) RetrieveDependencies ¶
func (d *DepsClient) RetrieveDependencies(ctx context.Context, purls []string) error
RetrieveDependencies gets all the dependencies for the purls provided in a concurrent manner. This can be called before GetDependencies for performance optimization.
func (*DepsClient) RetrieveVersionsAndProjects ¶
func (d *DepsClient) RetrieveVersionsAndProjects(ctx context.Context, purls []string)
RetrieveVersionsAndProjects retrieves version and project information concurrently for all version keys. This can be called before GetMetadata for performance optimization.
type IsDepPackage ¶
type IsDepPackage struct { CurrentPackageInput *model.PkgInputSpec DepPackageInput *model.PkgInputSpec IsDependency *model.IsDependencyInputSpec }
type PackageComponent ¶
type PackageComponent struct { CurrentPackage *model.PkgInputSpec Source *model.SourceInputSpec Scorecard *model.ScorecardInputSpec IsDepPackages []*IsDepPackage DepPackages []*PackageComponent UpdateTime time.Time }