Files
kra-new/cmd/wire_gen.go
T

288 lines
14 KiB
Go
Generated

// Code generated by Wire. DO NOT EDIT.
//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
"github.com/go-kratos/kratos/v3"
business2 "kra/internal/biz/business"
"kra/internal/biz/integration"
payment3 "kra/internal/biz/payment"
system2 "kra/internal/biz/system"
task2 "kra/internal/biz/task"
"kra/internal/config"
"kra/internal/data"
"kra/internal/data/business"
integration3 "kra/internal/data/integration"
payment2 "kra/internal/data/payment"
"kra/internal/data/system"
"kra/internal/data/task"
"kra/internal/initialize"
integration4 "kra/internal/integration"
"kra/internal/integration/cache"
"kra/internal/integration/email"
"kra/internal/integration/gameplatform"
"kra/internal/integration/mq"
"kra/internal/integration/payment"
"kra/internal/integration/sms"
"kra/internal/integration/storage"
"kra/internal/integration/systeminfo"
"kra/internal/integration/websocket"
"kra/internal/logging"
"kra/internal/modules"
"kra/internal/server"
"kra/internal/server/handler"
"kra/internal/server/router"
business3 "kra/internal/service/business"
integration2 "kra/internal/service/integration"
payment4 "kra/internal/service/payment"
system3 "kra/internal/service/system"
task3 "kra/internal/service/task"
"kra/internal/worker"
"log/slog"
)
import (
_ "go.uber.org/automaxprocs"
)
// Injectors from wire.go:
// wireApp init kratos application.
func wireApp(configServer *config.Server, store *config.Store, logger *slog.Logger, reloadableLogger *logging.ReloadableLogger, string2 string) (*kratos.App, func(), error) {
reloadable, err := storage.NewFileStorage(store)
if err != nil {
return nil, nil, err
}
catalog := modules.Catalog()
dataData, cleanup, err := data.NewData(store, logger, reloadable, catalog)
if err != nil {
return nil, nil, err
}
authorityAccessRepo := system.NewAuthorityAccessRepo(dataData)
apiRepo := system.NewAPIRepo(dataData)
accessControlUsecase := system2.NewAccessControlUsecase(authorityAccessRepo, apiRepo)
accessControlService := system3.NewAccessControlService(accessControlUsecase)
userRepo := system.NewUserRepo(dataData)
userUsecase := system2.NewUserUsecase(userRepo)
securityRepo := system.NewSecurityRepo(dataData)
systemCache := cache.New(dataData)
runtimeSettings := system.NewRuntimeSettings(store)
apiTokenRepo := system.NewAPITokenRepo(dataData)
tokenUsecase := system2.NewTokenUsecase(apiTokenRepo)
securityUsecase := system2.NewSecurityUsecase(securityRepo, systemCache, runtimeSettings, tokenUsecase)
tokenIssuer := system.NewTokenIssuer(runtimeSettings)
auditRecordRepo := system.NewAuditRecorderRepo(dataData)
authenticationUsecase := system2.NewAuthenticationUsecase(userUsecase, securityUsecase, tokenIssuer, auditRecordRepo)
authService := system3.NewAuthService(authenticationUsecase)
securityService := system3.NewSecurityService(securityUsecase)
auditRecorderUsecase := system2.NewAuditRecorderUsecase(auditRecordRepo)
auditRecorder := system3.NewAuditRecorder(auditRecorderUsecase)
registry := taskRegistry()
channelPortraitRepo := business.NewChannelPortraitRepo(dataData)
channelRepo := business.NewChannelRepo(dataData)
businessPortraitRepo := business.NewBusinessPortraitRepo(dataData, dataData)
accountRepo := business.NewAccountRepo(dataData)
accountUsecase := business2.NewAccountUsecase(accountRepo)
userPreferenceRepo := business.NewUserPreferenceRepo(dataData)
userPreferenceUsecase := business2.NewUserPreferenceUsecase(userPreferenceRepo)
channelPortraitUsecase := business2.NewChannelPortraitUsecase(channelPortraitRepo, channelRepo, businessPortraitRepo, accountUsecase, userPreferenceUsecase)
channelPortraitService := business3.NewChannelPortraitService(channelPortraitUsecase)
channelPortrait := handler.NewChannelPortrait(channelPortraitService)
businessPortraitUsecase := business2.NewBusinessPortraitUsecase(businessPortraitRepo, accountUsecase, userPreferenceUsecase)
businessPortraitService := business3.NewBusinessPortraitService(businessPortraitUsecase)
businessPortrait := handler.NewBusinessPortrait(businessPortraitService)
channelWriteRepo := business.NewChannelWriteRepo(dataData)
platformPasswordEncoder := gameplatform.NewPasswordEncoder()
channelUsecase := business2.NewChannelUsecase(channelRepo, channelWriteRepo, accountUsecase, userPreferenceUsecase, platformPasswordEncoder)
channelService := business3.NewChannelService(channelUsecase)
channel := handler.NewChannel(channelService)
activationRepo := business.NewActivationRepo(dataData, dataData)
activationUsecase := business2.NewActivationUsecase(activationRepo, accountUsecase)
activationService := business3.NewActivationService(activationUsecase)
activation := handler.NewActivation(activationService)
alertRecordRepo := business.NewAlertRecordRepo(dataData)
alertRecordUsecase := business2.NewAlertRecordUsecase(alertRecordRepo, accountUsecase)
alertRecordService := business3.NewAlertRecordService(alertRecordUsecase)
alertRecord := handler.NewAlertRecord(alertRecordService)
alertRuleRepo := business.NewAlertRuleRepo(dataData)
alertRuleUsecase := business2.NewAlertRuleUsecase(alertRuleRepo, accountUsecase)
alertRuleService := business3.NewAlertRuleService(alertRuleUsecase)
alertRule := handler.NewAlertRule(alertRuleService)
businessPromoteRepo := business.NewBusinessPromoteRepo(dataData)
businessPromoteUsecase := business2.NewBusinessPromoteUsecase(businessPromoteRepo, accountUsecase)
businessPromoteService := business3.NewBusinessPromoteService(businessPromoteUsecase)
businessPromote := handler.NewBusinessPromote(businessPromoteService)
userPreferenceService := business3.NewUserPreferenceService(userPreferenceUsecase)
accountService := business3.NewAccountService(accountUsecase)
bindingRepo := business.NewBindingRepo(dataData)
platformAccountRepo := business.NewPlatformAccountRepo(dataData)
platformPasswordVerifier := gameplatform.NewPasswords()
bindingUsecase := business2.NewBindingUsecase(bindingRepo, accountUsecase, platformAccountRepo, platformPasswordVerifier)
bindingService := business3.NewBindingService(bindingUsecase)
handlerBusiness := handler.NewBusiness(userPreferenceService, accountService, bindingService)
passwordResetRepo := business.NewPasswordResetRepo(dataData)
runtimeconfigStore := data.NewIntegrationRuntime(dataData)
smsSender := sms.NewSender(runtimeconfigStore)
passwordResetSMS := gameplatform.NewPasswordSMS(smsSender)
passwordResetUsecase := business2.NewPasswordResetUsecase(passwordResetRepo, passwordResetSMS)
passwordResetService := business3.NewPasswordResetService(passwordResetUsecase)
businessPassword := handler.NewBusinessPassword(passwordResetService)
smsUsecase := integration.NewSMSUsecase(smsSender)
smsService := integration2.NewSMSService(smsUsecase)
handlerSMS := handler.NewSMS(smsService)
authorityUsecase := system2.NewAuthorityUsecase(authorityAccessRepo)
authorityService := system3.NewAuthorityService(authorityUsecase)
authority := handler.NewAuthority(authorityService)
menuRepo := system.NewMenuRepo(dataData)
menuUsecase := system2.NewMenuUsecase(menuRepo)
menuService := system3.NewMenuService(menuUsecase)
menu := handler.NewMenu(menuService)
apiUsecase := system2.NewAPIUsecase(apiRepo)
apiService := system3.NewAPIService(apiUsecase, runtimeSettings)
api := handler.NewAPI(apiService)
permissionRepo := system.NewPermissionRepo(dataData)
permissionUsecase := system2.NewPermissionUsecase(permissionRepo)
permissionService := system3.NewPermissionService(permissionUsecase)
permission := handler.NewPermission(permissionService)
departmentRepo := system.NewDepartmentRepo(dataData)
departmentUsecase := system2.NewDepartmentUsecase(departmentRepo)
departmentService := system3.NewDepartmentService(departmentUsecase)
positionRepo := system.NewPositionRepo(dataData)
positionUsecase := system2.NewPositionUsecase(positionRepo)
positionService := system3.NewPositionService(positionUsecase)
organization := handler.NewOrganization(departmentService, positionService)
announcementRepo := system.NewAnnouncementRepo(dataData)
announcementUsecase := system2.NewAnnouncementUsecase(announcementRepo)
announcementService := system3.NewAnnouncementService(announcementUsecase)
announcement := handler.NewAnnouncement(announcementService)
emailRepo := email.NewEmailRepo(store)
emailUsecase := system2.NewEmailUsecase(emailRepo)
emailService := system3.NewEmailService(emailUsecase)
handlerEmail := handler.NewEmail(emailService)
paymentConfigReader := integration3.NewPaymentConfigReader(dataData)
factory := payment.NewFactory()
paymentOrderRepo := payment2.NewPaymentOrderRepo(dataData)
paymentRepo := payment2.NewPaymentRepo(dataData, paymentConfigReader, factory, paymentOrderRepo)
paymentHooks := payment3.NewPaymentHooks()
paymentOrderSourceRegistry := payment3.NewPaymentOrderSourceRegistry()
paymentFulfillmentRegistry := payment3.NewPaymentFulfillmentRegistry()
paymentUsecase := payment3.NewPaymentUsecase(paymentRepo, paymentOrderRepo, paymentHooks, paymentOrderSourceRegistry, paymentFulfillmentRegistry, logger)
paymentService := payment4.NewPaymentService(paymentUsecase)
handlerPayment := handler.NewPayment(paymentService)
taskRepo := task.NewTaskRepo(dataData)
taskUsecase := task2.NewTaskUsecaseWithRegistry(taskRepo, registry)
taskExecutor := worker.NewTaskExecutorWithRegistry(taskUsecase, registry)
taskScheduler := worker.NewTaskScheduler(taskUsecase, authorityUsecase, taskExecutor, logger)
taskRuntime := worker.NewTaskRuntime(taskScheduler)
taskApplicationUsecase := task2.NewTaskApplicationUsecase(taskUsecase, taskRuntime)
taskService := task3.NewTaskService(taskApplicationUsecase)
handlerTask := handler.NewTask(taskService)
mediaRepo := system.NewMediaRepo(dataData)
mediaUsecase := system2.NewMediaUsecase(mediaRepo, reloadable, runtimeSettings)
mediaService := system3.NewMediaService(mediaUsecase, runtimeSettings)
media := handler.NewMedia(mediaService)
auditQueryRepo := system.NewAuditRepo(dataData)
auditUsecase := system2.NewAuditUsecase(auditQueryRepo)
auditService := system3.NewAuditService(auditUsecase)
logFileRepo := system.NewLogFileRepo(dataData)
logViewerUsecase := system2.NewLogViewerUsecase(logFileRepo)
logViewerService := system3.NewLogViewerService(logViewerUsecase)
audit := handler.NewAudit(auditService, auditRecorder, logViewerService, logger)
exportRepo := system.NewExportRepo(dataData)
exportUsecase := system2.NewExportUsecase(exportRepo)
exportService := system3.NewExportService(exportUsecase, systemCache)
export := handler.NewExport(exportService)
versionRepo := system.NewVersionRepo(dataData)
versionUsecase := system2.NewVersionUsecase(versionRepo)
versionService := system3.NewVersionService(versionUsecase)
version := handler.NewVersion(versionService)
dictionaryRepo := system.NewDictionaryRepo(dataData)
dictionaryUsecase := system2.NewDictionaryUsecase(dictionaryRepo)
dictionaryService := system3.NewDictionaryService(dictionaryUsecase)
dictionary := handler.NewDictionary(dictionaryService)
parameterRepo := system.NewParameterRepo(dataData)
parameterUsecase := system2.NewParameterUsecase(parameterRepo)
parameterService := system3.NewParameterService(parameterUsecase)
parameter := handler.NewParameter(parameterService)
tokenService := system3.NewTokenService(tokenUsecase, tokenIssuer)
apiToken := handler.NewAPIToken(tokenService)
initializationRepo := initialize.NewRepo(dataData, catalog)
taskReloader := worker.NewTaskReloader(taskScheduler)
provider := systeminfo.NewProvider()
systemConfigUsecase := system2.NewSystemConfigUsecase(initializationRepo, taskReloader, provider)
systemConfigService := system3.NewSystemConfigService(systemConfigUsecase, runtimeSettings)
systemConfig := handler.NewSystemConfig(systemConfigService, securityService)
public := handler.NewPublic(authService, systemConfigService, securityService)
userService := system3.NewUserService(userUsecase, securityService)
user := handler.NewUser(userService, authService)
navigation := handler.NewNavigation(userService)
session := handler.NewSession(tokenService)
integrationConfigRepo := integration3.NewIntegrationConfigRepo(dataData)
connectivityTester := integration4.NewConnectivityTester(runtimeconfigStore)
integrationConfigUsecase := integration.NewIntegrationConfigUsecase(integrationConfigRepo, connectivityTester)
integrationConfigService := integration2.NewIntegrationConfigService(integrationConfigUsecase)
integrationConfig := handler.NewIntegrationConfig(integrationConfigService)
set := &handler.Set{
ChannelPortrait: channelPortrait,
BusinessPortrait: businessPortrait,
Channel: channel,
Activation: activation,
AlertRecord: alertRecord,
AlertRule: alertRule,
BusinessPromote: businessPromote,
Business: handlerBusiness,
BusinessPassword: businessPassword,
SMS: handlerSMS,
Authority: authority,
Menu: menu,
API: api,
Permission: permission,
Organization: organization,
Announcement: announcement,
Email: handlerEmail,
Payment: handlerPayment,
Task: handlerTask,
Media: media,
Audit: audit,
Export: export,
Version: version,
Dictionary: dictionary,
Parameter: parameter,
APIToken: apiToken,
SystemConfig: systemConfig,
Public: public,
User: user,
Navigation: navigation,
Session: session,
IntegrationConfig: integrationConfig,
}
routes := router.NewRoutes(set)
maintenanceRepo := system.NewMaintenanceRepo(dataData)
maintenanceUsecase := system2.NewMaintenanceUsecase(maintenanceRepo)
taskMethods := worker.NewTaskMethods(taskUsecase, maintenanceUsecase, mediaUsecase, store)
routeRegistrar := buildRuntime(registry, routes, taskMethods)
websocketServer, cleanup2, err := websocket.New(runtimeconfigStore)
if err != nil {
cleanup()
return nil, nil, err
}
engine := server.NewGinEngineWithRuntime(store, accessControlService, authService, securityService, auditRecorder, logger, string2, routeRegistrar, websocketServer)
httpServer := server.NewGinServer(configServer, engine)
mqReloadable, cleanup3, err := mq.New(runtimeconfigStore, logger)
if err != nil {
cleanup2()
cleanup()
return nil, nil, err
}
app := newApp(logger, httpServer, taskScheduler, auditRecorder, reloadableLogger, mqReloadable)
return app, func() {
cleanup3()
cleanup2()
cleanup()
}, nil
}