-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refacotr/#84] DIContainer 생성 및 ServiceLayer 구성
- Loading branch information
Showing
8 changed files
with
99 additions
and
7 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
HMH_Tuist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/DIContainer.swift
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,17 @@ | ||
// | ||
// DIContainer.swift | ||
// MyPageFeatureInterface | ||
// | ||
// Created by 류희재 on 8/13/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class DIContainer: ObservableObject { | ||
var repositorys: RepositoryType | ||
|
||
init(repositorys: RepositoryType) { | ||
self.repositorys = repositorys | ||
} | ||
} |
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
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
..._iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/AuthService.swift
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,16 @@ | ||
// | ||
// AuthService.swift | ||
// MyPageFeatureInterface | ||
// | ||
// Created by 류희재 on 8/13/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol AuthServiceType { | ||
} | ||
|
||
class AuthService: AuthServiceType {} | ||
|
||
class StubAuthService: AuthServiceType {} |
30 changes: 30 additions & 0 deletions
30
...ist_iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/Services.swift
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,30 @@ | ||
// | ||
// Services.swift | ||
// MyPageFeatureInterface | ||
// | ||
// Created by 류희재 on 8/13/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol ServiceType { | ||
var authService: AuthenticationServiceType { get set } | ||
var userService: UserServiceType { get set } | ||
} | ||
|
||
class Services: ServiceType { | ||
var authService: AuthenticationServiceType | ||
var userService: UserServiceType | ||
|
||
init() { | ||
self.authService = AuthenticationService() | ||
self.userService = UserService(dbRepository: UserDBRepository()) | ||
} | ||
} | ||
|
||
class StubService: ServiceType { | ||
var authService: AuthenticationServiceType = StubAuthenticationService() | ||
var userService: UserServiceType = StubUserService() | ||
} | ||
|
16 changes: 16 additions & 0 deletions
16
..._iOS/Projects/Features/MyPageFeature/Sources/Refactor_MyFeature/Service/UserService.swift
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,16 @@ | ||
// | ||
// UserService.swift | ||
// MyPageFeatureInterface | ||
// | ||
// Created by 류희재 on 8/13/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol UserServiceType { | ||
} | ||
|
||
class UserService: UserServiceType {} | ||
|
||
class StubUserService: UserServiceType {} |
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