-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π :: (#384) μλ² μ κ² λͺ¨λ¬ μ λΈ
- Loading branch information
Showing
15 changed files
with
104 additions
and
11 deletions.
There are no files selected for viewing
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
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
5 changes: 5 additions & 0 deletions
5
core/data/src/main/java/team/retum/data/repository/ServerStatusCheckRepository.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package team.retum.data.repository | ||
|
||
interface ServerStatusCheckRepository { | ||
suspend fun serverStatusCheck() | ||
} |
12 changes: 12 additions & 0 deletions
12
core/data/src/main/java/team/retum/data/repository/ServerStatusCheckRepositoryImpl.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package team.retum.data.repository | ||
|
||
import team.retum.network.datasource.RemoteServerStatusCheckDataSource | ||
import javax.inject.Inject | ||
|
||
class ServerStatusCheckRepositoryImpl @Inject constructor( | ||
private val remoteServerStatusCheckDataSource: RemoteServerStatusCheckDataSource, | ||
) : ServerStatusCheckRepository { | ||
override suspend fun serverStatusCheck() { | ||
remoteServerStatusCheckDataSource.serverStatusCheck() | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
core/domain/src/main/java/team/retum/usecase/usecase/ServerStatusCheckUseCase.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package team.retum.usecase.usecase | ||
|
||
import team.retum.data.repository.ServerStatusCheckRepository | ||
import javax.inject.Inject | ||
|
||
class ServerStatusCheckUseCase @Inject constructor( | ||
private val serverStatusCheckRepository: ServerStatusCheckRepository, | ||
) { | ||
suspend operator fun invoke() = runCatching { | ||
serverStatusCheckRepository.serverStatusCheck() | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
core/network/src/main/java/team/retum/network/api/ServerStatusCheckApi.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package team.retum.network.api | ||
|
||
import retrofit2.http.GET | ||
import team.retum.network.di.RequestUrls | ||
|
||
interface ServerStatusCheckApi { | ||
@GET(RequestUrls.CheckServerStatus.checkServerStatus) | ||
suspend fun serverStatusCheck() | ||
} |
5 changes: 5 additions & 0 deletions
5
.../network/src/main/java/team/retum/network/datasource/RemoteServerStatusCheckDataSource.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package team.retum.network.datasource | ||
|
||
interface RemoteServerStatusCheckDataSource { | ||
suspend fun serverStatusCheck() | ||
} |
15 changes: 15 additions & 0 deletions
15
...work/src/main/java/team/retum/network/datasource/RemoteServerStatusCheckDataSourceImpl.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package team.retum.network.datasource | ||
|
||
import team.retum.network.api.ServerStatusCheckApi | ||
import team.retum.network.util.RequestHandler | ||
import javax.inject.Inject | ||
|
||
class RemoteServerStatusCheckDataSourceImpl @Inject constructor( | ||
private val serverStatusCheckApi: ServerStatusCheckApi, | ||
) : RemoteServerStatusCheckDataSource { | ||
override suspend fun serverStatusCheck() { | ||
RequestHandler<Unit>().request { | ||
serverStatusCheckApi.serverStatusCheck() | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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