Skip to content

Instantly share code, notes, and snippets.

@tdcolvin
Last active June 27, 2023 10:37
Show Gist options
  • Save tdcolvin/8b6c2317086d396a421197897c44ac2b to your computer and use it in GitHub Desktop.
Save tdcolvin/8b6c2317086d396a421197897c44ac2b to your computer and use it in GitHub Desktop.
interface LocalDataSource {
fun getPlanetsFlow(): Flow<WorkResult<List<Planet>>>
fun getPlanetFlow(planetId: String): Flow<WorkResult<Planet?>>
suspend fun setPlanets(planets: List<Planet>)
}
interface RemoteDataSource {
suspend fun getPlanets(): List<Planet>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment