Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ConfigGitHub is the default git repository URI ConfigGitHub = "https://github.com/LinuxSuRen/hd-home" // ConfigBranch is the default branch name of hd-home git repository ConfigBranch = "master" )
View Source
const (
// ProviderGitHub represents https://github.com
ProviderGitHub = "github"
)
Variables ¶
This section is empty.
Functions ¶
func FetchLatestRepo ¶ added in v0.0.28
FetchLatestRepo fetches the hd-home as the config
func GetConfigDir ¶
GetConfigDir returns the directory of the config
Types ¶
type CmdWithArgs ¶
CmdWithArgs is a command with arguments
type HDConfig ¶
type HDConfig struct {
Name string `yaml:"Name"`
Filename string `yaml:"filename"`
Binary string `yaml:"binary"`
TargetBinary string `yaml:"targetBinary"`
AdditionBinaries []string `yaml:"additionBinaries"`
URL string `yaml:"url"`
Tar string `yaml:"tar"`
SupportOS []string `yaml:"supportOS"`
SupportArch []string `yaml:"supportArch"`
Replacements map[string]string `yaml:"replacements"`
Installation *CmdWithArgs `yaml:"installation"`
PreInstall *CmdWithArgs `yaml:"preInstall"`
PostInstall *CmdWithArgs `yaml:"postInstall"`
TestInstall *CmdWithArgs `yaml:"testInstall"`
}
HDConfig is the config of http-downloader
type HDPackage ¶
type HDPackage struct {
Name string
Version string // e.g. v1.0.1
VersionNum string // e.g. 1.0.1
OS string // e.g. linux, darwin
Arch string // e.g. amd64
AdditionBinaries []string
}
HDPackage represents a package of http-downloader
type Installer ¶
type Installer struct {
Package *HDConfig
Tar bool
Output string
Source string
Name string
CleanPackage bool
Provider string
OS string
Arch string
Fetch bool
AdditionBinaries []string
}
Installer is a tool to install a package
func (*Installer) CheckDepAndInstall ¶
CheckDepAndInstall checks the desired tools, install the missing packages
Click to show internal directories.
Click to hide internal directories.