OperationController
OperationController exposes the persistent operation list to the frontend. It stays limited to DTO conversion and feature invocation.
- Methods: 4
- Referenced types: 1
Methods
CancelOperation
CancelOperation requests cancellation of a running background operation.
Go
go
CancelOperation(id string) errorTypeScript
ts
CancelOperation(id: string): Promise<void>Parameters
| Name | Type |
|---|---|
id | string |
Example
ts
await CancelOperation("id")Source
internal/transport/wails/operation_controller.go:29
ClearOperationHistory
ClearOperationHistory removes completed operation records and returns the count removed.
Go
go
ClearOperationHistory() (int64, error)TypeScript
ts
ClearOperationHistory(): Promise<number>Returns
| Go type | TypeScript type |
|---|---|
int64 | number |
Example
ts
const clearOperationHistory = await ClearOperationHistory()Source
internal/transport/wails/operation_controller.go:39
DeleteOperation
DeleteOperation removes a completed operation from history.
Go
go
DeleteOperation(id string) errorTypeScript
ts
DeleteOperation(id: string): Promise<void>Parameters
| Name | Type |
|---|---|
id | string |
Example
ts
await DeleteOperation("id")Source
internal/transport/wails/operation_controller.go:34
ListOperations
ListOperations returns tracked background operations for progress and history views.
Go
go
ListOperations() ([]OperationDTO, error)TypeScript
ts
ListOperations(): Promise<OperationDTO[]>Returns
| Go type | TypeScript type |
|---|---|
[]OperationDTO | OperationDTO[] |
Example
ts
const listOperations = await ListOperations()Source
internal/transport/wails/operation_controller.go:19