Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
Types ¶
type LaunchBody ¶
func (LaunchBody) FetchLaunchMeta ¶ added in v1.4.0
func (launchdata LaunchBody) FetchLaunchMeta() (response LaunchMeta, err error)
Fetches Lunar's API.
Takes in a `LaunchBody` type.
Returns a `LaunchMeta` type.
type LaunchMeta ¶
type LaunchMeta struct { Success bool `json:"success"` LaunchTypeData struct { Artifacts []Artifacts `json:"artifacts"` MainClass string `json:"mainClass"` } `json:"launchTypeData"` Licenses []struct { File string `json:"file"` URL string `json:"url"` Sha1 string `json:"sha1"` } `json:"licenses"` Textures struct { IndexURL string `json:"indexUrl"` IndexSha1 string `json:"indexSha1"` BaseURL string `json:"baseUrl"` } `json:"textures"` Jre struct { Download struct { URL string `json:"url"` Extension string `json:"extension"` } `json:"download"` ExecutablePathInArchive []string `json:"executablePathInArchive"` CheckFiles [][]string `json:"checkFiles"` ExtraArguments []string `json:"extraArguments"` JavawDownload interface{} `json:"javawDownload"` JavawExeChecksum interface{} `json:"javawExeChecksum"` JavaExeChecksum string `json:"javaExeChecksum"` } `json:"jre"` Error struct { Issues []struct { Code string `json:"error"` Expected string `json:"expected"` Received string `json:"received"` Path []string `json:"path"` Message string `json:"message"` } `json:"issues"` } `json:"error"` }
func (LaunchMeta) DownloadArtifacts ¶
func (data LaunchMeta) DownloadArtifacts(path string) (err error)
Downloads Lunar's artifacts from API.
Specify where to download artifacts with `path`.
func (LaunchMeta) DownloadCosmetics ¶
func (data LaunchMeta) DownloadCosmetics(path string) (err error)
Downloads Lunar's cosmetics and various textures from API concurrently.
Specify where to download artifacts with `path`.
func (LaunchMeta) SortFiles ¶
func (data LaunchMeta) SortFiles(path string) (classpath []string, ichorClassPath []string, external []string, natives []string)
Sorts Lunar's artifacts by TYPE.
Specify the path to Lunar's artifacts with `path`.
Returns []string: classpath, ichorClassPath, external, natives.
Click to show internal directories.
Click to hide internal directories.