PharmacyLocalDataStore
public protocol PharmacyLocalDataStore
Interface for saving, loading and deleting pharmacies
sourcery: StreamWrapped
-
Fetches a pharmacy by it’s telematik-id
Declaration
Swift
func fetchPharmacy(by telematikId: String) -> AnyPublisher<PharmacyLocation?, LocalStoreError>
Parameters
telematikId
Identifier of the pharmacy to fetch
-
List all pharmacies contained in the store /// - Parameter count: Number of pharmacies to fetch, nil if no limit should be applied
Declaration
Swift
func listPharmacies(count: Int?) -> AnyPublisher<[PharmacyLocation], LocalStoreError>
-
Creates or updates a sequence of pharmacies into the store
sourcery: SkipStreamWrapped
Declaration
Swift
func save(pharmacies: [PharmacyLocation]) -> AnyPublisher<Bool, LocalStoreError>
Parameters
pharmacies
Array of pharmacies to be saved
-
Deletes a sequence of pharmacies from the store
sourcery: SkipStreamWrapped
Declaration
Swift
func delete(pharmacies: [PharmacyLocation]) -> AnyPublisher<Bool, LocalStoreError>
Parameters
pharmacies
Array of pharmacies to be deleted
-
Updates a Pharmacy entity
sourcery: SkipStreamWrapped
Declaration
Swift
func update( telematikId: String, mutating: @escaping (inout PharmacyLocation) -> Void ) -> AnyPublisher<PharmacyLocation, LocalStoreError>
Parameters
telematikId
telematik id of the Pharmacy to update
mutating
Closure with the actual pharmacy to be updated