dependencies

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDepPkgVersionIDs

func FindDepPkgVersionIDs(ctx context.Context, gqlclient graphql.Client, depPkgType string, depPkgNameSpace string, depPkgName string, versionRange string) ([]string, error)

FindDepPkgVersionIDs queries for packages matching the specified filters (type, namespace, name) and version range. It returns a slice of version IDs that match the given version range criteria. This function returns: - A slice of matching dependent package version IDs. - An error

Types

type PackageName

type PackageName struct {
	Name           string
	DependentCount int
}

func GetDependenciesBySortedDependentCnt

func GetDependenciesBySortedDependentCnt(ctx context.Context, gqlClient graphql.Client) ([]PackageName, error)

GetDependenciesBySortedDependentCnt retrieves all dependents for each package and returns a sorted list of PackageName, where each PackageName contains the name of the package and the number of its dependents. The list is sorted in descending order based on the DependentCount, so packages with the most dependents come first. This function leverages the findDependentsOfDependencies function to construct a map of all packages and their dependents, then processes this map to create a slice of PackageName, which is then sorted.

Returns: - A slice of PackageName, sorted by DependentCount in descending order. - An error

Jump to

Keyboard shortcuts

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