DefaultPharmacyRepository
public struct DefaultPharmacyRepository : PharmacyRepository
Repository for the app to the Pharmacy data layer handling the syncing between its data stores.
-
Initializes a new PharmacyRepository as the gateway between Presentation layer and underlying data layer(s)
Declaration
Swift
public init( disk: PharmacyLocalDataStore, cloud: PharmacyRemoteDataStore )
Parameters
disk
The data source that represents the disk/local storage
cloud
The data source that represents the cloud/remote storage
-
Declaration
Swift
public func updateFromRemote( by telematikId: String ) -> AnyPublisher<PharmacyLocation, PharmacyRepositoryError>
-
Declaration
Swift
public func loadCached( by telematikId: String ) -> AnyPublisher<PharmacyLocation?, PharmacyRepositoryError>
-
Declaration
Swift
public func searchRemote( searchTerm: String, position: Position?, filter: [PharmacyRepositoryFilter] ) -> AnyPublisher<[PharmacyLocation], PharmacyRepositoryError>
-
Declaration
Swift
public func loadLocal(by telematikId: String) -> AnyPublisher<PharmacyLocation?, PharmacyRepositoryError>
-
Declaration
Swift
public func loadLocal(count: Int?) -> AnyPublisher<[PharmacyLocation], PharmacyRepositoryError>
-
Declaration
Swift
public func save(pharmacies: [PharmacyLocation]) -> AnyPublisher<Bool, PharmacyRepositoryError>
-
Declaration
Swift
public func delete(pharmacies: [PharmacyLocation]) -> AnyPublisher<Bool, PharmacyRepositoryError>
-
Declaration
Swift
public func loadAvsCertificates(for id: String) -> AnyPublisher<[X509], PharmacyRepositoryError>