GODT-976 Exclude updates from clearing cache and clear cache, including updates, while switching early access off

This commit is contained in:
Michal Horejsek
2021-01-27 09:16:04 +01:00
parent c6107dbd4b
commit 7468ed7dc0
18 changed files with 241 additions and 13 deletions

View File

@ -17,8 +17,15 @@
package bridge
import (
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/proton-bridge/internal/updater"
)
type Locator interface {
Clear() error
ClearUpdates() error
}
type Cacher interface {
@ -32,3 +39,13 @@ type SettingsProvider interface {
GetBool(key string) bool
SetBool(key string, val bool)
}
type Updater interface {
Check() (updater.VersionInfo, error)
IsDowngrade(updater.VersionInfo) bool
InstallUpdate(updater.VersionInfo) error
}
type Versioner interface {
RemoveOtherVersions(*semver.Version) error
}