Other: Add more extensive logging

This commit is contained in:
James Houlahan
2022-11-03 23:02:34 +01:00
parent 8bb60afabd
commit c548ba85fe
24 changed files with 405 additions and 81 deletions

View File

@ -17,7 +17,11 @@
package events
import "github.com/ProtonMail/proton-bridge/v2/internal/updater"
import (
"fmt"
"github.com/ProtonMail/proton-bridge/v2/internal/updater"
)
type UpdateAvailable struct {
eventBase
@ -27,16 +31,32 @@ type UpdateAvailable struct {
CanInstall bool
}
func (event UpdateAvailable) String() string {
return fmt.Sprintf("UpdateAvailable: Version %s, CanInstall %t", event.Version.Version, event.CanInstall)
}
type UpdateNotAvailable struct {
eventBase
}
func (event UpdateNotAvailable) String() string {
return "UpdateNotAvailable"
}
type UpdateInstalled struct {
eventBase
Version updater.VersionInfo
}
func (event UpdateInstalled) String() string {
return fmt.Sprintf("UpdateInstalled: Version %s", event.Version.Version)
}
type UpdateForced struct {
eventBase
}
func (event UpdateForced) String() string {
return "UpdateForced"
}