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 ¶
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