pat/api/types/types.go
Martin Hebnes Pedersen 93fc985420 Reload frontend on config changes
Closes #6
2025-06-22 20:14:20 +02:00

28 lines
933 B
Go

package types
// Status represents a status report as sent to the Web GUI
type Status struct {
ActiveListeners []string `json:"active_listeners"`
Connected bool `json:"connected"`
Dialing bool `json:"dialing"`
RemoteAddr string `json:"remote_addr"`
HTTPClients []string `json:"http_clients"`
ConfigHash string `json:"config_hash"`
}
// Progress represents a progress report as sent to the Web GUI
type Progress struct {
BytesTransferred int `json:"bytes_transferred"`
BytesTotal int `json:"bytes_total"`
MID string `json:"mid"`
Subject string `json:"subject"`
Receiving bool `json:"receiving"`
Sending bool `json:"sending"`
Done bool `json:"done"`
}
// Notification represents a desktop notification as sent to the Web GUI
type Notification struct {
Title string `json:"title"`
Body string `json:"body"`
}