Documentation
¶
Index ¶
- Constants
- func CheckCache(version string, cacheDir string) (string, error)
- func DownloadFile(uri string, bar *progressbar.ProgressBar) (string, error)
- func DownloadVersion(version string, isPreview bool) (string, error)
- func GetLatestPreviewVersion() (string, error)
- func GetLatestReleaseVersion() (string, error)
- func Install() error
- func SetConfig(config Config)
- func SetTargetVersion(version string)
- func Unzip(zipFile *os.File, bar *progressbar.ProgressBar) error
- type Config
Constants ¶
View Source
const ( DownloadPage = "https://www.minecraft.net/en-us/download/server/bedrock" ReleaseDownloadPrefix = "https://minecraft.azureedge.net/bin-win/bedrock-server-" ReleaseDownloadSuffix = ".zip" PreviewDownloadPrefix = "https://minecraft.azureedge.net/bin-win-preview/bedrock-server-" PreviewDownloadSuffix = ".zip" )
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func DownloadFile(uri string, bar *progressbar.ProgressBar) (string, error)
DownloadFile downloads a file from the given uri and returns the file name. If bar is not nil, the progress will be written to it.
func DownloadVersion ¶
DownloadVersion downloads the given version of BDS.
func GetLatestPreviewVersion ¶
GetLatestPreviewVersion returns the latest preview version of BDS.
func GetLatestReleaseVersion ¶
GetLatestReleaseVersion returns the latest version of BDS.
func SetTargetVersion ¶
func SetTargetVersion(version string)
func Unzip ¶
func Unzip(zipFile *os.File, bar *progressbar.ProgressBar) error
Unzip zip file to the current directory.
Types ¶
Click to show internal directories.
Click to hide internal directories.