feat: 定义仓库协议与用例(含会话)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import CoreModel
|
||||
|
||||
/// Home 数据仓库协议(定义在 domain 层,实现放 CoreRepository)。
|
||||
/// Kotlin: interface HomeRepository { fun observeHome(): Flow<HomeData> }
|
||||
public protocol HomeRepository: Sendable {
|
||||
/// Kotlin: Flow<HomeData> → Swift: AsyncThrowingStream<HomeData, Error>
|
||||
/// 已登录首页。
|
||||
func observeHome() -> AsyncThrowingStream<HomeData, Error>
|
||||
/// 游客首页。
|
||||
func observeGuestHome() -> AsyncThrowingStream<HomeData, Error>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user