Добавлен Yandex
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.github.nullptroma.wallenc.domain.auth
|
||||
|
||||
/**
|
||||
* Результат входа через Яндекс (без зависимости от Yandex SDK).
|
||||
*/
|
||||
sealed interface RemoteYandexAuthResult {
|
||||
data class Success(val accessToken: String) : RemoteYandexAuthResult
|
||||
data class Failure(val message: String) : RemoteYandexAuthResult
|
||||
data object Cancelled : RemoteYandexAuthResult
|
||||
}
|
||||
|
||||
/**
|
||||
* Запуск OAuth Яндекса. Реализация только в модуле app (Yandex Auth SDK).
|
||||
*/
|
||||
fun interface RemoteYandexSignInLauncher {
|
||||
fun launch(onResult: (RemoteYandexAuthResult) -> Unit)
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.nullptroma.wallenc.domain.interfaces
|
||||
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import java.util.UUID
|
||||
|
||||
interface IVaultsManager {
|
||||
val localVault: IVault
|
||||
@@ -8,5 +9,7 @@ interface IVaultsManager {
|
||||
val remoteVaults: StateFlow<List<IVault>>
|
||||
val allStorages: StateFlow<List<IStorage>>
|
||||
val allVaults: StateFlow<List<IVault>>
|
||||
fun addYandexVault(email: String, token: String)
|
||||
suspend fun addYandexVault(accessToken: String)
|
||||
|
||||
suspend fun removeRemoteVault(vaultUuid: UUID)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.github.nullptroma.wallenc.domain.interfaces
|
||||
|
||||
/**
|
||||
* Удалённый vault Яндекс с привязанным аккаунтом (почта для UI).
|
||||
*/
|
||||
interface IYandexVault : IVault {
|
||||
val accountEmail: String
|
||||
}
|
||||
Reference in New Issue
Block a user