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, cacheDirPath 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) *buildinfo.Dependency
Return required dependency from cache. If dependency does not exist, return nil. dependencyName - Name of dependency (lowercase package name).