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
identifierIdentifier 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
profilesArray 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
profilesArray 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
profileIdIdentifier of the Profile to update
mutatingClosure with the actual profile to be updated
-
save(profile:Extension method) Creates or updates a
Profileinto the store. Updates if the identifier does already exist in storesourcery: SkipStreamWrapped
Declaration
Swift
public func save(profile: Profile) -> AnyPublisher<Bool, LocalStoreError>Parameters
profileInstance of
Profileto be saved -
delete(profile:Extension method) Deletes a
Profilefrom the store with the related identifiersourcery: SkipStreamWrapped
Declaration
Swift
public func delete(profile: Profile) -> AnyPublisher<Bool, LocalStoreError>Parameters
profileInstance of
Profileto be deleted
View on GitHub
ProfileDataStore Protocol Reference