repository.go 1.7 KB
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.UserRepository, error) {
	return repository.NewUserRepository(transactionContext)
}