Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDepsInfoAndReturnMissingDeps ¶
func AddDepsInfoAndReturnMissingDeps(dependenciesMap map[string]*buildinfo.Dependency, dependenciesCache *DependenciesCache, dependencyToFileMap map[string]string, servicesManager artifactory.ArtifactoryServicesManager, repository string) ([]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.
func UpdateDependenciesCache ¶
func UpdateDependenciesCache(updatedMap map[string]*buildinfo.Dependency) 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.
Types ¶
type DependenciesCache ¶
type DependenciesCache struct { Version int `json:"version,omitempty"` DepsMap map[string]*buildinfo.Dependency `json:"dependencies,omitempty"` }
func GetProjectDependenciesCache ¶
func GetProjectDependenciesCache() (*DependenciesCache, 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).