Skip to content

Instantly share code, notes, and snippets.

@tdcolvin
Last active June 27, 2023 10:44
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 tdcolvin/2ccb69c3e8e0907d15c58093d9892dcd to your computer and use it in GitHub Desktop.
Save tdcolvin/2ccb69c3e8e0907d15c58093d9892dcd 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>)
suspend fun addPlanet(planet: Planet)
suspend fun deletePlanet(planetId: String)
}
interface RemoteDataSource {
suspend fun getPlanets(): List<Planet>
suspend fun addPlanet(planet: Planet): Planet
suspend fun deletePlanet(planetId: String)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment