ModCatalogController
ModCatalogController exposes ModDB browsing, catalog downloads, and downloaded-mod management to the frontend. It stays limited to DTO conversion and feature invocation.
- Methods: 13
- Referenced types: 12
Methods
- CancelModTask
- CheckModUpdates
- DownloadMod
- DownloadModsBatch
- GetMod
- InstallDownloadedMod
- ListDownloadedMods
- ListModTags
- PreviewUnusedDownloadedMods
- RemoveDownloadedMod
- RemoveUnusedDownloadedMods
- SearchMods
- UploadMods
CancelModTask
CancelModTask requests cancellation of an active catalog download or upload.
Go
CancelModTask(taskID string) errorTypeScript
CancelModTask(taskID: string): Promise<void>Parameters
| Name | Type |
|---|---|
taskID | string |
Example
await CancelModTask("task-id")Source
internal/transport/wails/mod_catalog_controller.go:220
CheckModUpdates
CheckModUpdates refreshes update information for cached releases of one catalog mod.
Go
CheckModUpdates(modID string) ([]DownloadedModDTO, error)TypeScript
CheckModUpdates(modID: string): Promise<DownloadedModDTO[]>Parameters
| Name | Type |
|---|---|
modID | string |
Returns
| Go type | TypeScript type |
|---|---|
[]DownloadedModDTO | DownloadedModDTO[] |
Example
const checkModUpdates = await CheckModUpdates("mod-id")Source
internal/transport/wails/mod_catalog_controller.go:225
DownloadMod
DownloadMod downloads a catalog release and optionally installs it into selected instances. The call returns when the download task finishes; TaskID can be passed to CancelModTask, and per-instance installation failures are reported through Installations.
Go
DownloadMod(request DownloadCatalogModRequest) (ModInstallResultDTO, error)TypeScript
DownloadMod(request: DownloadCatalogModRequest): Promise<ModInstallResultDTO>Parameters
| Name | Type |
|---|---|
request | DownloadCatalogModRequest |
Returns
| Go type | TypeScript type |
|---|---|
ModInstallResultDTO | ModInstallResultDTO |
Errors
mod_not_found: the mod does not exist in the catalogmod_version_not_found: the requested release does not existmod_catalog_unavailable: the catalog could not be reachedmod_incompatible: the release is incompatible with a target instancemod_download_already_active: a task for this release is already runninginvalid_mod_file: the downloaded archive is not a valid moddownload_failed: the release could not be downloadedinstance_not_found: a target instance does not existgame_version_not_found: a target instance has no installed game versionsnapshot_in_progress: a snapshot is currently being takendata_folder_busy: a data-folder relocation is in progress
Example
const downloadMod = await DownloadMod({ modId: "mod-id", versionId: "version-id", instanceIds: [], downloadOnly: false, allowIncompatible: false })Source
internal/transport/wails/mod_catalog_controller.go:122
DownloadModsBatch
DownloadModsBatch downloads and installs several catalog releases for one instance.
Go
DownloadModsBatch(request DownloadModsBatchRequest) []BatchModInstallResultDTOTypeScript
DownloadModsBatch(request: DownloadModsBatchRequest): Promise<BatchModInstallResultDTO[]>Parameters
| Name | Type |
|---|---|
request | DownloadModsBatchRequest |
Returns
| Go type | TypeScript type |
|---|---|
[]BatchModInstallResultDTO | BatchModInstallResultDTO[] |
Example
const downloadModsBatch = await DownloadModsBatch({ instanceId: "instance-id", targets: [] })Source
internal/transport/wails/mod_catalog_controller.go:153
GetMod
GetMod returns catalog details and available versions for one mod.
Go
GetMod(modID string) (ModDetailsDTO, error)TypeScript
GetMod(modID: string): Promise<ModDetailsDTO>Parameters
| Name | Type |
|---|---|
modID | string |
Returns
| Go type | TypeScript type |
|---|---|
ModDetailsDTO | ModDetailsDTO |
Example
const getMod = await GetMod("mod-id")Source
internal/transport/wails/mod_catalog_controller.go:66
InstallDownloadedMod
InstallDownloadedMod installs an already cached catalog release into selected instances.
Go
InstallDownloadedMod(request InstallDownloadedModRequest) (ModInstallResultDTO, error)TypeScript
InstallDownloadedMod(request: InstallDownloadedModRequest): Promise<ModInstallResultDTO>Parameters
| Name | Type |
|---|---|
request | InstallDownloadedModRequest |
Returns
| Go type | TypeScript type |
|---|---|
ModInstallResultDTO | ModInstallResultDTO |
Example
const installDownloadedMod = await InstallDownloadedMod({ modId: "mod-id", versionId: "version-id", instanceIds: [], allowIncompatible: false })Source
internal/transport/wails/mod_catalog_controller.go:181
ListDownloadedMods
ListDownloadedMods returns catalog mod files cached by the launcher.
Go
ListDownloadedMods() ([]DownloadedModDTO, error)TypeScript
ListDownloadedMods(): Promise<DownloadedModDTO[]>Returns
| Go type | TypeScript type |
|---|---|
[]DownloadedModDTO | DownloadedModDTO[] |
Example
const listDownloadedMods = await ListDownloadedMods()Source
internal/transport/wails/mod_catalog_controller.go:82
ListModTags
ListModTags returns catalog tags with their current result counts.
Go
ListModTags() ([]ModTagDTO, error)TypeScript
ListModTags(): Promise<ModTagDTO[]>Returns
| Go type | TypeScript type |
|---|---|
[]ModTagDTO | ModTagDTO[] |
Example
const listModTags = await ListModTags()Source
internal/transport/wails/mod_catalog_controller.go:72
PreviewUnusedDownloadedMods
PreviewUnusedDownloadedMods reports cached mod files that are not used by any instance.
Go
PreviewUnusedDownloadedMods() (DownloadedModCleanupResultDTO, error)TypeScript
PreviewUnusedDownloadedMods(): Promise<DownloadedModCleanupResultDTO>Returns
| Go type | TypeScript type |
|---|---|
DownloadedModCleanupResultDTO | DownloadedModCleanupResultDTO |
Example
const previewUnusedDownloadedMods = await PreviewUnusedDownloadedMods()Source
internal/transport/wails/mod_catalog_controller.go:200
RemoveDownloadedMod
RemoveDownloadedMod deletes a cached catalog release when it is safe to remove.
Go
RemoveDownloadedMod(modID string, versionID string) errorTypeScript
RemoveDownloadedMod(modID: string, versionID: string): Promise<void>Parameters
| Name | Type |
|---|---|
modID | string |
versionID | string |
Example
await RemoveDownloadedMod("mod-id", "version-id")Source
internal/transport/wails/mod_catalog_controller.go:192
RemoveUnusedDownloadedMods
RemoveUnusedDownloadedMods deletes cached mod files that are not used by any instance.
Go
RemoveUnusedDownloadedMods() (DownloadedModCleanupResultDTO, error)TypeScript
RemoveUnusedDownloadedMods(): Promise<DownloadedModCleanupResultDTO>Returns
| Go type | TypeScript type |
|---|---|
DownloadedModCleanupResultDTO | DownloadedModCleanupResultDTO |
Example
const removeUnusedDownloadedMods = await RemoveUnusedDownloadedMods()Source
internal/transport/wails/mod_catalog_controller.go:206
SearchMods
SearchMods queries the public mod catalog with filters, compatibility checks, and pagination.
Go
SearchMods(request ModSearchRequest) (ModSearchResultDTO, error)TypeScript
SearchMods(request: ModSearchRequest): Promise<ModSearchResultDTO>Parameters
| Name | Type |
|---|---|
request | ModSearchRequest |
Returns
| Go type | TypeScript type |
|---|---|
ModSearchResultDTO | ModSearchResultDTO |
Example
const searchMods = await SearchMods({ text: "", gameVersion: "1.0.0", side: "", tags: [], compatibleOnly: false, instanceId: "instance-id", sort: "", page: 0, pageSize: 0 })Source
internal/transport/wails/mod_catalog_controller.go:37
UploadMods
UploadMods uploads selected local mod archives to the catalog service.
Go
UploadMods(sourcePaths []string) (UploadModsResultDTO, error)TypeScript
UploadMods(sourcePaths: string[]): Promise<UploadModsResultDTO>Parameters
| Name | Type |
|---|---|
sourcePaths | []string |
Returns
| Go type | TypeScript type |
|---|---|
UploadModsResultDTO | UploadModsResultDTO |
Example
const uploadMods = await UploadMods([])Source
internal/transport/wails/mod_catalog_controller.go:212