StorageClient
public protocol StorageClient
StorageClient protocol represents predefined interfaces and protocols for FRAuthenticator’s storage method
-
Stores Account object into Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func setAccount(account: Account) -> BoolParameters
accountAccount object to be stored
-
Removes Account object from Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func removeAccount(account: Account) -> BoolParameters
accountAccount object to be removed
-
Retrieves Account object with its unique identifier
Declaration
Swift
func getAccount(accountIdentifier: String) -> Account?Parameters
accountIdentifierString value of Account’s unique identifier
-
Retrieves all Account objects stored in Storage Client
Declaration
Swift
func getAllAccounts() -> [Account] -
Stores Mechanism object into Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func setMechanism(mechanism: Mechanism) -> BoolParameters
mechanismMechanism object to be stored
-
Removes Mechanism object from Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func removeMechanism(mechanism: Mechanism) -> BoolParameters
mechanismMechanism object to be removed
-
Retrieves Mechanism object with given Mechanism UUID
Declaration
Swift
func getMechanismForUUID(uuid: String) -> Mechanism?Parameters
uuidUUID of Mechanism
-
Retrieves PushNotification object with its unique identifier
Declaration
Swift
func getNotification(notificationIdentifier: String) -> PushNotification?Parameters
notificationIdentifierString value of PushNotification’s unique identifier
-
Retrieves PushNotification object with its unique message identifier
Declaration
Swift
func getNotificationByMessageId(messageId: String) -> PushNotification?Parameters
messageIdString value of PushNotification’s message identifier
-
Stores PushNotification object into Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func setNotification(notification: PushNotification) -> BoolParameters
notificationPushNotification object to be stored
-
Removes PushNotification object from Storage Client, and returns discardable Boolean result of operation
Declaration
Swift
@discardableResult func removeNotification(notification: PushNotification) -> BoolParameters
notificationPushNotification object to be removed
-
Retrieves all Notification objects from Storage Client with given Mechanism object
Declaration
Swift
func getAllNotificationsForMechanism(mechanism: Mechanism) -> [PushNotification]Parameters
mechanismMechanism object that is associated with Notification(s)
-
Retrieves all Notification objects from Storage Client
Declaration
Swift
func getAllNotifications() -> [PushNotification] -
Returns whether or not StorageClient has any data stored
Declaration
Swift
@discardableResult func isEmpty() -> Bool
View on GitHub