Documentation
¶
Index ¶
- Constants
- Variables
- func CleanDownload(conf Conf, cleanupPaths []string) error
- func Execute(conf Conf) error
- func FetchEntry(conf Conf, entry AddonEntry) ([]string, error)
- func RemoveNonBlizDirs(conf Conf) error
- func UnpackEntry(conf Conf, entry AddonEntry) error
- type AddonEntry
- type Conf
- type TOCFile
- type TOCFileGroup
- type UnpackCandidate
Constants ¶
View Source
const MARKER = ".wow_addon_cli"
View Source
const SEP = string(filepath.Separator)
Variables ¶
View Source
var CLIENT_SUFFIXES = []string{
"_Wrath",
"_TBC",
"_Vanilla",
"_Mainline",
"_Cata",
"-WOTLKC",
"-BCC",
"-Classic",
}
View Source
var DefaultSkipCleanPrefixes = []string{
"Blizzard_",
}
Functions ¶
func CleanDownload ¶
func FetchEntry ¶
func FetchEntry(conf Conf, entry AddonEntry) ([]string, error)
func RemoveNonBlizDirs ¶
func UnpackEntry ¶
func UnpackEntry(conf Conf, entry AddonEntry) error
Types ¶
type AddonEntry ¶
type AddonEntry struct {
// config strings
Git string
Zip string
Url string
Name string
// hydrated later
UniqueName string
}
func (AddonEntry) CloneSubdirName ¶ added in v1.2.0
func (entry AddonEntry) CloneSubdirName() string
func (*AddonEntry) Hydrate ¶
func (entry *AddonEntry) Hydrate() error
type Conf ¶
type Conf struct {
DownloadPath string
BackupPath string
AddonsPath string
PrecleanBliz bool
SkipCleanPrefixes []string
Addons []AddonEntry `toml:"addons"`
}
func (Conf) DownloadUniqueDir ¶ added in v1.2.0
func (c Conf) DownloadUniqueDir(entry AddonEntry) (string, error)
A unique download path subdir to put artifacts in
type TOCFile ¶ added in v1.2.0
func BuildTOCFromFile ¶ added in v1.2.0
func (TOCFile) AddonNameNoClientSuffix ¶ added in v1.2.0
NameNoClientSuffix returns the toc addon name with the extension removed and the client suffix trimmed
type TOCFileGroup ¶ added in v1.2.0
type TOCFileGroup struct {
TOCFiles []TOCFile
}
func GroupTOCFiles ¶ added in v1.2.0
func GroupTOCFiles(tocs []TOCFile) ([]TOCFileGroup, error)
GroupTOCFiles takes toc file structs and collects them into lists based on their common matching dirs
func (TOCFileGroup) AddonName ¶ added in v1.2.0
func (grp TOCFileGroup) AddonName() (string, error)
func (TOCFileGroup) Dir ¶ added in v1.2.0
func (grp TOCFileGroup) Dir() (string, error)
Click to show internal directories.
Click to hide internal directories.