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: 16
  • Referenced types: 13

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:241

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:246

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:143

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:174

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:202

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:103

ListFavoriteModIDs ​

ListFavoriteModIDs returns locally stored favorite catalog IDs.

Go ​

go
ListFavoriteModIDs() ([]string, error)

TypeScript ​

ts
ListFavoriteModIDs(): Promise<string[]>

Returns ​

Go typeTypeScript type
[]stringstring[]

Example ​

ts
const listFavoriteModIDs = await ListFavoriteModIDs()

Source ​

internal/transport/wails/mod_catalog_controller.go:72

ListFavoriteMods ​

ListFavoriteMods returns current catalog summaries for saved favorites.

Go ​

go
ListFavoriteMods() ([]ModSummaryDTO, error)

TypeScript ​

ts
ListFavoriteMods(): Promise<ModSummaryDTO[]>

Returns ​

Go typeTypeScript type
[]ModSummaryDTOModSummaryDTO[]

Example ​

ts
const listFavoriteMods = await ListFavoriteMods()

Source ​

internal/transport/wails/mod_catalog_controller.go:78

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:93

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:221

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:213

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:227

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

SetModFavorite ​

SetModFavorite explicitly adds or removes a catalog mod favorite.

Go ​

go
SetModFavorite(modID string, favorite bool) error

TypeScript ​

ts
SetModFavorite(modID: string, favorite: boolean): Promise<void>

Parameters ​

NameType
modIDstring
favoritebool

Example ​

ts
await SetModFavorite("mod-id", false)

Source ​

internal/transport/wails/mod_catalog_controller.go:88

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:233