repository.go
1.7 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
package factory
import (
"gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/infrastructure/pg/transaction"
"gitlab.fjmaimaimai.com/mmm-go/godevp/pkg/infrastructure/repository"
)
func CreateAccessRepository(transactionContext *transaction.TransactionContext) (domain.AccessRepository, error) {
return repository.NewAccessRepository(transactionContext)
}
func CreateRoleAccessRepository(transactionContext *transaction.TransactionContext) (domain.RoleAccessRepository, error) {
return repository.NewRoleAccessRepository(transactionContext)
}
func CreateMenuRepository(transactionContext *transaction.TransactionContext) (domain.MenuRepository, error) {
return repository.NewMenuRepository(transactionContext)
}
func CreateProjectModuleRepository(transactionContext *transaction.TransactionContext) (domain.ProjectModuleRepository, error) {
return repository.NewProjectModuleRepository(transactionContext)
}
func CreateProjectModuleVersionRepository(transactionContext *transaction.TransactionContext) (domain.ProjectModuleVersionRepository, error) {
return repository.NewProjectModuleVersionRepository(transactionContext)
}
func CreateProjectModuleFilesRepository(transactionContext *transaction.TransactionContext) (domain.ProjectModuleFilesRepository, error) {
return repository.NewProjectModuleFilesRepository(transactionContext)
}
func CreateRoleRepository(transactionContext *transaction.TransactionContext) (domain.RoleRepository, error) {
return repository.NewRoleRepository(transactionContext)
}
func CreateUserRepository(transactionContext *transaction.TransactionContext) (domain.UsersRepository, error) {
return repository.NewUserRepository(transactionContext)
}