Documentation ¶
Index ¶
- Variables
- func CheckSum(data []byte, sha1check string) bool
- func CheckSumByPath(path, sha1check string) bool
- func DownloadAndCheck(out, url, sha1check string) error
- func DownloadFile(url, output string) ([]byte, error)
- func FetchFile(url string) ([]byte, error)
- 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, LauncherDir, AssetsDir string )
Functions ¶
func CheckSumByPath ¶
func DownloadAndCheck ¶
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 `json:"path"` Size uint `json:"size"` Sha1 string `json:"sha1"` Url string `json:"url"` } } `json:"downloads"` Name *string `json:"name"` Extract *struct { Exclude *[]string } `json:"extract"` Natives *map[string]string `json:"natives"` Rules *[]struct { Action string Os *struct { Name string } } `json:"rules"` } `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.