This commit is contained in:
Max Goedjen
2020-03-15 01:01:40 -07:00
committed by GitHub
parent 2c052e2657
commit 6136fc2e69
13 changed files with 283 additions and 60 deletions

View File

@@ -0,0 +1,27 @@
import Foundation
import Combine
class PreviewUpdater: UpdaterProtocol {
let update: Release?
init(update: Update = .none) {
switch update {
case .none:
self.update = nil
case .advisory:
self.update = Release(name: "10.10.10", html_url: URL(string: "https://example.com")!, body: "Some regular update")
case .critical:
self.update = Release(name: "10.10.10", html_url: URL(string: "https://example.com")!, body: "Critical Security Update")
}
}
}
extension PreviewUpdater {
enum Update {
case none, advisory, critical
}
}