smlhandler

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUpdates

func CheckForUpdates(satisfactoryPath string, install bool) bool

CheckForUpdates compares the installed version with the newest available and optionally downloads it

func GetInstalledVersion

func GetInstalledVersion(satisfactoryPath string) string

GetInstalledVersion gets the version of the SML dll (0.0.0 = unknown)

func InstallSML

func InstallSML(satisfactoryPath string, version string) error

InstallSML checks the versions of SML and installs if the specified version is newer than the installed version

func UninstallSML

func UninstallSML(satisfactoryPath string) error

UninstallSML removes the SML dll from the path

func UpdateSML

func UpdateSML(satisfactoryPath string) error

UpdateSML finds the latest version of SML available to download from GitHub and updates to it if newer

Types

type SMLAsset

type SMLAsset struct {
	Name        string `json:"name"`
	DownloadURL string `json:"browser_download_url"`
}

SMLAsset part of GitHub asset structure

type SMLRelease

type SMLRelease struct {
	Version         string     `json:"tag_name"`
	Description     string     `json:"body"`
	ReleaseDateTime time.Time  `json:"published_at"`
	Assets          []SMLAsset `json:"assets"`
	DownloadURL     string
}

SMLRelease part of GitHub release structure

func GetLatestSML

func GetLatestSML() SMLRelease

GetLatestSML finds the latest version of SML available to download from GitHub

func GetSMLReleases

func GetSMLReleases() []SMLRelease

GetSMLReleases finds the versions of SML available to download from GitHub

Jump to

Keyboard shortcuts

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