dependencies

package
v2.47.10 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateDependenciesCache

func UpdateDependenciesCache(updatedMap map[string]buildinfo.Dependency, cacheDir string) (err error)

Receives map of all current project's dependencies information. The map contains the dependencies retrieved from Artifactory as well as those read from cache. Writes the updated project's dependencies cache with all current dependencies.

func UpdateDepsChecksumInfo

func UpdateDepsChecksumInfo(dependenciesMap map[string]buildinfo.Dependency, srcPath string, servicesManager artifactory.ArtifactoryServicesManager, repository string) error

Populate project's dependencies with checksums and file names. If the dependency was downloaded in this pip-install execution, checksum will be fetched from Artifactory. Otherwise, check if exists in cache. Return dependency-names of all dependencies which its information could not be obtained.

Types

type DependenciesCache

type DependenciesCache struct {
	Version int                             `json:"version,omitempty"`
	DepsMap map[string]buildinfo.Dependency `json:"dependencies,omitempty"`
}

func GetProjectDependenciesCache

func GetProjectDependenciesCache(cacheDir string) (cache *DependenciesCache, err error)

Reads the json cache file of recent used project's dependencies, and converts it into a map of Key: dependency_name Value: dependency's struct with all relevant information. If cache file does not exist -> return nil, nil. If error occurred, return error.

func (DependenciesCache) GetDependency

func (cache DependenciesCache) GetDependency(dependencyName string) (dependency buildinfo.Dependency)

Return required dependency from cache. If dependency does not exist, return nil. dependencyName - Name of dependency (lowercase package name).

Jump to

Keyboard shortcuts

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