Documentation
¶
Index ¶
- func DeleteMod(profileName, modDirName string) error
- func DisableMod(modName, profileName string) error
- func DownloadAndCacheBepInEx(basePath string, version string) (string, error)
- func EnableMod(modName, profileName string) error
- func FetchLatestBepInExVersion() (string, error)
- func InstallMod(profileName, modAuthor, modTitle string) error
- func InstallModFromUrl(profile, modUrl string) error
- func IsBepInExCached(basePath string) bool
- func IsBepInExUpToDate(basePath string, currentConfig *config.Config) (bool, error)
- func MovePlugins(modPath string) error
- func UnpackBepInEx(targetDir string) error
- func Unzip(src, dest string) error
- func UnzipMod(src, dest string) error
- type BepInExRelease
- type ModDetails
- type ModManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAndCacheBepInEx ¶
DownloadAndCacheBepInEx downloads and caches the latest BepInEx release. Returns the path to the downloaded zip file.
func FetchLatestBepInExVersion ¶
FetchLatestBepInExVersion fetches the latest stable release version of BepInEx from GitHub.
func InstallMod ¶
InstallMod installs or updates the specified mod in the given profile.
func InstallModFromUrl ¶ added in v0.0.7
func IsBepInExCached ¶
func IsBepInExUpToDate ¶
IsBepInExUpToDate checks if the cached version of BepInEx matches the latest stable version.
func MovePlugins ¶
MovePlugins searches for a 'plugins' directory inside the modPath or inside 'modPath/BepInEx'. If found, it moves all contents from the 'plugins' directory to the modPath.
func UnpackBepInEx ¶
UnpackBepInEx unpacks the BepInEx zip into the specified directory.
Types ¶
type BepInExRelease ¶
type BepInExRelease struct {
TagName string `json:"tag_name"`
Assets []struct {
BrowserDownloadURL string `json:"browser_download_url"`
} `json:"assets"`
}
BepInExRelease represents the structure of a GitHub release.
type ModDetails ¶
type ModDetails struct {
Author string `json:"author"`
ModDirName string `json:"mod_dir_name"`
Manifest ModManifest `json:"manifest"`
}
func ListMods ¶
func ListMods(profileName string) ([]ModDetails, error)
ListMods returns a list of all mods.
type ModManifest ¶
type ModManifest struct {
Name string `json:"name"`
Version string `json:"version_number"`
Description string `json:"description"`
Dependencies []string `json:"dependencies"`
}
func ReadModManifest ¶
func ReadModManifest(manifestPath string) (ModManifest, error)