ZappStorageProtocol
@objc
public protocol ZappStorageProtocol
This prtocol represents public API for Zapp Storage
-
Save to storage item for specific key
Declaration
Swift
func set(key: String, value: String, namespace: String?) -> BoolParameters
keyThe key with which to associate the value.
valueThe object to store in storage.
namespaceNamespace that will be used for save item
Return Value
true if saving succeed
-
Retrieve value from the storage
Declaration
Swift
func get(key: String, namespace: String?) -> String?Parameters
keyThe key with which to associate the value.
namespaceNamespace that where value will be searched
Return Value
String Value represantation of the JSON if item was founded outherwise nil
-
Get all items for current storage
- namespace: Namespace that where value will be searched
Declaration
Swift
func getAll(namespace: String?) -> String?Return Value
String Value represantation of the JSON of all items that stores in the storage, in case namespace not nil All items for defined namespace