chore: wire in location services

Signed-off-by: Alan Brault <alan.brault@visus.io>
This commit is contained in:
2026-08-09 10:22:38 -04:00
parent 59cb2737a1
commit e1da561ff6
9 changed files with 256 additions and 9 deletions
@@ -0,0 +1,11 @@
import Foundation
public struct Coordinate: Sendable, Hashable, Codable {
public let latitude: Double
public let longitude: Double
public init(latitude: Double, longitude: Double) {
self.latitude = latitude
self.longitude = longitude
}
}
@@ -0,0 +1,11 @@
import Foundation
public struct CurrentLocation: Sendable, Hashable {
public let coordinate: Coordinate
public let name: String
public init(coordinate: Coordinate, name: String) {
self.coordinate = coordinate
self.name = name
}
}
@@ -0,0 +1,7 @@
import Foundation
public enum LocationServiceError: Error, Sendable, Hashable {
case authorizationDenied
case locationUnavailable(reason: String)
case geocodingFailed(reason: String)
}
@@ -0,0 +1,6 @@
import Foundation
public protocol LocationService: Sendable {
func requestAuthorization() async
func getCurrentLocation() async throws -> CurrentLocation
}