Launcher, app/base, sentry, update service

This commit is contained in:
James Houlahan
2020-11-23 11:56:57 +01:00
parent 6fffb460b8
commit dc3f61acee
164 changed files with 5368 additions and 4039 deletions

View File

@ -22,7 +22,7 @@ import (
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/importexport"
"github.com/ProtonMail/proton-bridge/internal/transfer"
"github.com/ProtonMail/proton-bridge/internal/updates"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
)
@ -31,18 +31,19 @@ type PanicHandler interface {
HandlePanic()
}
// Updater is an interface for handling Bridge upgrades.
type Updater interface {
CheckIsUpToDate() (isUpToDate bool, latestVersion updates.VersionInfo, err error)
GetDownloadLink() string
GetLocalVersion() updates.VersionInfo
StartUpgrade(currentStatus chan<- updates.Progress)
// Restarter allows the app to set itself to restart next time it is closed.
type Restarter interface {
SetToRestart()
}
type NoEncConfirmator interface {
ConfirmNoEncryption(string, bool)
}
type Updater interface {
InstallUpdate(updater.VersionInfo) error
}
// UserManager is an interface of users needed by frontend.
type UserManager interface {
Login(username, password string) (pmapi.Client, *pmapi.Auth, error)