ProteusClientProviderImpl

internal class ProteusClientProviderImpl(rootProteusPath: String, userId: UserId, passphraseStorage: PassphraseStorage, currentClientIdProvider: CurrentClientIdProvider, dispatcher: KaliumDispatcher = KaliumDispatcherImpl, proteusMigrationRecoveryHandler: ProteusMigrationRecoveryHandler) : ProteusClientProvider, CryptoBackupExporter

Constructors

Link copied to clipboard
constructor(rootProteusPath: String, userId: UserId, passphraseStorage: PassphraseStorage, currentClientIdProvider: CurrentClientIdProvider, dispatcher: KaliumDispatcher = KaliumDispatcherImpl, proteusMigrationRecoveryHandler: ProteusMigrationRecoveryHandler)

Functions

Link copied to clipboard
open suspend override fun clearLocalFiles()
Link copied to clipboard
open suspend override fun exportCryptoDB(exportPath: String): Either<CoreFailure, CryptoBackupMetadata>

Exports the cryptographic database to the specified path and returns the metadata required for backup restoration.

Link copied to clipboard
open suspend override fun getOrCreate(): ProteusClient

Returns the ProteusClient or creates new one if doesn't exists.

Link copied to clipboard
open suspend override fun getOrError(): Either<CoreFailure, ProteusClient>

Returns the ProteusClient, retrieves it from local files or returns a failure if local files doesn't exist.