Skip to content

Instantly share code, notes, and snippets.

@MarcoSignoretto
Created May 9, 2023 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoSignoretto/9b6ce56c7f46b7e27e5fe9a58ea973c4 to your computer and use it in GitHub Desktop.
Save MarcoSignoretto/9b6ce56c7f46b7e27e5fe9a58ea973c4 to your computer and use it in GitHub Desktop.
package com.msignoretto.note.newnote
import com.msignoretto.note.shared.domain.Note
import kotlinx.coroutines.flow.SharedFlow
interface NotesRepository {
val stream: SharedFlow<List<Note>>
suspend fun insert(title: String, content: String)
suspend fun update(uid: String, title: String, content: String)
suspend fun delete(uid: String)
suspend fun lock(uid: String, title: String, content: String, password: String)
suspend fun unlock(uid: String, password: String): Note
suspend fun biometricUnlock(uid: String): Note
suspend fun getNote(uid: String): Note?
suspend fun fetchAll(): List<Note>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment