purpur

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiURL = fmt.Sprintf("https://api.purpurmc.org/v%d/", ApiVersion)
View Source
var ApiVersion = 2

Functions

func GetProjectVersionBuildDownload

func GetProjectVersionBuildDownload(project string, version string, build string, path string) (*mcsrvapi.DownloadChecksums, error)

Types

type PurpurProject

type PurpurProject struct {
	Project  string   `json:"project"`
	Versions []string `json:"versions"`
}

func GetProject

func GetProject(project string) (*PurpurProject, error)

type PurpurProjectBuild

type PurpurProjectBuild struct {
	Project   string                      `json:"project"`
	Version   string                      `json:"version"`
	Build     string                      `json:"build"`
	Result    string                      `json:"result"`
	Timestamp int64                       `json:"timestamp"`
	Duration  int64                       `json:"duration"`
	Commits   []PurpurProjectBuildCommits `json:"commits"`
	Md5       string                      `json:"md5"`
}

func GetProjectVersionBuild

func GetProjectVersionBuild(project string, version string, build string) (*PurpurProjectBuild, error)

func (*PurpurProjectBuild) DownloadURL added in v0.1.3

func (p *PurpurProjectBuild) DownloadURL() string

type PurpurProjectBuildCommits

type PurpurProjectBuildCommits struct {
	Author      string `json:"author"`
	Email       string `json:"email"`
	Description string `json:"description"`
	Hash        string `json:"hash"`
	Timestamp   int64  `json:"timestamp"`
}

type PurpurProjectBuilds

type PurpurProjectBuilds struct {
	Latest string   `json:"latest"`
	All    []string `json:"all"`
}

type PurpurProjectVersion

type PurpurProjectVersion struct {
	Project string              `json:"project"`
	Version string              `json:"version"`
	Builds  PurpurProjectBuilds `json:"builds"`
}

func GetProjectVersion

func GetProjectVersion(project string, version string) (*PurpurProjectVersion, error)

func (*PurpurProjectVersion) GetLatestBuild added in v0.1.3

func (p *PurpurProjectVersion) GetLatestBuild() (*PurpurProjectBuild, error)

type PurpurProjects

type PurpurProjects struct {
	Projects []string `json:"projects"`
}

func GetProjects

func GetProjects() (*PurpurProjects, error)

Jump to

Keyboard shortcuts

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