-
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.
Browse files
Browse the repository at this point in the history
[FEATURE] #1 UseCase 추가 및 Repository, DataSource 인터페이스 수정
- Loading branch information
Showing
20 changed files
with
118 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package com.eshc.data.source | ||
|
||
import com.eshc.domain.model.Issue | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface IssueDataSource { | ||
fun getIssues(state : String) : Single<Result<List<Issue>>> | ||
} |
6 changes: 6 additions & 0 deletions
6
data/src/main/java/com/eshc/data/source/NotificationDataSource.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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
package com.eshc.data.source | ||
|
||
import com.eshc.domain.model.Notification | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface NotificationDataSource { | ||
fun getNotifications() : Single<Result<List<Notification>>> | ||
|
||
fun updateNotificationAsRead() | ||
} |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package com.eshc.data.source | ||
|
||
import com.eshc.domain.model.Repo | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface RepoDataSource { | ||
fun getRepos() : Single<Result<List<Repo>>> | ||
} |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package com.eshc.data.source | ||
|
||
import com.eshc.domain.model.User | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface UserDataSource { | ||
fun getUser() : Single<Result<User>> | ||
} |
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 com.eshc.domain.model | ||
|
||
data class Issue( | ||
val id : Int, | ||
val repo : Repo, | ||
val state : String, | ||
val title : String, | ||
val updatedAt : String | ||
) |
10 changes: 10 additions & 0 deletions
10
domain/src/main/java/com/eshc/domain/model/Notification.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,10 @@ | ||
package com.eshc.domain.model | ||
|
||
data class Notification( | ||
val id : Int, | ||
val repo : Repo, | ||
val updatedAt : String, | ||
val unread : Boolean, | ||
val comments: Int, | ||
val issueNum : Int | ||
) |
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,10 @@ | ||
package com.eshc.domain.model | ||
|
||
data class Repo( | ||
val id : Int, | ||
val name : String, | ||
val description : String, | ||
val stargazersCount : Int, | ||
val language : String, | ||
val fullName : 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.eshc.domain.model | ||
|
||
data class User( | ||
val id : Int, | ||
val avatarUrl : String, | ||
val name : String, | ||
val blog : String, | ||
val location : String, | ||
val email : String, | ||
val bio : String, | ||
val publicRepos : Int, | ||
val followers : Int, | ||
val following : Int | ||
) |
4 changes: 4 additions & 0 deletions
4
domain/src/main/java/com/eshc/domain/repository/IssueRepository.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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package com.eshc.domain.repository | ||
|
||
import com.eshc.domain.model.Issue | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface IssueRepository { | ||
fun getIssues(state : String) : Single<Result<List<Issue>>> | ||
} |
6 changes: 6 additions & 0 deletions
6
domain/src/main/java/com/eshc/domain/repository/NotificationRepository.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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
package com.eshc.domain.repository | ||
|
||
import com.eshc.domain.model.Notification | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface NotificationRepository { | ||
fun getNotifications() : Single<Result<List<Notification>>> | ||
|
||
fun updateNotificationAsRead() | ||
} |
4 changes: 4 additions & 0 deletions
4
domain/src/main/java/com/eshc/domain/repository/RepoRepository.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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package com.eshc.domain.repository | ||
|
||
import com.eshc.domain.model.Repo | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface RepoRepository { | ||
fun getRepos() : Single<Result<List<Repo>>> | ||
} |
4 changes: 4 additions & 0 deletions
4
domain/src/main/java/com/eshc/domain/repository/UserRepository.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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package com.eshc.domain.repository | ||
|
||
import com.eshc.domain.model.User | ||
import io.reactivex.rxjava3.core.Single | ||
|
||
interface UserRepository { | ||
fun getUser() : Single<Result<User>> | ||
} |
3 changes: 1 addition & 2 deletions
3
...c/domain/usecase/GetAccessTokenUseCase.kt → ...ain/usecase/auth/GetAccessTokenUseCase.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
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/eshc/domain/usecase/issue/GetIssuesUseCase.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,7 @@ | ||
package com.eshc.domain.usecase.issue | ||
|
||
class GetIssuesUseCase() { | ||
operator fun invoke() { | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/eshc/domain/usecase/notification/GetNotificationsUseCase.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,7 @@ | ||
package com.eshc.domain.usecase.notification | ||
|
||
class GetNotificationsUseCase() { | ||
operator fun invoke() { | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/eshc/domain/usecase/notification/UpdateNotificationAsReadUseCase.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,7 @@ | ||
package com.eshc.domain.usecase.notification | ||
|
||
class UpdateNotificationAsReadUseCase() { | ||
operator fun invoke() { | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/eshc/domain/usecase/repo/GetReposUseCase.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,7 @@ | ||
package com.eshc.domain.usecase.repo | ||
|
||
class GetReposUseCase() { | ||
operator fun invoke() { | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/eshc/domain/usecase/user/GetUserProfileUseCase.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,7 @@ | ||
package com.eshc.domain.usecase.user | ||
|
||
class GetUserProfileUseCase() { | ||
operator fun invoke() { | ||
|
||
} | ||
} |
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
3 changes: 1 addition & 2 deletions
3
feature-login/src/main/java/com/eshc/feature/login/LoginViewModel.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