storage

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 New

func New(rootDir string, lockFile LockFile) *Storage

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

func (s *Storage) CreateCacheRepositoryDir(name string) (string, error)

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

func (s *Storage) GetInstallDir(moduleName string, version string) string

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 (s *Storage) GetInstalledModuleHash(moduleName string, revisionVersion string) (models.ModuleHash, error)

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

func (*Storage) IsModuleInstalled added in v0.4.0

func (s *Storage) IsModuleInstalled(module models.Module) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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