SnapshotController
SnapshotController exposes instance snapshot management to the frontend. It stays limited to DTO conversion and feature invocation.
- Methods: 4
- Referenced types: 2
Methods
CreateInstanceSnapshot
CreateInstanceSnapshot captures the current instance data as a restorable backup.
Go
go
CreateInstanceSnapshot(instanceID string) (OperationDTO, error)TypeScript
ts
CreateInstanceSnapshot(instanceID: string): Promise<OperationDTO>Parameters
| Name | Type |
|---|---|
instanceID | string |
Returns
| Go type | TypeScript type |
|---|---|
OperationDTO | OperationDTO |
Example
ts
const createInstanceSnapshot = await CreateInstanceSnapshot("instance-id")Source
internal/transport/wails/snapshot_controller.go:21
DeleteInstanceSnapshot
DeleteInstanceSnapshot permanently removes a selected instance backup.
Go
go
DeleteInstanceSnapshot(instanceID string, snapshotID string) errorTypeScript
ts
DeleteInstanceSnapshot(instanceID: string, snapshotID: string): Promise<void>Parameters
| Name | Type |
|---|---|
instanceID | string |
snapshotID | string |
Example
ts
await DeleteInstanceSnapshot("instance-id", "snapshot-id")Source
internal/transport/wails/snapshot_controller.go:66
ListInstanceSnapshots
ListInstanceSnapshots returns restorable backups for an instance in newest-first order.
Go
go
ListInstanceSnapshots(instanceID string) ([]InstanceSnapshotDTO, error)TypeScript
ts
ListInstanceSnapshots(instanceID: string): Promise<InstanceSnapshotDTO[]>Parameters
| Name | Type |
|---|---|
instanceID | string |
Returns
| Go type | TypeScript type |
|---|---|
[]InstanceSnapshotDTO | InstanceSnapshotDTO[] |
Example
ts
const listInstanceSnapshots = await ListInstanceSnapshots("instance-id")Source
internal/transport/wails/snapshot_controller.go:32
RestoreInstanceSnapshot
RestoreInstanceSnapshot replaces current instance data with the selected backup.
Go
go
RestoreInstanceSnapshot(instanceID string, snapshotID string) errorTypeScript
ts
RestoreInstanceSnapshot(instanceID: string, snapshotID: string): Promise<void>Parameters
| Name | Type |
|---|---|
instanceID | string |
snapshotID | string |
Example
ts
await RestoreInstanceSnapshot("instance-id", "snapshot-id")Source
internal/transport/wails/snapshot_controller.go:50