internal

package
v0.0.0-...-571967f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AddOnsFolder = "\\_retail_\\Interface\\AddOns"

Variables

This section is empty.

Functions

func BackUpExistingFile

func BackUpExistingFile(file string) string

func CleanUpFile

func CleanUpFile(filePath string) error

func DownloadLatestRelease

func DownloadLatestRelease(repo string, config *Config)

func FindGameInstallationDirectory

func FindGameInstallationDirectory() (string, error)

func MoveFilesUpALevel

func MoveFilesUpALevel(filePath string, config *Config) (folders []string)

func RestoreBackUps

func RestoreBackUps(backedUpFiles []string)

func SaveDefaultConfig

func SaveDefaultConfig(config *Config) error

func SplitProjectNameFromUrl

func SplitProjectNameFromUrl(url string) string

func TrimFileExtension

func TrimFileExtension(filePath, extension string) string

func Unzip

func Unzip(zipPath, outDir string) error

func Update

func Update(url string, addOnDetails *AddOn, config *Config) (bool, error)

Types

type AddOn

type AddOn struct {
	Url       string
	Repo      string
	Version   string
	Folders   []string
	CreatedAt time.Time
}

func FindAddOnDetails

func FindAddOnDetails(repo string, config *Config) (int, *AddOn)

type Config

type Config struct {
	GamePath string
	AddOns   []AddOn
}

func LoadConfig

func LoadConfig() Config

func (*Config) AddAddOn

func (config *Config) AddAddOn(url, repo, version string,
	createdAt time.Time,
	folders []string)

func (*Config) HasGamePath

func (config *Config) HasGamePath() bool

func (*Config) RemoveAnAddOn

func (config *Config) RemoveAnAddOn(repo string)

func (*Config) Save

func (config *Config) Save() error

type GitHubRelease

type GitHubRelease struct {
	ZipballUrl string `json:"zipball_url"`
	Name       string `json:"name"`
	AssetsUrl  string `json:"assets_url"`
}

type GithubReleaseAsset

type GithubReleaseAsset struct {
	DownloadUrl string `json:"browser_download_url"`
	Name        string `json:"name"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL