domain_service.go
5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package factory
import (
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/domain/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/infrastructure/domainService"
)
func CreateSignUpCompanyService(options map[string]interface{}) (service.PgSignUpCompanyService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgSignUpCompanyServiceService(transactionContext)
}
func CreatePgAuthResetPhoneService(options map[string]interface{}) (service.PgAuthResetPhoneService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgAuthResetPhoneService(transactionContext)
}
func CreatePgAuthAccountDestroyService(options map[string]interface{}) (service.PgAuthAccountDestroyService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgAuthAccountDestroyService(transactionContext)
}
func CreatePgCreateUserService(options map[string]interface{}) (service.PgCreateUserService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgCreateUserService(transactionContext)
}
func CreatePgDataAuthService(options map[string]interface{}) (domain.DataAuthor, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgDataAuthService(transactionContext)
}
func CreatePgUpdateUserService(options map[string]interface{}) (service.PgUpdateUserService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgUpdateUserService(transactionContext)
}
func CreatePgUpdateUserBaseService(options map[string]interface{}) (service.PgUpdateUserBaseService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgUpdateUserBaseService(transactionContext)
}
func CreatePgCreateRoleService(options map[string]interface{}) (service.PgCreateRoleService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgCreateRoleService(transactionContext)
}
func CreatePgCreateOrgService(options map[string]interface{}) (service.PgCreateOrgService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgCreateOrgService(transactionContext)
}
func CreatePgRoleAccessMenusService(options map[string]interface{}) (service.PgRoleAccessMenusService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgRoleAccessMenusService(transactionContext)
}
func CreatePgImService(options map[string]interface{}) (service.PgImService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgImService(transactionContext)
}
func CreateBatchAddUserService(options map[string]interface{}) (service.PgBatchAddUserService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgBatchAddUserService(transactionContext)
}
func CreatePgBatchRemoveRoleService(options map[string]interface{}) (service.PgBatchRemoveRoleService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgBatchRemoveRoleService(transactionContext)
}
func CreatePgBatchAddOrgService(options map[string]interface{}) (service.PgBatchAddOrgService, error) {
var transactionContext *pgTransaction.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pgTransaction.TransactionContext)
}
return domainService.NewPgBatchAddOrgService(transactionContext)
}