2022-08-31 14:31:28 +00:00
|
|
|
package server
|
2022-01-27 09:52:13 +00:00
|
|
|
|
|
|
|
// EventType type for event types.
|
|
|
|
type EventType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
EventConnectionError EventType = "connection-error"
|
|
|
|
|
|
|
|
EventConnectionSuccess EventType = "connection-success"
|
|
|
|
|
|
|
|
EventTransferError EventType = "transfer-error"
|
|
|
|
|
|
|
|
EventTransferSuccess EventType = "transfer-success"
|
|
|
|
|
2022-08-31 14:31:28 +00:00
|
|
|
EventProcessSuccess EventType = "process-success"
|
2022-01-27 09:52:13 +00:00
|
|
|
|
2022-08-31 14:31:28 +00:00
|
|
|
EventProcessError EventType = "process-error"
|
2022-01-27 09:52:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Event is a type for transfer events.
|
|
|
|
type Event struct {
|
2022-08-31 14:31:28 +00:00
|
|
|
Type EventType `json:"type"`
|
2022-10-21 12:15:39 +00:00
|
|
|
Error string `json:"error,omitempty"`
|
2022-01-27 09:52:13 +00:00
|
|
|
}
|