Package-level declarations

Types

Link copied to clipboard

A LocalDataSource backed by a kenwork Cache. Mirrors SwiftyNetwork's CacheBasedLocalDataSource.

Link copied to clipboard
class GenericRepository<E : Any>(networkDataSource: NetworkDataSource, localDataSource: LocalDataSource<E>, responseType: TypeInfo, currentTimeMillis: () -> Long = System::currentTimeMillis, scope: CoroutineScope? = null) : Repository<E>

The default Repository: reads/writes a LocalDataSource and falls through to the network per CachePolicy, always writing through to local storage on a successful network load. Mirrors SwiftyNetwork's GenericRepository.

Link copied to clipboard
interface LocalDataSource<E : Any>

The local persistence side of a Repository. Mirrors SwiftyNetwork's LocalDataSource.

Link copied to clipboard
interface Repository<E : Any>

Coordinates a remote NetworkDataSource with a LocalDataSource under a CachePolicy. Mirrors SwiftyNetwork's Repository.

Functions

Link copied to clipboard
inline fun <E : Any> GenericRepository(networkDataSource: NetworkDataSource, localDataSource: LocalDataSource<E>, noinline currentTimeMillis: () -> Long = System::currentTimeMillis, scope: CoroutineScope? = null): GenericRepository<E>

Reified factory capturing the response TypeInfo for GenericRepository.