Line data Source code
1 : package profile
2 :
3 : // Interactor は、Profile に関するユースケース処理の実装を提供します。
4 : // リポジトリ層およびトランザクション実行を通じて、ドメインロジックを仲介します。
5 : type Interactor struct {
6 : uRepo URepo
7 : uIRepo UIRepo
8 : upRepo UPRepo
9 : uaRepo UARepo
10 : tx TxRunner
11 : }
12 :
13 : // New は、Profile 用ユースケースの Interactor を生成して返します。
14 : // 各リポジトリとトランザクションランナーを依存として受け取ります。
15 : func New(
16 : uRepo URepo,
17 : uIRepo UIRepo,
18 : upRepo UPRepo,
19 : uaRepo UARepo,
20 : tx TxRunner,
21 0 : ) Usecase {
22 0 : return &Interactor{
23 0 : uRepo: uRepo,
24 0 : uIRepo: uIRepo,
25 0 : upRepo: upRepo,
26 0 : uaRepo: uaRepo,
27 0 : tx: tx,
28 0 : }
29 0 : }
|