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

func CreateClientVersionRepository(transactionContext *transaction.TransactionContext) (domain.ClientVersionRepository, error) {
	return repository.NewClientVersionRepository(transactionContext)
}

func CreateOperatorLogRepository(transactionContext *transaction.TransactionContext) (domain.OperatorLogRepository, error) {
	return repository.NewOperatorLogRepository(transactionContext)
}