depsdevclient

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL