OperationDTO
OperationDTO reports progress and outcome for a background launcher task.
Kind
struct
Fields
| Go field | JSON field | Go type | TypeScript type | Optional | Nullable | Description |
|---|---|---|---|---|---|---|
ID | id | string | string | No | No | |
Type | type | string | string | No | No | Type identifies the operation kind, such as a version install or snapshot. |
ResourceID | resourceId | *string | string | null | Yes | Yes | ResourceID names the instance or game version the operation targets. |
Title | title | string | string | No | No | Title is the human-readable operation title, used as the i18n fallback. |
TitleKey | titleKey | string | string | Yes | No | TitleKey is the i18n key used to localize the operation title. |
TitleParams | titleParams | map[string]string | Record<string, string> | Yes | No | TitleParams are the interpolation values for the localized title. |
Status | status | string | string | No | No | Status is the operation lifecycle state: queued, running, completed, failed, or cancelled. |
Progress | progress | float64 | number | No | No | Progress is the completion ratio normalized from 0 to 1. |
CurrentBytes | currentBytes | int64 | number | No | No | CurrentBytes is the transferred byte count, and TotalBytes the expected total. |
TotalBytes | totalBytes | int64 | number | No | No | |
BytesPerSecond | bytesPerSecond | int64 | number | No | No | BytesPerSecond is the current transfer rate. |
ErrorCode | errorCode | *string | string | null | Yes | Yes | ErrorCode is a stable error identifier set when the operation fails. |
ErrorMessage | errorMessage | *string | string | null | Yes | Yes | ErrorMessage is the human-readable failure description set when the operation fails. |
CreatedAt | createdAt | string | string | No | No | CreatedAt, StartedAt, and FinishedAt are the operation lifecycle timestamps. |
StartedAt | startedAt | *string | string | null | Yes | Yes | |
FinishedAt | finishedAt | *string | string | null | Yes | Yes |
Used by
- GameVersionController.InstallLocalVersion — return value
- GameVersionController.InstallVersion — return value
- InstanceController.StartExistingDataImport — return value
- InstancePackageController.ImportPackage — return value
- ModManagerController.InstallModFile — return value
- OperationController.ListOperations — return value
- SnapshotController.CreateInstanceSnapshot — return value
Source
internal/transport/wails/dto.go:257