Documentation ¶
Index ¶
- Constants
- func CheckAndInstallCoursier()
- func CheckAndInstallMiniconda()
- func IsCoursierInstalled() bool
- func IsMinicondaInstalled() bool
- func RemoveGlobalSDKPathTemporarily(sdkName string)
- type CachedFileFinder
- type InstalledVersionFinder
- type Installer
- func (i *Installer) AddEnvsTemporarilly()
- func (i *Installer) CollectEnvs(basePath string) map[string][]string
- func (i *Installer) CreateSymlink()
- func (i *Installer) GetSDKInstaller() (si SDKInstaller)
- func (i *Installer) Install()
- func (i *Installer) IsInstalled() bool
- func (i *Installer) SetEnvGlobally()
- func (i *Installer) SetInvokeMode(m InvokeMode)
- func (i *Installer) Uninstall()
- func (i *Installer) UnsetEnv()
- type InvokeMode
- type SDKInstaller
- type VersionLocker
Constants ¶
View Source
const ( AddToPathTemporarillyEnvName string = "VMR_ADD_TO_PATH_TEMPORARILY" ModeGlobally InvokeMode = "globally" ModeSessionly InvokeMode = "sessionly" ModeToLock InvokeMode = "to-lock" )
View Source
const ( MinicondaSDKName string = "miniconda" CoursierSDKName string = "coursier" )
View Source
const (
LockerFileName = ".vmr.lock"
)
Lock the version of an SDK for a project.
Variables ¶
This section is empty.
Functions ¶
func CheckAndInstallCoursier ¶
func CheckAndInstallCoursier()
func CheckAndInstallMiniconda ¶
func CheckAndInstallMiniconda()
func IsCoursierInstalled ¶
func IsCoursierInstalled() bool
func IsMinicondaInstalled ¶
func IsMinicondaInstalled() bool
func RemoveGlobalSDKPathTemporarily ¶
func RemoveGlobalSDKPathTemporarily(sdkName string)
Remove the global SDK path from envs. Otherwise, it will shadow the hooked ones.
Types ¶
type CachedFileFinder ¶
Handle cached files.
func NewCachedFileFinder ¶
func NewCachedFileFinder(sdkName string, versionName ...string) *CachedFileFinder
func (*CachedFileFinder) Delete ¶
func (cf *CachedFileFinder) Delete()
type InstalledVersionFinder ¶
type InstalledVersionFinder struct { SDKName string InstalledVersions []string CurrentVersion string Installer *Installer }
func NewIVFinder ¶
func NewIVFinder(sdkName string) (i *InstalledVersionFinder)
func (*InstalledVersionFinder) FindAll ¶
func (i *InstalledVersionFinder) FindAll() (r []string, current string)
func (*InstalledVersionFinder) UninstallAllVersions ¶
func (i *InstalledVersionFinder) UninstallAllVersions()
type Installer ¶
type Installer struct { OriginSDKName string VersionName string Version download.Item Shell shell.Sheller Mode InvokeMode // contains filtered or unexported fields }
SDK Installer.
func NewInstaller ¶
func (*Installer) AddEnvsTemporarilly ¶
func (i *Installer) AddEnvsTemporarilly()
func (*Installer) CollectEnvs ¶
func (*Installer) CreateSymlink ¶
func (i *Installer) CreateSymlink()
func (*Installer) GetSDKInstaller ¶
func (i *Installer) GetSDKInstaller() (si SDKInstaller)
func (*Installer) IsInstalled ¶
func (*Installer) SetEnvGlobally ¶
func (i *Installer) SetEnvGlobally()
func (*Installer) SetInvokeMode ¶
func (i *Installer) SetInvokeMode(m InvokeMode)
type InvokeMode ¶
type InvokeMode string
type SDKInstaller ¶
type VersionLocker ¶
Lock the SDK version for a project.
func NewVLocker ¶
func NewVLocker() (v *VersionLocker)
func (*VersionLocker) FindLockerFile ¶
func (v *VersionLocker) FindLockerFile(dirPath ...string) string
func (*VersionLocker) HookForCdCommand ¶
func (v *VersionLocker) HookForCdCommand()
Hook for cd command.
func (*VersionLocker) Load ¶
func (v *VersionLocker) Load()
func (*VersionLocker) Save ¶
func (v *VersionLocker) Save(sdkName, versionName string)
save lock info.
Click to show internal directories.
Click to hide internal directories.