Documentation ¶
Index ¶
- Variables
- func DownloadFile(url, output string) ([]byte, error)
- func FetchFile(url string) ([]byte, error)
- func IsExist(path string) bool
- func MakeAllDirs(dir *string) error
- func SetUpVariables(dir *string)
- type AssetIndex
- type DownloadsEntry
- type LibraryDownloadEntry
- type VersionInfo
- type VersionJSON
- type VersionManifest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OperatingSystem, MinecraftDir, VersionDir, LibrariesDir, NativesDir, AssetsDir string )
Functions ¶
func DownloadFile ¶
func MakeAllDirs ¶
func SetUpVariables ¶
func SetUpVariables(dir *string)
Types ¶
type AssetIndex ¶
type AssetIndex struct { Objects map[string]struct { Hash string Size uint } Virtual bool `json:"virtual,omitempty"` MapToResources bool `json:"map_to_resources,omitempty"` }
var Ai AssetIndex
type DownloadsEntry ¶
type LibraryDownloadEntry ¶
type VersionInfo ¶
type VersionJSON ¶
type VersionJSON struct { Arguments struct { Game []interface{} Jvm []interface{} } `json:"arguments"` AssetIndex struct { Id string Sha1 string Size uint TotalSize uint Url string } `json:"assetIndex"` Assets string `json:"assets"` ComplianceLevel uint `json:"complianceLeveL"` Downloads struct { Client DownloadsEntry Client_mappings DownloadsEntry Server DownloadsEntry Server_mappings DownloadsEntry } `json:"downloads"` Id string `json:"id"` InheritsFrom *string `json:"inheritsFrom,omitempty"` JavaVersion struct { Component string MajorVersion uint } `json:"javaVersion"` Libraries []struct { Downloads struct { Artifact *LibraryDownloadEntry Classifiers *map[string]struct { Path string Url string } } Name *string Extract *struct { Exclude *[]string } Natives *map[string]string Rules *[]struct { Action string Os *struct { Name string } } } `json:"libraries"` Logging struct { Client struct { Argument string File struct { Id string Sha1 string Size uint Url string } Type string } } `json:"logging"` MainClass string `json:"mainClass"` MinecraftArguments *string `json:"minecraftArguments,omitempty"` MinimumLauncherVersion interface{} `json:"minimumLauncherVersion"` ReleaseTime string `json:"releaseTime"` Time string `json:"time"` Type string `json:"type"` }
func NewClientJSON ¶
func NewClientJSON(vm VersionManifest, version string) (*VersionJSON, error)
func (VersionJSON) FetchLibraries ¶
func (v VersionJSON) FetchLibraries(log chan string) error
func (VersionJSON) GetAssets ¶
func (v VersionJSON) GetAssets(log chan string) error
type VersionManifest ¶
type VersionManifest struct { Latest struct { Release string Snapshot string } Versions []VersionInfo }
func GetVersionManifest ¶
func GetVersionManifest() (*VersionManifest, error)
Click to show internal directories.
Click to hide internal directories.