@@ -21,7 +21,7 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/util"
|
||||
)
|
||||
|
||||
type EventType int
|
||||
type EventType int64
|
||||
|
||||
const (
|
||||
Starting EventType = 1 << iota
|
||||
@@ -52,6 +52,7 @@ const (
|
||||
FolderWatchStateChanged
|
||||
ListenAddressesChanged
|
||||
LoginAttempt
|
||||
Failure
|
||||
|
||||
AllEvents = (1 << iota) - 1
|
||||
)
|
||||
@@ -121,6 +122,8 @@ func (t EventType) String() string {
|
||||
return "LoginAttempt"
|
||||
case FolderWatchStateChanged:
|
||||
return "FolderWatchStateChanged"
|
||||
case Failure:
|
||||
return "Failure"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
@@ -200,6 +203,8 @@ func UnmarshalEventType(s string) EventType {
|
||||
return LoginAttempt
|
||||
case "FolderWatchStateChanged":
|
||||
return FolderWatchStateChanged
|
||||
case "Failure":
|
||||
return Failure
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user