manifest

package
v0.0.0-...-4a1ec1a Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	ID                     string    `json:"id"`
	Type                   string    `json:"type"`
	Time                   time.Time `json:"time"`
	ReleaseTime            time.Time `json:"releaseTime"`
	MinimumLauncherVersion int       `json:"minimumLauncherVersion"`
	MainClass              string    `json:"mainClass"`
	Downloads              struct {
		Client         *VersionDownload `json:"client"`
		ClientMappings *VersionDownload `json:"client_mappings"`
		Server         *VersionDownload `json:"server"`
		ServerMappings *VersionDownload `json:"server_mappings"`
	} `json:"downloads"`
}

type VersionDownload

type VersionDownload struct {
	Sha1 string `json:"sha1"`
	Size int    `json:"size"`
	URL  string `json:"url"`
}

type VersionManifest

type VersionManifest struct {
	Latest struct {
		Release  string `json:"release"`
		Snapshot string `json:"snapshot"`
	} `json:"latest"`
	Versions []*VersionManifestVersion `json:"versions"`
}

func GetVersionManifest

func GetVersionManifest(httpClient *http.Client) (*VersionManifest, error)

func (*VersionManifest) FindVersion

func (m *VersionManifest) FindVersion(id string) *VersionManifestVersion

type VersionManifestVersion

type VersionManifestVersion struct {
	ID          string    `json:"id"`
	Type        string    `json:"type"`
	URL         string    `json:"url"`
	Time        time.Time `json:"time"`
	ReleaseTime time.Time `json:"releaseTime"`
}

func (*VersionManifestVersion) GetFull

func (v *VersionManifestVersion) GetFull(httpClient *http.Client) (*Version, error)

Jump to

Keyboard shortcuts

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