Documentation
¶
Overview ¶
Package catalog answers the Controller's software questions from the stored catalog snapshot (synced and verified by catalogsync): which versions of a template exist, and which build, download URL and published checksum a version resolves to. Jars download from the publisher's official URL. With Offline set, nothing is downloaded.
Index ¶
Constants ¶
const ( Vanilla = "vanilla" Paper = "paper" Purpur = "purpur" Folia = "folia" // Velocity is the network's proxy, not a Minecraft server: its // versions are its own. Velocity = "velocity" )
Templates the catalog offers.
Variables ¶
var ( // ErrOffline is returned when downloads are switched off. ErrOffline = errors.New("software downloads are switched off (-offline)") // ErrNoSnapshot is returned before the first catalog sync succeeded. ErrNoSnapshot = errors.New("the catalog has not been synced yet") // ErrUnknownTemplate is returned for a template the catalog does not offer. ErrUnknownTemplate = errors.New("unknown software template") // ErrUnknownVersion is returned for a version the catalog does not offer. ErrUnknownVersion = errors.New("unknown or unsupported version") // ErrUnknownBuild is returned for a build the catalog does not offer. ErrUnknownBuild = errors.New("unknown build") )
Functions ¶
func CompareVersions ¶
CompareVersions orders release numbers numerically ("1.21.10" after "1.21.9", "26.1" after "1.21.11"). Unparseable versions sort first.
func ServerTemplates ¶ added in v1.19.0
func ServerTemplates() []string
ServerTemplates returns the Minecraft server templates.
func Supported ¶
Supported reports whether Shardkeep runs a Minecraft version: releases from 1.18 (the first needing Java 17), and every year-numbered release (26.1 onwards). Pre-releases, snapshots and release candidates are not.
func SupportedVersion ¶ added in v1.19.0
SupportedVersion reports whether Shardkeep runs a template's version: Minecraft versions for server templates (see Supported), and Velocity's own releases from 3.0.
Types ¶
type Build ¶
type Build struct {
Template string
Version string
// Build is empty for software without builds (Vanilla).
Build string
URL string
Hash Hash
// Size is zero when the publisher does not state it.
Size int64
JavaVersion int
}
Build is one downloadable server jar.
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog reads the stored snapshot.
func (*Catalog) Open ¶
Open starts downloading a build's jar from its publisher. The caller verifies it.