18 lines
639 B
Kotlin
18 lines
639 B
Kotlin
package be.simplenotes.domain.usecases.search
|
|
|
|
import be.simplenotes.domain.model.PersistedNote
|
|
import be.simplenotes.domain.model.PersistedNoteMetadata
|
|
import java.util.*
|
|
|
|
data class SearchTerms(val title: String?, val tag: String?, val content: String?, val all: String?)
|
|
|
|
interface NoteSearcher {
|
|
fun indexNote(userId: Int, note: PersistedNote)
|
|
fun indexNotes(userId: Int, notes: List<PersistedNote>)
|
|
fun deleteIndex(userId: Int, uuid: UUID)
|
|
fun updateIndex(userId: Int, note: PersistedNote)
|
|
fun search(userId: Int, terms: SearchTerms): List<PersistedNoteMetadata>
|
|
fun dropIndex(userId: Int)
|
|
fun dropAll()
|
|
}
|