Last active
June 27, 2023 10:44
-
-
Save tdcolvin/2ccb69c3e8e0907d15c58093d9892dcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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