vanillajava

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiURL = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json"
View Source
var ErrNotFound = errors.New("mc version not found")

Functions

This section is empty.

Types

type LatestVanillaJavaManifestVersion

type LatestVanillaJavaManifestVersion struct {
	Release  string `json:"release"`
	Snapshot string `json:"snapshot"`
}

type VanillaJavaManifest

type VanillaJavaManifest struct {
	Latest   LatestVanillaJavaManifestVersion `json:"latest"`
	Versions []VanillaJavaManifestVersion     `json:"versions"`
}

func GetManifest

func GetManifest() (*VanillaJavaManifest, error)

func (*VanillaJavaManifest) ClientDownload

func (m *VanillaJavaManifest) ClientDownload(version string, path string) (*mcsrvapi.DownloadChecksums, error)

func (*VanillaJavaManifest) GetManifestVersion

func (m *VanillaJavaManifest) GetManifestVersion(version string) (*VanillaJavaManifestVersion, error)

func (*VanillaJavaManifest) GetVersion

func (m *VanillaJavaManifest) GetVersion(version string) (*VanillaJavaVersion, error)

func (*VanillaJavaManifest) ServerDownload

func (m *VanillaJavaManifest) ServerDownload(version string, path string) (*mcsrvapi.DownloadChecksums, error)

type VanillaJavaManifestVersion

type VanillaJavaManifestVersion struct {
	Id              string    `json:"id"`
	Type            string    `json:"type"`
	Url             string    `json:"url"`
	Time            time.Time `json:"time"`
	ReleaseTime     time.Time `json:"releaseTime"`
	Sha1            string    `json:"sha1"`
	ComplianceLevel int       `json:"complianceLevel"`
}

type VanillaJavaVersion

type VanillaJavaVersion struct {
	Downloads VanillaJavaVersionDownloads
}

type VanillaJavaVersionDownload

type VanillaJavaVersionDownload struct {
	Sha1 string `json:"sha1"`
	Size int64  `json:"size"`
	URL  string `json:"url"`
}

type VanillaJavaVersionDownloads

type VanillaJavaVersionDownloads struct {
	Client         VanillaJavaVersionDownload `json:"client"`
	ClientMappings VanillaJavaVersionDownload `json:"client_mappings"`
	Server         VanillaJavaVersionDownload `json:"server"`
	ServerMappings VanillaJavaVersionDownload `json:"server_mappings"`
}

Jump to

Keyboard shortcuts

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