Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidName = errors.New("invalid name") ErrMissingName = errors.New("missing name") )
var ErrChecksumsUnsupported = errors.New("version precedes checksums")
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive = archive.Zip[Executable]
type Checksums ¶ added in v0.6.0
type Checksums struct {
// contains filtered or unexported fields
}
An 'Artifact' representing a Godot executable archive checksums file.
func NewChecksums ¶ added in v0.6.0
Returns a new 'Checksums' struct after validating the Godot version.
func (Checksums) Artifact ¶ added in v0.6.0
func (c Checksums) Artifact()
Artifact "registers" 'Checksums' as a Godot release artifact.
func (Checksums) Hash ¶ added in v0.6.0
Hash returns a new 'hash.Hash' for computing the file hash of an executable.
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
An 'Artifact' representing the Godot application itself.
func MustParse ¶
func MustParse(input string) Executable
Parses an 'Executable' struct from the name of a Godot executable or panics if it would fail.
func New ¶
func New(v version.Version, p platform.Platform) Executable
Creates a new 'Executable' struct with the specified values.
NOTE: This method is rather pointless, but the 'Versioned' and 'Platformed' interfaces conflict with the desired field names.
func Parse ¶
func Parse(input string) (Executable, error)
Parses an 'Executable' struct from the name of a Godot executable.
func (Executable) Archivable ¶
func (ex Executable) Archivable()
Allows 'Executable' to be used by 'Archive' implementation.
func (Executable) Artifact ¶ added in v0.6.0
func (ex Executable) Artifact()
Artifact "registers" 'Executable' as a Godot release artifact.
func (Executable) Name ¶
func (ex Executable) Name() string
Returns the name of the Godot executable, given the specified 'Version' and 'Platform'.
NOTE: Godot names its executables in the format 'Godot_<VERSION>_<PLATFORM>', with Windows executables getting an extra '.exe' extension. Both the version and platform identifiers are version-specific, but the overall naming scheme has not changed (as of v4.2).
func (Executable) Path ¶
func (ex Executable) Path() string
The path relative to the 'Artifact' that executes Godot. For Linux and Windows this will be the executable 'Artifact' itself. On macOS this will be a path within the app folder.
func (Executable) Platform ¶
func (ex Executable) Platform() platform.Platform
func (Executable) String ¶
func (ex Executable) String() string
func (Executable) Version ¶
func (ex Executable) Version() version.Version