ProfileDataStore
public protocol ProfileDataStore
Interface for saving, loading and deleting profiles
sourcery: StreamWrapped
-
Fetches a profile by it’s identifier
Declaration
Swift
func fetchProfile(by identifier: Profile.ID) -> AnyPublisher<Profile?, LocalStoreError>
Parameters
identifier
Identifier of the Profile to fetch
-
List all profiles contained in the store
Declaration
Swift
func listAllProfiles() -> AnyPublisher<[Profile], LocalStoreError>
-
Creates or updates a sequence of profiles into the store
sourcery: SkipStreamWrapped
Declaration
Swift
func save(profiles: [Profile]) -> AnyPublisher<Bool, LocalStoreError>
Parameters
profiles
Array of profiles to be saved
-
Deletes a sequence of profiles from the store
sourcery: SkipStreamWrapped
Declaration
Swift
func delete(profiles: [Profile]) -> AnyPublisher<Bool, LocalStoreError>
Parameters
profiles
Array of profiles to be deleted
-
Updates a Profile entity
sourcery: SkipStreamWrapped
Declaration
Swift
func update( profileId: UUID, mutating: @escaping (inout Profile) -> Void ) -> AnyPublisher<Bool, LocalStoreError>
Parameters
profileId
Identifier of the Profile to update
mutating
Closure with the actual profile to be updated
-
save(profile:
Extension method) Creates or updates a
Profile
into the store. Updates if the identifier does already exist in storesourcery: SkipStreamWrapped
Declaration
Swift
public func save(profile: Profile) -> AnyPublisher<Bool, LocalStoreError>
Parameters
profile
Instance of
Profile
to be saved -
delete(profile:
Extension method) Deletes a
Profile
from the store with the related identifiersourcery: SkipStreamWrapped
Declaration
Swift
public func delete(profile: Profile) -> AnyPublisher<Bool, LocalStoreError>
Parameters
profile
Instance of
Profile
to be deleted