Line data Source code
1 : // Package contact は 連絡先に関するユースケース(アプリケーションロジック)を提供します
2 : // ドメイン層のエンティティやリポジトリを操作し、アプリケーション全体で利用可能なビジネスフローを実装します
3 : package contact
4 :
5 : import "resume/internal/domain/service"
6 :
7 : // Interactor は連絡先に関するユースケースの実装を提供します
8 : type Interactor struct {
9 : tx TxRunner
10 : ucRepo UcRepo
11 : rtRepo RtRepo
12 : userContactService *service.UserContactService
13 : }
14 :
15 : // New は 連絡先 ユースケースの Interactor を生成して返す
16 : // 各リポジトリとトランザクションランナーを依存として受け取る
17 : func New(
18 : tx TxRunner,
19 : ucRepo UcRepo,
20 : rtRepo RtRepo,
21 : userContactService *service.UserContactService,
22 0 : ) Usecase {
23 0 : return &Interactor{
24 0 : tx: tx,
25 0 : ucRepo: ucRepo,
26 0 : rtRepo: rtRepo,
27 0 : userContactService: userContactService,
28 0 : }
29 0 : }
|