Documentation ¶
Index ¶
- Constants
- Variables
- func IsCoursierInstalled() bool
- func IsMinicondaInstalled() bool
- type CondaInstaller
- func (c *CondaInstaller) ClearCache()
- func (c *CondaInstaller) Copy()
- func (c *CondaInstaller) CreateBinarySymbol()
- func (c *CondaInstaller) CreateVersionSymbol()
- func (c *CondaInstaller) DeleteAll()
- func (c *CondaInstaller) DeleteVersion()
- func (c *CondaInstaller) Download() (zipFilePath string)
- func (c *CondaInstaller) GetHomepage() string
- func (c *CondaInstaller) GetInstall() func(appName, version, zipFilePath string)
- func (c *CondaInstaller) InstallApp(zipFilePath string)
- func (c *CondaInstaller) SearchVersion()
- func (c *CondaInstaller) SetEnv()
- func (c *CondaInstaller) SetVersion(version string)
- func (c *CondaInstaller) UnInstallApp()
- func (c *CondaInstaller) Unzip(zipFilePath string)
- type CoursierInstaller
- func (c *CoursierInstaller) ClearCache()
- func (c *CoursierInstaller) Copy()
- func (c *CoursierInstaller) CreateBinarySymbol()
- func (c *CoursierInstaller) CreateVersionSymbol()
- func (c *CoursierInstaller) DeleteAll()
- func (c *CoursierInstaller) DeleteVersion()
- func (c *CoursierInstaller) Download() (zipFilePath string)
- func (c *CoursierInstaller) GetHomepage() string
- func (c *CoursierInstaller) GetInstall() func(appName, version, zipFilePath string)
- func (c *CoursierInstaller) InstallApp(zipFilePath string)
- func (c *CoursierInstaller) SearchVersion()
- func (c *CoursierInstaller) SetEnv()
- func (c *CoursierInstaller) SetVersion(version string)
- func (c *CoursierInstaller) UnInstallApp()
- func (c *CoursierInstaller) Unzip(zipFilePath string)
- type Env
- type HomeDirFinder
- type Installer
- func (i *Installer) ClearCache()
- func (i *Installer) Copy()
- func (i *Installer) CreateBinarySymbol()
- func (i *Installer) CreateVersionSymbol()
- func (i *Installer) DeleteAll()
- func (i *Installer) DeleteVersion()
- func (i *Installer) Download() (zipFilePath string)
- func (i *Installer) GetHomepage() string
- func (i *Installer) GetInstall() func(appName, version, zipFileName string)
- func (i *Installer) InstallApp(zipFilePath string)
- func (i *Installer) SearchLatestVersion()
- func (i *Installer) SearchVersion()
- func (i *Installer) SetEnv()
- func (i *Installer) SetVersion(version string)
- func (i *Installer) UnInstallApp()
- func (i *Installer) Unzip(zipFilePath string)
- type Searcher
Constants ¶
View Source
const (
SymbolicsInfoFileName string = "symbolics.info"
)
Variables ¶
View Source
var DefaultDecorator = func(dUrl string, ft *request.Fetcher) string { pxy := os.Getenv(conf.VMProxyEnvName) if gutils.VerifyUrls(pxy) || strings.Contains(pxy, "://") { if ft != nil { ft.Proxy = pxy } return dUrl } return conf.DecorateUrl(dUrl) }
Functions ¶
func IsCoursierInstalled ¶ added in v0.0.3
func IsCoursierInstalled() bool
func IsMinicondaInstalled ¶
func IsMinicondaInstalled() bool
Types ¶
type CondaInstaller ¶
type CondaInstaller struct { AppName string Version string Searcher *Searcher V *versions.VersionItem Install func(appName, version, zipFilePath string) UnInstall func(appName, version string) HomePage string }
Use miniconda as installer.
func NewCondaInstaller ¶
func NewCondaInstaller() *CondaInstaller
func (*CondaInstaller) ClearCache ¶
func (c *CondaInstaller) ClearCache()
func (*CondaInstaller) Copy ¶
func (c *CondaInstaller) Copy()
func (*CondaInstaller) CreateBinarySymbol ¶
func (c *CondaInstaller) CreateBinarySymbol()
func (*CondaInstaller) CreateVersionSymbol ¶
func (c *CondaInstaller) CreateVersionSymbol()
func (*CondaInstaller) DeleteAll ¶
func (c *CondaInstaller) DeleteAll()
func (*CondaInstaller) DeleteVersion ¶
func (c *CondaInstaller) DeleteVersion()
func (*CondaInstaller) Download ¶
func (c *CondaInstaller) Download() (zipFilePath string)
func (*CondaInstaller) GetHomepage ¶
func (c *CondaInstaller) GetHomepage() string
func (*CondaInstaller) GetInstall ¶
func (c *CondaInstaller) GetInstall() func(appName, version, zipFilePath string)
func (*CondaInstaller) InstallApp ¶
func (c *CondaInstaller) InstallApp(zipFilePath string)
func (*CondaInstaller) SearchVersion ¶
func (c *CondaInstaller) SearchVersion()
func (*CondaInstaller) SetEnv ¶
func (c *CondaInstaller) SetEnv()
func (*CondaInstaller) SetVersion ¶
func (c *CondaInstaller) SetVersion(version string)
func (*CondaInstaller) UnInstallApp ¶
func (c *CondaInstaller) UnInstallApp()
func (*CondaInstaller) Unzip ¶
func (c *CondaInstaller) Unzip(zipFilePath string)
type CoursierInstaller ¶ added in v0.0.3
type CoursierInstaller struct { AppName string Version string Searcher *Searcher V *versions.VersionItem Install func(appName, version, zipFilePath string) UnInstall func(appName, version string) HomePage string }
Use coursier as installer for Scala.
https://get-coursier.io/docs/cli-install
func NewCoursierInstaller ¶ added in v0.0.3
func NewCoursierInstaller() *CoursierInstaller
func (*CoursierInstaller) ClearCache ¶ added in v0.0.3
func (c *CoursierInstaller) ClearCache()
func (*CoursierInstaller) Copy ¶ added in v0.0.3
func (c *CoursierInstaller) Copy()
func (*CoursierInstaller) CreateBinarySymbol ¶ added in v0.0.3
func (c *CoursierInstaller) CreateBinarySymbol()
func (*CoursierInstaller) CreateVersionSymbol ¶ added in v0.0.3
func (c *CoursierInstaller) CreateVersionSymbol()
func (*CoursierInstaller) DeleteAll ¶ added in v0.0.3
func (c *CoursierInstaller) DeleteAll()
func (*CoursierInstaller) DeleteVersion ¶ added in v0.0.3
func (c *CoursierInstaller) DeleteVersion()
func (*CoursierInstaller) Download ¶ added in v0.0.3
func (c *CoursierInstaller) Download() (zipFilePath string)
func (*CoursierInstaller) GetHomepage ¶ added in v0.0.3
func (c *CoursierInstaller) GetHomepage() string
func (*CoursierInstaller) GetInstall ¶ added in v0.0.3
func (c *CoursierInstaller) GetInstall() func(appName, version, zipFilePath string)
func (*CoursierInstaller) InstallApp ¶ added in v0.0.3
func (c *CoursierInstaller) InstallApp(zipFilePath string)
func (*CoursierInstaller) SearchVersion ¶ added in v0.0.3
func (c *CoursierInstaller) SearchVersion()
func (*CoursierInstaller) SetEnv ¶ added in v0.0.3
func (c *CoursierInstaller) SetEnv()
func (*CoursierInstaller) SetVersion ¶ added in v0.0.3
func (c *CoursierInstaller) SetVersion(version string)
func (*CoursierInstaller) UnInstallApp ¶ added in v0.0.3
func (c *CoursierInstaller) UnInstallApp()
func (*CoursierInstaller) Unzip ¶ added in v0.0.3
func (c *CoursierInstaller) Unzip(zipFilePath string)
type HomeDirFinder ¶
type HomeDirFinder struct { Home string FlagFiles []string // unique file names that only exists in Home Dir. ExceptDir bool }
Find home dir of unzipped directories.
func NewFinder ¶
func NewFinder(flagFiles ...string) (h *HomeDirFinder)
func (*HomeDirFinder) Find ¶
func (h *HomeDirFinder) Find(startDir string)
type Installer ¶
type Installer struct { AppName string Version string Searcher *Searcher Fetcher *request.Fetcher V *versions.VersionItem IsZipFile bool BinaryRenameTo string VersionFilter func(dUrl string) bool BinDirGetter func(version string) [][]string // Binary dir BinListGetter func() []string // Binaries FlagFileGetter func() []string // Flags to find home dir of an app FlagDirExcepted bool // whether to find binaries only EnvGetter func(appName, version string) []Env // Envs to set DUrlDecorator func(dUrl string, ft *request.Fetcher) string // Download url decorator PostInstall func(appName, version string) // post install hook Install func(appName, version, zipFileName string) // customed installation. UnInstall func(appName, version string) // customed uninstallation. StoreMultiVersions bool // installs only the latest version if false ForceReDownload bool // force to redownload the cached zip file AddBinDirToPath bool // uses $PATH instead of creating symbolics NoDownload bool // diable download HomePage string // home page of the app }
func NewInstaller ¶
func (*Installer) ClearCache ¶
func (i *Installer) ClearCache()
func (*Installer) CreateBinarySymbol ¶
func (i *Installer) CreateBinarySymbol()
func (*Installer) CreateVersionSymbol ¶
func (i *Installer) CreateVersionSymbol()
func (*Installer) DeleteAll ¶
func (i *Installer) DeleteAll()
Removes all installed versions of an app.
func (*Installer) GetHomepage ¶
func (*Installer) GetInstall ¶
func (*Installer) InstallApp ¶
customed installation.
func (*Installer) SearchLatestVersion ¶
func (i *Installer) SearchLatestVersion()
func (*Installer) SearchVersion ¶
func (i *Installer) SearchVersion()
Searches version files for an application.
func (*Installer) SetVersion ¶
type Searcher ¶
type Searcher struct {
VersionInfo *versions.VersionInfo
}
func NewSearcher ¶
func NewSearcher() (s *Searcher)
func (*Searcher) GetVersions ¶
func (s *Searcher) GetVersions(appName string) map[string]versions.VersionList
Gets version list.
Click to show internal directories.
Click to hide internal directories.