Line data Source code
1 : // Package meta は、国・住所用途・性別などのメタ情報を扱うユースケースを提供します。
2 : package meta
3 :
4 : import "resume/internal/usecase/i18n"
5 :
6 : // Interactor は、メタ情報(国・住所用途・性別など)に関するユースケースの実装です。
7 : type Interactor struct {
8 : tx TxRunner
9 : translator i18n.Translator
10 : apRepo ApRepo
11 : gnRepo GnRepo
12 : cnRepo CnRepo
13 : esRepo EsRepo
14 : dtRepo DtRepo
15 : scRepo ScRepo
16 : ocRepo OcRepo
17 : slRepo SlRepo
18 : exRepo ExRepo
19 : rtRepo RtRepo
20 : }
21 :
22 : // New は、トランザクションランナーと各種リポジトリ、翻訳器を受け取り、
23 : // メタ情報ユースケースの実装である Interactor を生成します。
24 : func New(
25 : tx TxRunner,
26 : translator i18n.Translator,
27 : apRepo ApRepo,
28 : gnRepo GnRepo,
29 : cnRepo CnRepo,
30 : esRepo EsRepo,
31 : dtRepo DtRepo,
32 : scRepo ScRepo,
33 : ocRepo OcRepo,
34 : slRepo SlRepo,
35 : exRepo ExRepo,
36 : rtRepo RtRepo,
37 0 : ) Usecase {
38 0 : return &Interactor{
39 0 : tx: tx,
40 0 : translator: translator,
41 0 : apRepo: apRepo,
42 0 : gnRepo: gnRepo,
43 0 : cnRepo: cnRepo,
44 0 : esRepo: esRepo,
45 0 : dtRepo: dtRepo,
46 0 : scRepo: scRepo,
47 0 : ocRepo: ocRepo,
48 0 : slRepo: slRepo,
49 0 : exRepo: exRepo,
50 0 : rtRepo: rtRepo,
51 0 : }
52 0 : }
|