Skip to content

GameVersionController

GameVersionController exposes installed and available game versions and drives installation and removal. It stays limited to DTO conversion and feature invocation.

  • Methods: 5
  • Referenced types: 4

Methods

InstallLocalVersion

InstallLocalVersion imports a game installation from a local archive or directory.

Go

go
InstallLocalVersion(request InstallVersionRequest) (OperationDTO, error)

TypeScript

ts
InstallLocalVersion(request: InstallVersionRequest): Promise<OperationDTO>

Parameters

NameType
requestInstallVersionRequest

Returns

Go typeTypeScript type
OperationDTOOperationDTO

Example

ts
const installLocalVersion = await InstallLocalVersion({ id: "id", name: "Example", sourcePath: "/path/to/file", executableRelativePath: "/path/to/file", expectedSha256: "" })

Source

internal/transport/wails/game_version_controller.go:94

InstallVersion

InstallVersion starts downloading and installing a selected game release. The call returns the queued OperationDTO immediately; later download and installation failures are reported through operation events and the OperationDTO error fields.

Go

go
InstallVersion(versionID string) (OperationDTO, error)

TypeScript

ts
InstallVersion(versionID: string): Promise<OperationDTO>

Parameters

NameType
versionIDstring

Returns

Go typeTypeScript type
OperationDTOOperationDTO

Errors

  • validation_error: the version identifier is invalid
  • version_catalog_unavailable: the release catalog could not be reached
  • game_version_already_installed: this release is already installed
  • game_version_not_found: the release is not available for this platform
  • insufficient_disk_space: not enough storage is available
  • file_permission_denied: the installation could not be written
  • data_folder_busy: a data-folder relocation is in progress

Example

ts
const installVersion = await InstallVersion("version-id")

Source

internal/transport/wails/game_version_controller.go:83

ListAvailableVersions

ListAvailableVersions returns downloadable releases compatible with the current platform.

Go

go
ListAvailableVersions() ([]AvailableGameVersionDTO, error)

TypeScript

ts
ListAvailableVersions(): Promise<AvailableGameVersionDTO[]>

Returns

Go typeTypeScript type
[]AvailableGameVersionDTOAvailableGameVersionDTO[]

Example

ts
const listAvailableVersions = await ListAvailableVersions()

Source

internal/transport/wails/game_version_controller.go:58

ListInstalledVersions

ListInstalledVersions returns game versions installed and managed by the launcher.

Go

go
ListInstalledVersions() ([]GameVersionDTO, error)

TypeScript

ts
ListInstalledVersions(): Promise<GameVersionDTO[]>

Returns

Go typeTypeScript type
[]GameVersionDTOGameVersionDTO[]

Example

ts
const listInstalledVersions = await ListInstalledVersions()

Source

internal/transport/wails/game_version_controller.go:45

RemoveVersion

RemoveVersion removes an installed game version when no managed instance requires it.

Go

go
RemoveVersion(id string, deleteFiles bool) error

TypeScript

ts
RemoveVersion(id: string, deleteFiles: boolean): Promise<void>

Parameters

NameType
idstring
deleteFilesbool

Example

ts
await RemoveVersion("id", false)

Source

internal/transport/wails/game_version_controller.go:109