-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TNT-140] DataStore 구축 #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
코맨 하나만 확인해주세용
@Singleton | ||
class SessionDataSource @Inject constructor( | ||
private val sessionPreferences: DataStore<Preferences>, | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로컬 저장 용도로 DataStore 사용할 때 DataSource를 나누는 기준은 어떻게 될까요?!
예를들어 SessionDataStore가 세션 관련 데이터
를 관리하고 있는 것처럼 데이터의 용도에 따라 나누면 될까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵넵 맞습니다~!!
📝 작업 내용
Closes [TNT-140] DataStore 구축 #21
DataStore
를 구축하였습니다.data:storage
모듈 내 위치합니다.storage
라고 명명한 이유는,datastore
,preferences
와 같이 내부 저장소 라이브러리의 이름을 명시하고 싶지 않았기 때문입니다.dataStore
보다 더 좋은 라이브러리가 생길 수도 있는데, 그렇게 되면 모듈명 자체를 변경해야 합니다. (물론 큰 여파는 없을 것 같지만요..):data
모듈 계층을 변경하였습니다.:data
:data:repository
<-:data:network
,:data:storage
repository
는 여러datasource
들을 취합하여 애플리케이션에 적합한 형태로 데이터를 매핑하는 역할을 맡고 있습니다.datasource
들을 가지고 있는 모듈과repository
모듈을 분리하여 역할을 명시하였습니다.📸 실행 화면
🙆🏻 리뷰 요청 사항
👀 레퍼런스