Documentation ¶
Index ¶
- Variables
- type Default
- func (t *Default) Configure() error
- func (t *Default) ExecutableName() string
- func (t *Default) Installed() (bool, error)
- func (t *Default) InstalledVersion() (string, error)
- func (t *Default) Name() string
- func (t *Default) Remove() error
- func (t *Default) SymlinkPath() string
- func (t *Default) ToolDir() string
- type Github
- type Mirror
Constants ¶
This section is empty.
Variables ¶
var InstallDir = func() string { homeDir, err := os.UserHomeDir() if err != nil { panic(fmt.Errorf("failed to retrieve $HOME dir: %w", err)) } return filepath.Join(homeDir, ".local", "bin", "backplane") }()
var LatestDir = func() string { return filepath.Join(InstallDir, "latest") }()
Functions ¶
This section is empty.
Types ¶
type Default ¶
type Default struct {
// contains filtered or unexported fields
}
func NewDefault ¶
NewDefault creates a Default tool with the provided name
func NewDefaultWithExecutable ¶
NewDefaultWithExecutable creates a Default tool with the provided name and executableName
func (*Default) ExecutableName ¶
ExecutableName returns the main executable name of the tool that will be installed in latest if not defined it will be the name
func (*Default) Installed ¶
Installed validates whether the tool has already been installed under the provided rootDir or not
func (*Default) InstalledVersion ¶
InstalledVersion returns the currently installed version of the tool
func (*Default) Remove ¶
Remove uninstalls the tool by deleting it's tool-unique directory under the provided rootDir and unlinking itself from the latestDir
func (*Default) SymlinkPath ¶
symlinkPath returns the path to the symlink created by this tool, given the latest directory
type Github ¶
type Github struct { // Default defines the default tool implementation Default // Source defines the source of the tool in GitHub Source *github.Source // VersionInLatestTag in VersionInLatestTag bool }