LoginStoreProtocol
public protocol LoginStoreProtocol : AnyObject
-
Declaration
Swift
func add(login: LoginEntry) throws -> Login
-
Declaration
Swift
func addMany(logins: [LoginEntry]) throws -> [BulkResultEntry]
-
Declaration
Swift
func addManyWithMeta(entriesWithMeta: [LoginEntryWithMeta]) throws -> [BulkResultEntry]
-
Declaration
Swift
func addOrUpdate(login: LoginEntry) throws -> Login
-
Declaration
Swift
func addWithMeta(entryWithMeta: LoginEntryWithMeta) throws -> Login
-
Declaration
Swift
func count() throws -> Int64
-
Declaration
Swift
func countByFormActionOrigin(formActionOrigin: String) throws -> Int64
-
Declaration
Swift
func countByOrigin(origin: String) throws -> Int64
-
Declaration
Swift
func delete(id: String) throws -> Bool
-
Declaration
Swift
func deleteMany(ids: [String]) throws -> [Bool]
-
The
delete_undecryptable_records_for_remote_replacement
function locally deletes stored logins that cannot be decrypted and sets the last sync time to 0 so any existing server records can be downloaded and overwrite the locally deleted records.NB: This function was created to unblock iOS logins users who are unable to sync logins and should not be used outside of this use case.
Declaration
Swift
func deleteUndecryptableRecordsForRemoteReplacement() throws -> LoginsDeletionMetrics
-
Declaration
Swift
func findLoginToUpdate(look: LoginEntry) throws -> Login?
-
Declaration
Swift
func get(id: String) throws -> Login?
-
Declaration
Swift
func getByBaseDomain(baseDomain: String) throws -> [Login]
-
Declaration
Swift
func getCheckpoint() throws -> String?
-
Declaration
Swift
func hasLoginsByBaseDomain(baseDomain: String) throws -> Bool
-
Declaration
Swift
func isEmpty() throws -> Bool
-
Declaration
Swift
func list() throws -> [Login]
-
Declaration
Swift
func registerWithSyncManager()
-
Declaration
Swift
func reset() throws
-
Run maintenance on the DB
This is intended to be run during idle time and will take steps / to clean up / shrink the database.
Declaration
Swift
func runMaintenance() throws
-
Declaration
Swift
func setCheckpoint(checkpoint: String) throws
-
Declaration
Swift
func shutdown()
-
Declaration
Swift
func touch(id: String) throws
-
Declaration
Swift
func update(id: String, login: LoginEntry) throws -> Login
-
Clear out locally stored logins data
If sync is enabled, then we will try to recover the data on the next sync.
The main reason to call this is when regenerating a new encryption key. In that case, there’s no reason to keep around the local data since it can’t be decrypted. Calling
wipe_local
is better than keeping around these un-decryptable logins, since we might be able to recover the data via sync.This is a no-op for freshly created databases, so it’s safe to call this whenever a key is generated.
Declaration
Swift
func wipeLocal() throws