ServerConfigRepository

Functions

Link copied to clipboard
abstract suspend fun commonApiVersion(domain: String): Either<CoreFailure, Int>
Link copied to clipboard
abstract suspend fun configForUser(userId: UserId): Either<StorageFailure, ServerConfig>

Return the server links and metadata for the given userId

Link copied to clipboard
abstract suspend fun fetchApiVersionAndStore(links: ServerConfig.Links): Either<CoreFailure, ServerConfig>

calculate the app/server common api version for a new non stored config and store it locally if the version is valid can return a ServerConfigFailure in case of an invalid version

Link copied to clipboard
abstract suspend fun getOrFetchMetadata(serverLinks: ServerConfig.Links): Either<CoreFailure, ServerConfig>
Link copied to clipboard
abstract suspend fun getTeamUrlForUser(userId: UserId): String?
Link copied to clipboard
abstract suspend fun storeConfig(links: ServerConfig.Links, metadata: ServerConfig.MetaData): Either<StorageFailure, ServerConfig>
Link copied to clipboard
abstract suspend fun updateConfigMetaData(serverConfig: ServerConfig): Either<CoreFailure, Unit>

update the api version and federation status of a locally stored config