Documentation ¶
Index ¶
- type LockFile
- type Storage
- func (s *Storage) CreateCacheDownloadDir(cacheDownloadPaths models.CacheDownloadPaths) error
- func (s *Storage) CreateCacheRepositoryDir(name string) (string, error)
- func (s *Storage) GetCacheDownloadPaths(module models.Module, revision models.Revision) models.CacheDownloadPaths
- func (s *Storage) GetInstallDir(moduleName string, version string) string
- func (s *Storage) GetInstalledModuleHash(moduleName string, revisionVersion string) (models.ModuleHash, error)
- func (s *Storage) Install(cacheDownloadPaths models.CacheDownloadPaths, module models.Module, ...) (models.ModuleHash, error)
- func (s *Storage) IsModuleInstalled(module models.Module) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockFile ¶ added in v0.4.0
type LockFile interface {
Read(moduleName string) (models.LockFileInfo, error)
}
LockFile should implement adapter for lock file workflow
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage implements workflows with directories
func (*Storage) CreateCacheDownloadDir ¶
func (s *Storage) CreateCacheDownloadDir(cacheDownloadPaths models.CacheDownloadPaths) error
CacheDownload create path to downloaded cache. Like $GOPATH/pkg/mod/cache/download
func (*Storage) CreateCacheRepositoryDir ¶ added in v0.4.0
CacheDir create and return path to cache dir. cache dir contains repository cache for repository with proto files. cmd/go/internal/modfetch/codehost/codehost.go: 228 - create workdir
func (*Storage) GetCacheDownloadPaths ¶ added in v0.4.0
func (s *Storage) GetCacheDownloadPaths(module models.Module, revision models.Revision) models.CacheDownloadPaths
GetDownloadArchivePath returns full path to download archive (include extension)
func (*Storage) GetInstallDir ¶ added in v0.4.0
getInstallDir returns dir to install package rootDir + installedDir + module full remote path + module's version eg: ~/.EASYP/mod/github.com/google/googleapis/v1.2.3
func (*Storage) GetInstalledModuleHash ¶ added in v0.4.0
func (*Storage) Install ¶
func (s *Storage) Install( cacheDownloadPaths models.CacheDownloadPaths, module models.Module, revision models.Revision, moduleConfig models.ModuleConfig, ) (models.ModuleHash, error)
Install package from archive and calculateds hash of installed package