There was an error while loading. Please reload this page.
1 parent fcdb026 commit 0718b9dCopy full SHA for 0718b9d
SkyWizardWidget/Data/Services/WeatherDataServiceLocalRemoteFallback.swift
@@ -0,0 +1,21 @@
1
+//
2
+// WeatherDataServiceLocalRemoteFallback.swift
3
+// SkyWizardWidgetExtension
4
5
+// Created by Hishara Dilshan on 01/01/2025.
6
7
+
8
+import Foundation
9
10
+struct WeatherDataServiceLocalRemoteFallback: WeatherDataService {
11
12
+ let localDataService: WeatherDataService
13
+ let remoteDataService: WeatherDataService
14
15
+ func getWeatherData() throws(WeatherServiceError) -> WeatherEntry {
16
+ //if connection available -> remote
17
+ //else -> local
18
+ //if error -> throw unavailable
19
+ .sample
20
+ }
21
+}
0 commit comments