Skip to content

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

CancelModTask requests cancellation of an active catalog download or upload.

Go

go
CancelModTask(taskID string) error

TypeScript

ts
CancelModTask(taskID: string): Promise<void>

Parameters

NameType
taskIDstring

Example

ts
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

go
CheckModUpdates(modID string) ([]DownloadedModDTO, error)

TypeScript

ts
CheckModUpdates(modID: string): Promise<DownloadedModDTO[]>

Parameters

NameType
modIDstring

Returns

Go typeTypeScript type
[]DownloadedModDTODownloadedModDTO[]

Example

ts
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

go
DownloadMod(request DownloadCatalogModRequest) (ModInstallResultDTO, error)

TypeScript

ts
DownloadMod(request: DownloadCatalogModRequest): Promise<ModInstallResultDTO>

Parameters

NameType
requestDownloadCatalogModRequest

Returns

Go typeTypeScript type
ModInstallResultDTOModInstallResultDTO

Errors

  • mod_not_found: the mod does not exist in the catalog
  • mod_version_not_found: the requested release does not exist
  • mod_catalog_unavailable: the catalog could not be reached
  • mod_incompatible: the release is incompatible with a target instance
  • mod_download_already_active: a task for this release is already running
  • invalid_mod_file: the downloaded archive is not a valid mod
  • download_failed: the release could not be downloaded
  • instance_not_found: a target instance does not exist
  • game_version_not_found: a target instance has no installed game version
  • snapshot_in_progress: a snapshot is currently being taken
  • data_folder_busy: a data-folder relocation is in progress

Example

ts
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

go
DownloadModsBatch(request DownloadModsBatchRequest) []BatchModInstallResultDTO

TypeScript

ts
DownloadModsBatch(request: DownloadModsBatchRequest): Promise<BatchModInstallResultDTO[]>

Parameters

NameType
requestDownloadModsBatchRequest

Returns

Go typeTypeScript type
[]BatchModInstallResultDTOBatchModInstallResultDTO[]

Example

ts
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

go
GetMod(modID string) (ModDetailsDTO, error)

TypeScript

ts
GetMod(modID: string): Promise<ModDetailsDTO>

Parameters

NameType
modIDstring

Returns

Go typeTypeScript type
ModDetailsDTOModDetailsDTO

Example

ts
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

go
InstallDownloadedMod(request InstallDownloadedModRequest) (ModInstallResultDTO, error)

TypeScript

ts
InstallDownloadedMod(request: InstallDownloadedModRequest): Promise<ModInstallResultDTO>

Parameters

NameType
requestInstallDownloadedModRequest

Returns

Go typeTypeScript type
ModInstallResultDTOModInstallResultDTO

Example

ts
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

go
ListDownloadedMods() ([]DownloadedModDTO, error)

TypeScript

ts
ListDownloadedMods(): Promise<DownloadedModDTO[]>

Returns

Go typeTypeScript type
[]DownloadedModDTODownloadedModDTO[]

Example

ts
const listDownloadedMods = await ListDownloadedMods()

Source

internal/transport/wails/mod_catalog_controller.go:82

ListModTags

ListModTags returns catalog tags with their current result counts.

Go

go
ListModTags() ([]ModTagDTO, error)

TypeScript

ts
ListModTags(): Promise<ModTagDTO[]>

Returns

Go typeTypeScript type
[]ModTagDTOModTagDTO[]

Example

ts
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

go
PreviewUnusedDownloadedMods() (DownloadedModCleanupResultDTO, error)

TypeScript

ts
PreviewUnusedDownloadedMods(): Promise<DownloadedModCleanupResultDTO>

Returns

Go typeTypeScript type
DownloadedModCleanupResultDTODownloadedModCleanupResultDTO

Example

ts
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

go
RemoveDownloadedMod(modID string, versionID string) error

TypeScript

ts
RemoveDownloadedMod(modID: string, versionID: string): Promise<void>

Parameters

NameType
modIDstring
versionIDstring

Example

ts
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

go
RemoveUnusedDownloadedMods() (DownloadedModCleanupResultDTO, error)

TypeScript

ts
RemoveUnusedDownloadedMods(): Promise<DownloadedModCleanupResultDTO>

Returns

Go typeTypeScript type
DownloadedModCleanupResultDTODownloadedModCleanupResultDTO

Example

ts
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

go
SearchMods(request ModSearchRequest) (ModSearchResultDTO, error)

TypeScript

ts
SearchMods(request: ModSearchRequest): Promise<ModSearchResultDTO>

Parameters

NameType
requestModSearchRequest

Returns

Go typeTypeScript type
ModSearchResultDTOModSearchResultDTO

Example

ts
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

go
UploadMods(sourcePaths []string) (UploadModsResultDTO, error)

TypeScript

ts
UploadMods(sourcePaths: string[]): Promise<UploadModsResultDTO>

Parameters

NameType
sourcePaths[]string

Returns

Go typeTypeScript type
UploadModsResultDTOUploadModsResultDTO

Example

ts
const uploadMods = await UploadMods([])

Source

internal/transport/wails/mod_catalog_controller.go:212