From d2061d6db8ee6dbe2e1dcc6a9b9797e2734d31ed Mon Sep 17 00:00:00 2001 From: owenlxu Date: Tue, 5 Nov 2024 14:54:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B7=AF=E5=BE=84=E7=BB=93=E6=9E=84=20#2733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archive/boot-archive/build.gradle.kts | 3 -- src/backend/auth/biz-auth/build.gradle.kts | 2 +- src/backend/boot-assembly/build.gradle.kts | 30 ++++++------- .../artifact-service/build.gradle.kts | 4 +- .../metadata-service/build.gradle.kts | 4 +- .../api-analysis-executor/build.gradle.kts | 2 +- .../analysis/executor/api/ExecutorClient.kt | 0 .../biz-analysis-executor/build.gradle.kts | 4 +- .../analysis/executor/CommonScanExecutor.kt | 0 .../analysis/executor/ExecutorScheduler.kt | 0 .../bkrepo/analysis/executor/ScanExecutor.kt | 0 .../analysis/executor/ScanExecutorFactory.kt | 0 .../executor/SubtaskHeartbeatRunnable.kt | 0 .../arrowhead/AbsArrowheadScanExecutor.kt | 0 .../arrowhead/ArrowheadScanExecutor.kt | 0 .../analysis/executor/component/FileLoader.kt | 0 .../AnalysisExecutorArtifactConfigurer.kt | 0 .../configuration/DockerProperties.kt | 0 .../ScannerExecutorConfiguration.kt | 0 .../ScannerExecutorProperties.kt | 0 .../executor/controller/ExecutorController.kt | 0 .../dependencycheck/DependencyScanExecutor.kt | 0 .../bkrepo/analysis/executor/job/CleanJob.kt | 0 .../executor/pojo/CommonScanExecutorResult.kt | 0 .../analysis/executor/pojo/ManifestV1.kt | 0 .../analysis/executor/pojo/ManifestV2.kt | 0 .../executor/pojo/ScanExecutorResult.kt | 0 .../executor/pojo/ScanExecutorTask.kt | 0 .../scancodeCheck/ScancodeToolkitExecutor.kt | 0 .../executor/standard/StandardScanExecutor.kt | 0 .../executor/trivy/TrivyScanExecutor.kt | 0 .../analysis/executor/util/CommandUtil.kt | 0 .../analysis/executor/util/CommonUtils.kt | 0 .../analysis/executor/util/Converter.kt | 0 .../executor/util/DockerScanHelper.kt | 0 .../analysis/executor/util/FileUtils.kt | 0 .../src/main/resources/standalone.toml | 0 .../src/main/resources/toolScan.sh | 0 .../analysis/executor/util/CommandUtilTest.kt | 0 .../analysis/executor/util/FileUtilsTest.kt | 0 .../boot-analysis-executor/build.gradle.kts | 2 +- .../executor/AnalysisExecutorApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../analysis-executor/build.gradle.kts | 0 .../analyst/api-analyst/build.gradle.kts | 0 .../tencent/bkrepo/analyst/api/ScanClient.kt | 0 .../extension/ScanResultNotifyContext.kt | 0 .../extension/ScanResultNotifyExtension.kt | 0 .../analyst/message/ScannerMessageCode.kt | 0 .../bkrepo/analyst/pojo/ArtifactScanReport.kt | 0 .../bkrepo/analyst/pojo/ArtifactScanStatus.kt | 0 .../analyst/pojo/AutoScanConfiguration.kt | 0 .../tencent/bkrepo/analyst/pojo/Constant.kt | 0 .../tencent/bkrepo/analyst/pojo/LeakType.kt | 0 .../com/tencent/bkrepo/analyst/pojo/Node.kt | 0 .../analyst/pojo/ProjectScanConfiguration.kt | 0 .../tencent/bkrepo/analyst/pojo/ScanPlan.kt | 0 .../tencent/bkrepo/analyst/pojo/ScanStatus.kt | 0 .../tencent/bkrepo/analyst/pojo/ScanTask.kt | 0 .../bkrepo/analyst/pojo/ScanTaskStatus.kt | 0 .../bkrepo/analyst/pojo/ScanTriggerType.kt | 0 .../bkrepo/analyst/pojo/SubScanTask.kt | 0 .../bkrepo/analyst/pojo/TaskMetadata.kt | 0 .../pojo/execution/DockerExecutionCluster.kt | 0 .../pojo/execution/ExecutionCluster.kt | 0 .../KubernetesDeploymentExecutionCluster.kt | 0 .../KubernetesExecutionClusterProperties.kt | 0 .../KubernetesJobExecutionCluster.kt | 0 .../analyst/pojo/license/SpdxLicenseInfo.kt | 0 .../pojo/license/SpdxLicenseJsonInfo.kt | 0 .../analyst/pojo/license/SpdxLicenseObject.kt | 0 .../bkrepo/analyst/pojo/report/Component.kt | 0 .../bkrepo/analyst/pojo/report/Report.kt | 0 .../analyst/pojo/report/Vulnerability.kt | 0 .../request/ArrowheadLoadResultArguments.kt | 0 .../request/ArrowheadSaveResultArguments.kt | 0 .../request/ArtifactPlanRelationRequest.kt | 0 .../request/ArtifactVulnerabilityRequest.kt | 0 .../pojo/request/CreateScanPlanRequest.kt | 0 .../request/FileScanResultDetailRequest.kt | 0 .../request/FileScanResultOverviewRequest.kt | 0 .../analyst/pojo/request/GlobalScanRequest.kt | 0 .../LicenseScanQualityUpdateRequest.kt | 0 .../pojo/request/LoadResultArguments.kt | 0 .../pojo/request/PipelineScanRequest.kt | 0 .../analyst/pojo/request/PlanCountRequest.kt | 0 .../ProjectScanConfigurationPageRequest.kt | 0 .../pojo/request/ReportResultRequest.kt | 0 .../pojo/request/SaveResultArguments.kt | 0 .../pojo/request/ScanQualityUpdateRequest.kt | 0 .../analyst/pojo/request/ScanRequest.kt | 0 .../analyst/pojo/request/ScanTaskQuery.kt | 0 .../pojo/request/SubtaskInfoRequest.kt | 0 .../pojo/request/UpdateScanPlanRequest.kt | 0 .../DependencyLoadResultArguments.kt | 0 .../DependencySaveResultArguments.kt | 0 .../request/filter/ListFilterRuleRequest.kt | 0 .../request/filter/MatchFilterRuleRequest.kt | 0 .../request/filter/UpdateFilterRuleRequest.kt | 0 .../ArtifactLicensesDetailRequest.kt | 0 .../ScancodeToolkitResultArguments.kt | 0 .../standard/StandardLoadResultArguments.kt | 0 .../request/trivy/TrivyLoadResultArguments.kt | 0 .../request/trivy/TrivySaveResultArguments.kt | 0 .../pojo/response/ArtifactPlanRelation.kt | 0 .../pojo/response/ArtifactPlanRelations.kt | 0 .../response/ArtifactVulnerabilityInfo.kt | 0 .../pojo/response/FileLicensesResultDetail.kt | 0 .../response/FileLicensesResultOverview.kt | 0 .../pojo/response/FileScanResultDetail.kt | 0 .../pojo/response/FileScanResultOverview.kt | 0 .../response/LicenseScanQualityResponse.kt | 0 .../pojo/response/ScanLicensePlanInfo.kt | 0 .../analyst/pojo/response/ScanPlanInfo.kt | 0 .../analyst/pojo/response/ScanQuality.kt | 0 .../analyst/pojo/response/ScannerBase.kt | 0 .../analyst/pojo/response/SubtaskInfo.kt | 0 .../pojo/response/SubtaskResultOverview.kt | 0 .../pojo/response/filter/FilterRule.kt | 0 .../pojo/response/filter/MergedFilterRule.kt | 0 .../response/filter/MergedFilterRuleData.kt | 0 .../tencent/bkrepo/analyst/pojo/rule/Rule.kt | 0 .../bkrepo/analyst/pojo/rule/RuleArtifact.kt | 0 .../bkrepo/analyst/pojo/rule/RuleType.kt | 0 .../analyst/utils/CompositeVersionRange.kt | 0 .../analyst/utils/DefaultVersionRange.kt | 0 .../bkrepo/analyst/utils/VersionNumber.kt | 0 .../bkrepo/analyst/utils/VersionRange.kt | 0 .../response/filter/MergedFilterRuleTest.kt | 0 .../bkrepo/analyst/utils/VersionNumberTest.kt | 0 .../bkrepo/analyst/utils/VersionRangeTest.kt | 0 .../analyst/biz-analyst/build.gradle.kts | 6 +-- .../analyst/component/AnalystLoadBalancer.kt | 0 .../component/CacheableRepositoryClient.kt | 0 .../analyst/component/ReportExporter.kt | 0 .../ScannerPermissionCheckHandler.kt | 0 .../AbstractScanExecutorResultManager.kt | 0 .../bkrepo/analyst/component/manager/Extra.kt | 0 .../analyst/component/manager/ResultItem.kt | 0 .../component/manager/ResultItemDao.kt | 0 .../manager/ScanExecutorResultManager.kt | 0 .../component/manager/ScannerConverter.kt | 0 .../manager/arrowhead/ArrowheadConverter.kt | 0 .../arrowhead/ArrowheadResultManager.kt | 0 .../component/manager/arrowhead/Converter.kt | 0 .../arrowhead/dao/ApplicationItemDao.kt | 0 .../manager/arrowhead/dao/CheckSecItemDao.kt | 0 .../manager/arrowhead/dao/CveSecItemDao.kt | 0 .../manager/arrowhead/dao/SensitiveItemDao.kt | 0 .../arrowhead/model/TApplicationItem.kt | 0 .../manager/arrowhead/model/TCheckSecItem.kt | 0 .../manager/arrowhead/model/TCveSecItem.kt | 0 .../manager/arrowhead/model/TSensitiveItem.kt | 0 .../manager/dependencycheck/Converter.kt | 0 .../DependencyCheckConverter.kt | 0 .../DependencyResultManager.kt | 0 .../dependencycheck/dao/DependencyItemDao.kt | 0 .../dependencycheck/model/TDependencyItem.kt | 0 .../component/manager/knowledgebase/CveDao.kt | 0 .../manager/knowledgebase/KnowledgeBase.kt | 0 .../manager/knowledgebase/LicenseDao.kt | 0 .../knowledgebase/MongoKnowledgeBase.kt | 0 .../component/manager/knowledgebase/TCve.kt | 0 .../manager/knowledgebase/TLicense.kt | 0 .../manager/scancode/ScanCodeConverter.kt | 0 .../manager/scancode/ScancodeResultManager.kt | 0 .../manager/scancode/dao/ScancodeItemDao.kt | 0 .../manager/scancode/model/TScancodeItem.kt | 0 .../manager/standard/StandardConverter.kt | 0 .../manager/standard/StandardResultManager.kt | 0 .../manager/standard/dao/LicenseResultDao.kt | 0 .../manager/standard/dao/SecurityResultDao.kt | 0 .../standard/dao/SensitiveResultDao.kt | 0 .../manager/standard/model/TLicenseResult.kt | 0 .../manager/standard/model/TSecurityResult.kt | 0 .../standard/model/TSensitiveResult.kt | 0 .../component/manager/trivy/Converter.kt | 0 .../component/manager/trivy/TrivyConverter.kt | 0 .../manager/trivy/TrivyResultManager.kt | 0 .../manager/trivy/dao/VulnerabilityItemDao.kt | 0 .../manager/trivy/model/TVulnerabilityItem.kt | 0 .../AnalysisLoadBalancerConfiguration.kt | 0 .../AnalystArtifactConfigurer.kt | 0 .../configuration/ReportExportProperties.kt | 0 .../configuration/ScannerConfiguration.kt | 0 .../configuration/ScannerProperties.kt | 0 .../ThreadPoolTaskExecutorConfiguration.kt | 0 .../analyst/controller/ScanController.kt | 0 .../user/SystemFilterRuleController.kt | 0 .../user/UserExecutionClusterController.kt | 0 .../user/UserFilterRuleController.kt | 0 .../controller/user/UserLicenseController.kt | 0 .../UserProjectScanConfigurationController.kt | 0 .../controller/user/UserScanController.kt | 0 .../controller/user/UserScanPlanController.kt | 0 .../user/UserScanQualityController.kt | 0 .../user/UserScanReportController.kt | 0 .../controller/user/UserScannerController.kt | 0 .../user/UserTemporaryScanController.kt | 0 .../bkrepo/analyst/dao/AbsSubScanTaskDao.kt | 0 .../analyst/dao/ArchiveSubScanTaskDao.kt | 0 .../bkrepo/analyst/dao/ExecutionClusterDao.kt | 0 .../bkrepo/analyst/dao/FileScanResultDao.kt | 0 .../bkrepo/analyst/dao/FilterRuleDao.kt | 0 .../dao/PlanArtifactLatestSubScanTaskDao.kt | 0 .../dao/ProjectScanConfigurationDao.kt | 0 .../tencent/bkrepo/analyst/dao/ScanPlanDao.kt | 0 .../tencent/bkrepo/analyst/dao/ScanTaskDao.kt | 0 .../tencent/bkrepo/analyst/dao/ScannerDao.kt | 0 .../analyst/dao/ScannerSimpleMongoDao.kt | 0 .../bkrepo/analyst/dao/SpdxLicenseDao.kt | 0 .../bkrepo/analyst/dao/SubScanTaskDao.kt | 0 .../dispatcher/AbsSubtaskDispatcher.kt | 0 .../bkrepo/analyst/dispatcher/CommonUtils.kt | 0 .../analyst/dispatcher/DockerDispatcher.kt | 0 .../KubernetesDeploymentDispatcher.kt | 0 .../dispatcher/KubernetesDispatcher.kt | 0 .../dispatcher/ResourceRequirements.kt | 0 .../analyst/dispatcher/SubtaskDispatcher.kt | 0 .../dispatcher/SubtaskDispatcherFactory.kt | 0 .../analyst/dispatcher/SubtaskPoller.kt | 0 .../dispatcher/SubtaskPullDispatcher.kt | 0 .../dispatcher/SubtaskPushDispatcher.kt | 0 .../analyst/dispatcher/dsl/DeploymentDsl.kt | 0 .../bkrepo/analyst/dispatcher/dsl/JobDsl.kt | 0 .../bkrepo/analyst/dispatcher/dsl/PodDsl.kt | 0 .../analyst/dispatcher/dsl/SecretDsl.kt | 0 .../analyst/distribution/DistributedCount.kt | 0 .../distribution/DistributedCountDao.kt | 0 .../distribution/DistributedCountFactory.kt | 0 .../distribution/MongoDistributedCount.kt | 0 .../distribution/RedisDistributedCount.kt | 0 .../analyst/distribution/TDistributedCount.kt | 0 .../analyst/event/AnalystScanEventConsumer.kt | 0 .../event/ScanTaskStatusChangedEvent.kt | 0 .../event/SubtaskStatusChangedEvent.kt | 0 .../ScanTaskStatusChangedEventListener.kt | 0 .../SubtaskStatusChangedEventListener.kt | 0 .../exception/ArtifactDeletedException.kt | 0 .../exception/LicenseNotFoundException.kt | 0 .../exception/ScanTaskNotFoundException.kt | 0 .../exception/ScannerNotFoundException.kt | 0 .../TaskSubmitInterruptedException.kt | 0 .../bkrepo/analyst/job/CorrectMetricsJob.kt | 0 .../bkrepo/analyst/metrics/FileSizeLevel.kt | 0 .../bkrepo/analyst/metrics/ScannerMetrics.kt | 0 .../bkrepo/analyst/model/LeakDetailExport.kt | 0 .../bkrepo/analyst/model/ScanPlanExport.kt | 0 .../analyst/model/SubScanTaskDefinition.kt | 0 .../analyst/model/TArchiveSubScanTask.kt | 0 .../bkrepo/analyst/model/TExecutionCluster.kt | 0 .../bkrepo/analyst/model/TFileScanResult.kt | 0 .../bkrepo/analyst/model/TFilterRule.kt | 0 .../model/TPlanArtifactLatestSubScanTask.kt | 0 .../model/TProjectScanConfiguration.kt | 0 .../tencent/bkrepo/analyst/model/TScanPlan.kt | 0 .../tencent/bkrepo/analyst/model/TScanTask.kt | 0 .../tencent/bkrepo/analyst/model/TScanner.kt | 0 .../bkrepo/analyst/model/TSpdxLicense.kt | 0 .../bkrepo/analyst/model/TSubScanTask.kt | 0 .../service/ExecutionClusterService.kt | 0 .../analyst/service/FilterRuleService.kt | 0 .../service/LicenseScanQualityService.kt | 0 .../ProjectScanConfigurationService.kt | 0 .../analyst/service/ScanPlanCorrectService.kt | 0 .../bkrepo/analyst/service/ScanPlanService.kt | 0 .../analyst/service/ScanQualityService.kt | 0 .../bkrepo/analyst/service/ScanService.kt | 0 .../bkrepo/analyst/service/ScanTaskService.kt | 0 .../bkrepo/analyst/service/ScannerService.kt | 0 .../analyst/service/SpdxLicenseService.kt | 0 .../service/TemporaryScanTokenService.kt | 0 .../impl/ExecutionClusterServiceImpl.kt | 0 .../service/impl/FilterRuleServiceImpl.kt | 0 .../impl/LicenseScanQualityServiceImpl.kt | 0 .../ProjectScanConfigurationServiceImpl.kt | 0 .../impl/ProjectUsageStatisticsServiceImpl.kt | 0 .../impl/ScanPlanCorrectServiceImpl.kt | 0 .../service/impl/ScanPlanServiceImpl.kt | 0 .../service/impl/ScanQualityServiceImpl.kt | 0 .../analyst/service/impl/ScanServiceImpl.kt | 0 .../service/impl/ScanTaskServiceImpl.kt | 0 .../service/impl/ScannerServiceImpl.kt | 0 .../service/impl/SpdxLicenseServiceImpl.kt | 0 .../impl/TemporaryScanTokenServiceImpl.kt | 0 .../bkrepo/analyst/statemachine/Action.kt | 0 .../ScanTaskSchedulerConfiguration.kt | 0 .../analyst/statemachine/StateAction.kt | 0 .../TaskStateMachineConfiguration.kt | 0 .../statemachine/TimeoutTaskScheduler.kt | 0 .../statemachine/iterator/IteratorManager.kt | 0 .../statemachine/iterator/NodeFilter.kt | 0 .../statemachine/iterator/NodeIterator.kt | 0 .../statemachine/iterator/PackageIterator.kt | 0 .../statemachine/iterator/PageableIterator.kt | 0 .../iterator/ProjectIdIterator.kt | 0 .../statemachine/subtask/SubtaskEvent.kt | 0 .../subtask/action/CreateSubtaskAction.kt | 0 .../subtask/action/ExecuteSubtaskAction.kt | 0 .../subtask/action/FinishSubtaskAction.kt | 0 .../subtask/action/NotifySubtaskAction.kt | 0 .../subtask/action/PullSubtaskAction.kt | 0 .../subtask/action/RetryAction.kt | 0 .../subtask/action/ReuseResultAction.kt | 0 .../subtask/action/SubtaskAction.kt | 0 .../subtask/context/CreateSubtaskContext.kt | 0 .../subtask/context/ExecuteSubtaskContext.kt | 0 .../subtask/context/FinishSubtaskContext.kt | 0 .../subtask/context/NotifySubtaskContext.kt | 0 .../subtask/context/PullSubtaskContext.kt | 0 .../subtask/context/RetryContext.kt | 0 .../subtask/context/SubtaskContext.kt | 0 .../statemachine/task/ScanTaskEvent.kt | 0 .../task/action/FinishedAction.kt | 0 .../statemachine/task/action/PendingAction.kt | 0 .../statemachine/task/action/ResetAction.kt | 0 .../statemachine/task/action/StopAction.kt | 0 .../task/action/StoppingAction.kt | 0 .../task/action/SubmittedAction.kt | 0 .../task/action/SubmittingAction.kt | 0 .../statemachine/task/action/TaskAction.kt | 0 .../task/context/CreateTaskContext.kt | 0 .../task/context/FinishTaskContext.kt | 0 .../task/context/ResetTaskContext.kt | 0 .../task/context/StopTaskContext.kt | 0 .../task/context/SubmitTaskContext.kt | 0 .../statemachine/task/context/TaskContext.kt | 0 .../tencent/bkrepo/analyst/utils/Converter.kt | 0 .../bkrepo/analyst/utils/EasyExcelUtils.kt | 0 .../tencent/bkrepo/analyst/utils/K8SHelper.kt | 0 .../tencent/bkrepo/analyst/utils/Request.kt | 0 .../bkrepo/analyst/utils/RuleConverter.kt | 0 .../tencent/bkrepo/analyst/utils/RuleUtil.kt | 0 .../analyst/utils/ScanLicenseConverter.kt | 0 .../bkrepo/analyst/utils/ScanParamUtil.kt | 0 .../bkrepo/analyst/utils/ScanPlanConverter.kt | 0 .../bkrepo/analyst/utils/ScannerUtil.kt | 0 .../bkrepo/analyst/utils/SubtaskConverter.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../com/tencent/bkrepo/analyst/Constants.kt | 0 .../bkrepo/analyst/utils/RequestTest.kt | 0 .../bkrepo/analyst/utils/RuleUtilTest.kt | 0 .../bkrepo/analyst/utils/ScanParamUtilTest.kt | 0 .../analyst/boot-analyst/build.gradle.kts | 2 +- .../bkrepo/analyst/AnalystApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../{ => core}/analyst/build.gradle.kts | 0 src/backend/{ => core}/archive/README.md | 0 .../archive/api-archive/build.gradle.kts | 0 .../bkrepo/archive/ArchiveFileNotFound.kt | 0 .../tencent/bkrepo/archive/ArchiveStatus.kt | 0 .../tencent/bkrepo/archive/CompressStatus.kt | 0 .../bkrepo/archive/api/ArchiveClient.kt | 0 .../archive/constant/ArchiveConstants.kt | 0 .../archive/constant/ArchiveMessageCode.kt | 0 .../archive/constant/ArchiveRestoreTier.kt | 0 .../archive/constant/ArchiveStorageClass.kt | 0 .../bkrepo/archive/pojo/ArchiveFile.kt | 0 .../bkrepo/archive/pojo/CompressFile.kt | 0 .../archive/request/ArchiveFileRequest.kt | 0 .../request/CompleteCompressRequest.kt | 0 .../archive/request/CompressFileRequest.kt | 0 .../request/CreateArchiveFileRequest.kt | 0 .../archive/request/DeleteCompressRequest.kt | 0 .../archive/request/UncompressFileRequest.kt | 0 .../UpdateCompressFileStatusRequest.kt | 0 .../archive/biz-archive/build.gradle.kts | 2 +- .../archive/config/ArchiveConfiguration.kt | 0 .../config/ArchiveCredentialsProperties.kt | 0 .../archive/config/ArchiveProperties.kt | 0 .../archive/config/CompressProperties.kt | 0 .../archive/config/DownloadProperties.kt | 0 .../bkrepo/archive/config/GcProperties.kt | 0 .../controller/service/ArchiveController.kt | 0 .../controller/user/SystemAdminController.kt | 0 .../archive/core/ActiveTaskSubscriber.kt | 0 .../bkrepo/archive/core/DiskHealthObserver.kt | 0 .../bkrepo/archive/core/FileCoreProcessor.kt | 0 .../bkrepo/archive/core/FileEntityEvent.kt | 0 .../bkrepo/archive/core/PriorityWrapper.kt | 0 .../bkrepo/archive/core/ReactorExtensions.kt | 0 .../tencent/bkrepo/archive/core/TaskResult.kt | 0 .../archive/core/archive/ArchiveManager.kt | 0 .../bkrepo/archive/core/archive/Archiver.kt | 0 .../archive/core/archive/EmptyArchiver.kt | 0 .../bkrepo/archive/core/archive/XZArchiver.kt | 0 .../archive/core/compress/BDCompressor.kt | 0 .../archive/core/compress/BDUncompressor.kt | 0 .../archive/core/compress/BDZipManager.kt | 0 .../core/compress/ChecksumFileProvider.kt | 1 - .../core/provider/CacheFileProviderProxy.kt | 0 .../core/provider/ConcurrentFileProvider.kt | 0 .../archive/core/provider/FileProvider.kt | 0 .../core/provider/FileProviderFactory.kt | 0 .../core/provider/FileProviderProxy.kt | 0 .../core/provider/FileStorageFileProvider.kt | 0 .../bkrepo/archive/core/provider/FileTask.kt | 0 .../core/provider/PriorityFileProvider.kt | 0 .../bkrepo/archive/event/FileArchivedEvent.kt | 0 .../archive/event/FileCompressedEvent.kt | 0 .../bkrepo/archive/event/FileRestoredEvent.kt | 0 .../event/StorageFileCompressedEvent.kt | 0 .../event/StorageFileUncompressedEvent.kt | 0 .../archive/listener/ArchiveListener.kt | 0 .../listener/StorageCompressListener.kt | 0 .../bkrepo/archive/metrics/ArchiveMetrics.kt | 0 .../bkrepo/archive/model/AbstractEntity.kt | 0 .../tencent/bkrepo/archive/model/IdEntity.kt | 0 .../bkrepo/archive/model/TArchiveFile.kt | 0 .../bkrepo/archive/model/TCompressFile.kt | 0 .../archive/repository/ArchiveFileDao.kt | 0 .../repository/ArchiveFileRepository.kt | 0 .../archive/repository/CompressFileDao.kt | 0 .../repository/CompressFileRepository.kt | 0 .../bkrepo/archive/service/ArchiveService.kt | 0 .../archive/service/ArchiveServiceImpl.kt | 0 .../bkrepo/archive/service/CompressService.kt | 0 .../archive/service/CompressServiceImpl.kt | 0 .../archive/service/SystemAdminService.kt | 0 .../archive/service/SystemAdminServiceImpl.kt | 0 .../bkrepo/archive/utils/ArchiveDaoUtils.kt | 0 .../bkrepo/archive/utils/ArchiveUtils.kt | 0 .../com/tencent/bkrepo/archive/BaseTest.kt | 0 .../archive/core/FileCoreProcessorTest.kt | 0 .../core/FileStorageFileProviderTest.kt | 0 .../archive/core/compress/BDZipManagerTest.kt | 0 .../provider/CacheFileProviderProxyTest.kt | 0 .../provider/ConcurrentFileProviderTest.kt | 0 .../archive/service/CompressServiceTest.kt | 0 .../src/test/resources/compress.properties | 0 .../resources/file-core-processor.properties | 0 .../archive/boot-archive/build.gradle.kts | 3 ++ .../bkrepo/archive/ArchiveApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../{ => core}/archive/build.gradle.kts | 0 .../composer/api-composer/build.gradle.kts | 0 .../bkrepo/composer/api/ComposerResource.kt | 0 .../composer/api/ComposerWebResource.kt | 0 .../composer/artifact/ComposerArtifactInfo.kt | 0 .../pojo/ComposerExceptionResponse.kt | 0 .../composer/biz-composer/build.gradle.kts | 2 +- .../com/tencent/bkrepo/composer/Constant.kt | 0 .../artifact/ComposerArtifactConfigurer.kt | 0 .../artifact/ComposerArtifactInfoResolver.kt | 0 .../repository/ComposerLocalRepository.kt | 0 .../repository/ComposerRemoteRepository.kt | 0 .../repository/ComposerVirtualRepository.kt | 0 .../controller/ComposerResourceController.kt | 0 .../ComposerWebResourceController.kt | 0 .../ComposerArtifactMetadataException.kt | 0 .../exception/ComposerExceptionHandler.kt | 0 ...mposerPackageMessageDeficiencyException.kt | 0 .../ComposerUnSupportCompressException.kt | 0 .../bkrepo/composer/pojo/ArtifactRepeat.kt | 0 .../composer/pojo/ArtifactUploadResponse.kt | 0 .../composer/pojo/ArtifactVersionDetail.kt | 0 .../com/tencent/bkrepo/composer/pojo/Basic.kt | 0 .../bkrepo/composer/pojo/ComposerMetadata.kt | 0 .../com/tencent/bkrepo/composer/pojo/Dist.kt | 0 .../composer/service/ComposerService.kt | 0 .../composer/service/ComposerWebService.kt | 0 .../bkrepo/composer/util/DecompressUtil.kt | 0 .../tencent/bkrepo/composer/util/HttpUtil.kt | 0 .../tencent/bkrepo/composer/util/JsonUtil.kt | 0 .../tencent/bkrepo/composer/util/UriUtil.kt | 0 .../composer/util/pojo/ComposerArtifact.kt | 0 .../bkrepo/composer/util/pojo/UriArgs.kt | 0 .../composer/boot-composer/build.gradle.kts | 34 ++++++++++++++ .../bkrepo/composer/ComposerApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../composer/util/DecompressUtilTest.kt | 0 .../{ => core}/composer/build.gradle.kts | 0 .../conan/api-conan/build.gradle.kts | 0 .../bkrepo/conan/constant/ConanMessageCode.kt | 0 .../bkrepo/conan/constant/Constants.kt | 0 .../bkrepo/conan/pojo/ConanDomainInfo.kt | 0 .../conan/pojo/ConanPackageDeleteRequest.kt | 0 .../conan/pojo/ConanPackageUploadRequest.kt | 0 .../conan/pojo/ConanRecipeDeleteRequest.kt | 0 .../conan/pojo/ConanRecipeUploadRequest.kt | 0 .../bkrepo/conan/pojo/PackageVersionInfo.kt | 0 .../conan/pojo/RevisionOperationRequest.kt | 0 .../conan/biz-conan/build.gradle.kts | 2 +- .../conan/artifact/ConanArtifactConfigurer.kt | 0 .../repository/ConanLocalRepository.kt | 0 .../repository/ConanRemoteRepository.kt | 0 .../repository/ConanVirtualRepository.kt | 0 .../resolver/ConanArtifactInfoResolver.kt | 0 .../bkrepo/conan/config/ConanProperties.kt | 0 .../conan/controller/ConanCommonController.kt | 0 .../conan/controller/ConanController.kt | 0 .../conan/controller/ConanDeleteController.kt | 0 .../controller/ConanRevisionsController.kt | 0 .../conan/controller/ConanSearchController.kt | 0 .../ConanUploadDownloadController.kt | 0 .../conan/controller/UserConanController.kt | 0 .../exception/ConanAuthenticationException.kt | 0 .../bkrepo/conan/exception/ConanException.kt | 0 .../conan/exception/ConanExceptionHandler.kt | 0 .../exception/ConanFileNotFoundException.kt | 0 .../exception/ConanRecipeNotFoundException.kt | 0 .../exception/ConanSearchNotFoundException.kt | 0 .../conan/listener/ConanEventListener.kt | 0 .../listener/event/ConanPackageDeleteEvent.kt | 0 .../listener/event/ConanPackageUploadEvent.kt | 0 .../listener/event/ConanRecipeDeleteEvent.kt | 0 .../listener/event/ConanRecipeUploadEvent.kt | 0 .../operation/AbstractRevisionOperation.kt | 0 .../operation/ConanPackageDeleteOperation.kt | 0 .../operation/ConanPackageUploadOperation.kt | 0 .../operation/ConanRecipeDeleteOperation.kt | 0 .../operation/ConanRecipeUploadOperation.kt | 0 .../bkrepo/conan/pojo/ConanFileReference.kt | 0 .../tencent/bkrepo/conan/pojo/ConanInfo.kt | 0 .../bkrepo/conan/pojo/ConanSearchResult.kt | 0 .../tencent/bkrepo/conan/pojo/IndexInfo.kt | 0 .../bkrepo/conan/pojo/PackageReference.kt | 0 .../tencent/bkrepo/conan/pojo/RevisionInfo.kt | 0 .../conan/pojo/artifact/ConanArtifactInfo.kt | 0 .../conan/pojo/request/FileRemoveRequest.kt | 0 .../pojo/request/PackageIdRemoveRequest.kt | 0 .../conan/pojo/response/ConanErrorResponse.kt | 0 .../conan/pojo/response/ConanResponse.kt | 0 .../conan/pool/ConanThreadPoolExecutor.kt | 0 .../conan/service/ConanCommonService.kt | 0 .../conan/service/ConanDeleteService.kt | 0 .../conan/service/ConanSearchService.kt | 0 .../bkrepo/conan/service/ConanService.kt | 0 .../service/ConanUploadDownloadService.kt | 0 .../conan/service/impl/CommonService.kt | 0 .../service/impl/ConanCommonServiceImpl.kt | 0 .../service/impl/ConanDeleteServiceImpl.kt | 0 .../service/impl/ConanSearchServiceImpl.kt | 0 .../conan/service/impl/ConanServiceImpl.kt | 0 .../impl/ConanUploadDownloadServiceImpl.kt | 0 .../conan/utils/ConanArtifactInfoUtil.kt | 0 .../bkrepo/conan/utils/ConanInfoLoadUtil.kt | 0 .../bkrepo/conan/utils/ConanPathUtils.kt | 0 .../bkrepo/conan/utils/ObjectBuildUtil.kt | 0 .../bkrepo/conan/utils/TimeFormatUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../conan/boot-conan/build.gradle.kts | 2 +- .../tencent/bkrepo/conan/ConanApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/conan/build.gradle.kts | 0 .../{ => core}/ddc/api-ddc/build.gradle.kts | 0 .../kotlin/com/tencent/bkrepo/ddc/Contant.kt | 0 .../ddc/extension/BlobDecompressExtension.kt | 0 .../{ => core}/ddc/biz-ddc/build.gradle.kts | 2 +- .../artifact/CompressedBlobArtifactInfo.kt | 0 .../ddc/artifact/DdcArtifactConfigurer.kt | 0 .../ddc/artifact/ReferenceArtifactInfo.kt | 0 .../artifact/repository/DdcLocalRepository.kt | 0 .../repository/DdcRemoteRepository.kt | 0 .../repository/DdcVirtualRepository.kt | 0 .../CompressedBlobArtifactInfoResolver.kt | 0 .../resolver/ReferenceArtifactInfoResolver.kt | 0 .../bkrepo/ddc/component/PermissionHelper.kt | 0 .../ddc/component/RefDownloadListener.kt | 0 .../bkrepo/ddc/config/DdcConfiguration.kt | 0 .../bkrepo/ddc/config/DdcProperties.kt | 0 .../controller/CompressedBlobController.kt | 0 .../bkrepo/ddc/controller/HealthController.kt | 0 .../controller/LegacyReferencesController.kt | 0 .../ddc/controller/ReferencesController.kt | 0 .../bkrepo/ddc/event/RefDownloadedEvent.kt | 0 .../ddc/exception/BlobNotFoundException.kt | 0 .../bkrepo/ddc/exception/CbWriterException.kt | 0 .../ddc/exception/DdcExceptionHandler.kt | 0 .../ddc/exception/NotImplementedException.kt | 0 .../ReferenceIsMissingBlobsException.kt | 0 .../bkrepo/ddc/metrics/DdcMeterBinder.kt | 0 .../com/tencent/bkrepo/ddc/model/TDdcBlob.kt | 0 .../tencent/bkrepo/ddc/model/TDdcLegacyRef.kt | 0 .../com/tencent/bkrepo/ddc/model/TDdcRef.kt | 0 .../tencent/bkrepo/ddc/model/TDdcRefBase.kt | 0 .../com/tencent/bkrepo/ddc/pojo/Blob.kt | 0 .../tencent/bkrepo/ddc/pojo/ContentHash.kt | 0 .../bkrepo/ddc/pojo/CreateRefResponse.kt | 0 .../com/tencent/bkrepo/ddc/pojo/RefId.kt | 0 .../com/tencent/bkrepo/ddc/pojo/RefKey.kt | 0 .../com/tencent/bkrepo/ddc/pojo/Reference.kt | 0 .../ddc/pojo/UploadCompressedBlobResponse.kt | 0 .../bkrepo/ddc/repository/BlobRepository.kt | 0 .../ddc/repository/LegacyRefRepository.kt | 0 .../ddc/repository/RefBaseRepository.kt | 0 .../bkrepo/ddc/repository/RefRepository.kt | 0 .../bkrepo/ddc/serialization/Blake3Hash.kt | 0 .../bkrepo/ddc/serialization/CbArray.kt | 0 .../ddc/serialization/CbBinaryAttachment.kt | 0 .../bkrepo/ddc/serialization/CbField.kt | 0 .../ddc/serialization/CbFieldIterator.kt | 0 .../bkrepo/ddc/serialization/CbFieldType.kt | 0 .../bkrepo/ddc/serialization/CbFieldUtils.kt | 0 .../bkrepo/ddc/serialization/CbObject.kt | 0 .../ddc/serialization/CbObjectAttachment.kt | 0 .../bkrepo/ddc/serialization/CbWriter.kt | 0 .../bkrepo/ddc/serialization/CbWriterBase.kt | 0 .../bkrepo/ddc/serialization/ICbWriter.kt | 0 .../bkrepo/ddc/serialization/IoHash.kt | 0 .../tencent/bkrepo/ddc/serialization/Scope.kt | 0 .../bkrepo/ddc/serialization/VarULong.kt | 0 .../tencent/bkrepo/ddc/service/BlobService.kt | 0 .../ddc/service/CompressedBlobService.kt | 0 .../ddc/service/ReferenceArtifactService.kt | 0 .../bkrepo/ddc/service/ReferenceResolver.kt | 0 .../bkrepo/ddc/service/ReferenceService.kt | 0 .../tencent/bkrepo/ddc/utils/BlakeUtils.kt | 0 .../bkrepo/ddc/utils/ByteBufferUtils.kt | 0 .../tencent/bkrepo/ddc/utils/CbFieldUtils.kt | 0 .../tencent/bkrepo/ddc/utils/CbWriterUtils.kt | 0 .../com/tencent/bkrepo/ddc/utils/DdcUtils.kt | 0 .../bkrepo/ddc/utils/MediaTypeUtils.kt | 0 .../com/tencent/bkrepo/ddc/utils/NodeUtils.kt | 0 .../bkrepo/ddc/serialization/CbFieldTest.kt | 0 .../bkrepo/ddc/serialization/CbWriterTest.kt | 0 .../bkrepo/ddc/serialization/VarULongTest.kt | 0 .../bkrepo/ddc/utils/BlakeUtilsTest.kt | 0 .../{ => core}/ddc/boot-ddc/build.gradle.kts | 2 +- .../com/tencent/bkrepo/ddc/DdcApplication.kt | 0 .../boot-ddc/src/main/resources/bootstrap.yml | 0 .../generic/api-generic/build.gradle.kts | 0 .../bkrepo/generic/api/OperateResource.kt | 0 .../generic/api/ProxyTemporaryAccessClient.kt | 0 .../generic/artifact/GenericArtifactInfo.kt | 0 .../artifact/GenericChunkedArtifactInfo.kt | 0 .../bkrepo/generic/constant/Constants.kt | 0 .../generic/constant/GenericMessageCode.kt | 0 .../bkrepo/generic/enum/GenericAction.kt | 0 .../extension/TemporaryUrlNotifyContext.kt | 0 .../extension/TemporaryUrlNotifyExtension.kt | 0 .../bkrepo/generic/pojo/BatchDownloadPaths.kt | 0 .../tencent/bkrepo/generic/pojo/BlockInfo.kt | 0 .../generic/pojo/ChunkedResponseProperty.kt | 0 .../bkrepo/generic/pojo/CompressedFileInfo.kt | 0 .../tencent/bkrepo/generic/pojo/FileInfo.kt | 0 .../generic/pojo/TemporaryAccessToken.kt | 0 .../bkrepo/generic/pojo/TemporaryAccessUrl.kt | 0 .../generic/pojo/TemporaryUrlCreateRequest.kt | 0 .../generic/pojo/UploadTransactionInfo.kt | 0 .../generic/pojo/bkbase/QueryRequest.kt | 0 .../generic/pojo/bkbase/QueryResponse.kt | 0 .../generic/biz-generic/build.gradle.kts | 4 +- .../artifact/GenericArtifactConfigurer.kt | 0 .../artifact/GenericArtifactInfoResolver.kt | 0 .../GenericChunkedArtifactInfoResolver.kt | 0 .../artifact/GenericLocalRepository.kt | 0 .../artifact/GenericRemoteRepository.kt | 0 .../artifact/GenericVirtualRepository.kt | 0 .../tencent/bkrepo/generic/artifact/Utils.kt | 0 .../context/GenericArtifactSearchContext.kt | 0 .../AsyncCacheHttpClientBuilderFactory.kt | 0 .../remote/AsyncRemoteArtifactCacheWriter.kt | 0 ...nericAsyncCacheHttpClientBuilderFactory.kt | 0 .../artifact/remote/ReceiverArtifactFile.kt | 0 .../remote/RemoteArtifactCacheLocks.kt | 0 .../remote/RemoteArtifactCacheWriter.kt | 0 .../bkrepo/generic/config/BkBaseProperties.kt | 0 .../bkrepo/generic/config/DeltaProperties.kt | 0 .../generic/config/GenericProperties.kt | 0 .../generic/config/IOExceptionHandler.kt | 0 .../generic/config/PlatformProperties.kt | 0 .../bkrepo/generic/config/ProxyProperties.kt | 0 .../generic/controller/GenericController.kt | 0 .../controller/GenericDeltaController.kt | 0 .../generic/controller/OperateResourceImpl.kt | 0 .../generic/controller/ProxyController.kt | 0 .../controller/TemporaryAccessController.kt | 0 .../proxy/ProxyTemporaryAccessController.kt | 0 .../tencent/bkrepo/generic/dao/SignFileDao.kt | 0 .../tencent/bkrepo/generic/model/TSignFile.kt | 0 .../generic/service/CompressedFileService.kt | 0 .../generic/service/DeltaSyncService.kt | 0 .../bkrepo/generic/service/DownloadService.kt | 0 .../bkrepo/generic/service/OperateService.kt | 0 .../bkrepo/generic/service/ProxyService.kt | 0 .../generic/service/TemporaryAccessService.kt | 0 .../bkrepo/generic/service/UploadService.kt | 0 .../bkrepo/generic/util/ChunkedRequestUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../generic/boot-generic/build.gradle.kts | 34 ++++++++++++++ .../bkrepo/generic/GenericApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../{ => core}/generic/build.gradle.kts | 0 .../{ => core}/git/api-git/build.gradle.kts | 0 .../git/artifact/GitContentArtifactInfo.kt | 0 .../git/artifact/GitPackFileArtifactInfo.kt | 0 .../git/artifact/GitRepositoryArtifactInfo.kt | 0 .../bkrepo/git/constant/GitConstants.kt | 0 .../bkrepo/git/constant/GitMessageCode.kt | 0 .../tencent/bkrepo/git/constant/HubType.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../{ => core}/git/biz-git/build.gradle.kts | 2 +- .../git/artifact/GitArtifactConfigurer.kt | 0 .../bkrepo/git/artifact/GitRepoInterceptor.kt | 0 .../artifact/repository/GitLocalRepository.kt | 0 .../repository/GitRemoteRepository.kt | 0 .../repository/GitVirtualRepository.kt | 0 .../artifact/resolver/GitContentResolver.kt | 0 .../resolver/GitRepositoryResolver.kt | 0 .../config/AsynchronousSpringEventsConfig.kt | 0 .../bkrepo/git/config/GitProperties.kt | 0 .../tencent/bkrepo/git/config/GitWebConfig.kt | 0 .../bkrepo/git/context/DfsDataReaders.kt | 0 .../git/context/DfsDataReadersHolder.kt | 0 .../com/tencent/bkrepo/git/context/FileId.kt | 0 .../tencent/bkrepo/git/context/UserHolder.kt | 0 .../bkrepo/git/controller/GitController.kt | 0 .../bkrepo/git/controller/GitLfsController.kt | 0 .../git/controller/user/GitApiController.kt | 0 .../git/exception/LockFailedException.kt | 0 .../interceptor/ContextSettingInterceptor.kt | 0 .../git/interceptor/ProxyInterceptor.kt | 0 .../git/internal/CodeRepositoryResolver.kt | 0 .../git/internal/storage/CodeObjDatabase.kt | 0 .../internal/storage/CodePackDescription.kt | 0 .../git/internal/storage/CodeRefDatabase.kt | 0 .../git/internal/storage/CodeRepository.kt | 0 .../internal/storage/CodeRepositoryBuilder.kt | 0 .../storage/DfsArtifactOutputStream.kt | 0 .../storage/DfsByteArrayDataReader.kt | 0 .../git/internal/storage/DfsConstants.kt | 0 .../git/internal/storage/DfsDataReader.kt | 0 .../git/internal/storage/DfsFileDataReader.kt | 0 .../internal/storage/DfsReadableChannel.kt | 0 .../storage/InMemoryRepositoryDataService.kt | 0 .../internal/storage/RepositoryDataService.kt | 0 .../git/listener/SyncRepositoryEvent.kt | 0 .../git/listener/SyncRepositoryListener.kt | 0 .../bkrepo/git/model/TDfsPackDescription.kt | 0 .../DfsPackDescriptionRepository.kt | 0 .../git/server/DefaultReceivePackFactory.kt | 0 .../bkrepo/git/server/SmartOutputStream.kt | 0 .../git/service/CodeRepositoryDataService.kt | 0 .../bkrepo/git/service/GitApiService.kt | 0 .../tencent/bkrepo/git/service/GitService.kt | 0 .../com/tencent/bkrepo/git/util/FileUtil.kt | 0 .../internal/storage/CodeRepositoryTest.kt | 0 .../git/internal/storage/EmptyLockProvider.kt | 0 .../git/boot-git}/build.gradle.kts | 2 +- .../com/tencent/bkrepo/git/GitApplication.kt | 0 .../boot-git/src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/git/build.gradle.kts | 0 .../{ => core}/helm/api-helm/build.gradle.kts | 0 .../com/tencent/bkrepo/helm/api/HelmClient.kt | 0 .../bkrepo/helm/constants/Constants.kt | 0 .../bkrepo/helm/constants/HelmMessageCode.kt | 0 .../bkrepo/helm/constants/QueryConstants.kt | 0 .../bkrepo/helm/pojo/HelmDomainInfo.kt | 0 .../bkrepo/helm/pojo/HelmErrorResponse.kt | 0 .../bkrepo/helm/pojo/HelmSuccessResponse.kt | 0 .../helm/pojo/chart/ChartOperationRequest.kt | 0 .../pojo/chart/ChartPackageDeleteRequest.kt | 0 .../helm/pojo/chart/ChartUploadRequest.kt | 0 .../pojo/chart/ChartVersionDeleteRequest.kt | 0 .../pojo/fixtool/DateTimeRepairResponse.kt | 0 .../pojo/fixtool/PackageManagerResponse.kt | 0 .../bkrepo/helm/pojo/job/ExecutionResult.kt | 0 .../bkrepo/helm/pojo/job/ExecutionStatus.kt | 0 .../helm/pojo/user/PackageVersionInfo.kt | 0 .../{ => core}/helm/biz-helm/build.gradle.kts | 2 +- .../helm/artifact/HelmArtifactConfigurer.kt | 0 .../repository/HelmLocalRepository.kt | 0 .../repository/HelmRemoteRepository.kt | 0 .../repository/HelmVirtualRepository.kt | 0 .../resolver/HelmArtifactInfoResolver.kt | 0 .../HelmDeleteArtifactInfoResolver.kt | 0 .../bkrepo/helm/config/DateConverterConfig.kt | 0 .../bkrepo/helm/config/HelmConsumerConfig.kt | 0 .../bkrepo/helm/config/HelmProperties.kt | 0 .../api/ChartManipulationController.kt | 0 .../api/ChartRepositoryController.kt | 0 .../controller/api/HelmFixToolController.kt | 0 .../helm/controller/api/UserHelmController.kt | 0 .../controller/service/HelmIndexController.kt | 0 .../helm/dao/HelmChartEventRecordDao.kt | 0 .../helm/exception/HelmBadRequestException.kt | 0 ...HelmErrorInvalidProvenanceFileException.kt | 0 .../helm/exception/HelmExceptionHandler.kt | 0 .../HelmFileAlreadyExistsException.kt | 0 .../exception/HelmFileNotFoundException.kt | 0 .../HelmForbiddenRequestException.kt | 0 .../exception/HelmIndexFreshFailException.kt | 0 .../exception/HelmRepoNotFoundException.kt | 0 .../helm/listener/ChartEventListener.kt | 0 .../listener/base/AbstractEventJobExecutor.kt | 0 .../listener/base/RemoteEventJobExecutor.kt | 0 .../PackageReplicationEventConsumer.kt | 0 .../consumer/RemoteRepoEventConsumer.kt | 0 .../consumer/ReplicationEventListener.kt | 0 .../helm/listener/event/ChartDeleteEvent.kt | 0 .../helm/listener/event/ChartUploadEvent.kt | 0 .../listener/event/ChartVersionDeleteEvent.kt | 0 .../listener/operation/IndexRefreshTask.kt | 0 .../bkrepo/helm/metrics/HelmMetrics.kt | 0 .../helm/model/THelmChartEventRecord.kt | 0 .../helm/pojo/artifact/HelmArtifactInfo.kt | 0 .../pojo/artifact/HelmDeleteArtifactInfo.kt | 0 .../helm/pojo/metadata/HelmChartMetadata.kt | 0 .../pojo/metadata/HelmIndexYamlMetadata.kt | 0 .../pojo/metadata/HelmMaintainerMetadata.kt | 0 .../pool/EventHandlerThreadPoolExecutor.kt | 0 .../helm/pool/HelmThreadPoolExecutor.kt | 0 .../helm/service/ChartManipulationService.kt | 0 .../helm/service/ChartRepositoryService.kt | 0 .../bkrepo/helm/service/FixToolService.kt | 0 .../helm/service/impl/AbstractChartService.kt | 0 .../impl/ChartManipulationServiceImpl.kt | 0 .../impl/ChartRepositoryServiceImpl.kt | 0 .../helm/service/impl/FixToolServiceImpl.kt | 0 .../helm/service/impl/HelmOperationService.kt | 0 .../bkrepo/helm/utils/ChartParserUtil.kt | 0 .../bkrepo/helm/utils/DecompressUtil.kt | 0 .../bkrepo/helm/utils/HelmMetadataUtils.kt | 0 .../tencent/bkrepo/helm/utils/HelmUtils.kt | 0 .../bkrepo/helm/utils/ObjectBuilderUtil.kt | 0 .../bkrepo/helm/utils/RemoteDownloadUtil.kt | 0 .../bkrepo/helm/utils/TimeFormatUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../core/helm/boot-helm/build.gradle.kts | 34 ++++++++++++++ .../tencent/bkrepo/helm/HelmApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../helm/service/ChartInfoServiceTest.kt | 0 .../service/ChartManipulationServiceTest.kt | 0 .../service/ChartRepositoryServiceTest.kt | 0 .../helm/service/HelmFixToolServiceTest.kt | 0 .../helm/utils/HelmMetadataUtilsTest.kt | 0 .../bkrepo/helm/utils/YamlUtilsTest.kt | 0 src/backend/{ => core}/helm/build.gradle.kts | 0 .../{ => core}/job/api-job/build.gradle.kts | 0 .../com/tencent/bkrepo/job/api/JobClient.kt | 0 .../bkrepo/job/pojo/ArchiveRestoreRequest.kt | 0 .../com/tencent/bkrepo/job/pojo/JobDetail.kt | 0 .../job/api-schedule/build.gradle.kts | 0 .../job/schedule/api/JobScheduleClient.kt | 0 .../{ => core}/job/biz-job/build.gradle.kts | 10 ++--- .../com/tencent/bkrepo/job/Constants.kt | 0 .../job/batch/ReplicaRecordCleanupJob.kt | 0 .../job/batch/base/ActiveProjectService.kt | 0 .../tencent/bkrepo/job/batch/base/BatchJob.kt | 0 .../bkrepo/job/batch/base/CenterNodeJob.kt | 0 .../bkrepo/job/batch/base/ChildJobContext.kt | 0 .../job/batch/base/ChildMongoDbBatchJob.kt | 0 .../job/batch/base/CompositeJobContext.kt | 0 .../batch/base/CompositeMongoDbBatchJob.kt | 0 .../job/batch/base/DefaultContextJob.kt | 0 .../batch/base/DefaultContextMongoDbJob.kt | 0 .../bkrepo/job/batch/base/DefaultRepoJob.kt | 0 .../bkrepo/job/batch/base/FailoverJob.kt | 0 .../job/batch/base/JobConcurrentLevel.kt | 0 .../bkrepo/job/batch/base/JobContext.kt | 0 .../job/batch/base/JobExecuteContext.kt | 0 .../bkrepo/job/batch/base/MongoDbBatchJob.kt | 0 .../job/batch/base/MongodbFailoverJob.kt | 0 .../base/NodeStatCompositeMongoDbBatchJob.kt | 0 .../base/RecoverableMongodbJobContext.kt | 0 .../context/DeletedNodeCleanupJobContext.kt | 0 .../context/EmptyFolderCleanupJobContext.kt | 0 .../job/batch/context/FileJobContext.kt | 0 .../bkrepo/job/batch/context/NodeContext.kt | 0 .../job/batch/context/NodeCopyJobContext.kt | 0 .../job/batch/context/NodeFolderJobContext.kt | 0 .../ProjectRepoMetricsStatJobContext.kt | 0 .../batch/context/ProjectReportJobContext.kt | 0 .../file/BasedRepositoryNodeRetainResolver.kt | 0 .../batch/file/ExpireFileResolverConfig.kt | 0 .../job/batch/file/NodeRetainResolver.kt | 0 .../job/batch/file/RepositoryExpireConfig.kt | 0 .../task/archive/ArchivedNodeCompleteJob.kt | 0 .../task/archive/ArchivedNodeRestoreJob.kt | 0 .../batch/task/archive/IdleNodeArchiveJob.kt | 0 .../batch/task/archive/NodeCompressedJob.kt | 0 .../batch/task/archive/NodeUncompressedJob.kt | 0 .../job/batch/task/archive/SystemGcJob.kt | 0 .../batch/task/bkbase/NodeReport2BkbaseJob.kt | 0 .../task/bkbase/RepoDetailReport2BkbaseJob.kt | 0 .../task/cache/ExpiredCacheFileCleanupJob.kt | 0 .../task/cache/StorageCacheIndexEvictJob.kt | 0 .../batch/task/cache/StorageCacheIndexJob.kt | 0 .../task/cache/StorageCacheIndexSyncJob.kt | 0 .../cache/StorageCacheIndexerCustomizer.kt | 0 .../preload/ArtifactAccessLogEmbeddingJob.kt | 0 .../preload/ArtifactAccessRecordCleanupJob.kt | 0 .../preload/ArtifactPreloadPlanExecuteJob.kt | 0 .../ArtifactPreloadStrategyGenerateJob.kt | 0 .../ArtifactSimilarityPreloadPlanGenerator.kt | 0 .../batch/task/cache/preload/PreloadConfig.kt | 0 .../task/cache/preload/SimilarityPathUtils.kt | 0 .../task/cache/preload/ai/AiProperties.kt | 0 .../batch/task/cache/preload/ai/Document.kt | 0 .../task/cache/preload/ai/EmbeddingModel.kt | 0 .../cache/preload/ai/HttpEmbeddingModel.kt | 0 .../task/cache/preload/ai/SearchRequest.kt | 0 .../cache/preload/ai/SpringAiConfiguration.kt | 0 .../task/cache/preload/ai/VectorStore.kt | 0 .../cache/preload/ai/milvus/MilvusClient.kt | 0 .../ai/milvus/MilvusClientProperties.kt | 0 .../ai/milvus/MilvusRestApiException.kt | 0 .../preload/ai/milvus/MilvusVectorStore.kt | 0 .../ai/milvus/MilvusVectorStoreProperties.kt | 0 .../ai/milvus/request/CollectionSchema.kt | 0 .../ai/milvus/request/ConsistencyLevel.kt | 0 .../ai/milvus/request/CreateCollectionReq.kt | 0 .../preload/ai/milvus/request/DataType.kt | 0 .../ai/milvus/request/DeleteVectorReq.kt | 0 .../ai/milvus/request/DropCollectionReq.kt | 0 .../preload/ai/milvus/request/FieldSchema.kt | 0 .../ai/milvus/request/HasCollectionReq.kt | 0 .../preload/ai/milvus/request/IndexParam.kt | 0 .../preload/ai/milvus/request/IndexType.kt | 0 .../ai/milvus/request/InsertVectorReq.kt | 0 .../ai/milvus/request/LoadCollectionReq.kt | 0 .../preload/ai/milvus/request/MetricType.kt | 0 .../ai/milvus/request/SearchVectorReq.kt | 0 .../cache/preload/ai/milvus/request/Vector.kt | 0 .../ai/milvus/response/HasCollectionRes.kt | 0 .../ai/milvus/response/MilvusResponse.kt | 0 .../batch/task/clean/ArtifactCleanupJob.kt | 0 .../task/clean/DeletedBlockNodeCleanupJob.kt | 0 .../batch/task/clean/DeletedNodeCleanupJob.kt | 0 .../task/clean/DeletedRepositoryCleanupJob.kt | 0 .../clean/DistributedDockerImageCleanupJob.kt | 0 .../task/clean/FileReferenceCleanupJob.kt | 0 .../batch/task/clean/OauthTokenCleanupJob.kt | 0 .../task/clean/PipelineArtifactCleanupJob.kt | 0 .../clean/ProjectUsageStatisticsCleanupJob.kt | 0 .../task/clean/ReplicationLockCleanupJob.kt | 0 .../batch/task/clean/RunOnceTaskCleanupJob.kt | 0 .../batch/task/clean/ShareRecordCleanupJob.kt | 0 .../batch/task/clean/SignFileCleanupJob.kt | 0 .../task/clean/TemporaryTokenCleanupJob.kt | 0 .../job/batch/task/client/FsClientCleanJob.kt | 0 .../batch/task/client/FsClientOfflineJob.kt | 0 .../job/batch/task/ddc/DdcBlobCleanupJob.kt | 0 .../task/ddc/DdcBlobCleanupJobProperties.kt | 0 .../batch/task/ddc/ExpiredDdcRefCleanupJob.kt | 0 .../ddc/ExpiredDdcRefCleanupJobProperties.kt | 0 .../job/batch/task/other/ArtifactPushJob.kt | 0 .../batch/task/other/ExpiredNodeMarkupJob.kt | 0 .../batch/task/other/FileSynchronizeJob.kt | 0 .../batch/task/other/MigrateRepoStorageJob.kt | 0 .../job/batch/task/other/NodeCopyJob.kt | 0 .../project/BkciProjectMetadataSyncJob.kt | 0 .../BkciProjectMetadataSyncJobProperties.kt | 0 .../task/refresh/HelmMetadataRefreshJob.kt | 0 .../task/refresh/HelmReplicationRefreshJob.kt | 0 .../task/refresh/OciBlobNodeRefreshJob.kt | 0 .../job/batch/task/refresh/RepoInitJob.kt | 0 .../job/batch/task/refresh/RepoRefreshJob.kt | 0 .../refresh/ThirdPartyImageReplicationJob.kt | 0 .../task/separation/DataSeparationJob.kt | 0 .../separation/FixFailedDataSeparationJob.kt | 0 .../ActiveProjectEmptyFolderCleanupJob.kt | 0 .../stat/ActiveProjectNodeFolderStatJob.kt | 0 .../stat/ActiveProjectRepoMetricsStatJob.kt | 0 .../job/batch/task/stat/EmptyFolderCleanup.kt | 0 .../task/stat/FileSystemStorageStatJob.kt | 0 .../InactiveProjectEmptyFolderCleanupJob.kt | 0 .../stat/InactiveProjectNodeFolderStatJob.kt | 0 .../stat/InactiveProjectRepoMetricsStatJob.kt | 0 .../job/batch/task/stat/NodeFolderStat.kt | 0 .../task/stat/ProjectRepoMetricsStatJob.kt | 0 .../bkrepo/job/batch/task/stat/StatBaseJob.kt | 0 .../batch/task/storage/StorageReconcileJob.kt | 0 .../task/usage/ProjectDailyAvgMetricsJob.kt | 0 .../usage/ProjectMetricsReport2BkbaseJob.kt | 0 .../task/usage/ProjectMonthMetricReportJob.kt | 0 .../bkrepo/job/batch/utils/FolderUtils.kt | 0 .../job/batch/utils/MongoShardingUtils.kt | 0 .../bkrepo/job/batch/utils/NodeCommonUtils.kt | 0 .../job/batch/utils/RepositoryCommonUtils.kt | 0 .../bkrepo/job/batch/utils/StatUtils.kt | 0 .../bkrepo/job/batch/utils/TimeUtils.kt | 0 .../tencent/bkrepo/job/config/JobConfig.kt | 0 .../bkrepo/job/config/JobProperties.kt | 0 .../config/JobRegistryArtifactConfigurer.kt | 0 ...eProjectEmptyFolderCleanupJobProperties.kt | 0 ...ctiveProjectNodeFolderStatJobProperties.kt | 0 ...tiveProjectRepoMetricsStatJobProperties.kt | 0 .../ArchivedNodeCompleteJobProperties.kt | 0 .../ArchivedNodeRestoreJobProperties.kt | 0 ...ArtifactAccessLogEmbeddingJobProperties.kt | 0 ...rtifactAccessRecordCleanupJobProperties.kt | 0 .../ArtifactCleanupJobProperties.kt | 0 ...ArtifactPreloadPlanExecuteJobProperties.kt | 0 ...actPreloadStrategyGenerateJobProperties.kt | 0 .../properties/ArtifactPushJobProperties.kt | 0 .../config/properties/BatchJobProperties.kt | 0 .../properties/CompositeJobProperties.kt | 0 .../properties/DataSeparationJobProperties.kt | 0 .../DeletedBlockNodeCleanupJobProperties.kt | 0 .../DeletedNodeCleanupJobProperties.kt | 0 .../DeletedRepositoryCleanupJobProperties.kt | 0 ...tributedDockerImageCleanupJobProperties.kt | 0 .../ExpiredCacheFileCleanupJobProperties.kt | 0 .../ExpiredNodeMarkupJobProperties.kt | 0 .../FileReferenceCleanupJobProperties.kt | 0 .../FileSynchronizeJobProperties.kt | 0 .../FileSystemStorageStatJobProperties.kt | 0 .../FixFailedDataSeparationJobProperties.kt | 0 .../properties/FsClientCleanJobProperties.kt | 0 .../properties/FsClientOfflineProperties.kt | 0 .../HelmMetadataRefreshJobProperties.kt | 0 .../HelmReplicationRefreshJobProperties.kt | 0 .../IdleNodeArchiveJobProperties.kt | 0 ...eProjectEmptyFolderCleanupJobProperties.kt | 0 ...ctiveProjectNodeFolderStatJobProperties.kt | 0 ...tiveProjectRepoMetricsStatJobProperties.kt | 0 .../MigrateRepoStorageJobProperties.kt | 0 .../config/properties/MongodbJobProperties.kt | 0 .../properties/NodeCompressedJobProperties.kt | 0 .../properties/NodeCopyJobProperties.kt | 0 .../NodeReport2BkbaseJobProperties.kt | 0 ...eStatCompositeMongoDbBatchJobProperties.kt | 0 .../NodeUncompressedJobProperties.kt | 0 .../OauthTokenCleanupJobProperties.kt | 0 .../OciBlobNodeRefreshJobProperties.kt | 0 .../PipelineArtifactCleanupJobProperties.kt | 0 .../ProjectDailyAvgMetricsJobProperties.kt | 0 ...rojectMetricsReport2BkbaseJobProperties.kt | 0 .../ProjectMonthMetricReportJobProperties.kt | 0 .../ProjectRepoMetricsStatJobProperties.kt | 0 ...jectUsageStatisticsCleanupJobProperties.kt | 0 .../ReplicaRecordCleanupJobProperties.kt | 0 .../ReplicationLockCleanupJobProperties.kt | 0 .../RepoDetailReport2BkbaseJobProperties.kt | 0 .../properties/RepoInitJobProperties.kt | 0 .../config/properties/RepoJobProperties.kt | 0 .../properties/RepoRefreshJobProperties.kt | 0 .../RunOnceTaskCleanupJobProperties.kt | 0 .../ShareRecordCleanJobProperties.kt | 0 .../SignFileCleanupJobProperties.kt | 0 .../config/properties/StatJobProperties.kt | 0 .../StorageCacheIndexEvictJobProperties.kt | 0 .../StorageCacheIndexJobProperties.kt | 0 .../StorageCacheIndexSyncJobProperties.kt | 0 .../StorageReconcileJobProperties.kt | 0 .../properties/SystemGcJobProperties.kt | 0 .../TemporaryTokenCleanupJobProperties.kt | 0 ...ThirdPartyImageReplicationJobProperties.kt | 0 .../job/controller/service/JobController.kt | 0 .../controller/user/ArchiveJobController.kt | 0 .../controller/user/FileCacheController.kt | 0 .../job/controller/user/ShedlockController.kt | 0 .../user/UserEmbeddingController.kt | 0 .../job/controller/user/UserJobController.kt | 0 .../user/UserMigrateRepoStorageController.kt | 0 .../user/UserSeparationController.kt | 0 .../bkrepo/job/exception/FileMissException.kt | 0 .../job/exception/JobExecuteException.kt | 0 .../job/exception/RepoMigratingException.kt | 0 .../BlockThreadPoolTaskExecutorDecorator.kt | 0 .../bkrepo/job/executor/IdentityTask.kt | 0 .../bkrepo/job/executor/IdentityTaskInfo.kt | 0 .../listener/RefreshJobPropertiesListener.kt | 0 .../bkrepo/job/listener/TaskEventListener.kt | 0 .../job/listener/event/TaskExecutedEvent.kt | 0 .../tencent/bkrepo/job/metrics/JobMetrics.kt | 0 .../bkrepo/job/metrics/StorageCacheMetrics.kt | 0 .../tencent/bkrepo/job/migrate/Constant.kt | 0 .../job/migrate/MigrateFailedNodeService.kt | 0 .../job/migrate/MigrateRepoStorageService.kt | 0 .../config/MigrateRepoStorageProperties.kt | 0 .../dao/ArchiveMigrateFailedNodeDao.kt | 0 .../job/migrate/dao/MigrateFailedNodeDao.kt | 0 .../migrate/dao/MigrateRepoStorageTaskDao.kt | 0 .../job/migrate/executor/BaseTaskExecutor.kt | 0 .../job/migrate/executor/CorrectExecutor.kt | 0 .../job/migrate/executor/FinishExecutor.kt | 0 .../job/migrate/executor/MigrateExecutor.kt | 0 .../executor/MigrateFailedNodeExecutor.kt | 0 .../job/migrate/executor/TaskExecutor.kt | 0 .../handler/DefaultMigrateFailedHandler.kt | 0 .../executor/handler/MigrateFailedHandler.kt | 0 .../model/TArchiveMigrateFailedNode.kt | 0 .../job/migrate/model/TMigrateFailedNode.kt | 0 .../migrate/model/TMigrateRepoStorageTask.kt | 0 .../CreateMigrateRepoStorageTaskRequest.kt | 0 .../migrate/pojo/MigrateRepoStorageTask.kt | 0 .../pojo/MigrateRepoStorageTaskState.kt | 0 .../job/migrate/pojo/MigrationContext.kt | 0 .../tencent/bkrepo/job/migrate/pojo/Node.kt | 0 .../strategy/FileNotFoundAutoFixStrategy.kt | 0 .../MigrateFailedNodeAutoFixStrategy.kt | 0 .../strategy/MigrateFailedNodeFixer.kt | 0 .../migrate/utils/ExecutingTaskRecorder.kt | 0 .../migrate/utils/MigrateRepoStorageUtils.kt | 0 .../utils/MigratedTaskNumberPriorityQueue.kt | 0 .../bkrepo/job/migrate/utils/NodeIterator.kt | 0 .../job/migrate/utils/TransferDataExecutor.kt | 0 .../bkrepo/job/pojo/FileCacheCheckRequest.kt | 0 .../bkrepo/job/pojo/FileCacheRequest.kt | 0 .../com/tencent/bkrepo/job/pojo/FolderInfo.kt | 0 .../tencent/bkrepo/job/pojo/ShedlockInfo.kt | 0 .../com/tencent/bkrepo/job/pojo/TFileCache.kt | 0 .../tencent/bkrepo/job/pojo/TJobFailover.kt | 0 .../tencent/bkrepo/job/pojo/client/Client.kt | 0 .../bkrepo/job/pojo/client/DailyClient.kt | 0 .../job/pojo/project/TProjectMetrics.kt | 0 .../project/TProjectMetricsDailyAvgRecord.kt | 0 .../project/TProjectMetricsDailyRecord.kt | 0 .../bkrepo/job/pojo/project/TRepoMetrics.kt | 0 .../job/repository/FileCacheRepository.kt | 0 .../job/repository/JobSnapshotRepository.kt | 0 .../ProjectMetricsDailyAvgRecordRepository.kt | 0 .../ProjectMetricsDailyRecordRepository.kt | 0 .../job/repository/ShedlockRepository.kt | 0 .../com/tencent/bkrepo/job/schedule/Job.kt | 0 .../bkrepo/job/schedule/JobRegistrar.kt | 0 .../job/schedule/JobScheduleConfiguration.kt | 0 .../bkrepo/job/schedule/JobScheduleType.kt | 0 .../tencent/bkrepo/job/schedule/JobUtils.kt | 0 .../bkrepo/job/schedule/Registration.kt | 0 .../SpringScheduleAutoRegistration.kt | 0 .../schedule/SpringScheduleJobRegistrar.kt | 0 .../separation/config/DataSeparationConfig.kt | 0 .../dao/SeparationFailedRecordDao.kt | 0 .../job/separation/dao/SeparationNodeDao.kt | 0 .../separation/dao/SeparationPackageDao.kt | 0 .../dao/SeparationPackageVersionDao.kt | 0 .../job/separation/dao/SeparationTaskDao.kt | 0 .../dao/repo/SeparationMavenMetadataDao.kt | 0 .../SeparationDataNotFoundException.kt | 0 .../exception/SeparationDataStoreException.kt | 0 .../AbstractSeparationTaskExecutor.kt | 0 .../executor/ColdDataRestoreTaskExecutor.kt | 0 .../executor/ColdDataSeparateTaskExecutor.kt | 0 .../executor/FixFailedRecordTaskExecutor.kt | 0 .../executor/SeparationTaskExecutor.kt | 0 .../SeparationRecoveryEventConsumer.kt | 0 .../model/TSeparationFailedRecord.kt | 0 .../job/separation/model/TSeparationNode.kt | 0 .../separation/model/TSeparationPackage.kt | 0 .../model/TSeparationPackageVersion.kt | 0 .../job/separation/model/TSeparationTask.kt | 0 .../repo/TSeparationMavenMetadataRecord.kt | 0 .../job/separation/pojo/NodeFilterInfo.kt | 0 .../job/separation/pojo/PackageFilterInfo.kt | 0 .../job/separation/pojo/RecoveryNodeInfo.kt | 0 .../separation/pojo/RecoveryVersionInfo.kt | 0 .../separation/pojo/SeparationArtifactType.kt | 0 .../job/separation/pojo/SeparationContent.kt | 0 .../job/separation/pojo/SeparationInfo.kt | 0 .../job/separation/pojo/VersionFilterInfo.kt | 0 .../separation/pojo/VersionSeparationInfo.kt | 0 .../pojo/query/FileReferenceInfo.kt | 0 .../separation/pojo/query/MavenMetadata.kt | 0 .../job/separation/pojo/query/NodeBaseInfo.kt | 0 .../separation/pojo/query/NodeDetailInfo.kt | 0 .../pojo/query/PackageDetailInfo.kt | 0 .../job/separation/pojo/query/PackageInfo.kt | 0 .../pojo/query/PackageVersionInfo.kt | 0 .../pojo/query/VersionDetailInfo.kt | 0 .../pojo/record/SeparationContext.kt | 0 .../pojo/record/SeparationProgress.kt | 0 .../pojo/task/NodeSeparationInfo.kt | 0 .../pojo/task/PackageSeparationInfo.kt | 0 .../separation/pojo/task/SeparationCount.kt | 0 .../separation/pojo/task/SeparationTask.kt | 0 .../pojo/task/SeparationTaskRequest.kt | 0 .../pojo/task/SeparationTaskState.kt | 0 .../job/separation/service/DataRestorer.kt | 0 .../job/separation/service/DataSeparator.kt | 0 .../service/RepoSpecialDataSeparator.kt | 0 .../service/SeparationDataService.kt | 0 .../service/SeparationTaskService.kt | 0 .../service/impl/AbstractHandler.kt | 0 .../service/impl/DataRestorerImpl.kt | 0 .../service/impl/DataSeparatorImpl.kt | 0 .../service/impl/SeparationDataServiceImpl.kt | 0 .../service/impl/SeparationTaskServiceImpl.kt | 0 .../MavenRepoSpecialDataSeparatorHandler.kt | 0 .../repo/RepoSpecialSeparationMappings.kt | 0 .../separation/util/SeparationQueryHelper.kt | 0 .../job/separation/util/SeparationUtils.kt | 0 .../bkrepo/job/service/ArchiveJobService.kt | 0 .../bkrepo/job/service/FileCacheService.kt | 0 .../bkrepo/job/service/ShedlockService.kt | 0 .../bkrepo/job/service/SystemJobService.kt | 0 .../job/service/impl/ArchiveJobServiceImpl.kt | 0 .../job/service/impl/FileCacheServiceImp.kt | 0 .../job/service/impl/ShedlockServiceImp.kt | 0 .../bkrepo/job/JobTestConfiguration.kt | 0 .../job/batch/FileReferenceCleanupJobTest.kt | 0 .../tencent/bkrepo/job/batch/JobBaseTest.kt | 0 ...lockThreadPoolTaskExecutorDecoratorTest.kt | 0 .../task/clean/DeletedNodeCleanupJobTest.kt | 0 .../task/storage/StorageReconcileJobTest.kt | 0 .../job/batch/utils/NodeCommonUtilsTest.kt | 0 .../bkrepo/job/batch/utils/TimeUtilsTest.kt | 0 .../job/metrics/StorageCacheMetricsTest.kt | 0 .../migrate/MigrateFailedNodeServiceTest.kt | 0 .../migrate/MigrateRepoStorageServiceTest.kt | 0 .../migrate/executor/CorrectExecutorTest.kt | 0 .../job/migrate/executor/ExecutorBaseTest.kt | 0 .../migrate/executor/FinishExecutorTest.kt | 0 .../migrate/executor/MigrateExecutorTest.kt | 0 .../executor/MigrateFailedNodeExecutorTest.kt | 0 .../job/migrate/pojo/MigrationContextTest.kt | 0 .../FileNotFoundAutoFixStrategyTest.kt | 0 .../job/migrate/utils/MigrateTestUtils.kt | 0 .../MigratedTaskNumberPriorityQueueTest.kt | 0 .../job/migrate/utils/NodeIteratorTest.kt | 0 .../com/tencent/bkrepo/job/model/TNode.kt | 0 .../service/impl/ArchiveJobServiceImplTest.kt | 0 .../src/test/resources/job-ut.properties | 0 .../job/boot-job-schedule/build.gradle.kts | 2 +- .../job/schedule/JobScheduleApplication.kt | 0 .../config/JobScheduleConfiguration.kt | 0 .../schedule/controller/JobRpcController.kt | 0 .../controller/JobScheduleController.kt | 0 .../controller/WorkerGroupRpcController.kt | 0 .../src/main/resources/bootstrap.yaml | 0 .../job/boot-job-worker/build.gradle.kts | 2 +- .../boot-job-worker/shell/media-process.sh | 0 .../bkrepo/job/worker/JobWorkerApplication.kt | 0 .../config/DevOpsScheduleAutoRegistration.kt | 0 .../config/DevOpsScheduleJobRegistrar.kt | 0 .../job/worker/config/JobHandlerAdapter.kt | 0 .../worker/config/JobWorkerConfiguration.kt | 0 .../bkrepo/job/worker/rpc/JobRpcClient.kt | 0 .../src/main/resources/bootstrap.yaml | 0 .../{ => core}/job/boot-job/build.gradle.kts | 2 +- .../com/tencent/bkrepo/job/JobApplication.kt | 0 .../src/main/resources/bootstrap.properties | 0 src/backend/{ => core}/job/build.gradle.kts | 0 .../{ => core}/lfs/api-lfs/build.gradle.kts | 0 .../tencent/bkrepo/lfs/constant/Constants.kt | 0 .../tencent/bkrepo/lfs/pojo/ActionDetail.kt | 0 .../tencent/bkrepo/lfs/pojo/BatchRequest.kt | 0 .../tencent/bkrepo/lfs/pojo/BatchResponse.kt | 0 .../com/tencent/bkrepo/lfs/pojo/LfsObject.kt | 0 .../{ => core}/lfs/biz-lfs/build.gradle.kts | 2 +- .../lfs/artifact/LfsArtifactConfigurer.kt | 0 .../bkrepo/lfs/artifact/LfsArtifactInfo.kt | 0 .../lfs/artifact/LfsArtifactInfoResolver.kt | 0 .../bkrepo/lfs/artifact/LfsLocalRepository.kt | 0 .../bkrepo/lfs/artifact/LfsProperties.kt | 0 .../lfs/artifact/LfsRemoteRepository.kt | 0 .../lfs/artifact/LfsVirtualRepository.kt | 0 .../bkrepo/lfs/controller/ObjectController.kt | 0 .../lfs/exception/BatchRequestException.kt | 0 .../lfs/exception/LfsExceptionHandler.kt | 0 .../bkrepo/lfs/security/RemoteAuthHandler.kt | 0 .../bkrepo/lfs/service/ObjectService.kt | 0 .../com/tencent/bkrepo/lfs/utils/OidUtils.kt | 0 .../{ => core}/lfs/boot-lfs/build.gradle.kts | 2 +- .../com/tencent/bkrepo/lfs/LfsApplication.kt | 0 .../boot-lfs/src/main/resources/bootstrap.yml | 0 .../maven/api-maven/build.gradle.kts | 0 .../bkrepo/maven/api/MavenMetadataClient.kt | 0 .../bkrepo/maven/api/MavenWebResource.kt | 0 .../maven/artifact/MavenArtifactInfo.kt | 0 .../maven/artifact/MavenDeleteArtifactInfo.kt | 0 .../bkrepo/maven/constants/Constant.kt | 0 .../bkrepo/maven/enum/ChecksumPolicyType.kt | 0 .../com/tencent/bkrepo/maven/enum/HashType.kt | 0 .../bkrepo/maven/enum/MavenMessageCode.kt | 0 .../bkrepo/maven/enum/SnapshotBehaviorType.kt | 0 .../exception/MavenArtifactFormatException.kt | 0 .../maven/pojo/MavenExceptionResponse.kt | 0 .../tencent/bkrepo/maven/pojo/MavenGAVC.kt | 0 .../bkrepo/maven/pojo/MavenRepoConf.kt | 0 .../tencent/bkrepo/maven/pojo/MavenVersion.kt | 0 .../pojo/metadata/MavenMetadataRequest.kt | 0 .../pojo/response/MavenArtifactResponse.kt | 0 .../maven/pojo/response/MavenGAVCResponse.kt | 0 .../bkrepo/maven/util/MavenGAVCUtils.kt | 0 .../bkrepo/maven/util/MavenStringUtils.kt | 0 .../tencent/bkrepo/maven/util/MavenUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../maven/biz-maven/build.gradle.kts | 2 +- .../maven/artifact/MavenArtifactConfigurer.kt | 0 .../artifact/MavenArtifactInfoResolver.kt | 0 .../MavenDeleteArtifactInfoResolver.kt | 0 .../repository/MavenLocalRepository.kt | 0 .../repository/MavenRemoteRepository.kt | 0 .../repository/MavenVirtualRepository.kt | 0 .../bkrepo/maven/config/MavenProperties.kt | 0 .../controller/MavenResourceController.kt | 0 .../maven/controller/MavenWebController.kt | 0 .../service/MavenMetadataController.kt | 0 .../bkrepo/maven/dao/MavenMetadataDao.kt | 0 .../maven/exception/ConflictException.kt | 0 .../MavenArtifactNotFoundException.kt | 0 .../exception/MavenBadRequestException.kt | 0 .../maven/exception/MavenExceptionHandler.kt | 0 .../MavenMetadataChecksumException.kt | 0 .../exception/MavenPathParserException.kt | 0 .../MavenRequestForbiddenException.kt | 0 .../maven/model/TMavenMetadataRecord.kt | 0 .../com/tencent/bkrepo/maven/pojo/Basic.kt | 0 .../maven/pojo/MavenArtifactVersionData.kt | 0 .../maven/pojo/MavenMetadataSearchPojo.kt | 0 .../bkrepo/maven/service/MavenExtService.kt | 0 .../maven/service/MavenMetadataService.kt | 0 .../bkrepo/maven/service/MavenService.kt | 0 .../maven/service/impl/MavenServiceImpl.kt | 0 ...ommitEdgeCenterMavenMetadataServiceImpl.kt | 0 .../impl/edge/EdgeMavenMetadataService.kt | 0 .../tencent/bkrepo/maven/util/DigestUtils.kt | 0 .../bkrepo/maven/util/MavenConfiguration.kt | 0 .../bkrepo/maven/util/MavenMetadataUtils.kt | 0 .../artifact/MavenArtifactInfoResolverTest.kt | 0 .../maven/artifact/MavenArtifactTest.kt | 0 .../bkrepo/maven/util/MavenStringUtilsTest.kt | 0 .../bkrepo/maven/util/MavenUtilTest.kt | 0 .../maven/boot-maven}/build.gradle.kts | 2 +- .../tencent/bkrepo/maven/MavenApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/maven/build.gradle.kts | 0 .../{ => core}/npm/api-npm/build.gradle.kts | 0 .../tencent/bkrepo/npm/api/AuthResource.kt | 0 .../bkrepo/npm/api/ModuleDepsResource.kt | 0 .../bkrepo/npm/api/NpmFixToolResource.kt | 0 .../npm/api/PackageDependentResource.kt | 0 .../bkrepo/npm/artifact/NpmArtifactInfo.kt | 0 .../tencent/bkrepo/npm/constants/Constants.kt | 0 .../bkrepo/npm/constants/NpmJsonConstatns.kt | 0 .../bkrepo/npm/pojo/NpmDeleteResponse.kt | 0 .../tencent/bkrepo/npm/pojo/NpmDomainInfo.kt | 0 .../bkrepo/npm/pojo/NpmErrorResponse.kt | 0 .../bkrepo/npm/pojo/NpmSearchResponse.kt | 0 .../bkrepo/npm/pojo/NpmSuccessResponse.kt | 0 .../npm/pojo/auth/NpmAuthFailResponse.kt | 0 .../bkrepo/npm/pojo/auth/NpmAuthResponse.kt | 0 .../npm/pojo/enums/NpmOperationAction.kt | 0 .../pojo/fixtool/DateTimeFormatResponse.kt | 0 .../pojo/fixtool/PackageManagerResponse.kt | 0 .../fixtool/PackageMetadataFixResponse.kt | 0 .../pojo/metadata/MetadataSearchRequest.kt | 0 .../npm/pojo/metadata/disttags/DistTags.kt | 0 .../pojo/migration/MigrationErrorDataInfo.kt | 0 .../migration/MigrationFailDataDetailInfo.kt | 0 .../migration/NpmDataMigrationResponse.kt | 0 .../NpmPackageDependentMigrationResponse.kt | 0 .../MigrationErrorDataCreateRequest.kt | 0 .../npm/pojo/module/des/ModuleDepsInfo.kt | 0 .../module/des/service/DepsCreateRequest.kt | 0 .../module/des/service/DepsDeleteRequest.kt | 0 .../bkrepo/npm/pojo/user/NpmPackageInfo.kt | 0 .../pojo/user/NpmPackageLatestVersionInfo.kt | 0 .../npm/pojo/user/NpmPackageVersionInfo.kt | 0 .../bkrepo/npm/pojo/user/PackageInfo.kt | 0 .../npm/pojo/user/PackageVersionInfo.kt | 0 .../pojo/user/request/PackageDeleteRequest.kt | 0 .../request/PackageVersionDeleteRequest.kt | 0 .../{ => core}/npm/biz-npm/build.gradle.kts | 2 +- .../bkrepo/npm/NpmAutoConfiguration.kt | 0 .../npm/artifact/NpmArtifactConfigurer.kt | 0 .../npm/artifact/NpmArtifactInfoResolver.kt | 0 .../npm/artifact/NpmLoginAuthHandler.kt | 0 .../artifact/repository/NpmLocalRepository.kt | 0 .../repository/NpmRemoteRepository.kt | 0 .../repository/NpmVirtualRepository.kt | 0 .../npm/config/ArtifactWebServerCustomizer.kt | 0 .../npm/controller/NpmClientController.kt | 0 .../UserModuleDependentsController.kt | 0 .../npm/controller/UserNpmController.kt | 0 .../UserPackageMigrationController.kt | 0 .../MigrationErrorDataRepository.kt | 0 .../dao/repository/ModuleDepsRepository.kt | 0 .../exception/NpmArgumentNotFoundException.kt | 0 .../exception/NpmArgumentResolverException.kt | 0 .../exception/NpmArtifactExistException.kt | 0 .../exception/NpmArtifactNotFoundException.kt | 0 .../npm/exception/NpmBadRequestException.kt | 0 .../npm/exception/NpmClientAuthException.kt | 0 .../bkrepo/npm/exception/NpmException.kt | 0 .../npm/exception/NpmExceptionHandler.kt | 0 .../npm/exception/NpmLoginFailException.kt | 0 .../npm/exception/NpmRepoNotFoundException.kt | 0 .../npm/exception/NpmTagNotExistException.kt | 0 .../npm/exception/NpmTokenIllegalException.kt | 0 .../bkrepo/npm/handler/NpmDependentHandler.kt | 0 .../bkrepo/npm/handler/NpmPackageHandler.kt | 0 .../bkrepo/npm/model/TMigrationErrorData.kt | 0 .../tencent/bkrepo/npm/model/TModuleDeps.kt | 0 .../model/metadata/MaintainersDeserializer.kt | 0 .../npm/model/metadata/NpmPackageMetaData.kt | 0 .../npm/model/metadata/NpmVersionMetadata.kt | 0 .../model/metadata/VersionsDeserializer.kt | 0 .../npm/model/metadata/VersionsSerializer.kt | 0 .../npm/model/properties/PackageProperties.kt | 0 .../npm/properties/MigrationProperties.kt | 0 .../bkrepo/npm/properties/NpmProperties.kt | 0 .../npm/properties/TarballProperties.kt | 0 .../bkrepo/npm/resource/AuthResourceImpl.kt | 0 .../npm/resource/ModuleDepsResourceImpl.kt | 0 .../npm/resource/NpmFixToolResourceImpl.kt | 0 .../resource/PackageDependentResourceImpl.kt | 0 .../npm/service/DataMigrationService.kt | 0 .../bkrepo/npm/service/ModuleDepsService.kt | 0 .../bkrepo/npm/service/NpmClientService.kt | 0 .../bkrepo/npm/service/NpmFixToolService.kt | 0 .../bkrepo/npm/service/NpmWebService.kt | 0 .../npm/service/PackageDependentService.kt | 0 .../npm/service/impl/AbstractNpmService.kt | 0 .../npm/service/impl/NpmClientServiceImpl.kt | 0 .../npm/service/impl/NpmFixToolServiceImpl.kt | 0 .../npm/service/impl/NpmWebServiceImpl.kt | 0 .../com/tencent/bkrepo/npm/utils/BeanUtils.kt | 0 .../com/tencent/bkrepo/npm/utils/GsonUtils.kt | 0 .../bkrepo/npm/utils/MigrationUtils.kt | 0 .../com/tencent/bkrepo/npm/utils/NpmUtils.kt | 0 .../tencent/bkrepo/npm/utils/OkHttpUtil.kt | 0 .../bkrepo/npm/utils/ThreadPoolManager.kt | 0 .../com/tencent/bkrepo/npm/utils/TimeUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../tencent/bkrepo/npm/utils/NpmUtilsTest.kt | 0 .../{ => core}/npm/boot-npm/build.gradle.kts | 2 +- .../com/tencent/bkrepo/npm/NpmApplication.kt | 0 .../boot-npm/src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/npm/build.gradle.kts | 0 .../nuget/api-nuget/build.gradle.kts | 0 .../nuget/artifact/NugetArtifactInfo.kt | 0 .../bkrepo/nuget/constant/NugetConstants.kt | 0 .../bkrepo/nuget/constant/NugetMessageCode.kt | 0 .../bkrepo/nuget/constant/NugetQueryType.kt | 0 .../bkrepo/nuget/constant/ResourceType.kt | 0 .../bkrepo/nuget/model/NugetErrorResponse.kt | 0 .../model/v2/search/NuGetSearchRequest.kt | 0 .../nuget/model/v3/search/SearchRequest.kt | 0 .../nuget/model/v3/search/SearchResponse.kt | 0 .../model/v3/search/SearchResponseData.kt | 0 .../v3/search/SearchResponseDataVersion.kt | 0 .../nuget/biz-nuget/build.gradle.kts | 2 +- .../nuget/artifact/NugetArtifactConfigurer.kt | 0 .../artifact/auth/NugetApiKeyAuthHandler.kt | 0 .../repository/NugetLocalRepository.kt | 0 .../repository/NugetRemoteRepository.kt | 0 .../repository/NugetVirtualRepository.kt | 0 .../resolver/NugetArtifactInfoResolver.kt | 0 .../NugetDeleteArtifactInfoResolver.kt | 0 .../NugetDownloadArtifactInfoResolver.kt | 0 .../resolver/NugetPublishInfoResolver.kt | 0 .../NugetRegistrationArtifactInfoResolver.kt | 0 .../common/NugetRemoteAndVirtualCommon.kt | 0 .../tencent/bkrepo/nuget/common/UrlConvert.kt | 0 .../bkrepo/nuget/constant/NugetProperties.kt | 0 .../nuget/controller/NugetClientController.kt | 0 .../NugetPackageContentController.kt | 0 .../NugetPackageMetadataController.kt | 0 .../nuget/controller/NugetSearchController.kt | 0 .../controller/NugetServiceIndexController.kt | 0 .../nuget/controller/NugetWebController.kt | 0 .../NugetArtifactReceiveException.kt | 0 .../bkrepo/nuget/exception/NugetException.kt | 0 .../exception/NugetFeedNotFoundException.kt | 0 .../NugetMetadataListNotFoundException.kt | 0 .../NugetVersionListNotFoundException.kt | 0 .../nuget/handler/NugetPackageHandler.kt | 0 .../pojo/artifact/NugetDeleteArtifactInfo.kt | 0 .../artifact/NugetDownloadArtifactInfo.kt | 0 .../pojo/artifact/NugetPublishArtifactInfo.kt | 0 .../artifact/NugetRegistrationArtifactInfo.kt | 0 .../nuget/pojo/domain/NugetDomainInfo.kt | 0 .../bkrepo/nuget/pojo/nuspec/NuspecFile.kt | 0 .../nuget/pojo/nuspec/NuspecMetadata.kt | 0 .../bkrepo/nuget/pojo/nuspec/NuspecPackage.kt | 0 .../nuget/pojo/request/NugetSearchRequest.kt | 0 .../pojo/request/PackageDeleteRequest.kt | 0 .../request/PackageVersionDeleteRequest.kt | 0 .../pojo/response/VersionListResponse.kt | 0 .../response/search/NugetSearchResponse.kt | 0 .../response/search/SearchResponseData.kt | 0 .../search/SearchResponseDataTypes.kt | 0 .../search/SearchResponseDataVersion.kt | 0 .../nuget/pojo/user/PackageVersionInfo.kt | 0 .../nuget/pojo/v3/metadata/feed/Feed.kt | 0 .../nuget/pojo/v3/metadata/feed/Resource.kt | 0 .../v3/metadata/index/AlternatePackage.kt | 0 .../pojo/v3/metadata/index/Dependency.kt | 0 .../v3/metadata/index/DependencyGroups.kt | 0 .../pojo/v3/metadata/index/Deprecation.kt | 0 .../index/RegistrationCatalogEntry.kt | 0 .../v3/metadata/index/RegistrationIndex.kt | 0 .../v3/metadata/index/RegistrationItem.kt | 0 .../v3/metadata/index/RegistrationPageItem.kt | 0 .../pojo/v3/metadata/index/Vulnerability.kt | 0 .../pojo/v3/metadata/leaf/RegistrationLeaf.kt | 0 .../pojo/v3/metadata/page/RegistrationPage.kt | 0 .../nuget/service/NugetClientService.kt | 0 .../service/NugetPackageContentService.kt | 0 .../service/NugetPackageMetadataService.kt | 0 .../nuget/service/NugetSearchService.kt | 0 .../nuget/service/NugetServiceIndexService.kt | 0 .../bkrepo/nuget/service/NugetWebService.kt | 0 .../service/impl/NugetClientServiceImpl.kt | 0 .../impl/NugetPackageContentServiceImpl.kt | 0 .../impl/NugetPackageMetadataServiceImpl.kt | 0 .../service/impl/NugetSearchServiceImpl.kt | 0 .../impl/NugetServiceIndexServiceImpl.kt | 0 .../nuget/service/impl/NugetWebServiceImpl.kt | 0 .../bkrepo/nuget/util/DecompressUtil.kt | 0 .../tencent/bkrepo/nuget/util/NugetUtils.kt | 0 .../nuget/util/NugetV3RegistrationUtils.kt | 0 .../bkrepo/nuget/util/NugetVersionUtils.kt | 0 .../nuget/util/RemoteRegistrationUtils.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../src/main/resources/service_document.xml | 0 .../main/resources/v3/nugetRootFeedIndex.json | 0 .../core/nuget/boot-nuget/build.gradle.kts | 34 ++++++++++++++ .../tencent/bkrepo/nuget/NugetApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/nuget/build.gradle.kts | 0 .../{ => core}/oci/api-oci/build.gradle.kts | 0 .../com/tencent/bkrepo/oci/api/OciClient.kt | 0 .../bkrepo/oci/constant/OciConstants.kt | 0 .../oci/constant/OciErrorMessageConstants.kt | 0 .../bkrepo/oci/constant/OciMessageCode.kt | 0 .../oci/exception/OciBadRequestException.kt | 0 .../ImagePackageInfoPullExtension.kt | 0 .../oci/extension/ImagePackagePullContext.kt | 0 .../com/tencent/bkrepo/oci/model/BlobSum.kt | 0 .../bkrepo/oci/model/ConfigDescriptor.kt | 0 .../tencent/bkrepo/oci/model/Descriptor.kt | 0 .../bkrepo/oci/model/LayerDescriptor.kt | 0 .../bkrepo/oci/model/ManifestSchema1.kt | 0 .../bkrepo/oci/model/ManifestSchema2.kt | 0 .../tencent/bkrepo/oci/model/SchemaVersion.kt | 0 .../oci/pojo/artifact/OciArtifactInfo.kt | 0 .../oci/pojo/artifact/OciBlobArtifactInfo.kt | 0 .../pojo/artifact/OciDeleteArtifactInfo.kt | 0 .../pojo/artifact/OciManifestArtifactInfo.kt | 0 .../oci/pojo/artifact/OciTagArtifactInfo.kt | 0 .../bkrepo/oci/pojo/digest/OciDigest.kt | 0 .../pojo/fixtool/PackageManagerResponse.kt | 0 .../bkrepo/oci/pojo/node/NodeProperty.kt | 0 .../oci/pojo/remote/RemoteRequestProperty.kt | 0 .../oci/pojo/response/ResponseProperty.kt | 0 .../pojo/third/OciReplicationRecordInfo.kt | 0 .../tencent/bkrepo/oci/pojo/user/BasicInfo.kt | 0 .../oci/pojo/user/PackageVersionInfo.kt | 0 .../tencent/bkrepo/oci/util/DecompressUtil.kt | 0 .../bkrepo/oci/util/OciLocationUtils.kt | 0 .../com/tencent/bkrepo/oci/util/OciUtils.kt | 0 .../{ => core}/oci/biz-oci/build.gradle.kts | 2 +- .../artifact/OciRegistryArtifactConfigurer.kt | 0 .../oci/artifact/auth/OciLoginAuthHandler.kt | 0 .../repository/OciRegistryLocalRepository.kt | 0 .../repository/OciRegistryRemoteRepository.kt | 0 .../OciRegistryVirtualRepository.kt | 0 .../resolver/OciArtifactInfoResolver.kt | 0 .../resolver/OciBlobArtifactInfoResolver.kt | 0 .../resolver/OciDeleteArtifactInfoResolver.kt | 0 .../OciManifestArtifactInfoResolver.kt | 0 .../resolver/OciTagArtifactInfoResolver.kt | 0 .../bkrepo/oci/config/OciConsumerConfig.kt | 0 .../bkrepo/oci/config/OciProperties.kt | 0 .../service/OciPackageController.kt | 0 .../oci/controller/user/BaseController.kt | 0 .../oci/controller/user/CatalogController.kt | 0 .../oci/controller/user/OciBlobController.kt | 0 .../controller/user/OciManifestController.kt | 0 .../oci/controller/user/OciTagController.kt | 0 .../oci/controller/user/UserOciController.kt | 0 .../bkrepo/oci/dao/OciReplicationRecordDao.kt | 0 .../oci/exception/OciExceptionHandler.kt | 0 .../OciFileAlreadyExistsException.kt | 0 .../oci/exception/OciFileNotFoundException.kt | 0 .../exception/OciForbiddenRequestException.kt | 0 .../oci/exception/OciRepoNotFoundException.kt | 0 .../exception/OciVersionNotFoundException.kt | 0 .../bkrepo/oci/listener/base/EventExecutor.kt | 0 .../consumer/RemoteImageRepoEventConsumer.kt | 0 .../consumer/ReplicationEventListener.kt | 0 .../ThirdPartyReplicationEventConsumer.kt | 0 .../pool/EventHandlerThreadPoolExecutor.kt | 0 .../bkrepo/oci/model/TOciReplicationRecord.kt | 0 .../bkrepo/oci/pojo/auth/BearerToken.kt | 0 .../oci/pojo/response/CatalogResponse.kt | 0 .../oci/pojo/response/OciErrorResponse.kt | 0 .../bkrepo/oci/pojo/response/OciImage.kt | 0 .../oci/pojo/response/OciImageResult.kt | 0 .../bkrepo/oci/pojo/response/OciResponse.kt | 0 .../bkrepo/oci/pojo/response/OciTag.kt | 0 .../bkrepo/oci/pojo/response/OciTagResult.kt | 0 .../tencent/bkrepo/oci/pojo/tags/TagsInfo.kt | 0 .../bkrepo/oci/service/OciBlobService.kt | 0 .../bkrepo/oci/service/OciCatalogService.kt | 0 .../bkrepo/oci/service/OciManifestService.kt | 0 .../bkrepo/oci/service/OciOperationService.kt | 0 .../bkrepo/oci/service/OciTagService.kt | 0 .../oci/service/impl/OciBlobServiceImpl.kt | 0 .../oci/service/impl/OciCatalogServiceImpl.kt | 0 .../service/impl/OciManifestServiceImpl.kt | 0 .../service/impl/OciOperationServiceImpl.kt | 0 .../oci/service/impl/OciTagServiceImpl.kt | 0 .../bkrepo/oci/util/ObjectBuildUtils.kt | 0 .../bkrepo/oci/util/OciResponseUtils.kt | 0 .../com/tencent/bkrepo/oci/util/TimeUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../tencent/bkrepo/oci/test/OciTestInfo.kt | 0 .../tencent/bkrepo/oci/util/OciUtilsTest.kt | 0 .../oci/boot-oci}/build.gradle.kts | 3 +- .../bkrepo/oci/OciRegistryApplication.kt | 0 .../boot-oci/src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/oci/build.gradle.kts | 0 .../opdata/api-opdata/build.gradle.kts | 0 .../bkrepo/opdata/constant/Constants.kt | 0 .../extension/UsageComputerExtension.kt | 0 .../bkrepo/opdata/handler/MaskConfigItem.kt | 0 .../opdata/message/OpDataMessageCode.kt | 0 .../bkrepo/opdata/pojo/AnnotationsRequest.kt | 0 .../bkrepo/opdata/pojo/CleanupRules.kt | 0 .../com/tencent/bkrepo/opdata/pojo/Columns.kt | 0 .../com/tencent/bkrepo/opdata/pojo/Filter.kt | 0 .../bkrepo/opdata/pojo/MetricFilterInfo.kt | 0 .../tencent/bkrepo/opdata/pojo/NodeResult.kt | 0 .../tencent/bkrepo/opdata/pojo/ProjectBill.kt | 0 .../opdata/pojo/ProjectBillStatement.kt | 0 .../pojo/ProjectBillStatementRequest.kt | 0 .../bkrepo/opdata/pojo/ProjectMetrics.kt | 0 .../opdata/pojo/ProjectMetricsOption.kt | 0 .../opdata/pojo/ProjectMetricsRequest.kt | 0 .../bkrepo/opdata/pojo/QueryRequest.kt | 0 .../tencent/bkrepo/opdata/pojo/QueryResult.kt | 0 .../com/tencent/bkrepo/opdata/pojo/Range.kt | 0 .../com/tencent/bkrepo/opdata/pojo/Raw.kt | 0 .../tencent/bkrepo/opdata/pojo/RepoMetrics.kt | 0 .../bkrepo/opdata/pojo/SearchMapResult.kt | 0 .../bkrepo/opdata/pojo/SearchRequest.kt | 0 .../com/tencent/bkrepo/opdata/pojo/Target.kt | 0 .../bkrepo/opdata/pojo/config/ConfigItem.kt | 0 .../opdata/pojo/config/GetConfigRequest.kt | 0 .../opdata/pojo/config/UpdateConfigRequest.kt | 0 .../bkrepo/opdata/pojo/enums/FilterType.kt | 0 .../bkrepo/opdata/pojo/enums/Metrics.kt | 0 .../bkrepo/opdata/pojo/enums/MetricsType.kt | 0 .../bkrepo/opdata/pojo/enums/ProjectType.kt | 0 .../bkrepo/opdata/pojo/enums/StatMetrics.kt | 0 .../bkrepo/opdata/pojo/node/FolderInfo.kt | 0 .../bkrepo/opdata/pojo/node/ListOption.kt | 0 .../opdata/pojo/plugin/PluginCreateRequest.kt | 0 .../bkrepo/opdata/pojo/plugin/PluginDetail.kt | 0 .../opdata/pojo/plugin/PluginListOption.kt | 0 .../opdata/pojo/plugin/PluginUpdateRequest.kt | 0 .../opdata/pojo/registry/InstanceDetail.kt | 0 .../opdata/pojo/registry/InstanceInfo.kt | 0 .../opdata/pojo/registry/InstanceStatus.kt | 0 .../opdata/pojo/registry/ServiceInfo.kt | 0 .../pojo/storage/FileStorageListOption.kt | 0 .../pojo/storage/RootPathStorageMetric.kt | 0 .../pojo/storage/SubFolderStorageMetric.kt | 0 .../opdata/handler/MaskConfigItemTest.kt | 0 .../opdata/biz-opdata/build.gradle.kts | 4 +- .../opdata/client/ArtifactMetricsClient.kt | 0 .../actuator/ActuatorArtifactMetricsClient.kt | 0 .../bkrepo/opdata/client/actuator/Metrics.kt | 0 .../opdata/client/plugin/PluginClient.kt | 0 .../opdata/config/OkHttpConfiguration.kt | 0 .../bkrepo/opdata/config/OpConfiguration.kt | 0 .../bkrepo/opdata/config/OpDataConfigurer.kt | 0 .../config/OpEmptyFolderStatJobProperties.kt | 0 .../config/OpProjectMetricsProperties.kt | 0 .../bkrepo/opdata/config/OpProperties.kt | 0 .../opdata/config/OpStatJobProperties.kt | 0 .../opdata/config/client/ConfigClient.kt | 0 .../client/consul/ConsulConfigClient.kt | 0 .../consul/ConsulConfigClientConfiguration.kt | 0 .../controller/BkBaseExportController.kt | 0 .../opdata/controller/ConfigController.kt | 0 .../controller/FileStorageController.kt | 0 .../opdata/controller/FsClientController.kt | 0 .../opdata/controller/GrafanaController.kt | 0 .../opdata/controller/NodeController.kt | 0 .../NotifyChannelCredentialController.kt | 0 .../opdata/controller/OpServiceController.kt | 0 .../opdata/controller/PluginController.kt | 0 .../opdata/controller/ProjectController.kt | 0 .../opdata/controller/RepoController.kt | 0 .../opdata/exception/HttpRequestException.kt | 0 .../bkrepo/opdata/handler/QueryHandler.kt | 0 .../opdata/handler/impl/ArchiveInfoHandler.kt | 0 .../bkrepo/opdata/handler/impl/BaseHandler.kt | 0 .../opdata/handler/impl/CapSizeHandler.kt | 0 .../impl/EffectiveProjectNumHandler.kt | 0 .../handler/impl/FileExtensionHandler.kt | 0 .../opdata/handler/impl/GcInfoHandler.kt | 0 .../handler/impl/NodeCollectionHandler.kt | 0 .../opdata/handler/impl/NodeNumHandler.kt | 0 .../impl/NodeSizeDistributionHandler.kt | 0 .../opdata/handler/impl/ProjectListHandler.kt | 0 .../handler/impl/ProjectNodeNumHandler.kt | 0 .../handler/impl/ProjectNodeSizeHandler.kt | 0 .../opdata/handler/impl/ProjectNumHandler.kt | 0 .../handler/impl/ProjectTrafficHandler.kt | 0 .../opdata/handler/impl/RepoNodeNumHandler.kt | 0 .../handler/impl/RepoNodeSizeHandler.kt | 0 .../handler/impl/StorageCredentialHandler.kt | 0 .../com/tencent/bkrepo/opdata/job/BaseJob.kt | 0 .../bkrepo/opdata/job/EmptyFolderStatJob.kt | 0 .../opdata/job/pojo/EmptyFolderMetric.kt | 0 .../bkrepo/opdata/job/pojo/JobContext.kt | 0 .../bkrepo/opdata/model/ArchiveInfoModel.kt | 0 .../opdata/model/FileExtensionMetricsModel.kt | 0 .../bkrepo/opdata/model/GcInfoModel.kt | 0 .../opdata/model/NodeCollectionModel.kt | 0 .../tencent/bkrepo/opdata/model/NodeInfo.kt | 0 .../bkrepo/opdata/model/ProjectModel.kt | 0 .../tencent/bkrepo/opdata/model/RepoInfo.kt | 0 .../tencent/bkrepo/opdata/model/RepoModel.kt | 0 .../opdata/model/StorageCredentialsModel.kt | 0 .../bkrepo/opdata/model/TBkRepoMetrics.kt | 0 .../opdata/model/TFileExtensionMetrics.kt | 0 .../bkrepo/opdata/model/TFolderMetrics.kt | 0 .../bkrepo/opdata/model/TPathStatMetric.kt | 0 .../tencent/bkrepo/opdata/model/TPlugin.kt | 0 .../bkrepo/opdata/model/TProjectMetrics.kt | 0 .../opdata/model/TSizeDistributionMetrics.kt | 0 .../bkrepo/opdata/registry/RegistryClient.kt | 0 .../registry/consul/ConsulRegistryClient.kt | 0 .../ConsulRegistryClientConfiguration.kt | 0 .../consul/exception/ConsulApiException.kt | 0 .../registry/consul/pojo/ConsulInstance.kt | 0 .../consul/pojo/ConsulInstanceCheck.kt | 0 .../consul/pojo/ConsulInstanceHealth.kt | 0 .../registry/consul/pojo/ConsulInstanceId.kt | 0 .../opdata/registry/consul/pojo/ConsulNode.kt | 0 .../registry/consul/pojo/ConsulService.kt | 0 .../repository/BkRepoMetricsRepository.kt | 0 .../FileExtensionMetricsRepository.kt | 0 .../repository/FileSystemMetricsRepository.kt | 0 .../repository/FolderMetricsRepository.kt | 0 .../opdata/repository/PluginRepository.kt | 0 .../repository/ProjectMetricsRepository.kt | 0 .../SizeDistributionMetricsRepository.kt | 0 .../service/FileSystemStorageService.kt | 0 .../bkrepo/opdata/service/GrafanaService.kt | 0 .../bkrepo/opdata/service/NodeService.kt | 0 .../bkrepo/opdata/service/OpServiceService.kt | 0 .../bkrepo/opdata/service/PluginService.kt | 0 .../opdata/service/ProjectMetricsService.kt | 0 .../bkrepo/opdata/service/RepoService.kt | 0 .../bkrepo/opdata/util/EasyExcelUtils.kt | 0 .../tencent/bkrepo/opdata/util/HttpUtils.kt | 0 .../bkrepo/opdata/util/MetricsCacheUtil.kt | 0 .../util/MetricsHandlerThreadPoolExecutor.kt | 0 .../bkrepo/opdata/util/StatDateUtil.kt | 0 .../src/main/resources/bootstrap.properties | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../opdata/boot-opdata}/build.gradle.kts | 2 +- .../bkrepo/opdata/OpDataApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../{ => core}/pypi/api-pypi/build.gradle.kts | 0 .../bkrepo/pypi/artifact/PypiArtifactInfo.kt | 0 .../pypi/artifact/PypiSimpleArtifactInfo.kt | 0 .../tencent/bkrepo/pypi/constants/Constant.kt | 0 .../bkrepo/pypi/pojo/PypiExceptionResponse.kt | 0 .../{ => core}/pypi/biz-pypi/build.gradle.kts | 2 +- .../pypi/artifact/PypiArtifactConfigurer.kt | 0 .../bkrepo/pypi/artifact/PypiProperties.kt | 0 .../repository/PypiLocalRepository.kt | 0 .../repository/PypiRemoteRepository.kt | 0 .../repository/PypiVirtualRepository.kt | 0 .../resolver/PypiArtifactInfoResolver.kt | 0 .../PypiSimpleArtifactInfoResolver.kt | 0 .../pypi/artifact/url/UrlPatternUtil.kt | 0 .../tencent/bkrepo/pypi/artifact/xml/Array.kt | 0 .../tencent/bkrepo/pypi/artifact/xml/Data.kt | 0 .../bkrepo/pypi/artifact/xml/Member.kt | 0 .../bkrepo/pypi/artifact/xml/MethodCall.kt | 0 .../pypi/artifact/xml/MethodResponse.kt | 0 .../tencent/bkrepo/pypi/artifact/xml/Param.kt | 0 .../bkrepo/pypi/artifact/xml/Params.kt | 0 .../bkrepo/pypi/artifact/xml/Struct.kt | 0 .../tencent/bkrepo/pypi/artifact/xml/Value.kt | 0 .../pypi/artifact/xml/XmlConvertUtil.kt | 0 .../bkrepo/pypi/artifact/xml/XmlUtil.kt | 0 .../pypi/controller/PypiResourceController.kt | 0 .../controller/PypiWebResourceController.kt | 0 .../pypi/exception/PypiExceptionHandler.kt | 0 .../exception/PypiRemoteSearchException.kt | 0 .../exception/PypiSearchParamException.kt | 0 .../exception/PypiSecurityExceptionHandler.kt | 0 .../exception/PypiSimpleNotFoundException.kt | 0 .../PypiUnSupportCompressException.kt | 0 .../com/tencent/bkrepo/pypi/pojo/Basic.kt | 0 .../pypi/pojo/PypiArtifactVersionData.kt | 0 .../bkrepo/pypi/pojo/PypiPackagePojo.kt | 0 .../bkrepo/pypi/pojo/PypiSearchPojo2.kt | 0 .../bkrepo/pypi/service/PypiService.kt | 0 .../bkrepo/pypi/service/PypiWebService.kt | 0 .../bkrepo/pypi/util/ArtifactFileUtils.kt | 0 .../bkrepo/pypi/util/DecompressUtil.kt | 0 .../tencent/bkrepo/pypi/util/FileNameUtil.kt | 0 .../com/tencent/bkrepo/pypi/util/HtmlUtils.kt | 0 .../com/tencent/bkrepo/pypi/util/JsonUtil.kt | 0 .../com/tencent/bkrepo/pypi/util/JsoupUtil.kt | 0 .../bkrepo/pypi/util/PropertiesUtil.kt | 0 .../bkrepo/pypi/util/PypiVersionUtils.kt | 0 .../com/tencent/bkrepo/pypi/util/UrlUtils.kt | 0 .../com/tencent/bkrepo/pypi/util/XmlUtils.kt | 0 .../tencent/bkrepo/pypi/util/pojo/PypiInfo.kt | 0 .../src/main/resources/templates/welcome.html | 0 .../core/pypi/boot-pypi/build.gradle.kts | 34 ++++++++++++++ .../tencent/bkrepo/pypi/PypiApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../pypi/artifact/url/UrlPatternUtilTest.kt | 0 .../pypi/artifact/xml/XmlConvertUtilTest.kt | 0 src/backend/{ => core}/pypi/build.gradle.kts | 0 .../api-router-controller/build.gradle.kts | 0 .../router/api/RouterControllerClient.kt | 0 .../enum/RouterControllerMessageCode.kt | 0 .../bkrepo/router/enum/RouterNodeType.kt | 0 .../router/pojo/AddRouterNodeRequest.kt | 0 .../router/pojo/AddRouterPolicyRequest.kt | 0 .../bkrepo/router/pojo/NodeLocation.kt | 0 .../router/pojo/RemoveRouterNodeRequest.kt | 0 .../router/pojo/RemoveRouterPolicyRequest.kt | 0 .../tencent/bkrepo/router/pojo/RouterNode.kt | 0 .../bkrepo/router/pojo/RouterPolicy.kt | 0 .../pojo/user/UserAddRouterNodeRequest.kt | 0 .../pojo/user/UserAddRouterPolicyRequest.kt | 0 .../pojo/user/UserRemoveRouterNodeRequest.kt | 0 .../user/UserRemoveRouterPolicyRequest.kt | 0 .../biz-router-controller/build.gradle.kts | 2 +- .../config/RouterControllerConfiguration.kt | 0 .../contoller/service/RouterController.kt | 0 .../contoller/user/RouterAdminController.kt | 0 .../bkrepo/router/model/TNodeLocation.kt | 0 .../bkrepo/router/model/TRouterNode.kt | 0 .../bkrepo/router/model/TRouterPolicy.kt | 0 .../repository/NodeLocationRepository.kt | 0 .../router/repository/RouterNodeRepository.kt | 0 .../repository/RouterPolicyRepository.kt | 0 .../router/service/NodeRedirectService.kt | 0 .../router/service/RouterAdminService.kt | 0 .../router/service/RouterControllerService.kt | 0 .../service/impl/NodeRedirectServiceImpl.kt | 0 .../service/impl/RouterAdminServiceImpl.kt | 0 .../impl/RouterControllerServiceImpl.kt | 0 .../boot-router-controller/build.gradle.kts | 2 +- .../router/RouterControllerApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../router-controller/build.gradle.kts | 0 .../{ => core}/rpm/api-rpm/build.gradle.kts | 0 .../com/tencent/bkrepo/rpm/Constants.kt | 0 .../com/tencent/bkrepo/rpm/api/RpmResource.kt | 0 .../tencent/bkrepo/rpm/api/RpmWebResource.kt | 0 .../bkrepo/rpm/artifact/RpmArtifactInfo.kt | 0 .../bkrepo/rpm/pojo/RpmDeleteResponse.kt | 0 .../bkrepo/rpm/pojo/RpmExceptionResponse.kt | 0 .../bkrepo/rpm/pojo/RpmUploadResponse.kt | 0 .../com/tencent/bkrepo/rpm/util/StrUtils.kt | 0 .../{ => core}/rpm/biz-rpm/build.gradle.kts | 2 +- .../kotlin/com/tencent/bkrepo/rpm/Constant.kt | 0 .../rpm/artifact/RpmArtifactConfigurer.kt | 0 .../rpm/artifact/RpmArtifactInfoResolver.kt | 0 .../artifact/repository/RpmLocalRepository.kt | 0 .../repository/RpmRemoteRepository.kt | 0 .../repository/RpmVirtualRepository.kt | 0 .../rpm/controller/RpmDebugController.kt | 0 .../rpm/controller/RpmResourceController.kt | 0 .../controller/RpmResourceWebController.kt | 0 .../RpmArtifactFormatNotSupportedException.kt | 0 .../RpmArtifactMetadataResolveException.kt | 0 .../rpm/exception/RpmConfNotFoundException.kt | 0 .../rpm/exception/RpmExceptionHandler.kt | 0 .../exception/RpmIndexNotFoundException.kt | 0 .../exception/RpmIndexTypeResolveException.kt | 0 .../rpm/exception/RpmRepoDataException.kt | 0 .../exception/RpmRequestParamMissException.kt | 0 .../exception/RpmVersionNotFoundException.kt | 0 .../tencent/bkrepo/rpm/job/FileListsJob.kt | 0 .../com/tencent/bkrepo/rpm/job/JobService.kt | 0 .../com/tencent/bkrepo/rpm/job/OthersJob.kt | 0 .../com/tencent/bkrepo/rpm/job/PrimaryJob.kt | 0 .../tencent/bkrepo/rpm/pojo/ArtifactFormat.kt | 0 .../tencent/bkrepo/rpm/pojo/ArtifactRepeat.kt | 0 .../com/tencent/bkrepo/rpm/pojo/Basic.kt | 0 .../com/tencent/bkrepo/rpm/pojo/Index.kt | 0 .../com/tencent/bkrepo/rpm/pojo/IndexType.kt | 0 .../tencent/bkrepo/rpm/pojo/RepoDataPojo.kt | 0 .../bkrepo/rpm/pojo/RpmArtifactVersionData.kt | 0 .../tencent/bkrepo/rpm/pojo/RpmPackagePojo.kt | 0 .../tencent/bkrepo/rpm/pojo/RpmRepoConf.kt | 0 .../com/tencent/bkrepo/rpm/pojo/RpmVersion.kt | 0 .../com/tencent/bkrepo/rpm/pojo/XmlIndex.kt | 0 .../bkrepo/rpm/servcie/RpmDebugService.kt | 0 .../tencent/bkrepo/rpm/servcie/RpmService.kt | 0 .../bkrepo/rpm/servcie/RpmWebService.kt | 0 .../com/tencent/bkrepo/rpm/util/GZipUtils.kt | 0 .../bkrepo/rpm/util/RpmCollectionUtils.kt | 0 .../bkrepo/rpm/util/RpmConfiguration.kt | 0 .../tencent/bkrepo/rpm/util/RpmHeaderUtils.kt | 0 .../bkrepo/rpm/util/RpmVersionUtils.kt | 0 .../tencent/bkrepo/rpm/util/XmlStrUtils.kt | 0 .../rpm/util/redline/model/FormatWithType.kt | 0 .../rpm/util/redline/model/LeadWithType.kt | 0 .../rpm/util/redline/model/RpmFormat.kt | 0 .../bkrepo/rpm/util/rpm/RpmFormatUtils.kt | 0 .../bkrepo/rpm/util/rpm/RpmMetadataUtils.kt | 0 .../bkrepo/rpm/util/xStream/XStreamUtil.kt | 0 .../rpm/util/xStream/pojo/RpmChangeLog.kt | 0 .../rpm/util/xStream/pojo/RpmChecksum.kt | 0 .../bkrepo/rpm/util/xStream/pojo/RpmEntry.kt | 0 .../bkrepo/rpm/util/xStream/pojo/RpmFile.kt | 0 .../bkrepo/rpm/util/xStream/pojo/RpmFormat.kt | 0 .../rpm/util/xStream/pojo/RpmHeaderRange.kt | 0 .../rpm/util/xStream/pojo/RpmLocation.kt | 0 .../rpm/util/xStream/pojo/RpmMetadata.kt | 0 .../util/xStream/pojo/RpmMetadataChangeLog.kt | 0 .../util/xStream/pojo/RpmMetadataFileList.kt | 0 .../rpm/util/xStream/pojo/RpmPackage.kt | 0 .../util/xStream/pojo/RpmPackageChangeLog.kt | 0 .../util/xStream/pojo/RpmPackageFileList.kt | 0 .../bkrepo/rpm/util/xStream/pojo/RpmSize.kt | 0 .../bkrepo/rpm/util/xStream/pojo/RpmTime.kt | 0 .../rpm/util/xStream/pojo/RpmVersion.kt | 0 .../rpm/util/xStream/pojo/RpmXmlMetadata.kt | 0 .../rpm/util/xStream/pojo/RpmXmlPackage.kt | 0 .../rpm/util/xStream/repomd/RepoData.kt | 0 .../rpm/util/xStream/repomd/RepoGroup.kt | 0 .../rpm/util/xStream/repomd/RepoIndex.kt | 0 .../bkrepo/rpm/util/xStream/repomd/Repomd.kt | 0 .../bkrepo/rpm/util/RpmVersionUtilsTest.kt | 0 .../{ => core}/rpm/boot-rpm/build.gradle.kts | 2 +- .../com/tencent/bkrepo/rpm/RpmApplication.kt | 0 .../boot-rpm/src/main/resources/bootstrap.yml | 0 .../bkrepo/rpm/util/RpmStringUtilsTest.kt | 0 .../bkrepo/rpm/util/XmlStrUtilsTest.kt | 0 src/backend/{ => core}/rpm/build.gradle.kts | 0 .../{ => core}/s3/api-s3/build.gradle.kts | 0 .../bkrepo/s3/artifact/S3ArtifactInfo.kt | 0 .../tencent/bkrepo/s3/constant/Constants.kt | 0 .../bkrepo/s3/constant/S3ErrorTypes.kt | 0 .../bkrepo/s3/constant/S3HttpHeaders.kt | 0 .../bkrepo/s3/constant/S3MessageCode.kt | 0 .../bkrepo/s3/pojo/CopyObjectResult.kt | 0 .../bkrepo/s3/pojo/ListBucketResult.kt | 0 .../bkrepo/s3/pojo/VersioningConfiguration.kt | 0 .../{ => core}/s3/biz-s3/build.gradle.kts | 2 +- .../bkrepo/s3/artifact/S3LocalRepository.kt | 0 .../bkrepo/s3/artifact/S3RemoteRepository.kt | 0 .../bkrepo/s3/artifact/S3VirtualRepository.kt | 0 .../s3/artifact/auth/AWS4AuthCredentials.kt | 0 .../s3/artifact/auth/AWS4AuthHandler.kt | 0 .../s3/artifact/auth/AbstractAuthValidator.kt | 0 .../s3/artifact/auth/CacheAuthValidator.kt | 0 .../s3/artifact/auth/PasswordAuthValidator.kt | 0 .../s3/artifact/auth/TokenAuthValidator.kt | 0 .../configuration/ResourceWriterConfigurer.kt | 0 .../configuration/S3ArtifactInfoResolver.kt | 0 .../S3RegistryArtifactConfigurer.kt | 0 .../response/S3ArtifactResourceWriter.kt | 0 .../response/S3ExceptionCommonResponse.kt | 0 .../bkrepo/s3/artifact/utils/AWS4AuthUtil.kt | 0 .../bkrepo/s3/artifact/utils/ContextUtil.kt | 0 .../tencent/bkrepo/s3/config/S3WebConfig.kt | 0 .../s3/controller/S3ObjectController.kt | 0 .../exception/AWS4AuthenticationException.kt | 0 .../s3/exception/S3AccessDeniedException.kt | 0 .../bkrepo/s3/exception/S3ExceptionHandler.kt | 0 .../s3/exception/S3InternalException.kt | 0 .../s3/exception/S3NotFoundException.kt | 0 .../bkrepo/s3/service/S3ObjectService.kt | 1 - .../com/tencent/bkrepo/s3/utils/TimeUtil.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../s3/boot-s3}/build.gradle.kts | 2 +- .../com/tencent/bkrepo/s3/S3Application.kt | 0 .../boot-s3/src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/s3/build.gradle.kts | 0 .../{ => core}/svn/api-svn/build.gradle.kts | 0 .../{ => core}/svn/biz-svn/build.gradle.kts | 2 +- .../tencent/bkrepo/svn/UserProxyController.kt | 0 .../svn/artifact/SvnArtifactConfigurer.kt | 0 .../artifact/repository/SvnLocalRepository.kt | 0 .../repository/SvnRemoteRepository.kt | 0 .../repository/SvnVirtualRepository.kt | 0 .../bkrepo/svn/config/SvnConfiguration.kt | 0 .../bkrepo/svn/config/SvnProperties.kt | 0 .../interceptor/ChangeAncestorProxyHandler.kt | 0 .../svn/interceptor/ProxyInterceptor.kt | 0 .../interceptor/SvnDevXAccessInterceptor.kt | 0 .../bkrepo/svn/utils/SvnProxyHelper.kt | 0 .../interceptor/ChangeAncestorFilterTest.kt | 0 .../src/test/resources/testdata/test.xml | 0 .../{ => core}/svn/boot-svn/build.gradle.kts | 2 +- .../com/tencent/bkrepo/svn/SvnApplication.kt | 0 .../boot-svn/src/main/resources/bootstrap.yml | 0 src/backend/{ => core}/svn/build.gradle.kts | 0 .../webhook/api-webhook/build.gradle.kts | 0 .../webhook/constant/AssociationType.kt | 0 .../webhook/constant/WebHookRequestStatus.kt | 0 .../webhook/exception/WebHookMessageCode.kt | 0 .../webhook/pojo/CreateWebHookRequest.kt | 0 .../webhook/pojo/ListWebHookLogOption.kt | 0 .../webhook/pojo/UpdateWebHookRequest.kt | 0 .../tencent/bkrepo/webhook/pojo/WebHook.kt | 0 .../tencent/bkrepo/webhook/pojo/WebHookLog.kt | 0 .../pojo/payload/CommonEventPayload.kt | 0 .../metadata/MetedataDeletedEventPayload.kt | 0 .../payload/metadata/MetedataEventPayload.kt | 0 .../metadata/MetedataSavedEventPayload.kt | 0 .../payload/node/NodeCopiedEventPayload.kt | 0 .../payload/node/NodeCreatedEventPayload.kt | 0 .../payload/node/NodeDeletedEventPayload.kt | 0 .../node/NodeDownloadedEventPayload.kt | 0 .../pojo/payload/node/NodeEventPayload.kt | 0 .../payload/node/NodeMovedEventPayload.kt | 0 .../payload/node/NodeRenamedEventPayload.kt | 0 .../project/ProjectCreatedEventPayload.kt | 0 .../payload/repo/RepoCreatedEventPayload.kt | 0 .../payload/repo/RepoDeletedEventPayload.kt | 0 .../pojo/payload/repo/RepoEventPayload.kt | 0 .../payload/repo/RepoUpdatedEventPayload.kt | 0 .../payload/test/WebHookTestEventPayload.kt | 0 .../version/VersionCreatedEventPayload.kt | 0 .../webhook/biz-webhook/build.gradle.kts | 2 +- .../webhook/config/WebHookConfigurer.kt | 0 .../webhook/config/WebHookConsumerConfig.kt | 0 .../webhook/config/WebHookProperties.kt | 0 .../webhook/controller/UserLogController.kt | 0 .../controller/UserWebHookController.kt | 0 .../tencent/bkrepo/webhook/dao/WebHookDao.kt | 0 .../bkrepo/webhook/dao/WebHookLogDao.kt | 0 .../bkrepo/webhook/event/WebHookTestEvent.kt | 0 .../webhook/executor/WebHookExecutor.kt | 0 .../executor/WebhookArtifactEventConsumer.kt | 0 .../bkrepo/webhook/metrics/MetricsConstant.kt | 0 .../bkrepo/webhook/metrics/WebHookMetrics.kt | 0 .../tencent/bkrepo/webhook/model/TWebHook.kt | 0 .../bkrepo/webhook/model/TWebHookLog.kt | 0 .../webhook/payload/EventPayloadFactory.kt | 0 .../payload/builder/EventPayloadBuilder.kt | 0 .../metedata/MetadataDeletedPayloadBuilder.kt | 0 .../metedata/MetadataSavedPayloadBuilder.kt | 0 .../builder/node/NodeCopiedPayloadBuilder.kt | 0 .../builder/node/NodeCreatedPayloadBuilder.kt | 0 .../builder/node/NodeDeletedPayloadBuilder.kt | 0 .../node/NodeDownloadedPayloadBuilder.kt | 0 .../builder/node/NodeMovedPayloadBuilder.kt | 0 .../builder/node/NodePayloadBuilder.kt | 0 .../builder/node/NodeRenamedPayloadBuilder.kt | 0 .../project/ProjectCreatedPayloadBuilder.kt | 0 .../builder/repo/RepoCreatedPayloadBuilder.kt | 0 .../builder/repo/RepoDeletedPayloadBuilder.kt | 0 .../builder/repo/RepoPayloadBuilder.kt | 0 .../builder/repo/RepoUpdatedPayloadBuilder.kt | 0 .../builder/test/TestPayloadBuilder.kt | 0 .../version/VersionCreatedPayloadBuilder.kt | 0 .../bkrepo/webhook/service/LogService.kt | 0 .../bkrepo/webhook/service/WebHookService.kt | 0 .../webhook/service/impl/LogServiceImpl.kt | 0 .../service/impl/WebHookServiceImpl.kt | 0 .../resources/i18n/messages_en.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../webhook/WebHookTestConfiguration.kt | 0 .../bkrepo/webhook/WebHookTestConstants.kt | 0 .../bkrepo/webhook/service/ServiceBaseTest.kt | 0 .../webhook/service/WebHookServiceTest.kt | 0 .../test/resources/bootstrap-ut.properties | 0 .../webhook/boot-webhook}/build.gradle.kts | 3 +- .../bkrepo/webhook/WebHookApplication.kt | 0 .../src/main/resources/bootstrap.yml | 0 .../{ => core}/webhook/build.gradle.kts | 0 src/backend/gradle/publish-api.gradle.kts | 2 +- src/backend/media/biz-media/build.gradle.kts | 2 +- src/backend/nuget/boot-nuget/build.gradle.kts | 34 -------------- .../opdata/boot-opdata/build.gradle.kts | 34 -------------- src/backend/pypi/boot-pypi/build.gradle.kts | 34 -------------- .../biz-repository/build.gradle.kts | 2 +- src/backend/s3/boot-s3/build.gradle.kts | 34 -------------- src/backend/settings.gradle.kts | 44 +++++++++---------- .../webhook/boot-webhook/build.gradle.kts | 34 -------------- 2090 files changed, 269 insertions(+), 271 deletions(-) delete mode 100644 src/backend/archive/boot-archive/build.gradle.kts rename src/backend/{ => core}/analysis-executor/api-analysis-executor/build.gradle.kts (96%) rename src/backend/{ => core}/analysis-executor/api-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/api/ExecutorClient.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/build.gradle.kts (93%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/CommonScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ExecutorScheduler.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutorFactory.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/SubtaskHeartbeatRunnable.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/AbsArrowheadScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/ArrowheadScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/component/FileLoader.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/AnalysisExecutorArtifactConfigurer.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/DockerProperties.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorConfiguration.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorProperties.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/controller/ExecutorController.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/dependencycheck/DependencyScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/job/CleanJob.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/CommonScanExecutorResult.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV1.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV2.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorResult.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorTask.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/scancodeCheck/ScancodeToolkitExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/standard/StandardScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/trivy/TrivyScanExecutor.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtil.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommonUtils.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/Converter.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/DockerScanHelper.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtils.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/resources/standalone.toml (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/main/resources/toolScan.sh (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtilTest.kt (100%) rename src/backend/{ => core}/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtilsTest.kt (100%) rename src/backend/{ => core}/analysis-executor/boot-analysis-executor/build.gradle.kts (95%) rename src/backend/{ => core}/analysis-executor/boot-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/AnalysisExecutorApplication.kt (100%) rename src/backend/{ => core}/analysis-executor/boot-analysis-executor/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/analysis-executor/build.gradle.kts (100%) rename src/backend/{ => core}/analyst/api-analyst/build.gradle.kts (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/api/ScanClient.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyContext.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyExtension.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/message/ScannerMessageCode.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanReport.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanStatus.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/AutoScanConfiguration.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Constant.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/LeakType.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Node.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ProjectScanConfiguration.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanPlan.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanStatus.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTask.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTaskStatus.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTriggerType.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/SubScanTask.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/TaskMetadata.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/DockerExecutionCluster.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/ExecutionCluster.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesDeploymentExecutionCluster.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesExecutionClusterProperties.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesJobExecutionCluster.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseInfo.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseJsonInfo.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseObject.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Component.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Report.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Vulnerability.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadLoadResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadSaveResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactPlanRelationRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactVulnerabilityRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/CreateScanPlanRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultDetailRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultOverviewRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/GlobalScanRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LicenseScanQualityUpdateRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LoadResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PipelineScanRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PlanCountRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ProjectScanConfigurationPageRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ReportResultRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SaveResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanQualityUpdateRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanTaskQuery.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SubtaskInfoRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/UpdateScanPlanRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencyLoadResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencySaveResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/ListFilterRuleRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/MatchFilterRuleRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/UpdateFilterRuleRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ArtifactLicensesDetailRequest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ScancodeToolkitResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/standard/StandardLoadResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivyLoadResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivySaveResultArguments.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelation.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelations.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactVulnerabilityInfo.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultDetail.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultOverview.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultDetail.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultOverview.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/LicenseScanQualityResponse.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanLicensePlanInfo.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanPlanInfo.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanQuality.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScannerBase.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskInfo.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskResultOverview.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/FilterRule.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRule.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleData.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/Rule.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleArtifact.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleType.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/CompositeVersionRange.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/DefaultVersionRange.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumber.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionRange.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleTest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumberTest.kt (100%) rename src/backend/{ => core}/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionRangeTest.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/build.gradle.kts (92%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/AnalystLoadBalancer.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/CacheableRepositoryClient.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ReportExporter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ScannerPermissionCheckHandler.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/AbstractScanExecutorResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/Extra.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScanExecutorResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScannerConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/Converter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/ApplicationItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CheckSecItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CveSecItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/SensitiveItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TApplicationItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCheckSecItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCveSecItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TSensitiveItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/Converter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyCheckConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/dao/DependencyItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/model/TDependencyItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/CveDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/KnowledgeBase.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/LicenseDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/MongoKnowledgeBase.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TCve.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TLicense.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScanCodeConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScancodeResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/dao/ScancodeItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/model/TScancodeItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/LicenseResultDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SecurityResultDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SensitiveResultDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TLicenseResult.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSecurityResult.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSensitiveResult.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/Converter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyResultManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/dao/VulnerabilityItemDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/model/TVulnerabilityItem.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalysisLoadBalancerConfiguration.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalystArtifactConfigurer.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ReportExportProperties.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerConfiguration.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerProperties.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ThreadPoolTaskExecutorConfiguration.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/ScanController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/SystemFilterRuleController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserExecutionClusterController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserFilterRuleController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserLicenseController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserProjectScanConfigurationController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanPlanController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanQualityController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanReportController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScannerController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserTemporaryScanController.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/AbsSubScanTaskDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ArchiveSubScanTaskDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ExecutionClusterDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FileScanResultDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FilterRuleDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/PlanArtifactLatestSubScanTaskDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ProjectScanConfigurationDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanPlanDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanTaskDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerSimpleMongoDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SpdxLicenseDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SubScanTaskDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/AbsSubtaskDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/CommonUtils.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/DockerDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDeploymentDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/ResourceRequirements.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcherFactory.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPoller.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPullDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPushDispatcher.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/DeploymentDsl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/JobDsl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/PodDsl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/SecretDsl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCount.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountDao.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountFactory.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/MongoDistributedCount.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/RedisDistributedCount.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/TDistributedCount.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/AnalystScanEventConsumer.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/ScanTaskStatusChangedEvent.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/SubtaskStatusChangedEvent.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/ScanTaskStatusChangedEventListener.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/SubtaskStatusChangedEventListener.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ArtifactDeletedException.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/LicenseNotFoundException.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScanTaskNotFoundException.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScannerNotFoundException.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/TaskSubmitInterruptedException.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/job/CorrectMetricsJob.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/FileSizeLevel.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/ScannerMetrics.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/LeakDetailExport.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/ScanPlanExport.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/SubScanTaskDefinition.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TArchiveSubScanTask.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TExecutionCluster.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFileScanResult.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFilterRule.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TPlanArtifactLatestSubScanTask.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TProjectScanConfiguration.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanPlan.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanTask.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanner.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSpdxLicense.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSubScanTask.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ExecutionClusterService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/FilterRuleService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/LicenseScanQualityService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ProjectScanConfigurationService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanCorrectService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanQualityService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanTaskService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScannerService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/SpdxLicenseService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/TemporaryScanTokenService.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ExecutionClusterServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/FilterRuleServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/LicenseScanQualityServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectScanConfigurationServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectUsageStatisticsServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanCorrectServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanQualityServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanTaskServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScannerServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/SpdxLicenseServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/TemporaryScanTokenServiceImpl.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/Action.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/ScanTaskSchedulerConfiguration.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/StateAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TaskStateMachineConfiguration.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TimeoutTaskScheduler.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/IteratorManager.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeFilter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeIterator.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PackageIterator.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PageableIterator.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/ProjectIdIterator.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/SubtaskEvent.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/CreateSubtaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ExecuteSubtaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/FinishSubtaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/NotifySubtaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/PullSubtaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/RetryAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ReuseResultAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/SubtaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/CreateSubtaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/ExecuteSubtaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/FinishSubtaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/NotifySubtaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/PullSubtaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/RetryContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/SubtaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/ScanTaskEvent.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/FinishedAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/PendingAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/ResetAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StopAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StoppingAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittedAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittingAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/TaskAction.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/CreateTaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/FinishTaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/ResetTaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/StopTaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/SubmitTaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/TaskContext.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Converter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/EasyExcelUtils.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/K8SHelper.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Request.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtil.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanLicenseConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtil.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanPlanConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScannerUtil.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/SubtaskConverter.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/Constants.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RequestTest.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtilTest.kt (100%) rename src/backend/{ => core}/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtilTest.kt (100%) rename src/backend/{ => core}/analyst/boot-analyst/build.gradle.kts (96%) rename src/backend/{ => core}/analyst/boot-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/AnalystApplication.kt (100%) rename src/backend/{ => core}/analyst/boot-analyst/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/analyst/build.gradle.kts (100%) rename src/backend/{ => core}/archive/README.md (100%) rename src/backend/{ => core}/archive/api-archive/build.gradle.kts (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveFileNotFound.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveStatus.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/CompressStatus.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/api/ArchiveClient.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveConstants.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveMessageCode.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveRestoreTier.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveStorageClass.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/ArchiveFile.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/CompressFile.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/ArchiveFileRequest.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompleteCompressRequest.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompressFileRequest.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CreateArchiveFileRequest.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/DeleteCompressRequest.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UncompressFileRequest.kt (100%) rename src/backend/{ => core}/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UpdateCompressFileStatusRequest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/build.gradle.kts (92%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveConfiguration.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveCredentialsProperties.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveProperties.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/CompressProperties.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/DownloadProperties.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/GcProperties.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/service/ArchiveController.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/user/SystemAdminController.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ActiveTaskSubscriber.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/DiskHealthObserver.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessor.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileEntityEvent.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/PriorityWrapper.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ReactorExtensions.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/TaskResult.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/ArchiveManager.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/Archiver.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/EmptyArchiver.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/XZArchiver.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDCompressor.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDUncompressor.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManager.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt (97%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxy.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProvider.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProvider.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderFactory.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderProxy.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileStorageFileProvider.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileTask.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/PriorityFileProvider.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileArchivedEvent.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileCompressedEvent.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileRestoredEvent.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileCompressedEvent.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileUncompressedEvent.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/ArchiveListener.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/StorageCompressListener.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/metrics/ArchiveMetrics.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/AbstractEntity.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/IdEntity.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TArchiveFile.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TCompressFile.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileDao.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileRepository.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileDao.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileRepository.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveService.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveServiceImpl.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressService.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressServiceImpl.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminService.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminServiceImpl.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveDaoUtils.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveUtils.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/BaseTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessorTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileStorageFileProviderTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManagerTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxyTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProviderTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/service/CompressServiceTest.kt (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/resources/compress.properties (100%) rename src/backend/{ => core}/archive/biz-archive/src/test/resources/file-core-processor.properties (100%) create mode 100644 src/backend/core/archive/boot-archive/build.gradle.kts rename src/backend/{ => core}/archive/boot-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveApplication.kt (100%) rename src/backend/{ => core}/archive/boot-archive/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/archive/build.gradle.kts (100%) rename src/backend/{ => core}/composer/api-composer/build.gradle.kts (100%) rename src/backend/{ => core}/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerResource.kt (100%) rename src/backend/{ => core}/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerWebResource.kt (100%) rename src/backend/{ => core}/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfo.kt (100%) rename src/backend/{ => core}/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerExceptionResponse.kt (100%) rename src/backend/{ => core}/composer/biz-composer/build.gradle.kts (97%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/Constant.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactConfigurer.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerLocalRepository.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerRemoteRepository.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerVirtualRepository.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerResourceController.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerWebResourceController.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerArtifactMetadataException.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerExceptionHandler.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerPackageMessageDeficiencyException.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerUnSupportCompressException.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactRepeat.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactUploadResponse.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactVersionDetail.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Basic.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerMetadata.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Dist.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerService.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerWebService.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/DecompressUtil.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/HttpUtil.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/JsonUtil.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/UriUtil.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/ComposerArtifact.kt (100%) rename src/backend/{ => core}/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/UriArgs.kt (100%) create mode 100644 src/backend/core/composer/boot-composer/build.gradle.kts rename src/backend/{ => core}/composer/boot-composer/src/main/kotlin/com/tencent/bkrepo/composer/ComposerApplication.kt (100%) rename src/backend/{ => core}/composer/boot-composer/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/composer/boot-composer/src/test/kotlin/com/tencent/bkrepo/composer/util/DecompressUtilTest.kt (100%) rename src/backend/{ => core}/composer/build.gradle.kts (100%) rename src/backend/{ => core}/conan/api-conan/build.gradle.kts (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/ConanMessageCode.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/Constants.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanDomainInfo.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageDeleteRequest.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageUploadRequest.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeDeleteRequest.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeUploadRequest.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageVersionInfo.kt (100%) rename src/backend/{ => core}/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionOperationRequest.kt (100%) rename src/backend/{ => core}/conan/biz-conan/build.gradle.kts (97%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/ConanArtifactConfigurer.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanLocalRepository.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanRemoteRepository.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanVirtualRepository.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/resolver/ConanArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/config/ConanProperties.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanCommonController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanDeleteController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanRevisionsController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanSearchController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanUploadDownloadController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/UserConanController.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanAuthenticationException.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanException.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanExceptionHandler.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanFileNotFoundException.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanRecipeNotFoundException.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanSearchNotFoundException.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/ConanEventListener.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageDeleteEvent.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageUploadEvent.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeDeleteEvent.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeUploadEvent.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/AbstractRevisionOperation.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageDeleteOperation.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageUploadOperation.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeDeleteOperation.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeUploadOperation.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanFileReference.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanInfo.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanSearchResult.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/IndexInfo.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageReference.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionInfo.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/artifact/ConanArtifactInfo.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/FileRemoveRequest.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/PackageIdRemoveRequest.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanErrorResponse.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanResponse.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pool/ConanThreadPoolExecutor.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanCommonService.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanDeleteService.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanSearchService.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanService.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanUploadDownloadService.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/CommonService.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanCommonServiceImpl.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanDeleteServiceImpl.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanSearchServiceImpl.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanServiceImpl.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanUploadDownloadServiceImpl.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanArtifactInfoUtil.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanInfoLoadUtil.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanPathUtils.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ObjectBuildUtil.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/TimeFormatUtil.kt (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/conan/biz-conan/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/conan/boot-conan/build.gradle.kts (96%) rename src/backend/{ => core}/conan/boot-conan/src/main/kotlin/com/tencent/bkrepo/conan/ConanApplication.kt (100%) rename src/backend/{ => core}/conan/boot-conan/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/conan/build.gradle.kts (100%) rename src/backend/{ => core}/ddc/api-ddc/build.gradle.kts (100%) rename src/backend/{ => core}/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/Contant.kt (100%) rename src/backend/{ => core}/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/extension/BlobDecompressExtension.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/build.gradle.kts (97%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/CompressedBlobArtifactInfo.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/DdcArtifactConfigurer.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/ReferenceArtifactInfo.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcLocalRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcRemoteRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcVirtualRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/CompressedBlobArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/ReferenceArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/PermissionHelper.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/RefDownloadListener.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcConfiguration.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcProperties.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/CompressedBlobController.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/HealthController.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/LegacyReferencesController.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/ReferencesController.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/event/RefDownloadedEvent.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/BlobNotFoundException.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/CbWriterException.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/DdcExceptionHandler.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/NotImplementedException.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/ReferenceIsMissingBlobsException.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/metrics/DdcMeterBinder.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcBlob.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcLegacyRef.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRef.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRefBase.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Blob.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/ContentHash.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/CreateRefResponse.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefId.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefKey.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Reference.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/UploadCompressedBlobResponse.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/BlobRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/LegacyRefRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefBaseRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefRepository.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Blake3Hash.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbArray.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbBinaryAttachment.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbField.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldIterator.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldType.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObject.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObjectAttachment.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriter.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterBase.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/ICbWriter.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/IoHash.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Scope.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/VarULong.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/BlobService.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/CompressedBlobService.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceArtifactService.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceResolver.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceService.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/ByteBufferUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbFieldUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbWriterUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/DdcUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/MediaTypeUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/NodeUtils.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldTest.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterTest.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/VarULongTest.kt (100%) rename src/backend/{ => core}/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtilsTest.kt (100%) rename src/backend/{ => core}/ddc/boot-ddc/build.gradle.kts (96%) rename src/backend/{ => core}/ddc/boot-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/DdcApplication.kt (100%) rename src/backend/{ => core}/ddc/boot-ddc/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/generic/api-generic/build.gradle.kts (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/OperateResource.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/ProxyTemporaryAccessClient.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfo.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfo.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/Constants.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/GenericMessageCode.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/enum/GenericAction.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyContext.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyExtension.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BatchDownloadPaths.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BlockInfo.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/ChunkedResponseProperty.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/CompressedFileInfo.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/FileInfo.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessToken.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessUrl.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryUrlCreateRequest.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/UploadTransactionInfo.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryRequest.kt (100%) rename src/backend/{ => core}/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryResponse.kt (100%) rename src/backend/{ => core}/generic/biz-generic/build.gradle.kts (94%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactConfigurer.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericLocalRepository.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericRemoteRepository.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericVirtualRepository.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/Utils.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/context/GenericArtifactSearchContext.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncCacheHttpClientBuilderFactory.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncRemoteArtifactCacheWriter.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/GenericAsyncCacheHttpClientBuilderFactory.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/ReceiverArtifactFile.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheLocks.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheWriter.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/BkBaseProperties.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/DeltaProperties.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/GenericProperties.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/IOExceptionHandler.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/PlatformProperties.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/ProxyProperties.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericController.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericDeltaController.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/OperateResourceImpl.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/ProxyController.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/TemporaryAccessController.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/proxy/ProxyTemporaryAccessController.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/dao/SignFileDao.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/model/TSignFile.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/CompressedFileService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DeltaSyncService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DownloadService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/OperateService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/ProxyService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/TemporaryAccessService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/UploadService.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/util/ChunkedRequestUtil.kt (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/generic/biz-generic/src/main/resources/i18n/messages_zh_TW.properties (100%) create mode 100644 src/backend/core/generic/boot-generic/build.gradle.kts rename src/backend/{ => core}/generic/boot-generic/src/main/kotlin/com/tencent/bkrepo/generic/GenericApplication.kt (100%) rename src/backend/{ => core}/generic/boot-generic/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/generic/build.gradle.kts (100%) rename src/backend/{ => core}/git/api-git/build.gradle.kts (100%) rename src/backend/{ => core}/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitContentArtifactInfo.kt (100%) rename src/backend/{ => core}/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitPackFileArtifactInfo.kt (100%) rename src/backend/{ => core}/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepositoryArtifactInfo.kt (100%) rename src/backend/{ => core}/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitConstants.kt (100%) rename src/backend/{ => core}/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitMessageCode.kt (100%) rename src/backend/{ => core}/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/HubType.kt (100%) rename src/backend/{ => core}/git/api-git/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/git/api-git/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/git/api-git/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/git/biz-git/build.gradle.kts (97%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitArtifactConfigurer.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepoInterceptor.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitLocalRepository.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitRemoteRepository.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitVirtualRepository.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitContentResolver.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitRepositoryResolver.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/AsynchronousSpringEventsConfig.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitProperties.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitWebConfig.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReaders.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReadersHolder.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/FileId.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/UserHolder.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitController.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitLfsController.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/user/GitApiController.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/exception/LockFailedException.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ContextSettingInterceptor.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ProxyInterceptor.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/CodeRepositoryResolver.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeObjDatabase.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodePackDescription.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRefDatabase.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepository.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryBuilder.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsArtifactOutputStream.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsByteArrayDataReader.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsConstants.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsDataReader.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsFileDataReader.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsReadableChannel.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/InMemoryRepositoryDataService.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/RepositoryDataService.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryEvent.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryListener.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/model/TDfsPackDescription.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/repository/DfsPackDescriptionRepository.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/DefaultReceivePackFactory.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/SmartOutputStream.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/CodeRepositoryDataService.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitApiService.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitService.kt (100%) rename src/backend/{ => core}/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/util/FileUtil.kt (100%) rename src/backend/{ => core}/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryTest.kt (100%) rename src/backend/{ => core}/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/EmptyLockProvider.kt (100%) rename src/backend/{maven/boot-maven => core/git/boot-git}/build.gradle.kts (96%) rename src/backend/{ => core}/git/boot-git/src/main/kotlin/com/tencent/bkrepo/git/GitApplication.kt (100%) rename src/backend/{ => core}/git/boot-git/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/git/build.gradle.kts (100%) rename src/backend/{ => core}/helm/api-helm/build.gradle.kts (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/api/HelmClient.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/Constants.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/HelmMessageCode.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/QueryConstants.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmDomainInfo.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmErrorResponse.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmSuccessResponse.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartOperationRequest.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartPackageDeleteRequest.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartUploadRequest.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartVersionDeleteRequest.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/DateTimeRepairResponse.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/PackageManagerResponse.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionResult.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionStatus.kt (100%) rename src/backend/{ => core}/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/user/PackageVersionInfo.kt (100%) rename src/backend/{ => core}/helm/biz-helm/build.gradle.kts (97%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/HelmArtifactConfigurer.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmLocalRepository.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmRemoteRepository.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmVirtualRepository.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmDeleteArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/DateConverterConfig.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmConsumerConfig.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmProperties.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartManipulationController.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartRepositoryController.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/HelmFixToolController.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/UserHelmController.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/service/HelmIndexController.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/dao/HelmChartEventRecordDao.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmBadRequestException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmErrorInvalidProvenanceFileException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmExceptionHandler.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileAlreadyExistsException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileNotFoundException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmForbiddenRequestException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmIndexFreshFailException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmRepoNotFoundException.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/ChartEventListener.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/AbstractEventJobExecutor.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/RemoteEventJobExecutor.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/PackageReplicationEventConsumer.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/RemoteRepoEventConsumer.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/ReplicationEventListener.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartDeleteEvent.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartUploadEvent.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartVersionDeleteEvent.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/operation/IndexRefreshTask.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/metrics/HelmMetrics.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/model/THelmChartEventRecord.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmArtifactInfo.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmDeleteArtifactInfo.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmChartMetadata.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmIndexYamlMetadata.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmMaintainerMetadata.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/EventHandlerThreadPoolExecutor.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/HelmThreadPoolExecutor.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationService.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryService.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/FixToolService.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartManipulationServiceImpl.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/FixToolServiceImpl.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/HelmOperationService.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ChartParserUtil.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/DecompressUtil.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtils.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmUtils.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ObjectBuilderUtil.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/RemoteDownloadUtil.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/TimeFormatUtil.kt (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/helm/biz-helm/src/main/resources/i18n/messages_zh_TW.properties (100%) create mode 100644 src/backend/core/helm/boot-helm/build.gradle.kts rename src/backend/{ => core}/helm/boot-helm/src/main/kotlin/com/tencent/bkrepo/helm/HelmApplication.kt (100%) rename src/backend/{ => core}/helm/boot-helm/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartInfoServiceTest.kt (100%) rename src/backend/{ => core}/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationServiceTest.kt (100%) rename src/backend/{ => core}/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryServiceTest.kt (100%) rename src/backend/{ => core}/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/HelmFixToolServiceTest.kt (100%) rename src/backend/{ => core}/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtilsTest.kt (100%) rename src/backend/{ => core}/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/YamlUtilsTest.kt (100%) rename src/backend/{ => core}/helm/build.gradle.kts (100%) rename src/backend/{ => core}/job/api-job/build.gradle.kts (100%) rename src/backend/{ => core}/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/api/JobClient.kt (100%) rename src/backend/{ => core}/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ArchiveRestoreRequest.kt (100%) rename src/backend/{ => core}/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/JobDetail.kt (100%) rename src/backend/{ => core}/job/api-schedule/build.gradle.kts (100%) rename src/backend/{ => core}/job/api-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/api/JobScheduleClient.kt (100%) rename src/backend/{ => core}/job/biz-job/build.gradle.kts (91%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/Constants.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/ReplicaRecordCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ActiveProjectService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/BatchJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CenterNodeJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildMongoDbBatchJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeMongoDbBatchJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextMongoDbJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultRepoJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/FailoverJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobConcurrentLevel.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobExecuteContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongoDbBatchJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongodbFailoverJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/NodeStatCompositeMongoDbBatchJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/RecoverableMongodbJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/DeletedNodeCleanupJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/EmptyFolderCleanupJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/FileJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeCopyJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeFolderJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectRepoMetricsStatJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectReportJobContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/BasedRepositoryNodeRetainResolver.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/ExpireFileResolverConfig.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/NodeRetainResolver.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/RepositoryExpireConfig.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeCompleteJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeRestoreJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeCompressedJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeUncompressedJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/SystemGcJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/NodeReport2BkbaseJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/RepoDetailReport2BkbaseJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/ExpiredCacheFileCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexEvictJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexSyncJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexerCustomizer.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessLogEmbeddingJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessRecordCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadPlanExecuteJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadStrategyGenerateJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactSimilarityPreloadPlanGenerator.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/PreloadConfig.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/SimilarityPathUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/AiProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/Document.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/EmbeddingModel.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/HttpEmbeddingModel.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SearchRequest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SpringAiConfiguration.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/VectorStore.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClient.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClientProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusRestApiException.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStore.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStoreProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CollectionSchema.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/ConsistencyLevel.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CreateCollectionReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DataType.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DeleteVectorReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DropCollectionReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/FieldSchema.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/HasCollectionReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexParam.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexType.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/InsertVectorReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/LoadCollectionReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/MetricType.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/SearchVectorReq.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/Vector.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/HasCollectionRes.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/MilvusResponse.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ArtifactCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedBlockNodeCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedRepositoryCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DistributedDockerImageCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/FileReferenceCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/OauthTokenCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/PipelineArtifactCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ProjectUsageStatisticsCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ReplicationLockCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/RunOnceTaskCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ShareRecordCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/SignFileCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/TemporaryTokenCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientCleanJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientOfflineJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ArtifactPushJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ExpiredNodeMarkupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/FileSynchronizeJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/MigrateRepoStorageJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmMetadataRefreshJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmReplicationRefreshJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/OciBlobNodeRefreshJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoInitJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoRefreshJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/ThirdPartyImageReplicationJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/DataSeparationJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/FixFailedDataSeparationJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectEmptyFolderCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectNodeFolderStatJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectRepoMetricsStatJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/EmptyFolderCleanup.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/FileSystemStorageStatJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectEmptyFolderCleanupJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectNodeFolderStatJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectRepoMetricsStatJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/NodeFolderStat.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/StatBaseJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectDailyAvgMetricsJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMetricsReport2BkbaseJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMonthMetricReportJob.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/FolderUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/MongoShardingUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/RepositoryCommonUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/StatUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobConfig.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobRegistryArtifactConfigurer.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectEmptyFolderCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectNodeFolderStatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectRepoMetricsStatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeCompleteJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeRestoreJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessLogEmbeddingJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessRecordCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadPlanExecuteJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadStrategyGenerateJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPushJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/BatchJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/CompositeJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DataSeparationJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedBlockNodeCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedNodeCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedRepositoryCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DistributedDockerImageCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredCacheFileCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredNodeMarkupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileReferenceCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSynchronizeJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSystemStorageStatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FixFailedDataSeparationJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientCleanJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientOfflineProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmMetadataRefreshJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmReplicationRefreshJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/IdleNodeArchiveJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectEmptyFolderCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectNodeFolderStatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectRepoMetricsStatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MigrateRepoStorageJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MongodbJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCompressedJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCopyJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeReport2BkbaseJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeStatCompositeMongoDbBatchJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeUncompressedJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OauthTokenCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OciBlobNodeRefreshJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/PipelineArtifactCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectDailyAvgMetricsJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMetricsReport2BkbaseJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMonthMetricReportJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectRepoMetricsStatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectUsageStatisticsCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicaRecordCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicationLockCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoDetailReport2BkbaseJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoInitJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoRefreshJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RunOnceTaskCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ShareRecordCleanJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SignFileCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StatJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexEvictJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexSyncJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageReconcileJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SystemGcJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/TemporaryTokenCleanupJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ThirdPartyImageReplicationJobProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/service/JobController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ArchiveJobController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/FileCacheController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ShedlockController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserEmbeddingController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserJobController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserMigrateRepoStorageController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserSeparationController.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/FileMissException.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/JobExecuteException.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/RepoMigratingException.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/BlockThreadPoolTaskExecutorDecorator.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTask.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTaskInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/RefreshJobPropertiesListener.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/TaskEventListener.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/event/TaskExecutedEvent.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/JobMetrics.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetrics.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/Constant.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/config/MigrateRepoStorageProperties.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/ArchiveMigrateFailedNodeDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateFailedNodeDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateRepoStorageTaskDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/BaseTaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/TaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/DefaultMigrateFailedHandler.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/MigrateFailedHandler.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TArchiveMigrateFailedNode.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateFailedNode.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateRepoStorageTask.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/CreateMigrateRepoStorageTaskRequest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTask.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTaskState.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/Node.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategy.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeAutoFixStrategy.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeFixer.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/ExecutingTaskRecorder.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateRepoStorageUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueue.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIterator.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/TransferDataExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheCheckRequest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheRequest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FolderInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ShedlockInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TFileCache.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TJobFailover.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/Client.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/DailyClient.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetrics.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyAvgRecord.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyRecord.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TRepoMetrics.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/FileCacheRepository.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/JobSnapshotRepository.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyAvgRecordRepository.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyRecordRepository.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ShedlockRepository.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Job.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobRegistrar.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleConfiguration.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleType.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Registration.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleAutoRegistration.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleJobRegistrar.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/config/DataSeparationConfig.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationFailedRecordDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationNodeDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageVersionDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationTaskDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/repo/SeparationMavenMetadataDao.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataNotFoundException.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataStoreException.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/AbstractSeparationTaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataRestoreTaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataSeparateTaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/FixFailedRecordTaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/SeparationTaskExecutor.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/listener/SeparationRecoveryEventConsumer.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationFailedRecord.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationNode.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackage.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackageVersion.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationTask.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/repo/TSeparationMavenMetadataRecord.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/NodeFilterInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/PackageFilterInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryNodeInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryVersionInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationArtifactType.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationContent.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionFilterInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionSeparationInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/FileReferenceInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/MavenMetadata.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeBaseInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeDetailInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageDetailInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageVersionInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/VersionDetailInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationContext.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationProgress.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/NodeSeparationInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/PackageSeparationInfo.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationCount.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTask.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskRequest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskState.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataRestorer.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataSeparator.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/RepoSpecialDataSeparator.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationDataService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationTaskService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/AbstractHandler.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataRestorerImpl.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataSeparatorImpl.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationDataServiceImpl.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationTaskServiceImpl.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/MavenRepoSpecialDataSeparatorHandler.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/RepoSpecialSeparationMappings.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationQueryHelper.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ArchiveJobService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/FileCacheService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ShedlockService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/SystemJobService.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImpl.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/FileCacheServiceImp.kt (100%) rename src/backend/{ => core}/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ShedlockServiceImp.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/JobTestConfiguration.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/FileReferenceCleanupJobTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/JobBaseTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/base/BlockThreadPoolTaskExecutorDecoratorTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJobTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJobTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtilsTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtilsTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetricsTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeServiceTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageServiceTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutorTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/ExecutorBaseTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutorTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutorTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutorTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContextTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategyTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateTestUtils.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueueTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIteratorTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/model/TNode.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImplTest.kt (100%) rename src/backend/{ => core}/job/biz-job/src/test/resources/job-ut.properties (100%) rename src/backend/{ => core}/job/boot-job-schedule/build.gradle.kts (80%) rename src/backend/{ => core}/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleApplication.kt (100%) rename src/backend/{ => core}/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/config/JobScheduleConfiguration.kt (100%) rename src/backend/{ => core}/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobRpcController.kt (100%) rename src/backend/{ => core}/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobScheduleController.kt (100%) rename src/backend/{ => core}/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/WorkerGroupRpcController.kt (100%) rename src/backend/{ => core}/job/boot-job-schedule/src/main/resources/bootstrap.yaml (100%) rename src/backend/{ => core}/job/boot-job-worker/build.gradle.kts (83%) rename src/backend/{ => core}/job/boot-job-worker/shell/media-process.sh (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/JobWorkerApplication.kt (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleAutoRegistration.kt (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleJobRegistrar.kt (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobHandlerAdapter.kt (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobWorkerConfiguration.kt (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/rpc/JobRpcClient.kt (100%) rename src/backend/{ => core}/job/boot-job-worker/src/main/resources/bootstrap.yaml (100%) rename src/backend/{ => core}/job/boot-job/build.gradle.kts (96%) rename src/backend/{ => core}/job/boot-job/src/main/kotlin/com/tencent/bkrepo/job/JobApplication.kt (100%) rename src/backend/{ => core}/job/boot-job/src/main/resources/bootstrap.properties (100%) rename src/backend/{ => core}/job/build.gradle.kts (100%) rename src/backend/{ => core}/lfs/api-lfs/build.gradle.kts (100%) rename src/backend/{ => core}/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/constant/Constants.kt (100%) rename src/backend/{ => core}/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/ActionDetail.kt (100%) rename src/backend/{ => core}/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchRequest.kt (100%) rename src/backend/{ => core}/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchResponse.kt (100%) rename src/backend/{ => core}/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/LfsObject.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/build.gradle.kts (97%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactConfigurer.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfo.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsLocalRepository.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsProperties.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsRemoteRepository.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsVirtualRepository.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/controller/ObjectController.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/BatchRequestException.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/LfsExceptionHandler.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/security/RemoteAuthHandler.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/service/ObjectService.kt (100%) rename src/backend/{ => core}/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/utils/OidUtils.kt (100%) rename src/backend/{ => core}/lfs/boot-lfs/build.gradle.kts (96%) rename src/backend/{ => core}/lfs/boot-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/LfsApplication.kt (100%) rename src/backend/{ => core}/lfs/boot-lfs/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/maven/api-maven/build.gradle.kts (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenMetadataClient.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenWebResource.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfo.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfo.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/constants/Constant.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/ChecksumPolicyType.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/HashType.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/MavenMessageCode.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/SnapshotBehaviorType.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactFormatException.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenExceptionResponse.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenGAVC.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenRepoConf.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenVersion.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/metadata/MavenMetadataRequest.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenArtifactResponse.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenGAVCResponse.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenGAVCUtils.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtils.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenUtil.kt (100%) rename src/backend/{ => core}/maven/api-maven/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/maven/api-maven/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/maven/api-maven/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/maven/biz-maven/build.gradle.kts (97%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactConfigurer.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenLocalRepository.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenRemoteRepository.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenVirtualRepository.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/config/MavenProperties.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenResourceController.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenWebController.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/service/MavenMetadataController.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/dao/MavenMetadataDao.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/ConflictException.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactNotFoundException.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenBadRequestException.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenExceptionHandler.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenMetadataChecksumException.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenPathParserException.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenRequestForbiddenException.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/model/TMavenMetadataRecord.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/Basic.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenArtifactVersionData.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenMetadataSearchPojo.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenExtService.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenMetadataService.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenService.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/MavenServiceImpl.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/center/CommitEdgeCenterMavenMetadataServiceImpl.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/edge/EdgeMavenMetadataService.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/DigestUtils.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenConfiguration.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenMetadataUtils.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolverTest.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactTest.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtilsTest.kt (100%) rename src/backend/{ => core}/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenUtilTest.kt (100%) rename src/backend/{generic/boot-generic => core/maven/boot-maven}/build.gradle.kts (96%) rename src/backend/{ => core}/maven/boot-maven/src/main/kotlin/com/tencent/bkrepo/maven/MavenApplication.kt (100%) rename src/backend/{ => core}/maven/boot-maven/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/maven/build.gradle.kts (100%) rename src/backend/{ => core}/npm/api-npm/build.gradle.kts (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/AuthResource.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/ModuleDepsResource.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/NpmFixToolResource.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/PackageDependentResource.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/Constants.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/NpmJsonConstatns.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDeleteResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDomainInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmErrorResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSearchResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSuccessResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthFailResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/enums/NpmOperationAction.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/DateTimeFormatResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageManagerResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageMetadataFixResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/MetadataSearchRequest.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/disttags/DistTags.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationErrorDataInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationFailDataDetailInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmDataMigrationResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmPackageDependentMigrationResponse.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/service/MigrationErrorDataCreateRequest.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/ModuleDepsInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsCreateRequest.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsDeleteRequest.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageLatestVersionInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageVersionInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageVersionInfo.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageDeleteRequest.kt (100%) rename src/backend/{ => core}/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageVersionDeleteRequest.kt (100%) rename src/backend/{ => core}/npm/biz-npm/build.gradle.kts (97%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmAutoConfiguration.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactConfigurer.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmLoginAuthHandler.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmLocalRepository.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmRemoteRepository.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmVirtualRepository.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/config/ArtifactWebServerCustomizer.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/NpmClientController.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserModuleDependentsController.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserNpmController.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserPackageMigrationController.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/MigrationErrorDataRepository.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/ModuleDepsRepository.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentNotFoundException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentResolverException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactExistException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactNotFoundException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmBadRequestException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmClientAuthException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmExceptionHandler.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmLoginFailException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmRepoNotFoundException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTagNotExistException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTokenIllegalException.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmDependentHandler.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmPackageHandler.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TMigrationErrorData.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TModuleDeps.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/MaintainersDeserializer.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmPackageMetaData.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmVersionMetadata.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsDeserializer.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsSerializer.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/properties/PackageProperties.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/MigrationProperties.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/NpmProperties.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/TarballProperties.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/AuthResourceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/ModuleDepsResourceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/NpmFixToolResourceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/PackageDependentResourceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/DataMigrationService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/ModuleDepsService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmClientService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmFixToolService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmWebService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/PackageDependentService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/AbstractNpmService.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmClientServiceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmFixToolServiceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmWebServiceImpl.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/BeanUtils.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/GsonUtils.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/MigrationUtils.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/NpmUtils.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/OkHttpUtil.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/ThreadPoolManager.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/TimeUtil.kt (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/npm/biz-npm/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/npm/biz-npm/src/test/kotlin/com/tencent/bkrepo/npm/utils/NpmUtilsTest.kt (100%) rename src/backend/{ => core}/npm/boot-npm/build.gradle.kts (96%) rename src/backend/{ => core}/npm/boot-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmApplication.kt (100%) rename src/backend/{ => core}/npm/boot-npm/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/npm/build.gradle.kts (100%) rename src/backend/{ => core}/nuget/api-nuget/build.gradle.kts (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactInfo.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetConstants.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetMessageCode.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetQueryType.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/ResourceType.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/NugetErrorResponse.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v2/search/NuGetSearchRequest.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchRequest.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponse.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseData.kt (100%) rename src/backend/{ => core}/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseDataVersion.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/build.gradle.kts (97%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactConfigurer.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/auth/NugetApiKeyAuthHandler.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetLocalRepository.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetRemoteRepository.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetVirtualRepository.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDeleteArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDownloadArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetPublishInfoResolver.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetRegistrationArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/NugetRemoteAndVirtualCommon.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/UrlConvert.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetProperties.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetClientController.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageContentController.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageMetadataController.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetSearchController.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetServiceIndexController.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetWebController.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetArtifactReceiveException.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetException.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetFeedNotFoundException.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetMetadataListNotFoundException.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetVersionListNotFoundException.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/handler/NugetPackageHandler.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDeleteArtifactInfo.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDownloadArtifactInfo.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetPublishArtifactInfo.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetRegistrationArtifactInfo.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/domain/NugetDomainInfo.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecFile.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecMetadata.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecPackage.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/NugetSearchRequest.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageDeleteRequest.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageVersionDeleteRequest.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/VersionListResponse.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/NugetSearchResponse.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseData.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataTypes.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataVersion.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/user/PackageVersionInfo.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Feed.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Resource.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/AlternatePackage.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Dependency.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/DependencyGroups.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Deprecation.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationCatalogEntry.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationIndex.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationItem.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationPageItem.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Vulnerability.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/leaf/RegistrationLeaf.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/page/RegistrationPage.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetClientService.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageContentService.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageMetadataService.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetSearchService.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetServiceIndexService.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetWebService.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetClientServiceImpl.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageContentServiceImpl.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageMetadataServiceImpl.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetSearchServiceImpl.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetServiceIndexServiceImpl.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetWebServiceImpl.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/DecompressUtil.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetUtils.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetV3RegistrationUtils.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetVersionUtils.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/RemoteRegistrationUtils.kt (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/resources/service_document.xml (100%) rename src/backend/{ => core}/nuget/biz-nuget/src/main/resources/v3/nugetRootFeedIndex.json (100%) create mode 100644 src/backend/core/nuget/boot-nuget/build.gradle.kts rename src/backend/{ => core}/nuget/boot-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/NugetApplication.kt (100%) rename src/backend/{ => core}/nuget/boot-nuget/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/nuget/build.gradle.kts (100%) rename src/backend/{ => core}/oci/api-oci/build.gradle.kts (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/api/OciClient.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciConstants.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciErrorMessageConstants.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciMessageCode.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciBadRequestException.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackageInfoPullExtension.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackagePullContext.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/BlobSum.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ConfigDescriptor.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/Descriptor.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/LayerDescriptor.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema1.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema2.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/SchemaVersion.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciArtifactInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciBlobArtifactInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciDeleteArtifactInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciManifestArtifactInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciTagArtifactInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/digest/OciDigest.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/fixtool/PackageManagerResponse.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/node/NodeProperty.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/remote/RemoteRequestProperty.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/ResponseProperty.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/third/OciReplicationRecordInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/BasicInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/PackageVersionInfo.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/DecompressUtil.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciLocationUtils.kt (100%) rename src/backend/{ => core}/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciUtils.kt (100%) rename src/backend/{ => core}/oci/biz-oci/build.gradle.kts (97%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/OciRegistryArtifactConfigurer.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/auth/OciLoginAuthHandler.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryLocalRepository.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryRemoteRepository.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryVirtualRepository.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciBlobArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciDeleteArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciManifestArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciTagArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciConsumerConfig.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciProperties.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/service/OciPackageController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/BaseController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/CatalogController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciBlobController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciManifestController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciTagController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/UserOciController.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/dao/OciReplicationRecordDao.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileAlreadyExistsException.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileNotFoundException.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciForbiddenRequestException.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciRepoNotFoundException.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciVersionNotFoundException.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/base/EventExecutor.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/RemoteImageRepoEventConsumer.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ReplicationEventListener.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ThirdPartyReplicationEventConsumer.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/pool/EventHandlerThreadPoolExecutor.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/TOciReplicationRecord.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/auth/BearerToken.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/CatalogResponse.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciErrorResponse.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImage.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImageResult.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciResponse.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTag.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTagResult.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/tags/TagsInfo.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciBlobService.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciCatalogService.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciManifestService.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciOperationService.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciTagService.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciBlobServiceImpl.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciCatalogServiceImpl.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciManifestServiceImpl.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciOperationServiceImpl.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciTagServiceImpl.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/ObjectBuildUtils.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciResponseUtils.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/TimeUtil.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/oci/biz-oci/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/test/OciTestInfo.kt (100%) rename src/backend/{ => core}/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/util/OciUtilsTest.kt (100%) rename src/backend/{helm/boot-helm => core/oci/boot-oci}/build.gradle.kts (96%) rename src/backend/{ => core}/oci/boot-oci/src/main/kotlin/com/tencent/bkrepo/oci/OciRegistryApplication.kt (100%) rename src/backend/{ => core}/oci/boot-oci/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/oci/build.gradle.kts (100%) rename src/backend/{ => core}/opdata/api-opdata/build.gradle.kts (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/constant/Constants.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/extension/UsageComputerExtension.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItem.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/message/OpDataMessageCode.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/AnnotationsRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/CleanupRules.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Columns.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Filter.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/MetricFilterInfo.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/NodeResult.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBill.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatement.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatementRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetrics.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsOption.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryResult.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Range.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Raw.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/RepoMetrics.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchMapResult.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Target.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/ConfigItem.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/GetConfigRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/UpdateConfigRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/FilterType.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/Metrics.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/MetricsType.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/ProjectType.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/StatMetrics.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/FolderInfo.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/ListOption.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginCreateRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginDetail.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginListOption.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginUpdateRequest.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceDetail.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceInfo.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceStatus.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/ServiceInfo.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/FileStorageListOption.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/RootPathStorageMetric.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/SubFolderStorageMetric.kt (100%) rename src/backend/{ => core}/opdata/api-opdata/src/test/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItemTest.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/build.gradle.kts (96%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/ArtifactMetricsClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/ActuatorArtifactMetricsClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/Metrics.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/plugin/PluginClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OkHttpConfiguration.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpConfiguration.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpDataConfigurer.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpEmptyFolderStatJobProperties.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProjectMetricsProperties.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProperties.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpStatJobProperties.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/ConfigClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClientConfiguration.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/BkBaseExportController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ConfigController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FileStorageController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FsClientController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/GrafanaController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NodeController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NotifyChannelCredentialController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/OpServiceController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/PluginController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ProjectController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RepoController.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/exception/HttpRequestException.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/QueryHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ArchiveInfoHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/BaseHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/CapSizeHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/EffectiveProjectNumHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/FileExtensionHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/GcInfoHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeCollectionHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeNumHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeSizeDistributionHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectListHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeNumHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeSizeHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNumHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectTrafficHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeNumHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeSizeHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/StorageCredentialHandler.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/BaseJob.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/EmptyFolderStatJob.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/EmptyFolderMetric.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/JobContext.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ArchiveInfoModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/FileExtensionMetricsModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/GcInfoModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeCollectionModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeInfo.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ProjectModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoInfo.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/StorageCredentialsModel.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TBkRepoMetrics.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFileExtensionMetrics.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFolderMetrics.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPathStatMetric.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPlugin.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TProjectMetrics.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TSizeDistributionMetrics.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/RegistryClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClient.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClientConfiguration.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/exception/ConsulApiException.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstance.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceCheck.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceHealth.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceId.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulNode.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/BkRepoMetricsRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileExtensionMetricsRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileSystemMetricsRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FolderMetricsRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/PluginRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/ProjectMetricsRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/SizeDistributionMetricsRepository.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/FileSystemStorageService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/GrafanaService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/NodeService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/OpServiceService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/PluginService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/ProjectMetricsService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/RepoService.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/EasyExcelUtils.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/HttpUtils.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsCacheUtil.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsHandlerThreadPoolExecutor.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/StatDateUtil.kt (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/resources/bootstrap.properties (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/opdata/biz-opdata/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{composer/boot-composer => core/opdata/boot-opdata}/build.gradle.kts (96%) rename src/backend/{ => core}/opdata/boot-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/OpDataApplication.kt (100%) rename src/backend/{ => core}/opdata/boot-opdata/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/pypi/api-pypi/build.gradle.kts (100%) rename src/backend/{ => core}/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactInfo.kt (100%) rename src/backend/{ => core}/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiSimpleArtifactInfo.kt (100%) rename src/backend/{ => core}/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/constants/Constant.kt (100%) rename src/backend/{ => core}/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiExceptionResponse.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/build.gradle.kts (97%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactConfigurer.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiProperties.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiLocalRepository.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiRemoteRepository.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiVirtualRepository.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiSimpleArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Array.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Data.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Member.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodCall.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodResponse.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Param.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Params.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Struct.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Value.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiResourceController.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiWebResourceController.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiExceptionHandler.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiRemoteSearchException.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSearchParamException.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSecurityExceptionHandler.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSimpleNotFoundException.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiUnSupportCompressException.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/Basic.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiArtifactVersionData.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiPackagePojo.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiSearchPojo2.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiService.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiWebService.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/ArtifactFileUtils.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/DecompressUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/FileNameUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/HtmlUtils.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsonUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsoupUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PropertiesUtil.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PypiVersionUtils.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/UrlUtils.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/XmlUtils.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/pojo/PypiInfo.kt (100%) rename src/backend/{ => core}/pypi/biz-pypi/src/main/resources/templates/welcome.html (100%) create mode 100644 src/backend/core/pypi/boot-pypi/build.gradle.kts rename src/backend/{ => core}/pypi/boot-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/PypiApplication.kt (100%) rename src/backend/{ => core}/pypi/boot-pypi/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtilTest.kt (100%) rename src/backend/{ => core}/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtilTest.kt (100%) rename src/backend/{ => core}/pypi/build.gradle.kts (100%) rename src/backend/{ => core}/router-controller/api-router-controller/build.gradle.kts (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/api/RouterControllerClient.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterControllerMessageCode.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterNodeType.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterNodeRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterPolicyRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/NodeLocation.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterNodeRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterPolicyRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterNode.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterPolicy.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterNodeRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterPolicyRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterNodeRequest.kt (100%) rename src/backend/{ => core}/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterPolicyRequest.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/build.gradle.kts (96%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/config/RouterControllerConfiguration.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/service/RouterController.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/user/RouterAdminController.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TNodeLocation.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterNode.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterPolicy.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/NodeLocationRepository.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterNodeRepository.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterPolicyRepository.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/NodeRedirectService.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterAdminService.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterControllerService.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/NodeRedirectServiceImpl.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterAdminServiceImpl.kt (100%) rename src/backend/{ => core}/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterControllerServiceImpl.kt (100%) rename src/backend/{ => core}/router-controller/boot-router-controller/build.gradle.kts (95%) rename src/backend/{ => core}/router-controller/boot-router-controller/src/main/kotlin/com/tencent/bkrepo/router/RouterControllerApplication.kt (100%) rename src/backend/{ => core}/router-controller/boot-router-controller/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/router-controller/build.gradle.kts (100%) rename src/backend/{ => core}/rpm/api-rpm/build.gradle.kts (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constants.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmResource.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmWebResource.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfo.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmDeleteResponse.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmExceptionResponse.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmUploadResponse.kt (100%) rename src/backend/{ => core}/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/StrUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/build.gradle.kts (97%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constant.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactConfigurer.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmLocalRepository.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmRemoteRepository.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmVirtualRepository.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmDebugController.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceController.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceWebController.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactFormatNotSupportedException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactMetadataResolveException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmConfNotFoundException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmExceptionHandler.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexNotFoundException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexTypeResolveException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRepoDataException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRequestParamMissException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmVersionNotFoundException.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/FileListsJob.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/JobService.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/OthersJob.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/PrimaryJob.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactFormat.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactRepeat.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Basic.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Index.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/IndexType.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RepoDataPojo.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmArtifactVersionData.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmPackagePojo.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmRepoConf.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmVersion.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/XmlIndex.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmDebugService.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmService.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmWebService.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmCollectionUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmConfiguration.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmHeaderUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/FormatWithType.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/LeadWithType.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/RpmFormat.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmFormatUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmMetadataUtils.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/XStreamUtil.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChangeLog.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChecksum.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmEntry.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFile.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFormat.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmHeaderRange.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmLocation.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadata.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataChangeLog.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataFileList.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackage.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageChangeLog.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageFileList.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmSize.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmTime.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmVersion.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlMetadata.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlPackage.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoData.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoGroup.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoIndex.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/Repomd.kt (100%) rename src/backend/{ => core}/rpm/biz-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtilsTest.kt (100%) rename src/backend/{ => core}/rpm/boot-rpm/build.gradle.kts (97%) rename src/backend/{ => core}/rpm/boot-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/RpmApplication.kt (100%) rename src/backend/{ => core}/rpm/boot-rpm/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmStringUtilsTest.kt (100%) rename src/backend/{ => core}/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtilsTest.kt (100%) rename src/backend/{ => core}/rpm/build.gradle.kts (100%) rename src/backend/{ => core}/s3/api-s3/build.gradle.kts (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3ArtifactInfo.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/Constants.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3ErrorTypes.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3HttpHeaders.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3MessageCode.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/CopyObjectResult.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/ListBucketResult.kt (100%) rename src/backend/{ => core}/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/VersioningConfiguration.kt (100%) rename src/backend/{ => core}/s3/biz-s3/build.gradle.kts (97%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3LocalRepository.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3RemoteRepository.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3VirtualRepository.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthCredentials.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthHandler.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AbstractAuthValidator.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/CacheAuthValidator.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/PasswordAuthValidator.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/TokenAuthValidator.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3ArtifactInfoResolver.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3RegistryArtifactConfigurer.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ExceptionCommonResponse.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/AWS4AuthUtil.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/ContextUtil.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/config/S3WebConfig.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/controller/S3ObjectController.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/AWS4AuthenticationException.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3AccessDeniedException.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3ExceptionHandler.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3InternalException.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3NotFoundException.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt (99%) rename src/backend/{ => core}/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/utils/TimeUtil.kt (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/s3/biz-s3/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{git/boot-git => core/s3/boot-s3}/build.gradle.kts (96%) rename src/backend/{ => core}/s3/boot-s3/src/main/kotlin/com/tencent/bkrepo/s3/S3Application.kt (100%) rename src/backend/{ => core}/s3/boot-s3/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/s3/build.gradle.kts (100%) rename src/backend/{ => core}/svn/api-svn/build.gradle.kts (100%) rename src/backend/{ => core}/svn/biz-svn/build.gradle.kts (97%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/UserProxyController.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/SvnArtifactConfigurer.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnLocalRepository.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnRemoteRepository.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnVirtualRepository.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnConfiguration.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnProperties.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ProxyInterceptor.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/SvnDevXAccessInterceptor.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/utils/SvnProxyHelper.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/test/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorFilterTest.kt (100%) rename src/backend/{ => core}/svn/biz-svn/src/test/resources/testdata/test.xml (100%) rename src/backend/{ => core}/svn/boot-svn/build.gradle.kts (96%) rename src/backend/{ => core}/svn/boot-svn/src/main/kotlin/com/tencent/bkrepo/svn/SvnApplication.kt (100%) rename src/backend/{ => core}/svn/boot-svn/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/svn/build.gradle.kts (100%) rename src/backend/{ => core}/webhook/api-webhook/build.gradle.kts (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/AssociationType.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/WebHookRequestStatus.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/exception/WebHookMessageCode.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/CreateWebHookRequest.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/ListWebHookLogOption.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/UpdateWebHookRequest.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHook.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHookLog.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/CommonEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataDeletedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataSavedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCopiedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCreatedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDeletedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDownloadedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeMovedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeRenamedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/project/ProjectCreatedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoCreatedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoDeletedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoUpdatedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/test/WebHookTestEventPayload.kt (100%) rename src/backend/{ => core}/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/version/VersionCreatedEventPayload.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/build.gradle.kts (97%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConfigurer.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConsumerConfig.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookProperties.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserLogController.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserWebHookController.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookDao.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookLogDao.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/event/WebHookTestEvent.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebHookExecutor.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebhookArtifactEventConsumer.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/MetricsConstant.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/WebHookMetrics.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHook.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHookLog.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/EventPayloadFactory.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/EventPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataDeletedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataSavedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCopiedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCreatedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDeletedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDownloadedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeMovedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodePayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeRenamedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/project/ProjectCreatedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoCreatedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoDeletedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoUpdatedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/test/TestPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/version/VersionCreatedPayloadBuilder.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/LogService.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/WebHookService.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/LogServiceImpl.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/WebHookServiceImpl.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/resources/i18n/messages_en.properties (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/resources/i18n/messages_zh_CN.properties (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/main/resources/i18n/messages_zh_TW.properties (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConfiguration.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConstants.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/ServiceBaseTest.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/WebHookServiceTest.kt (100%) rename src/backend/{ => core}/webhook/biz-webhook/src/test/resources/bootstrap-ut.properties (100%) rename src/backend/{oci/boot-oci => core/webhook/boot-webhook}/build.gradle.kts (97%) rename src/backend/{ => core}/webhook/boot-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/WebHookApplication.kt (100%) rename src/backend/{ => core}/webhook/boot-webhook/src/main/resources/bootstrap.yml (100%) rename src/backend/{ => core}/webhook/build.gradle.kts (100%) delete mode 100644 src/backend/nuget/boot-nuget/build.gradle.kts delete mode 100644 src/backend/opdata/boot-opdata/build.gradle.kts delete mode 100644 src/backend/pypi/boot-pypi/build.gradle.kts delete mode 100644 src/backend/s3/boot-s3/build.gradle.kts delete mode 100644 src/backend/webhook/boot-webhook/build.gradle.kts diff --git a/src/backend/archive/boot-archive/build.gradle.kts b/src/backend/archive/boot-archive/build.gradle.kts deleted file mode 100644 index fa471d7a52..0000000000 --- a/src/backend/archive/boot-archive/build.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -dependencies { - implementation(project(":archive:biz-archive")) -} diff --git a/src/backend/auth/biz-auth/build.gradle.kts b/src/backend/auth/biz-auth/build.gradle.kts index 955178a7ab..f0b623f85a 100644 --- a/src/backend/auth/biz-auth/build.gradle.kts +++ b/src/backend/auth/biz-auth/build.gradle.kts @@ -42,6 +42,6 @@ dependencies { implementation("org.apache.httpcomponents:httpclient") implementation("com.tencent.bk.sdk:crypto-java-sdk") implementation("io.micrometer:micrometer-registry-prometheus") - api(project(":router-controller:api-router-controller")) + api(project(":core:router-controller:api-router-controller")) api(project(":common:common-metadata:metadata-service")) } diff --git a/src/backend/boot-assembly/build.gradle.kts b/src/backend/boot-assembly/build.gradle.kts index b0c73b4e6a..265f2202b7 100644 --- a/src/backend/boot-assembly/build.gradle.kts +++ b/src/backend/boot-assembly/build.gradle.kts @@ -32,22 +32,22 @@ dependencies { implementation(project(":auth:biz-auth")) implementation(project(":repository:biz-repository")) - implementation(project(":generic:biz-generic")) - implementation(project(":composer:biz-composer")) - implementation(project(":helm:biz-helm")) - implementation(project(":maven:biz-maven")) - implementation(project(":npm:biz-npm")) - implementation(project(":nuget:biz-nuget")) - implementation(project(":rpm:biz-rpm")) - implementation(project(":oci:biz-oci")) - implementation(project(":job:biz-job")) - implementation(project(":analyst:biz-analyst")) + implementation(project(":core:generic:biz-generic")) + implementation(project(":core:composer:biz-composer")) + implementation(project(":core:helm:biz-helm")) + implementation(project(":core:maven:biz-maven")) + implementation(project(":core:npm:biz-npm")) + implementation(project(":core:nuget:biz-nuget")) + implementation(project(":core:rpm:biz-rpm")) + implementation(project(":core:oci:biz-oci")) + implementation(project(":core:job:biz-job")) + implementation(project(":core:analyst:biz-analyst")) implementation(project(":replication:biz-replication")) - implementation(project(":webhook:biz-webhook")) - implementation(project(":lfs:biz-lfs")) - implementation(project(":ddc:biz-ddc")) - implementation(project(":archive:biz-archive")) - implementation(project(":router-controller:biz-router-controller")) + implementation(project(":core:webhook:biz-webhook")) + implementation(project(":core:lfs:biz-lfs")) + implementation(project(":core:ddc:biz-ddc")) + implementation(project(":core:archive:biz-archive")) + implementation(project(":core:router-controller:biz-router-controller")) } configurations.all { diff --git a/src/backend/common/common-artifact/artifact-service/build.gradle.kts b/src/backend/common/common-artifact/artifact-service/build.gradle.kts index 20e2df9adc..041042eee6 100644 --- a/src/backend/common/common-artifact/artifact-service/build.gradle.kts +++ b/src/backend/common/common-artifact/artifact-service/build.gradle.kts @@ -34,8 +34,8 @@ dependencies { api(project(":auth:api-auth")) api(project(":replication:api-replication")) api(project(":fs:api-fs-server")) - api(project(":router-controller:api-router-controller")) - api(project(":archive:api-archive")) + api(project(":core:router-controller:api-router-controller")) + api(project(":core:archive:api-archive")) api(project(":common:common-service:service-servlet")) api(project(":common:common-security")) api(project(":common:common-artifact:artifact-api")) diff --git a/src/backend/common/common-metadata/metadata-service/build.gradle.kts b/src/backend/common/common-metadata/metadata-service/build.gradle.kts index a706c744f2..a8ae2a237a 100644 --- a/src/backend/common/common-metadata/metadata-service/build.gradle.kts +++ b/src/backend/common/common-metadata/metadata-service/build.gradle.kts @@ -39,8 +39,8 @@ dependencies { api(project(":common:common-service:service-base")) api(project(":common:common-stream")) api(project(":common:common-query:query-mongo")) - api(project(":archive:api-archive")) - api(project(":router-controller:api-router-controller")) + api(project(":core:archive:api-archive")) + api(project(":core:router-controller:api-router-controller")) api(project(":fs:api-fs-server")) compileOnly(project(":common:common-mongo-reactive")) diff --git a/src/backend/analysis-executor/api-analysis-executor/build.gradle.kts b/src/backend/core/analysis-executor/api-analysis-executor/build.gradle.kts similarity index 96% rename from src/backend/analysis-executor/api-analysis-executor/build.gradle.kts rename to src/backend/core/analysis-executor/api-analysis-executor/build.gradle.kts index 92fdcf33d6..ad30ae0c97 100644 --- a/src/backend/analysis-executor/api-analysis-executor/build.gradle.kts +++ b/src/backend/core/analysis-executor/api-analysis-executor/build.gradle.kts @@ -27,6 +27,6 @@ dependencies { api(project(":common:common-analysis")) - implementation(project(":analyst:api-analyst")) + implementation(project(":core:analyst:api-analyst")) compileOnly("org.springframework.cloud:spring-cloud-openfeign-core") } diff --git a/src/backend/analysis-executor/api-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/api/ExecutorClient.kt b/src/backend/core/analysis-executor/api-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/api/ExecutorClient.kt similarity index 100% rename from src/backend/analysis-executor/api-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/api/ExecutorClient.kt rename to src/backend/core/analysis-executor/api-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/api/ExecutorClient.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/build.gradle.kts b/src/backend/core/analysis-executor/biz-analysis-executor/build.gradle.kts similarity index 93% rename from src/backend/analysis-executor/biz-analysis-executor/build.gradle.kts rename to src/backend/core/analysis-executor/biz-analysis-executor/build.gradle.kts index a1b2a527dc..549e0f43b4 100644 --- a/src/backend/analysis-executor/biz-analysis-executor/build.gradle.kts +++ b/src/backend/core/analysis-executor/biz-analysis-executor/build.gradle.kts @@ -26,8 +26,8 @@ */ dependencies { - implementation(project(":analyst:api-analyst")) - implementation(project(":analysis-executor:api-analysis-executor")) + implementation(project(":core:analyst:api-analyst")) + implementation(project(":core:analysis-executor:api-analysis-executor")) implementation(project(":common:common-service:service-servlet")) implementation(project(":common:common-artifact:artifact-service")) implementation(project(":common:common-security")) diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/CommonScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/CommonScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/CommonScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/CommonScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ExecutorScheduler.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ExecutorScheduler.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ExecutorScheduler.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ExecutorScheduler.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutorFactory.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutorFactory.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutorFactory.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/ScanExecutorFactory.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/SubtaskHeartbeatRunnable.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/SubtaskHeartbeatRunnable.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/SubtaskHeartbeatRunnable.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/SubtaskHeartbeatRunnable.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/AbsArrowheadScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/AbsArrowheadScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/AbsArrowheadScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/AbsArrowheadScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/ArrowheadScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/ArrowheadScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/ArrowheadScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/arrowhead/ArrowheadScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/component/FileLoader.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/component/FileLoader.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/component/FileLoader.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/component/FileLoader.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/AnalysisExecutorArtifactConfigurer.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/AnalysisExecutorArtifactConfigurer.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/AnalysisExecutorArtifactConfigurer.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/AnalysisExecutorArtifactConfigurer.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/DockerProperties.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/DockerProperties.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/DockerProperties.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/DockerProperties.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorConfiguration.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorConfiguration.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorConfiguration.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorConfiguration.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorProperties.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorProperties.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorProperties.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/configuration/ScannerExecutorProperties.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/controller/ExecutorController.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/controller/ExecutorController.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/controller/ExecutorController.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/controller/ExecutorController.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/dependencycheck/DependencyScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/dependencycheck/DependencyScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/dependencycheck/DependencyScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/dependencycheck/DependencyScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/job/CleanJob.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/job/CleanJob.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/job/CleanJob.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/job/CleanJob.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/CommonScanExecutorResult.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/CommonScanExecutorResult.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/CommonScanExecutorResult.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/CommonScanExecutorResult.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV1.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV1.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV1.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV1.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV2.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV2.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV2.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ManifestV2.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorResult.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorResult.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorResult.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorResult.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorTask.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorTask.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorTask.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/pojo/ScanExecutorTask.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/scancodeCheck/ScancodeToolkitExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/scancodeCheck/ScancodeToolkitExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/scancodeCheck/ScancodeToolkitExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/scancodeCheck/ScancodeToolkitExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/standard/StandardScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/standard/StandardScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/standard/StandardScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/standard/StandardScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/trivy/TrivyScanExecutor.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/trivy/TrivyScanExecutor.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/trivy/TrivyScanExecutor.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/trivy/TrivyScanExecutor.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtil.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtil.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtil.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtil.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommonUtils.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommonUtils.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommonUtils.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/CommonUtils.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/Converter.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/Converter.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/Converter.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/Converter.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/DockerScanHelper.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/DockerScanHelper.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/DockerScanHelper.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/DockerScanHelper.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtils.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtils.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtils.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtils.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/resources/standalone.toml b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/resources/standalone.toml similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/resources/standalone.toml rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/resources/standalone.toml diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/main/resources/toolScan.sh b/src/backend/core/analysis-executor/biz-analysis-executor/src/main/resources/toolScan.sh similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/main/resources/toolScan.sh rename to src/backend/core/analysis-executor/biz-analysis-executor/src/main/resources/toolScan.sh diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtilTest.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtilTest.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtilTest.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/CommandUtilTest.kt diff --git a/src/backend/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtilsTest.kt b/src/backend/core/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtilsTest.kt similarity index 100% rename from src/backend/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtilsTest.kt rename to src/backend/core/analysis-executor/biz-analysis-executor/src/test/kotlin/com/tencent/bkrepo/analysis/executor/util/FileUtilsTest.kt diff --git a/src/backend/analysis-executor/boot-analysis-executor/build.gradle.kts b/src/backend/core/analysis-executor/boot-analysis-executor/build.gradle.kts similarity index 95% rename from src/backend/analysis-executor/boot-analysis-executor/build.gradle.kts rename to src/backend/core/analysis-executor/boot-analysis-executor/build.gradle.kts index cb2bdbf5d6..1583dee37d 100644 --- a/src/backend/analysis-executor/boot-analysis-executor/build.gradle.kts +++ b/src/backend/core/analysis-executor/boot-analysis-executor/build.gradle.kts @@ -26,6 +26,6 @@ */ dependencies { - implementation(project(":analysis-executor:biz-analysis-executor")) + implementation(project(":core:analysis-executor:biz-analysis-executor")) implementation(project(":common:common-service:service-servlet")) } diff --git a/src/backend/analysis-executor/boot-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/AnalysisExecutorApplication.kt b/src/backend/core/analysis-executor/boot-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/AnalysisExecutorApplication.kt similarity index 100% rename from src/backend/analysis-executor/boot-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/AnalysisExecutorApplication.kt rename to src/backend/core/analysis-executor/boot-analysis-executor/src/main/kotlin/com/tencent/bkrepo/analysis/executor/AnalysisExecutorApplication.kt diff --git a/src/backend/analysis-executor/boot-analysis-executor/src/main/resources/bootstrap.yml b/src/backend/core/analysis-executor/boot-analysis-executor/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/analysis-executor/boot-analysis-executor/src/main/resources/bootstrap.yml rename to src/backend/core/analysis-executor/boot-analysis-executor/src/main/resources/bootstrap.yml diff --git a/src/backend/analysis-executor/build.gradle.kts b/src/backend/core/analysis-executor/build.gradle.kts similarity index 100% rename from src/backend/analysis-executor/build.gradle.kts rename to src/backend/core/analysis-executor/build.gradle.kts diff --git a/src/backend/analyst/api-analyst/build.gradle.kts b/src/backend/core/analyst/api-analyst/build.gradle.kts similarity index 100% rename from src/backend/analyst/api-analyst/build.gradle.kts rename to src/backend/core/analyst/api-analyst/build.gradle.kts diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/api/ScanClient.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/api/ScanClient.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/api/ScanClient.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/api/ScanClient.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyContext.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyContext.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyContext.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyContext.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyExtension.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyExtension.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyExtension.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/extension/ScanResultNotifyExtension.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/message/ScannerMessageCode.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/message/ScannerMessageCode.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/message/ScannerMessageCode.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/message/ScannerMessageCode.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanReport.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanReport.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanReport.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanReport.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanStatus.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanStatus.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanStatus.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ArtifactScanStatus.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/AutoScanConfiguration.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/AutoScanConfiguration.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/AutoScanConfiguration.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/AutoScanConfiguration.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Constant.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Constant.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Constant.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Constant.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/LeakType.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/LeakType.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/LeakType.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/LeakType.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Node.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Node.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Node.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/Node.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ProjectScanConfiguration.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ProjectScanConfiguration.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ProjectScanConfiguration.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ProjectScanConfiguration.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanPlan.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanPlan.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanPlan.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanPlan.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanStatus.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanStatus.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanStatus.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanStatus.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTask.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTask.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTask.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTask.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTaskStatus.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTaskStatus.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTaskStatus.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTaskStatus.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTriggerType.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTriggerType.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTriggerType.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/ScanTriggerType.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/SubScanTask.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/SubScanTask.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/SubScanTask.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/SubScanTask.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/TaskMetadata.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/TaskMetadata.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/TaskMetadata.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/TaskMetadata.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/DockerExecutionCluster.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/DockerExecutionCluster.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/DockerExecutionCluster.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/DockerExecutionCluster.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/ExecutionCluster.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/ExecutionCluster.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/ExecutionCluster.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/ExecutionCluster.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesDeploymentExecutionCluster.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesDeploymentExecutionCluster.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesDeploymentExecutionCluster.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesDeploymentExecutionCluster.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesExecutionClusterProperties.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesExecutionClusterProperties.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesExecutionClusterProperties.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesExecutionClusterProperties.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesJobExecutionCluster.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesJobExecutionCluster.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesJobExecutionCluster.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/execution/KubernetesJobExecutionCluster.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseInfo.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseInfo.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseInfo.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseInfo.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseJsonInfo.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseJsonInfo.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseJsonInfo.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseJsonInfo.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseObject.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseObject.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseObject.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/license/SpdxLicenseObject.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Component.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Component.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Component.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Component.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Report.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Report.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Report.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Report.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Vulnerability.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Vulnerability.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Vulnerability.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/report/Vulnerability.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadLoadResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadLoadResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadLoadResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadLoadResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadSaveResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadSaveResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadSaveResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArrowheadSaveResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactPlanRelationRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactPlanRelationRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactPlanRelationRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactPlanRelationRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactVulnerabilityRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactVulnerabilityRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactVulnerabilityRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ArtifactVulnerabilityRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/CreateScanPlanRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/CreateScanPlanRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/CreateScanPlanRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/CreateScanPlanRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultDetailRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultDetailRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultDetailRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultDetailRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultOverviewRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultOverviewRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultOverviewRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/FileScanResultOverviewRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/GlobalScanRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/GlobalScanRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/GlobalScanRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/GlobalScanRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LicenseScanQualityUpdateRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LicenseScanQualityUpdateRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LicenseScanQualityUpdateRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LicenseScanQualityUpdateRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LoadResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LoadResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LoadResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/LoadResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PipelineScanRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PipelineScanRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PipelineScanRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PipelineScanRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PlanCountRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PlanCountRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PlanCountRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/PlanCountRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ProjectScanConfigurationPageRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ProjectScanConfigurationPageRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ProjectScanConfigurationPageRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ProjectScanConfigurationPageRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ReportResultRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ReportResultRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ReportResultRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ReportResultRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SaveResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SaveResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SaveResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SaveResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanQualityUpdateRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanQualityUpdateRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanQualityUpdateRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanQualityUpdateRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanTaskQuery.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanTaskQuery.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanTaskQuery.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/ScanTaskQuery.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SubtaskInfoRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SubtaskInfoRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SubtaskInfoRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/SubtaskInfoRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/UpdateScanPlanRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/UpdateScanPlanRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/UpdateScanPlanRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/UpdateScanPlanRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencyLoadResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencyLoadResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencyLoadResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencyLoadResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencySaveResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencySaveResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencySaveResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/dependencecheck/DependencySaveResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/ListFilterRuleRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/ListFilterRuleRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/ListFilterRuleRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/ListFilterRuleRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/MatchFilterRuleRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/MatchFilterRuleRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/MatchFilterRuleRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/MatchFilterRuleRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/UpdateFilterRuleRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/UpdateFilterRuleRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/UpdateFilterRuleRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/filter/UpdateFilterRuleRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ArtifactLicensesDetailRequest.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ArtifactLicensesDetailRequest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ArtifactLicensesDetailRequest.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ArtifactLicensesDetailRequest.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ScancodeToolkitResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ScancodeToolkitResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ScancodeToolkitResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/scancodetoolkit/ScancodeToolkitResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/standard/StandardLoadResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/standard/StandardLoadResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/standard/StandardLoadResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/standard/StandardLoadResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivyLoadResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivyLoadResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivyLoadResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivyLoadResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivySaveResultArguments.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivySaveResultArguments.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivySaveResultArguments.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/request/trivy/TrivySaveResultArguments.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelation.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelation.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelation.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelation.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelations.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelations.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelations.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactPlanRelations.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactVulnerabilityInfo.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactVulnerabilityInfo.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactVulnerabilityInfo.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ArtifactVulnerabilityInfo.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultDetail.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultDetail.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultDetail.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultDetail.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultOverview.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultOverview.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultOverview.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileLicensesResultOverview.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultDetail.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultDetail.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultDetail.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultDetail.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultOverview.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultOverview.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultOverview.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/FileScanResultOverview.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/LicenseScanQualityResponse.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/LicenseScanQualityResponse.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/LicenseScanQualityResponse.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/LicenseScanQualityResponse.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanLicensePlanInfo.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanLicensePlanInfo.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanLicensePlanInfo.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanLicensePlanInfo.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanPlanInfo.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanPlanInfo.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanPlanInfo.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanPlanInfo.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanQuality.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanQuality.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanQuality.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScanQuality.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScannerBase.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScannerBase.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScannerBase.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/ScannerBase.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskInfo.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskInfo.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskInfo.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskInfo.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskResultOverview.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskResultOverview.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskResultOverview.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/SubtaskResultOverview.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/FilterRule.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/FilterRule.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/FilterRule.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/FilterRule.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRule.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRule.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRule.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRule.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleData.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleData.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleData.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleData.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/Rule.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/Rule.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/Rule.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/Rule.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleArtifact.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleArtifact.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleArtifact.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleArtifact.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleType.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleType.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleType.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/pojo/rule/RuleType.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/CompositeVersionRange.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/CompositeVersionRange.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/CompositeVersionRange.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/CompositeVersionRange.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/DefaultVersionRange.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/DefaultVersionRange.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/DefaultVersionRange.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/DefaultVersionRange.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumber.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumber.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumber.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumber.kt diff --git a/src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionRange.kt b/src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionRange.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionRange.kt rename to src/backend/core/analyst/api-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/VersionRange.kt diff --git a/src/backend/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleTest.kt b/src/backend/core/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleTest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleTest.kt rename to src/backend/core/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/pojo/response/filter/MergedFilterRuleTest.kt diff --git a/src/backend/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumberTest.kt b/src/backend/core/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumberTest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumberTest.kt rename to src/backend/core/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionNumberTest.kt diff --git a/src/backend/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionRangeTest.kt b/src/backend/core/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionRangeTest.kt similarity index 100% rename from src/backend/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionRangeTest.kt rename to src/backend/core/analyst/api-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/VersionRangeTest.kt diff --git a/src/backend/analyst/biz-analyst/build.gradle.kts b/src/backend/core/analyst/biz-analyst/build.gradle.kts similarity index 92% rename from src/backend/analyst/biz-analyst/build.gradle.kts rename to src/backend/core/analyst/biz-analyst/build.gradle.kts index 1be62c4add..0bbecc9020 100644 --- a/src/backend/analyst/biz-analyst/build.gradle.kts +++ b/src/backend/core/analyst/biz-analyst/build.gradle.kts @@ -27,9 +27,9 @@ dependencies { implementation("com.alibaba:easyexcel:3.1.1") - implementation(project(":analyst:api-analyst")) - implementation(project(":analysis-executor:api-analysis-executor")) - implementation(project(":oci:api-oci")) + implementation(project(":core:analyst:api-analyst")) + implementation(project(":core:analysis-executor:api-analysis-executor")) + implementation(project(":core:oci:api-oci")) implementation(project(":common:common-notify:notify-service")) implementation(project(":common:common-service:service-servlet")) implementation("org.springframework.boot:spring-boot-starter-webflux") diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/AnalystLoadBalancer.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/AnalystLoadBalancer.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/AnalystLoadBalancer.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/AnalystLoadBalancer.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/CacheableRepositoryClient.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/CacheableRepositoryClient.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/CacheableRepositoryClient.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/CacheableRepositoryClient.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ReportExporter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ReportExporter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ReportExporter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ReportExporter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ScannerPermissionCheckHandler.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ScannerPermissionCheckHandler.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ScannerPermissionCheckHandler.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/ScannerPermissionCheckHandler.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/AbstractScanExecutorResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/AbstractScanExecutorResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/AbstractScanExecutorResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/AbstractScanExecutorResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/Extra.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/Extra.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/Extra.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/Extra.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ResultItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScanExecutorResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScanExecutorResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScanExecutorResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScanExecutorResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScannerConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScannerConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScannerConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/ScannerConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/ArrowheadResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/Converter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/Converter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/Converter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/Converter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/ApplicationItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/ApplicationItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/ApplicationItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/ApplicationItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CheckSecItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CheckSecItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CheckSecItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CheckSecItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CveSecItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CveSecItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CveSecItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/CveSecItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/SensitiveItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/SensitiveItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/SensitiveItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/dao/SensitiveItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TApplicationItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TApplicationItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TApplicationItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TApplicationItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCheckSecItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCheckSecItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCheckSecItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCheckSecItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCveSecItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCveSecItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCveSecItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TCveSecItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TSensitiveItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TSensitiveItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TSensitiveItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/arrowhead/model/TSensitiveItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/Converter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/Converter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/Converter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/Converter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyCheckConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyCheckConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyCheckConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyCheckConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/DependencyResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/dao/DependencyItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/dao/DependencyItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/dao/DependencyItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/dao/DependencyItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/model/TDependencyItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/model/TDependencyItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/model/TDependencyItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/dependencycheck/model/TDependencyItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/CveDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/CveDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/CveDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/CveDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/KnowledgeBase.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/KnowledgeBase.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/KnowledgeBase.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/KnowledgeBase.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/LicenseDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/LicenseDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/LicenseDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/LicenseDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/MongoKnowledgeBase.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/MongoKnowledgeBase.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/MongoKnowledgeBase.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/MongoKnowledgeBase.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TCve.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TCve.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TCve.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TCve.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TLicense.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TLicense.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TLicense.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/knowledgebase/TLicense.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScanCodeConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScanCodeConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScanCodeConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScanCodeConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScancodeResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScancodeResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScancodeResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/ScancodeResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/dao/ScancodeItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/dao/ScancodeItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/dao/ScancodeItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/dao/ScancodeItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/model/TScancodeItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/model/TScancodeItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/model/TScancodeItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/scancode/model/TScancodeItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/StandardResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/LicenseResultDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/LicenseResultDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/LicenseResultDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/LicenseResultDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SecurityResultDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SecurityResultDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SecurityResultDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SecurityResultDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SensitiveResultDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SensitiveResultDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SensitiveResultDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/dao/SensitiveResultDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TLicenseResult.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TLicenseResult.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TLicenseResult.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TLicenseResult.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSecurityResult.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSecurityResult.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSecurityResult.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSecurityResult.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSensitiveResult.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSensitiveResult.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSensitiveResult.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/standard/model/TSensitiveResult.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/Converter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/Converter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/Converter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/Converter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyResultManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyResultManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyResultManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/TrivyResultManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/dao/VulnerabilityItemDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/dao/VulnerabilityItemDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/dao/VulnerabilityItemDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/dao/VulnerabilityItemDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/model/TVulnerabilityItem.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/model/TVulnerabilityItem.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/model/TVulnerabilityItem.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/component/manager/trivy/model/TVulnerabilityItem.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalysisLoadBalancerConfiguration.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalysisLoadBalancerConfiguration.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalysisLoadBalancerConfiguration.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalysisLoadBalancerConfiguration.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalystArtifactConfigurer.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalystArtifactConfigurer.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalystArtifactConfigurer.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/AnalystArtifactConfigurer.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ReportExportProperties.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ReportExportProperties.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ReportExportProperties.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ReportExportProperties.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerConfiguration.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerConfiguration.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerConfiguration.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerConfiguration.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerProperties.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerProperties.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerProperties.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ScannerProperties.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ThreadPoolTaskExecutorConfiguration.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ThreadPoolTaskExecutorConfiguration.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ThreadPoolTaskExecutorConfiguration.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/configuration/ThreadPoolTaskExecutorConfiguration.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/ScanController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/ScanController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/ScanController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/ScanController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/SystemFilterRuleController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/SystemFilterRuleController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/SystemFilterRuleController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/SystemFilterRuleController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserExecutionClusterController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserExecutionClusterController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserExecutionClusterController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserExecutionClusterController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserFilterRuleController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserFilterRuleController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserFilterRuleController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserFilterRuleController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserLicenseController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserLicenseController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserLicenseController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserLicenseController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserProjectScanConfigurationController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserProjectScanConfigurationController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserProjectScanConfigurationController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserProjectScanConfigurationController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanPlanController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanPlanController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanPlanController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanPlanController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanQualityController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanQualityController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanQualityController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanQualityController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanReportController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanReportController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanReportController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScanReportController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScannerController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScannerController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScannerController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserScannerController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserTemporaryScanController.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserTemporaryScanController.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserTemporaryScanController.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/controller/user/UserTemporaryScanController.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/AbsSubScanTaskDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/AbsSubScanTaskDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/AbsSubScanTaskDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/AbsSubScanTaskDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ArchiveSubScanTaskDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ArchiveSubScanTaskDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ArchiveSubScanTaskDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ArchiveSubScanTaskDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ExecutionClusterDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ExecutionClusterDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ExecutionClusterDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ExecutionClusterDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FileScanResultDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FileScanResultDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FileScanResultDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FileScanResultDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FilterRuleDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FilterRuleDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FilterRuleDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/FilterRuleDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/PlanArtifactLatestSubScanTaskDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/PlanArtifactLatestSubScanTaskDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/PlanArtifactLatestSubScanTaskDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/PlanArtifactLatestSubScanTaskDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ProjectScanConfigurationDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ProjectScanConfigurationDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ProjectScanConfigurationDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ProjectScanConfigurationDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanPlanDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanPlanDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanPlanDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanPlanDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanTaskDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanTaskDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanTaskDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScanTaskDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerSimpleMongoDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerSimpleMongoDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerSimpleMongoDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/ScannerSimpleMongoDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SpdxLicenseDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SpdxLicenseDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SpdxLicenseDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SpdxLicenseDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SubScanTaskDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SubScanTaskDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SubScanTaskDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dao/SubScanTaskDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/AbsSubtaskDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/AbsSubtaskDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/AbsSubtaskDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/AbsSubtaskDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/CommonUtils.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/CommonUtils.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/CommonUtils.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/CommonUtils.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/DockerDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/DockerDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/DockerDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/DockerDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDeploymentDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDeploymentDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDeploymentDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDeploymentDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/KubernetesDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/ResourceRequirements.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/ResourceRequirements.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/ResourceRequirements.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/ResourceRequirements.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcherFactory.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcherFactory.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcherFactory.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskDispatcherFactory.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPoller.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPoller.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPoller.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPoller.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPullDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPullDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPullDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPullDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPushDispatcher.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPushDispatcher.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPushDispatcher.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/SubtaskPushDispatcher.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/DeploymentDsl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/DeploymentDsl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/DeploymentDsl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/DeploymentDsl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/JobDsl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/JobDsl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/JobDsl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/JobDsl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/PodDsl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/PodDsl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/PodDsl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/PodDsl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/SecretDsl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/SecretDsl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/SecretDsl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/dispatcher/dsl/SecretDsl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCount.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCount.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCount.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCount.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountDao.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountDao.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountDao.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountDao.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountFactory.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountFactory.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountFactory.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/DistributedCountFactory.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/MongoDistributedCount.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/MongoDistributedCount.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/MongoDistributedCount.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/MongoDistributedCount.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/RedisDistributedCount.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/RedisDistributedCount.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/RedisDistributedCount.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/RedisDistributedCount.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/TDistributedCount.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/TDistributedCount.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/TDistributedCount.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/distribution/TDistributedCount.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/AnalystScanEventConsumer.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/AnalystScanEventConsumer.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/AnalystScanEventConsumer.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/AnalystScanEventConsumer.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/ScanTaskStatusChangedEvent.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/ScanTaskStatusChangedEvent.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/ScanTaskStatusChangedEvent.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/ScanTaskStatusChangedEvent.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/SubtaskStatusChangedEvent.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/SubtaskStatusChangedEvent.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/SubtaskStatusChangedEvent.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/SubtaskStatusChangedEvent.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/ScanTaskStatusChangedEventListener.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/ScanTaskStatusChangedEventListener.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/ScanTaskStatusChangedEventListener.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/ScanTaskStatusChangedEventListener.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/SubtaskStatusChangedEventListener.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/SubtaskStatusChangedEventListener.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/SubtaskStatusChangedEventListener.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/event/listener/SubtaskStatusChangedEventListener.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ArtifactDeletedException.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ArtifactDeletedException.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ArtifactDeletedException.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ArtifactDeletedException.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/LicenseNotFoundException.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/LicenseNotFoundException.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/LicenseNotFoundException.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/LicenseNotFoundException.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScanTaskNotFoundException.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScanTaskNotFoundException.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScanTaskNotFoundException.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScanTaskNotFoundException.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScannerNotFoundException.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScannerNotFoundException.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScannerNotFoundException.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/ScannerNotFoundException.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/TaskSubmitInterruptedException.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/TaskSubmitInterruptedException.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/TaskSubmitInterruptedException.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/exception/TaskSubmitInterruptedException.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/job/CorrectMetricsJob.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/job/CorrectMetricsJob.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/job/CorrectMetricsJob.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/job/CorrectMetricsJob.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/FileSizeLevel.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/FileSizeLevel.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/FileSizeLevel.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/FileSizeLevel.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/ScannerMetrics.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/ScannerMetrics.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/ScannerMetrics.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/metrics/ScannerMetrics.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/LeakDetailExport.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/LeakDetailExport.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/LeakDetailExport.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/LeakDetailExport.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/ScanPlanExport.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/ScanPlanExport.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/ScanPlanExport.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/ScanPlanExport.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/SubScanTaskDefinition.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/SubScanTaskDefinition.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/SubScanTaskDefinition.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/SubScanTaskDefinition.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TArchiveSubScanTask.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TArchiveSubScanTask.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TArchiveSubScanTask.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TArchiveSubScanTask.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TExecutionCluster.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TExecutionCluster.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TExecutionCluster.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TExecutionCluster.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFileScanResult.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFileScanResult.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFileScanResult.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFileScanResult.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFilterRule.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFilterRule.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFilterRule.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TFilterRule.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TPlanArtifactLatestSubScanTask.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TPlanArtifactLatestSubScanTask.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TPlanArtifactLatestSubScanTask.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TPlanArtifactLatestSubScanTask.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TProjectScanConfiguration.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TProjectScanConfiguration.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TProjectScanConfiguration.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TProjectScanConfiguration.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanPlan.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanPlan.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanPlan.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanPlan.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanTask.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanTask.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanTask.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanTask.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanner.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanner.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanner.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TScanner.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSpdxLicense.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSpdxLicense.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSpdxLicense.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSpdxLicense.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSubScanTask.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSubScanTask.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSubScanTask.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/model/TSubScanTask.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ExecutionClusterService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ExecutionClusterService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ExecutionClusterService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ExecutionClusterService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/FilterRuleService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/FilterRuleService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/FilterRuleService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/FilterRuleService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/LicenseScanQualityService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/LicenseScanQualityService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/LicenseScanQualityService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/LicenseScanQualityService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ProjectScanConfigurationService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ProjectScanConfigurationService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ProjectScanConfigurationService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ProjectScanConfigurationService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanCorrectService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanCorrectService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanCorrectService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanCorrectService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanPlanService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanQualityService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanQualityService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanQualityService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanQualityService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanTaskService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanTaskService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanTaskService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScanTaskService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScannerService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScannerService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScannerService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/ScannerService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/SpdxLicenseService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/SpdxLicenseService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/SpdxLicenseService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/SpdxLicenseService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/TemporaryScanTokenService.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/TemporaryScanTokenService.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/TemporaryScanTokenService.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/TemporaryScanTokenService.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ExecutionClusterServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ExecutionClusterServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ExecutionClusterServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ExecutionClusterServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/FilterRuleServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/FilterRuleServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/FilterRuleServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/FilterRuleServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/LicenseScanQualityServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/LicenseScanQualityServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/LicenseScanQualityServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/LicenseScanQualityServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectScanConfigurationServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectScanConfigurationServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectScanConfigurationServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectScanConfigurationServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectUsageStatisticsServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectUsageStatisticsServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectUsageStatisticsServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ProjectUsageStatisticsServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanCorrectServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanCorrectServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanCorrectServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanCorrectServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanPlanServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanQualityServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanQualityServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanQualityServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanQualityServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanTaskServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanTaskServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanTaskServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScanTaskServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScannerServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScannerServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScannerServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/ScannerServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/SpdxLicenseServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/SpdxLicenseServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/SpdxLicenseServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/SpdxLicenseServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/TemporaryScanTokenServiceImpl.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/TemporaryScanTokenServiceImpl.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/TemporaryScanTokenServiceImpl.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/service/impl/TemporaryScanTokenServiceImpl.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/Action.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/Action.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/Action.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/Action.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/ScanTaskSchedulerConfiguration.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/ScanTaskSchedulerConfiguration.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/ScanTaskSchedulerConfiguration.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/ScanTaskSchedulerConfiguration.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/StateAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/StateAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/StateAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/StateAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TaskStateMachineConfiguration.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TaskStateMachineConfiguration.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TaskStateMachineConfiguration.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TaskStateMachineConfiguration.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TimeoutTaskScheduler.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TimeoutTaskScheduler.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TimeoutTaskScheduler.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/TimeoutTaskScheduler.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/IteratorManager.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/IteratorManager.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/IteratorManager.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/IteratorManager.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeFilter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeFilter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeFilter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeFilter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeIterator.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeIterator.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeIterator.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/NodeIterator.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PackageIterator.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PackageIterator.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PackageIterator.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PackageIterator.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PageableIterator.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PageableIterator.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PageableIterator.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/PageableIterator.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/ProjectIdIterator.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/ProjectIdIterator.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/ProjectIdIterator.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/iterator/ProjectIdIterator.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/SubtaskEvent.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/SubtaskEvent.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/SubtaskEvent.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/SubtaskEvent.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/CreateSubtaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/CreateSubtaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/CreateSubtaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/CreateSubtaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ExecuteSubtaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ExecuteSubtaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ExecuteSubtaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ExecuteSubtaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/FinishSubtaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/FinishSubtaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/FinishSubtaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/FinishSubtaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/NotifySubtaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/NotifySubtaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/NotifySubtaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/NotifySubtaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/PullSubtaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/PullSubtaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/PullSubtaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/PullSubtaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/RetryAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/RetryAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/RetryAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/RetryAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ReuseResultAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ReuseResultAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ReuseResultAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/ReuseResultAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/SubtaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/SubtaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/SubtaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/action/SubtaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/CreateSubtaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/CreateSubtaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/CreateSubtaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/CreateSubtaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/ExecuteSubtaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/ExecuteSubtaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/ExecuteSubtaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/ExecuteSubtaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/FinishSubtaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/FinishSubtaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/FinishSubtaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/FinishSubtaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/NotifySubtaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/NotifySubtaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/NotifySubtaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/NotifySubtaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/PullSubtaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/PullSubtaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/PullSubtaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/PullSubtaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/RetryContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/RetryContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/RetryContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/RetryContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/SubtaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/SubtaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/SubtaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/subtask/context/SubtaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/ScanTaskEvent.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/ScanTaskEvent.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/ScanTaskEvent.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/ScanTaskEvent.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/FinishedAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/FinishedAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/FinishedAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/FinishedAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/PendingAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/PendingAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/PendingAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/PendingAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/ResetAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/ResetAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/ResetAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/ResetAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StopAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StopAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StopAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StopAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StoppingAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StoppingAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StoppingAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/StoppingAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittedAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittedAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittedAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittedAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittingAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittingAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittingAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/SubmittingAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/TaskAction.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/TaskAction.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/TaskAction.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/action/TaskAction.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/CreateTaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/CreateTaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/CreateTaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/CreateTaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/FinishTaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/FinishTaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/FinishTaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/FinishTaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/ResetTaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/ResetTaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/ResetTaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/ResetTaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/StopTaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/StopTaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/StopTaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/StopTaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/SubmitTaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/SubmitTaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/SubmitTaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/SubmitTaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/TaskContext.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/TaskContext.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/TaskContext.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/statemachine/task/context/TaskContext.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Converter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Converter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Converter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Converter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/EasyExcelUtils.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/EasyExcelUtils.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/EasyExcelUtils.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/EasyExcelUtils.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/K8SHelper.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/K8SHelper.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/K8SHelper.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/K8SHelper.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Request.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Request.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Request.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/Request.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtil.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtil.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtil.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtil.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanLicenseConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanLicenseConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanLicenseConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanLicenseConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtil.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtil.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtil.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtil.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanPlanConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanPlanConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanPlanConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScanPlanConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScannerUtil.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScannerUtil.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScannerUtil.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/ScannerUtil.kt diff --git a/src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/SubtaskConverter.kt b/src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/SubtaskConverter.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/SubtaskConverter.kt rename to src/backend/core/analyst/biz-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/utils/SubtaskConverter.kt diff --git a/src/backend/analyst/biz-analyst/src/main/resources/i18n/messages_en.properties b/src/backend/core/analyst/biz-analyst/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/resources/i18n/messages_en.properties rename to src/backend/core/analyst/biz-analyst/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/analyst/biz-analyst/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/analyst/biz-analyst/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/analyst/biz-analyst/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/analyst/biz-analyst/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/analyst/biz-analyst/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/analyst/biz-analyst/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/analyst/biz-analyst/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/Constants.kt b/src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/Constants.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/Constants.kt rename to src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/Constants.kt diff --git a/src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RequestTest.kt b/src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RequestTest.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RequestTest.kt rename to src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RequestTest.kt diff --git a/src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtilTest.kt b/src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtilTest.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtilTest.kt rename to src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/RuleUtilTest.kt diff --git a/src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtilTest.kt b/src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtilTest.kt similarity index 100% rename from src/backend/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtilTest.kt rename to src/backend/core/analyst/biz-analyst/src/test/kotlin/com/tencent/bkrepo/analyst/utils/ScanParamUtilTest.kt diff --git a/src/backend/analyst/boot-analyst/build.gradle.kts b/src/backend/core/analyst/boot-analyst/build.gradle.kts similarity index 96% rename from src/backend/analyst/boot-analyst/build.gradle.kts rename to src/backend/core/analyst/boot-analyst/build.gradle.kts index e16869b9a1..035d5530f7 100644 --- a/src/backend/analyst/boot-analyst/build.gradle.kts +++ b/src/backend/core/analyst/boot-analyst/build.gradle.kts @@ -26,6 +26,6 @@ */ dependencies { - implementation(project(":analyst:biz-analyst")) + implementation(project(":core:analyst:biz-analyst")) implementation(project(":common:common-service:service-servlet")) } diff --git a/src/backend/analyst/boot-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/AnalystApplication.kt b/src/backend/core/analyst/boot-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/AnalystApplication.kt similarity index 100% rename from src/backend/analyst/boot-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/AnalystApplication.kt rename to src/backend/core/analyst/boot-analyst/src/main/kotlin/com/tencent/bkrepo/analyst/AnalystApplication.kt diff --git a/src/backend/analyst/boot-analyst/src/main/resources/bootstrap.yml b/src/backend/core/analyst/boot-analyst/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/analyst/boot-analyst/src/main/resources/bootstrap.yml rename to src/backend/core/analyst/boot-analyst/src/main/resources/bootstrap.yml diff --git a/src/backend/analyst/build.gradle.kts b/src/backend/core/analyst/build.gradle.kts similarity index 100% rename from src/backend/analyst/build.gradle.kts rename to src/backend/core/analyst/build.gradle.kts diff --git a/src/backend/archive/README.md b/src/backend/core/archive/README.md similarity index 100% rename from src/backend/archive/README.md rename to src/backend/core/archive/README.md diff --git a/src/backend/archive/api-archive/build.gradle.kts b/src/backend/core/archive/api-archive/build.gradle.kts similarity index 100% rename from src/backend/archive/api-archive/build.gradle.kts rename to src/backend/core/archive/api-archive/build.gradle.kts diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveFileNotFound.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveFileNotFound.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveFileNotFound.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveFileNotFound.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveStatus.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveStatus.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveStatus.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveStatus.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/CompressStatus.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/CompressStatus.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/CompressStatus.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/CompressStatus.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/api/ArchiveClient.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/api/ArchiveClient.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/api/ArchiveClient.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/api/ArchiveClient.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveConstants.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveConstants.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveConstants.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveConstants.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveMessageCode.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveMessageCode.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveMessageCode.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveMessageCode.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveRestoreTier.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveRestoreTier.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveRestoreTier.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveRestoreTier.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveStorageClass.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveStorageClass.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveStorageClass.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/constant/ArchiveStorageClass.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/ArchiveFile.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/ArchiveFile.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/ArchiveFile.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/ArchiveFile.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/CompressFile.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/CompressFile.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/CompressFile.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/CompressFile.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/ArchiveFileRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/ArchiveFileRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/ArchiveFileRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/ArchiveFileRequest.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompleteCompressRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompleteCompressRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompleteCompressRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompleteCompressRequest.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompressFileRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompressFileRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompressFileRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompressFileRequest.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CreateArchiveFileRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CreateArchiveFileRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CreateArchiveFileRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CreateArchiveFileRequest.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/DeleteCompressRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/DeleteCompressRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/DeleteCompressRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/DeleteCompressRequest.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UncompressFileRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UncompressFileRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UncompressFileRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UncompressFileRequest.kt diff --git a/src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UpdateCompressFileStatusRequest.kt b/src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UpdateCompressFileStatusRequest.kt similarity index 100% rename from src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UpdateCompressFileStatusRequest.kt rename to src/backend/core/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UpdateCompressFileStatusRequest.kt diff --git a/src/backend/archive/biz-archive/build.gradle.kts b/src/backend/core/archive/biz-archive/build.gradle.kts similarity index 92% rename from src/backend/archive/biz-archive/build.gradle.kts rename to src/backend/core/archive/biz-archive/build.gradle.kts index ceae4ea2ab..f0a4654be3 100644 --- a/src/backend/archive/biz-archive/build.gradle.kts +++ b/src/backend/core/archive/biz-archive/build.gradle.kts @@ -1,6 +1,6 @@ dependencies { - implementation(project(":archive:api-archive")) + implementation(project(":core:archive:api-archive")) api(project(":common:common-storage:storage-service")) api(project(":common:common-security")) api(project(":common:common-service:service-servlet")) diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveConfiguration.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveConfiguration.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveConfiguration.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveConfiguration.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveCredentialsProperties.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveCredentialsProperties.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveCredentialsProperties.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveCredentialsProperties.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveProperties.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveProperties.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveProperties.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/ArchiveProperties.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/CompressProperties.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/CompressProperties.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/CompressProperties.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/CompressProperties.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/DownloadProperties.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/DownloadProperties.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/DownloadProperties.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/DownloadProperties.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/GcProperties.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/GcProperties.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/GcProperties.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/config/GcProperties.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/service/ArchiveController.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/service/ArchiveController.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/service/ArchiveController.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/service/ArchiveController.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/user/SystemAdminController.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/user/SystemAdminController.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/user/SystemAdminController.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/controller/user/SystemAdminController.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ActiveTaskSubscriber.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ActiveTaskSubscriber.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ActiveTaskSubscriber.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ActiveTaskSubscriber.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/DiskHealthObserver.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/DiskHealthObserver.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/DiskHealthObserver.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/DiskHealthObserver.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessor.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessor.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessor.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessor.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileEntityEvent.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileEntityEvent.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileEntityEvent.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/FileEntityEvent.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/PriorityWrapper.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/PriorityWrapper.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/PriorityWrapper.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/PriorityWrapper.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ReactorExtensions.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ReactorExtensions.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ReactorExtensions.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/ReactorExtensions.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/TaskResult.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/TaskResult.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/TaskResult.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/TaskResult.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/ArchiveManager.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/ArchiveManager.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/ArchiveManager.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/ArchiveManager.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/Archiver.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/Archiver.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/Archiver.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/Archiver.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/EmptyArchiver.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/EmptyArchiver.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/EmptyArchiver.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/EmptyArchiver.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/XZArchiver.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/XZArchiver.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/XZArchiver.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/archive/XZArchiver.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDCompressor.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDCompressor.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDCompressor.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDCompressor.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDUncompressor.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDUncompressor.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDUncompressor.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDUncompressor.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManager.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManager.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManager.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManager.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt similarity index 97% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt index d445cd5d4b..56d65ee63c 100644 --- a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt +++ b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/compress/ChecksumFileProvider.kt @@ -5,7 +5,6 @@ import com.tencent.bkrepo.archive.core.provider.FileProviderProxy import com.tencent.bkrepo.archive.core.mapPriority import com.tencent.bkrepo.common.bksync.BkSync import com.tencent.bkrepo.common.storage.monitor.measureThroughput -import com.tencent.bkrepo.common.storage.util.delete import org.slf4j.LoggerFactory import reactor.core.publisher.Mono import java.io.File diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxy.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxy.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxy.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxy.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProvider.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProvider.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProvider.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProvider.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProvider.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProvider.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProvider.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProvider.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderFactory.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderFactory.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderFactory.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderFactory.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderProxy.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderProxy.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderProxy.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileProviderProxy.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileStorageFileProvider.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileStorageFileProvider.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileStorageFileProvider.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileStorageFileProvider.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileTask.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileTask.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileTask.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/FileTask.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/PriorityFileProvider.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/PriorityFileProvider.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/PriorityFileProvider.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/core/provider/PriorityFileProvider.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileArchivedEvent.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileArchivedEvent.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileArchivedEvent.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileArchivedEvent.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileCompressedEvent.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileCompressedEvent.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileCompressedEvent.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileCompressedEvent.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileRestoredEvent.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileRestoredEvent.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileRestoredEvent.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/FileRestoredEvent.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileCompressedEvent.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileCompressedEvent.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileCompressedEvent.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileCompressedEvent.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileUncompressedEvent.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileUncompressedEvent.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileUncompressedEvent.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileUncompressedEvent.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/ArchiveListener.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/ArchiveListener.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/ArchiveListener.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/ArchiveListener.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/StorageCompressListener.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/StorageCompressListener.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/StorageCompressListener.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/listener/StorageCompressListener.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/metrics/ArchiveMetrics.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/metrics/ArchiveMetrics.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/metrics/ArchiveMetrics.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/metrics/ArchiveMetrics.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/AbstractEntity.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/AbstractEntity.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/AbstractEntity.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/AbstractEntity.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/IdEntity.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/IdEntity.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/IdEntity.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/IdEntity.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TArchiveFile.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TArchiveFile.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TArchiveFile.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TArchiveFile.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TCompressFile.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TCompressFile.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TCompressFile.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/model/TCompressFile.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileDao.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileDao.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileDao.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileDao.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileRepository.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileRepository.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileRepository.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/ArchiveFileRepository.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileDao.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileDao.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileDao.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileDao.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileRepository.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileRepository.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileRepository.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/repository/CompressFileRepository.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveService.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveService.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveService.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveService.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveServiceImpl.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveServiceImpl.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveServiceImpl.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/ArchiveServiceImpl.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressService.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressService.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressService.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressService.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressServiceImpl.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressServiceImpl.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressServiceImpl.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/CompressServiceImpl.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminService.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminService.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminService.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminService.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminServiceImpl.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminServiceImpl.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminServiceImpl.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/service/SystemAdminServiceImpl.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveDaoUtils.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveDaoUtils.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveDaoUtils.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveDaoUtils.kt diff --git a/src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveUtils.kt b/src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveUtils.kt similarity index 100% rename from src/backend/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveUtils.kt rename to src/backend/core/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/utils/ArchiveUtils.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/BaseTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/BaseTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/BaseTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/BaseTest.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessorTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessorTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessorTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileCoreProcessorTest.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileStorageFileProviderTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileStorageFileProviderTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileStorageFileProviderTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/FileStorageFileProviderTest.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManagerTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManagerTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManagerTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/compress/BDZipManagerTest.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxyTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxyTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxyTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/CacheFileProviderProxyTest.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProviderTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProviderTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProviderTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/core/provider/ConcurrentFileProviderTest.kt diff --git a/src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/service/CompressServiceTest.kt b/src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/service/CompressServiceTest.kt similarity index 100% rename from src/backend/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/service/CompressServiceTest.kt rename to src/backend/core/archive/biz-archive/src/test/kotlin/com/tencent/bkrepo/archive/service/CompressServiceTest.kt diff --git a/src/backend/archive/biz-archive/src/test/resources/compress.properties b/src/backend/core/archive/biz-archive/src/test/resources/compress.properties similarity index 100% rename from src/backend/archive/biz-archive/src/test/resources/compress.properties rename to src/backend/core/archive/biz-archive/src/test/resources/compress.properties diff --git a/src/backend/archive/biz-archive/src/test/resources/file-core-processor.properties b/src/backend/core/archive/biz-archive/src/test/resources/file-core-processor.properties similarity index 100% rename from src/backend/archive/biz-archive/src/test/resources/file-core-processor.properties rename to src/backend/core/archive/biz-archive/src/test/resources/file-core-processor.properties diff --git a/src/backend/core/archive/boot-archive/build.gradle.kts b/src/backend/core/archive/boot-archive/build.gradle.kts new file mode 100644 index 0000000000..c1b64e5875 --- /dev/null +++ b/src/backend/core/archive/boot-archive/build.gradle.kts @@ -0,0 +1,3 @@ +dependencies { + implementation(project(":core:archive:biz-archive")) +} diff --git a/src/backend/archive/boot-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveApplication.kt b/src/backend/core/archive/boot-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveApplication.kt similarity index 100% rename from src/backend/archive/boot-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveApplication.kt rename to src/backend/core/archive/boot-archive/src/main/kotlin/com/tencent/bkrepo/archive/ArchiveApplication.kt diff --git a/src/backend/archive/boot-archive/src/main/resources/bootstrap.yml b/src/backend/core/archive/boot-archive/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/archive/boot-archive/src/main/resources/bootstrap.yml rename to src/backend/core/archive/boot-archive/src/main/resources/bootstrap.yml diff --git a/src/backend/archive/build.gradle.kts b/src/backend/core/archive/build.gradle.kts similarity index 100% rename from src/backend/archive/build.gradle.kts rename to src/backend/core/archive/build.gradle.kts diff --git a/src/backend/composer/api-composer/build.gradle.kts b/src/backend/core/composer/api-composer/build.gradle.kts similarity index 100% rename from src/backend/composer/api-composer/build.gradle.kts rename to src/backend/core/composer/api-composer/build.gradle.kts diff --git a/src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerResource.kt b/src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerResource.kt similarity index 100% rename from src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerResource.kt rename to src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerResource.kt diff --git a/src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerWebResource.kt b/src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerWebResource.kt similarity index 100% rename from src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerWebResource.kt rename to src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/api/ComposerWebResource.kt diff --git a/src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfo.kt b/src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfo.kt similarity index 100% rename from src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfo.kt rename to src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfo.kt diff --git a/src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerExceptionResponse.kt b/src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerExceptionResponse.kt similarity index 100% rename from src/backend/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerExceptionResponse.kt rename to src/backend/core/composer/api-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerExceptionResponse.kt diff --git a/src/backend/composer/biz-composer/build.gradle.kts b/src/backend/core/composer/biz-composer/build.gradle.kts similarity index 97% rename from src/backend/composer/biz-composer/build.gradle.kts rename to src/backend/core/composer/biz-composer/build.gradle.kts index 261e91efd2..a6cb730b7b 100644 --- a/src/backend/composer/biz-composer/build.gradle.kts +++ b/src/backend/core/composer/biz-composer/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies{ - api(project(":composer:api-composer")) + api(project(":core:composer:api-composer")) api(project(":common:common-job")) api(project(":common:common-artifact:artifact-service")) implementation("com.google.code.gson:gson") diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/Constant.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/Constant.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/Constant.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/Constant.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactConfigurer.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactConfigurer.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactConfigurer.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactConfigurer.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfoResolver.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfoResolver.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfoResolver.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/ComposerArtifactInfoResolver.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerLocalRepository.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerLocalRepository.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerLocalRepository.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerLocalRepository.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerRemoteRepository.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerRemoteRepository.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerRemoteRepository.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerRemoteRepository.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerVirtualRepository.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerVirtualRepository.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerVirtualRepository.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/artifact/repository/ComposerVirtualRepository.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerResourceController.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerResourceController.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerResourceController.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerResourceController.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerWebResourceController.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerWebResourceController.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerWebResourceController.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/controller/ComposerWebResourceController.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerArtifactMetadataException.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerArtifactMetadataException.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerArtifactMetadataException.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerArtifactMetadataException.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerExceptionHandler.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerExceptionHandler.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerExceptionHandler.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerExceptionHandler.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerPackageMessageDeficiencyException.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerPackageMessageDeficiencyException.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerPackageMessageDeficiencyException.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerPackageMessageDeficiencyException.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerUnSupportCompressException.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerUnSupportCompressException.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerUnSupportCompressException.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/exception/ComposerUnSupportCompressException.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactRepeat.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactRepeat.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactRepeat.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactRepeat.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactUploadResponse.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactUploadResponse.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactUploadResponse.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactUploadResponse.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactVersionDetail.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactVersionDetail.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactVersionDetail.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ArtifactVersionDetail.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Basic.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Basic.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Basic.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Basic.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerMetadata.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerMetadata.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerMetadata.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/ComposerMetadata.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Dist.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Dist.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Dist.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/pojo/Dist.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerService.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerService.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerService.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerService.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerWebService.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerWebService.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerWebService.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/service/ComposerWebService.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/DecompressUtil.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/DecompressUtil.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/DecompressUtil.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/DecompressUtil.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/HttpUtil.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/HttpUtil.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/HttpUtil.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/HttpUtil.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/JsonUtil.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/JsonUtil.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/JsonUtil.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/JsonUtil.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/UriUtil.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/UriUtil.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/UriUtil.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/UriUtil.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/ComposerArtifact.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/ComposerArtifact.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/ComposerArtifact.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/ComposerArtifact.kt diff --git a/src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/UriArgs.kt b/src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/UriArgs.kt similarity index 100% rename from src/backend/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/UriArgs.kt rename to src/backend/core/composer/biz-composer/src/main/kotlin/com/tencent/bkrepo/composer/util/pojo/UriArgs.kt diff --git a/src/backend/core/composer/boot-composer/build.gradle.kts b/src/backend/core/composer/boot-composer/build.gradle.kts new file mode 100644 index 0000000000..188ae0484d --- /dev/null +++ b/src/backend/core/composer/boot-composer/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +dependencies { + implementation(project(":core:composer:biz-composer")) +} diff --git a/src/backend/composer/boot-composer/src/main/kotlin/com/tencent/bkrepo/composer/ComposerApplication.kt b/src/backend/core/composer/boot-composer/src/main/kotlin/com/tencent/bkrepo/composer/ComposerApplication.kt similarity index 100% rename from src/backend/composer/boot-composer/src/main/kotlin/com/tencent/bkrepo/composer/ComposerApplication.kt rename to src/backend/core/composer/boot-composer/src/main/kotlin/com/tencent/bkrepo/composer/ComposerApplication.kt diff --git a/src/backend/composer/boot-composer/src/main/resources/bootstrap.yml b/src/backend/core/composer/boot-composer/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/composer/boot-composer/src/main/resources/bootstrap.yml rename to src/backend/core/composer/boot-composer/src/main/resources/bootstrap.yml diff --git a/src/backend/composer/boot-composer/src/test/kotlin/com/tencent/bkrepo/composer/util/DecompressUtilTest.kt b/src/backend/core/composer/boot-composer/src/test/kotlin/com/tencent/bkrepo/composer/util/DecompressUtilTest.kt similarity index 100% rename from src/backend/composer/boot-composer/src/test/kotlin/com/tencent/bkrepo/composer/util/DecompressUtilTest.kt rename to src/backend/core/composer/boot-composer/src/test/kotlin/com/tencent/bkrepo/composer/util/DecompressUtilTest.kt diff --git a/src/backend/composer/build.gradle.kts b/src/backend/core/composer/build.gradle.kts similarity index 100% rename from src/backend/composer/build.gradle.kts rename to src/backend/core/composer/build.gradle.kts diff --git a/src/backend/conan/api-conan/build.gradle.kts b/src/backend/core/conan/api-conan/build.gradle.kts similarity index 100% rename from src/backend/conan/api-conan/build.gradle.kts rename to src/backend/core/conan/api-conan/build.gradle.kts diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/ConanMessageCode.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/ConanMessageCode.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/ConanMessageCode.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/ConanMessageCode.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/Constants.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/Constants.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/Constants.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/constant/Constants.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanDomainInfo.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanDomainInfo.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanDomainInfo.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanDomainInfo.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageDeleteRequest.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageDeleteRequest.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageDeleteRequest.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageDeleteRequest.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageUploadRequest.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageUploadRequest.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageUploadRequest.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanPackageUploadRequest.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeDeleteRequest.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeDeleteRequest.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeDeleteRequest.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeDeleteRequest.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeUploadRequest.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeUploadRequest.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeUploadRequest.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanRecipeUploadRequest.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageVersionInfo.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageVersionInfo.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageVersionInfo.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageVersionInfo.kt diff --git a/src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionOperationRequest.kt b/src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionOperationRequest.kt similarity index 100% rename from src/backend/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionOperationRequest.kt rename to src/backend/core/conan/api-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionOperationRequest.kt diff --git a/src/backend/conan/biz-conan/build.gradle.kts b/src/backend/core/conan/biz-conan/build.gradle.kts similarity index 97% rename from src/backend/conan/biz-conan/build.gradle.kts rename to src/backend/core/conan/biz-conan/build.gradle.kts index fec3c072e1..90f44520f9 100644 --- a/src/backend/conan/biz-conan/build.gradle.kts +++ b/src/backend/core/conan/biz-conan/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":conan:api-conan")) + api(project(":core:conan:api-conan")) api(project(":common:common-artifact:artifact-service")) api(project(":common:common-lock")) diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/ConanArtifactConfigurer.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/ConanArtifactConfigurer.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/ConanArtifactConfigurer.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/ConanArtifactConfigurer.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanLocalRepository.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanLocalRepository.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanLocalRepository.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanLocalRepository.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanRemoteRepository.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanRemoteRepository.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanRemoteRepository.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanRemoteRepository.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanVirtualRepository.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanVirtualRepository.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanVirtualRepository.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/repository/ConanVirtualRepository.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/resolver/ConanArtifactInfoResolver.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/resolver/ConanArtifactInfoResolver.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/resolver/ConanArtifactInfoResolver.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/artifact/resolver/ConanArtifactInfoResolver.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/config/ConanProperties.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/config/ConanProperties.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/config/ConanProperties.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/config/ConanProperties.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanCommonController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanCommonController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanCommonController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanCommonController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanDeleteController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanDeleteController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanDeleteController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanDeleteController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanRevisionsController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanRevisionsController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanRevisionsController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanRevisionsController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanSearchController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanSearchController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanSearchController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanSearchController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanUploadDownloadController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanUploadDownloadController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanUploadDownloadController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/ConanUploadDownloadController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/UserConanController.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/UserConanController.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/UserConanController.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/controller/UserConanController.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanAuthenticationException.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanAuthenticationException.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanAuthenticationException.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanAuthenticationException.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanException.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanException.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanException.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanException.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanExceptionHandler.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanExceptionHandler.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanExceptionHandler.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanExceptionHandler.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanFileNotFoundException.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanFileNotFoundException.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanFileNotFoundException.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanFileNotFoundException.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanRecipeNotFoundException.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanRecipeNotFoundException.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanRecipeNotFoundException.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanRecipeNotFoundException.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanSearchNotFoundException.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanSearchNotFoundException.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanSearchNotFoundException.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/exception/ConanSearchNotFoundException.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/ConanEventListener.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/ConanEventListener.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/ConanEventListener.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/ConanEventListener.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageDeleteEvent.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageDeleteEvent.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageDeleteEvent.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageDeleteEvent.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageUploadEvent.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageUploadEvent.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageUploadEvent.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanPackageUploadEvent.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeDeleteEvent.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeDeleteEvent.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeDeleteEvent.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeDeleteEvent.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeUploadEvent.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeUploadEvent.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeUploadEvent.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/event/ConanRecipeUploadEvent.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/AbstractRevisionOperation.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/AbstractRevisionOperation.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/AbstractRevisionOperation.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/AbstractRevisionOperation.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageDeleteOperation.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageDeleteOperation.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageDeleteOperation.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageDeleteOperation.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageUploadOperation.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageUploadOperation.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageUploadOperation.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanPackageUploadOperation.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeDeleteOperation.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeDeleteOperation.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeDeleteOperation.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeDeleteOperation.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeUploadOperation.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeUploadOperation.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeUploadOperation.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/listener/operation/ConanRecipeUploadOperation.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanFileReference.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanFileReference.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanFileReference.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanFileReference.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanInfo.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanInfo.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanInfo.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanInfo.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanSearchResult.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanSearchResult.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanSearchResult.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/ConanSearchResult.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/IndexInfo.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/IndexInfo.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/IndexInfo.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/IndexInfo.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageReference.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageReference.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageReference.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/PackageReference.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionInfo.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionInfo.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionInfo.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/RevisionInfo.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/artifact/ConanArtifactInfo.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/artifact/ConanArtifactInfo.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/artifact/ConanArtifactInfo.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/artifact/ConanArtifactInfo.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/FileRemoveRequest.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/FileRemoveRequest.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/FileRemoveRequest.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/FileRemoveRequest.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/PackageIdRemoveRequest.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/PackageIdRemoveRequest.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/PackageIdRemoveRequest.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/request/PackageIdRemoveRequest.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanErrorResponse.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanErrorResponse.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanErrorResponse.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanErrorResponse.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanResponse.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanResponse.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanResponse.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pojo/response/ConanResponse.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pool/ConanThreadPoolExecutor.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pool/ConanThreadPoolExecutor.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pool/ConanThreadPoolExecutor.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/pool/ConanThreadPoolExecutor.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanCommonService.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanCommonService.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanCommonService.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanCommonService.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanDeleteService.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanDeleteService.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanDeleteService.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanDeleteService.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanSearchService.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanSearchService.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanSearchService.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanSearchService.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanService.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanService.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanService.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanService.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanUploadDownloadService.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanUploadDownloadService.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanUploadDownloadService.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/ConanUploadDownloadService.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/CommonService.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/CommonService.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/CommonService.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/CommonService.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanCommonServiceImpl.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanCommonServiceImpl.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanCommonServiceImpl.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanCommonServiceImpl.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanDeleteServiceImpl.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanDeleteServiceImpl.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanDeleteServiceImpl.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanDeleteServiceImpl.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanSearchServiceImpl.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanSearchServiceImpl.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanSearchServiceImpl.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanSearchServiceImpl.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanServiceImpl.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanServiceImpl.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanServiceImpl.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanServiceImpl.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanUploadDownloadServiceImpl.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanUploadDownloadServiceImpl.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanUploadDownloadServiceImpl.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/service/impl/ConanUploadDownloadServiceImpl.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanArtifactInfoUtil.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanArtifactInfoUtil.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanArtifactInfoUtil.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanArtifactInfoUtil.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanInfoLoadUtil.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanInfoLoadUtil.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanInfoLoadUtil.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanInfoLoadUtil.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanPathUtils.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanPathUtils.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanPathUtils.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ConanPathUtils.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ObjectBuildUtil.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ObjectBuildUtil.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ObjectBuildUtil.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/ObjectBuildUtil.kt diff --git a/src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/TimeFormatUtil.kt b/src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/TimeFormatUtil.kt similarity index 100% rename from src/backend/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/TimeFormatUtil.kt rename to src/backend/core/conan/biz-conan/src/main/kotlin/com/tencent/bkrepo/conan/utils/TimeFormatUtil.kt diff --git a/src/backend/conan/biz-conan/src/main/resources/i18n/messages_en.properties b/src/backend/core/conan/biz-conan/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/conan/biz-conan/src/main/resources/i18n/messages_en.properties rename to src/backend/core/conan/biz-conan/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/conan/biz-conan/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/conan/biz-conan/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/conan/biz-conan/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/conan/biz-conan/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/conan/biz-conan/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/conan/biz-conan/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/conan/biz-conan/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/conan/biz-conan/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/conan/boot-conan/build.gradle.kts b/src/backend/core/conan/boot-conan/build.gradle.kts similarity index 96% rename from src/backend/conan/boot-conan/build.gradle.kts rename to src/backend/core/conan/boot-conan/build.gradle.kts index 437a76d07f..3194117431 100644 --- a/src/backend/conan/boot-conan/build.gradle.kts +++ b/src/backend/core/conan/boot-conan/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":conan:biz-conan")) + implementation(project(":core:conan:biz-conan")) } diff --git a/src/backend/conan/boot-conan/src/main/kotlin/com/tencent/bkrepo/conan/ConanApplication.kt b/src/backend/core/conan/boot-conan/src/main/kotlin/com/tencent/bkrepo/conan/ConanApplication.kt similarity index 100% rename from src/backend/conan/boot-conan/src/main/kotlin/com/tencent/bkrepo/conan/ConanApplication.kt rename to src/backend/core/conan/boot-conan/src/main/kotlin/com/tencent/bkrepo/conan/ConanApplication.kt diff --git a/src/backend/conan/boot-conan/src/main/resources/bootstrap.yml b/src/backend/core/conan/boot-conan/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/conan/boot-conan/src/main/resources/bootstrap.yml rename to src/backend/core/conan/boot-conan/src/main/resources/bootstrap.yml diff --git a/src/backend/conan/build.gradle.kts b/src/backend/core/conan/build.gradle.kts similarity index 100% rename from src/backend/conan/build.gradle.kts rename to src/backend/core/conan/build.gradle.kts diff --git a/src/backend/ddc/api-ddc/build.gradle.kts b/src/backend/core/ddc/api-ddc/build.gradle.kts similarity index 100% rename from src/backend/ddc/api-ddc/build.gradle.kts rename to src/backend/core/ddc/api-ddc/build.gradle.kts diff --git a/src/backend/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/Contant.kt b/src/backend/core/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/Contant.kt similarity index 100% rename from src/backend/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/Contant.kt rename to src/backend/core/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/Contant.kt diff --git a/src/backend/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/extension/BlobDecompressExtension.kt b/src/backend/core/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/extension/BlobDecompressExtension.kt similarity index 100% rename from src/backend/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/extension/BlobDecompressExtension.kt rename to src/backend/core/ddc/api-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/extension/BlobDecompressExtension.kt diff --git a/src/backend/ddc/biz-ddc/build.gradle.kts b/src/backend/core/ddc/biz-ddc/build.gradle.kts similarity index 97% rename from src/backend/ddc/biz-ddc/build.gradle.kts rename to src/backend/core/ddc/biz-ddc/build.gradle.kts index 75dc4e4a78..ba3dab5474 100644 --- a/src/backend/ddc/biz-ddc/build.gradle.kts +++ b/src/backend/core/ddc/biz-ddc/build.gradle.kts @@ -26,7 +26,7 @@ */ dependencies { - implementation(project(":ddc:api-ddc")) + implementation(project(":core:ddc:api-ddc")) implementation(project(":repository:api-repository")) implementation("org.bouncycastle:bcpkix-jdk15on:1.69") } diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/CompressedBlobArtifactInfo.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/CompressedBlobArtifactInfo.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/CompressedBlobArtifactInfo.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/CompressedBlobArtifactInfo.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/DdcArtifactConfigurer.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/DdcArtifactConfigurer.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/DdcArtifactConfigurer.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/DdcArtifactConfigurer.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/ReferenceArtifactInfo.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/ReferenceArtifactInfo.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/ReferenceArtifactInfo.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/ReferenceArtifactInfo.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcLocalRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcLocalRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcLocalRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcLocalRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcRemoteRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcRemoteRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcRemoteRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcRemoteRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcVirtualRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcVirtualRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcVirtualRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/repository/DdcVirtualRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/CompressedBlobArtifactInfoResolver.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/CompressedBlobArtifactInfoResolver.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/CompressedBlobArtifactInfoResolver.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/CompressedBlobArtifactInfoResolver.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/ReferenceArtifactInfoResolver.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/ReferenceArtifactInfoResolver.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/ReferenceArtifactInfoResolver.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/artifact/resolver/ReferenceArtifactInfoResolver.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/PermissionHelper.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/PermissionHelper.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/PermissionHelper.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/PermissionHelper.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/RefDownloadListener.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/RefDownloadListener.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/RefDownloadListener.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/component/RefDownloadListener.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcConfiguration.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcConfiguration.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcConfiguration.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcConfiguration.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcProperties.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcProperties.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcProperties.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/config/DdcProperties.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/CompressedBlobController.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/CompressedBlobController.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/CompressedBlobController.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/CompressedBlobController.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/HealthController.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/HealthController.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/HealthController.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/HealthController.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/LegacyReferencesController.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/LegacyReferencesController.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/LegacyReferencesController.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/LegacyReferencesController.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/ReferencesController.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/ReferencesController.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/ReferencesController.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/controller/ReferencesController.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/event/RefDownloadedEvent.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/event/RefDownloadedEvent.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/event/RefDownloadedEvent.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/event/RefDownloadedEvent.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/BlobNotFoundException.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/BlobNotFoundException.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/BlobNotFoundException.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/BlobNotFoundException.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/CbWriterException.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/CbWriterException.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/CbWriterException.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/CbWriterException.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/DdcExceptionHandler.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/DdcExceptionHandler.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/DdcExceptionHandler.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/DdcExceptionHandler.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/NotImplementedException.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/NotImplementedException.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/NotImplementedException.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/NotImplementedException.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/ReferenceIsMissingBlobsException.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/ReferenceIsMissingBlobsException.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/ReferenceIsMissingBlobsException.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/exception/ReferenceIsMissingBlobsException.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/metrics/DdcMeterBinder.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/metrics/DdcMeterBinder.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/metrics/DdcMeterBinder.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/metrics/DdcMeterBinder.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcBlob.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcBlob.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcBlob.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcBlob.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcLegacyRef.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcLegacyRef.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcLegacyRef.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcLegacyRef.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRef.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRef.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRef.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRef.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRefBase.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRefBase.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRefBase.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/model/TDdcRefBase.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Blob.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Blob.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Blob.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Blob.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/ContentHash.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/ContentHash.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/ContentHash.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/ContentHash.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/CreateRefResponse.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/CreateRefResponse.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/CreateRefResponse.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/CreateRefResponse.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefId.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefId.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefId.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefId.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefKey.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefKey.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefKey.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/RefKey.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Reference.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Reference.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Reference.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/Reference.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/UploadCompressedBlobResponse.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/UploadCompressedBlobResponse.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/UploadCompressedBlobResponse.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/pojo/UploadCompressedBlobResponse.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/BlobRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/BlobRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/BlobRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/BlobRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/LegacyRefRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/LegacyRefRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/LegacyRefRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/LegacyRefRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefBaseRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefBaseRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefBaseRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefBaseRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefRepository.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefRepository.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefRepository.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/repository/RefRepository.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Blake3Hash.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Blake3Hash.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Blake3Hash.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Blake3Hash.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbArray.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbArray.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbArray.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbArray.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbBinaryAttachment.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbBinaryAttachment.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbBinaryAttachment.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbBinaryAttachment.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbField.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbField.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbField.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbField.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldIterator.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldIterator.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldIterator.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldIterator.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldType.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldType.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldType.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldType.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObject.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObject.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObject.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObject.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObjectAttachment.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObjectAttachment.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObjectAttachment.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbObjectAttachment.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriter.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriter.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriter.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriter.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterBase.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterBase.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterBase.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterBase.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/ICbWriter.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/ICbWriter.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/ICbWriter.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/ICbWriter.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/IoHash.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/IoHash.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/IoHash.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/IoHash.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Scope.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Scope.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Scope.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/Scope.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/VarULong.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/VarULong.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/VarULong.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/serialization/VarULong.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/BlobService.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/BlobService.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/BlobService.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/BlobService.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/CompressedBlobService.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/CompressedBlobService.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/CompressedBlobService.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/CompressedBlobService.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceArtifactService.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceArtifactService.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceArtifactService.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceArtifactService.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceResolver.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceResolver.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceResolver.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceResolver.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceService.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceService.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceService.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/service/ReferenceService.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/ByteBufferUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/ByteBufferUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/ByteBufferUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/ByteBufferUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbFieldUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbFieldUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbFieldUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbFieldUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbWriterUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbWriterUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbWriterUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/CbWriterUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/DdcUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/DdcUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/DdcUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/DdcUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/MediaTypeUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/MediaTypeUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/MediaTypeUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/MediaTypeUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/NodeUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/NodeUtils.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/NodeUtils.kt rename to src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/NodeUtils.kt diff --git a/src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldTest.kt b/src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldTest.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldTest.kt rename to src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbFieldTest.kt diff --git a/src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterTest.kt b/src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterTest.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterTest.kt rename to src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/CbWriterTest.kt diff --git a/src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/VarULongTest.kt b/src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/VarULongTest.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/VarULongTest.kt rename to src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/serialization/VarULongTest.kt diff --git a/src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtilsTest.kt b/src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtilsTest.kt similarity index 100% rename from src/backend/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtilsTest.kt rename to src/backend/core/ddc/biz-ddc/src/test/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtilsTest.kt diff --git a/src/backend/ddc/boot-ddc/build.gradle.kts b/src/backend/core/ddc/boot-ddc/build.gradle.kts similarity index 96% rename from src/backend/ddc/boot-ddc/build.gradle.kts rename to src/backend/core/ddc/boot-ddc/build.gradle.kts index a8ff34940f..edb71dfe75 100644 --- a/src/backend/ddc/boot-ddc/build.gradle.kts +++ b/src/backend/core/ddc/boot-ddc/build.gradle.kts @@ -26,5 +26,5 @@ */ dependencies { - implementation(project(":ddc:biz-ddc")) + implementation(project(":core:ddc:biz-ddc")) } diff --git a/src/backend/ddc/boot-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/DdcApplication.kt b/src/backend/core/ddc/boot-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/DdcApplication.kt similarity index 100% rename from src/backend/ddc/boot-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/DdcApplication.kt rename to src/backend/core/ddc/boot-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/DdcApplication.kt diff --git a/src/backend/ddc/boot-ddc/src/main/resources/bootstrap.yml b/src/backend/core/ddc/boot-ddc/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/ddc/boot-ddc/src/main/resources/bootstrap.yml rename to src/backend/core/ddc/boot-ddc/src/main/resources/bootstrap.yml diff --git a/src/backend/generic/api-generic/build.gradle.kts b/src/backend/core/generic/api-generic/build.gradle.kts similarity index 100% rename from src/backend/generic/api-generic/build.gradle.kts rename to src/backend/core/generic/api-generic/build.gradle.kts diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/OperateResource.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/OperateResource.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/OperateResource.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/OperateResource.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/ProxyTemporaryAccessClient.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/ProxyTemporaryAccessClient.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/ProxyTemporaryAccessClient.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/api/ProxyTemporaryAccessClient.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfo.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfo.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfo.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfo.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfo.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfo.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfo.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfo.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/Constants.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/Constants.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/Constants.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/Constants.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/GenericMessageCode.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/GenericMessageCode.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/GenericMessageCode.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/constant/GenericMessageCode.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/enum/GenericAction.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/enum/GenericAction.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/enum/GenericAction.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/enum/GenericAction.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyContext.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyContext.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyContext.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyContext.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyExtension.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyExtension.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyExtension.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/extension/TemporaryUrlNotifyExtension.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BatchDownloadPaths.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BatchDownloadPaths.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BatchDownloadPaths.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BatchDownloadPaths.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BlockInfo.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BlockInfo.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BlockInfo.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/BlockInfo.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/ChunkedResponseProperty.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/ChunkedResponseProperty.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/ChunkedResponseProperty.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/ChunkedResponseProperty.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/CompressedFileInfo.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/CompressedFileInfo.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/CompressedFileInfo.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/CompressedFileInfo.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/FileInfo.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/FileInfo.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/FileInfo.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/FileInfo.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessToken.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessToken.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessToken.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessToken.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessUrl.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessUrl.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessUrl.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryAccessUrl.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryUrlCreateRequest.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryUrlCreateRequest.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryUrlCreateRequest.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/TemporaryUrlCreateRequest.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/UploadTransactionInfo.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/UploadTransactionInfo.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/UploadTransactionInfo.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/UploadTransactionInfo.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryRequest.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryRequest.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryRequest.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryRequest.kt diff --git a/src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryResponse.kt b/src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryResponse.kt similarity index 100% rename from src/backend/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryResponse.kt rename to src/backend/core/generic/api-generic/src/main/kotlin/com/tencent/bkrepo/generic/pojo/bkbase/QueryResponse.kt diff --git a/src/backend/generic/biz-generic/build.gradle.kts b/src/backend/core/generic/biz-generic/build.gradle.kts similarity index 94% rename from src/backend/generic/biz-generic/build.gradle.kts rename to src/backend/core/generic/biz-generic/build.gradle.kts index 88361d8c4c..01abaeb307 100644 --- a/src/backend/generic/biz-generic/build.gradle.kts +++ b/src/backend/core/generic/biz-generic/build.gradle.kts @@ -30,9 +30,9 @@ */ dependencies { - api(project(":generic:api-generic")) + api(project(":core:generic:api-generic")) api(project(":common:common-redis")) - api(project(":analyst:api-analyst")) + api(project(":core:analyst:api-analyst")) api(project(":common:common-generic")) api(project(":common:common-artifact:artifact-service")) implementation(project(":common:common-artifact:artifact-cache")) diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactConfigurer.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactConfigurer.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactConfigurer.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactConfigurer.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfoResolver.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfoResolver.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfoResolver.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericArtifactInfoResolver.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfoResolver.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfoResolver.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfoResolver.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericChunkedArtifactInfoResolver.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericLocalRepository.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericLocalRepository.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericLocalRepository.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericLocalRepository.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericRemoteRepository.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericRemoteRepository.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericRemoteRepository.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericRemoteRepository.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericVirtualRepository.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericVirtualRepository.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericVirtualRepository.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/GenericVirtualRepository.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/Utils.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/Utils.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/Utils.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/Utils.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/context/GenericArtifactSearchContext.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/context/GenericArtifactSearchContext.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/context/GenericArtifactSearchContext.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/context/GenericArtifactSearchContext.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncCacheHttpClientBuilderFactory.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncCacheHttpClientBuilderFactory.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncCacheHttpClientBuilderFactory.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncCacheHttpClientBuilderFactory.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncRemoteArtifactCacheWriter.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncRemoteArtifactCacheWriter.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncRemoteArtifactCacheWriter.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/AsyncRemoteArtifactCacheWriter.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/GenericAsyncCacheHttpClientBuilderFactory.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/GenericAsyncCacheHttpClientBuilderFactory.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/GenericAsyncCacheHttpClientBuilderFactory.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/GenericAsyncCacheHttpClientBuilderFactory.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/ReceiverArtifactFile.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/ReceiverArtifactFile.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/ReceiverArtifactFile.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/ReceiverArtifactFile.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheLocks.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheLocks.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheLocks.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheLocks.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheWriter.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheWriter.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheWriter.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/artifact/remote/RemoteArtifactCacheWriter.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/BkBaseProperties.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/BkBaseProperties.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/BkBaseProperties.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/BkBaseProperties.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/DeltaProperties.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/DeltaProperties.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/DeltaProperties.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/DeltaProperties.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/GenericProperties.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/GenericProperties.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/GenericProperties.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/GenericProperties.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/IOExceptionHandler.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/IOExceptionHandler.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/IOExceptionHandler.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/IOExceptionHandler.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/PlatformProperties.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/PlatformProperties.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/PlatformProperties.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/PlatformProperties.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/ProxyProperties.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/ProxyProperties.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/ProxyProperties.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/config/ProxyProperties.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericController.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericController.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericController.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericController.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericDeltaController.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericDeltaController.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericDeltaController.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/GenericDeltaController.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/OperateResourceImpl.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/OperateResourceImpl.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/OperateResourceImpl.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/OperateResourceImpl.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/ProxyController.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/ProxyController.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/ProxyController.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/ProxyController.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/TemporaryAccessController.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/TemporaryAccessController.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/TemporaryAccessController.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/TemporaryAccessController.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/proxy/ProxyTemporaryAccessController.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/proxy/ProxyTemporaryAccessController.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/proxy/ProxyTemporaryAccessController.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/controller/proxy/ProxyTemporaryAccessController.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/dao/SignFileDao.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/dao/SignFileDao.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/dao/SignFileDao.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/dao/SignFileDao.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/model/TSignFile.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/model/TSignFile.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/model/TSignFile.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/model/TSignFile.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/CompressedFileService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/CompressedFileService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/CompressedFileService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/CompressedFileService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DeltaSyncService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DeltaSyncService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DeltaSyncService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DeltaSyncService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DownloadService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DownloadService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DownloadService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/DownloadService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/OperateService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/OperateService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/OperateService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/OperateService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/ProxyService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/ProxyService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/ProxyService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/ProxyService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/TemporaryAccessService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/TemporaryAccessService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/TemporaryAccessService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/TemporaryAccessService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/UploadService.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/UploadService.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/UploadService.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/service/UploadService.kt diff --git a/src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/util/ChunkedRequestUtil.kt b/src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/util/ChunkedRequestUtil.kt similarity index 100% rename from src/backend/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/util/ChunkedRequestUtil.kt rename to src/backend/core/generic/biz-generic/src/main/kotlin/com/tencent/bkrepo/generic/util/ChunkedRequestUtil.kt diff --git a/src/backend/generic/biz-generic/src/main/resources/i18n/messages_en.properties b/src/backend/core/generic/biz-generic/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/generic/biz-generic/src/main/resources/i18n/messages_en.properties rename to src/backend/core/generic/biz-generic/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/generic/biz-generic/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/generic/biz-generic/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/generic/biz-generic/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/generic/biz-generic/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/generic/biz-generic/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/generic/biz-generic/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/generic/biz-generic/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/generic/biz-generic/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/core/generic/boot-generic/build.gradle.kts b/src/backend/core/generic/boot-generic/build.gradle.kts new file mode 100644 index 0000000000..577f8b152b --- /dev/null +++ b/src/backend/core/generic/boot-generic/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +dependencies { + implementation(project(":core:generic:biz-generic")) +} diff --git a/src/backend/generic/boot-generic/src/main/kotlin/com/tencent/bkrepo/generic/GenericApplication.kt b/src/backend/core/generic/boot-generic/src/main/kotlin/com/tencent/bkrepo/generic/GenericApplication.kt similarity index 100% rename from src/backend/generic/boot-generic/src/main/kotlin/com/tencent/bkrepo/generic/GenericApplication.kt rename to src/backend/core/generic/boot-generic/src/main/kotlin/com/tencent/bkrepo/generic/GenericApplication.kt diff --git a/src/backend/generic/boot-generic/src/main/resources/bootstrap.yml b/src/backend/core/generic/boot-generic/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/generic/boot-generic/src/main/resources/bootstrap.yml rename to src/backend/core/generic/boot-generic/src/main/resources/bootstrap.yml diff --git a/src/backend/generic/build.gradle.kts b/src/backend/core/generic/build.gradle.kts similarity index 100% rename from src/backend/generic/build.gradle.kts rename to src/backend/core/generic/build.gradle.kts diff --git a/src/backend/git/api-git/build.gradle.kts b/src/backend/core/git/api-git/build.gradle.kts similarity index 100% rename from src/backend/git/api-git/build.gradle.kts rename to src/backend/core/git/api-git/build.gradle.kts diff --git a/src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitContentArtifactInfo.kt b/src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitContentArtifactInfo.kt similarity index 100% rename from src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitContentArtifactInfo.kt rename to src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitContentArtifactInfo.kt diff --git a/src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitPackFileArtifactInfo.kt b/src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitPackFileArtifactInfo.kt similarity index 100% rename from src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitPackFileArtifactInfo.kt rename to src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitPackFileArtifactInfo.kt diff --git a/src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepositoryArtifactInfo.kt b/src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepositoryArtifactInfo.kt similarity index 100% rename from src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepositoryArtifactInfo.kt rename to src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepositoryArtifactInfo.kt diff --git a/src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitConstants.kt b/src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitConstants.kt similarity index 100% rename from src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitConstants.kt rename to src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitConstants.kt diff --git a/src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitMessageCode.kt b/src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitMessageCode.kt similarity index 100% rename from src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitMessageCode.kt rename to src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/GitMessageCode.kt diff --git a/src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/HubType.kt b/src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/HubType.kt similarity index 100% rename from src/backend/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/HubType.kt rename to src/backend/core/git/api-git/src/main/kotlin/com/tencent/bkrepo/git/constant/HubType.kt diff --git a/src/backend/git/api-git/src/main/resources/i18n/messages_en.properties b/src/backend/core/git/api-git/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/git/api-git/src/main/resources/i18n/messages_en.properties rename to src/backend/core/git/api-git/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/git/api-git/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/git/api-git/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/git/api-git/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/git/api-git/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/git/api-git/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/git/api-git/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/git/api-git/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/git/api-git/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/git/biz-git/build.gradle.kts b/src/backend/core/git/biz-git/build.gradle.kts similarity index 97% rename from src/backend/git/biz-git/build.gradle.kts rename to src/backend/core/git/biz-git/build.gradle.kts index e57eb12780..4c3669d8c2 100644 --- a/src/backend/git/biz-git/build.gradle.kts +++ b/src/backend/core/git/biz-git/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":git:api-git")) + api(project(":core:git:api-git")) api(project(":common:common-job")) implementation("org.eclipse.jgit:org.eclipse.jgit.http.server") testImplementation("org.eclipse.jgit:org.eclipse.jgit.junit") diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitArtifactConfigurer.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitArtifactConfigurer.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitArtifactConfigurer.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitArtifactConfigurer.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepoInterceptor.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepoInterceptor.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepoInterceptor.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/GitRepoInterceptor.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitLocalRepository.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitLocalRepository.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitLocalRepository.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitLocalRepository.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitRemoteRepository.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitRemoteRepository.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitRemoteRepository.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitRemoteRepository.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitVirtualRepository.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitVirtualRepository.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitVirtualRepository.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/repository/GitVirtualRepository.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitContentResolver.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitContentResolver.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitContentResolver.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitContentResolver.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitRepositoryResolver.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitRepositoryResolver.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitRepositoryResolver.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/artifact/resolver/GitRepositoryResolver.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/AsynchronousSpringEventsConfig.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/AsynchronousSpringEventsConfig.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/AsynchronousSpringEventsConfig.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/AsynchronousSpringEventsConfig.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitProperties.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitProperties.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitProperties.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitProperties.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitWebConfig.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitWebConfig.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitWebConfig.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/config/GitWebConfig.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReaders.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReaders.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReaders.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReaders.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReadersHolder.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReadersHolder.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReadersHolder.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/DfsDataReadersHolder.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/FileId.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/FileId.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/FileId.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/FileId.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/UserHolder.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/UserHolder.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/UserHolder.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/context/UserHolder.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitController.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitController.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitController.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitController.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitLfsController.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitLfsController.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitLfsController.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/GitLfsController.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/user/GitApiController.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/user/GitApiController.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/user/GitApiController.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/controller/user/GitApiController.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/exception/LockFailedException.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/exception/LockFailedException.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/exception/LockFailedException.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/exception/LockFailedException.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ContextSettingInterceptor.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ContextSettingInterceptor.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ContextSettingInterceptor.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ContextSettingInterceptor.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ProxyInterceptor.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ProxyInterceptor.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ProxyInterceptor.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/interceptor/ProxyInterceptor.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/CodeRepositoryResolver.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/CodeRepositoryResolver.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/CodeRepositoryResolver.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/CodeRepositoryResolver.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeObjDatabase.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeObjDatabase.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeObjDatabase.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeObjDatabase.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodePackDescription.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodePackDescription.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodePackDescription.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodePackDescription.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRefDatabase.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRefDatabase.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRefDatabase.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRefDatabase.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepository.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepository.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepository.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepository.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryBuilder.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryBuilder.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryBuilder.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryBuilder.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsArtifactOutputStream.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsArtifactOutputStream.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsArtifactOutputStream.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsArtifactOutputStream.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsByteArrayDataReader.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsByteArrayDataReader.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsByteArrayDataReader.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsByteArrayDataReader.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsConstants.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsConstants.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsConstants.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsConstants.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsDataReader.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsDataReader.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsDataReader.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsDataReader.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsFileDataReader.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsFileDataReader.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsFileDataReader.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsFileDataReader.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsReadableChannel.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsReadableChannel.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsReadableChannel.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/DfsReadableChannel.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/InMemoryRepositoryDataService.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/InMemoryRepositoryDataService.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/InMemoryRepositoryDataService.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/InMemoryRepositoryDataService.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/RepositoryDataService.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/RepositoryDataService.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/RepositoryDataService.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/internal/storage/RepositoryDataService.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryEvent.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryEvent.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryEvent.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryEvent.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryListener.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryListener.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryListener.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/listener/SyncRepositoryListener.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/model/TDfsPackDescription.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/model/TDfsPackDescription.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/model/TDfsPackDescription.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/model/TDfsPackDescription.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/repository/DfsPackDescriptionRepository.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/repository/DfsPackDescriptionRepository.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/repository/DfsPackDescriptionRepository.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/repository/DfsPackDescriptionRepository.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/DefaultReceivePackFactory.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/DefaultReceivePackFactory.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/DefaultReceivePackFactory.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/DefaultReceivePackFactory.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/SmartOutputStream.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/SmartOutputStream.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/SmartOutputStream.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/server/SmartOutputStream.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/CodeRepositoryDataService.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/CodeRepositoryDataService.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/CodeRepositoryDataService.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/CodeRepositoryDataService.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitApiService.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitApiService.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitApiService.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitApiService.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitService.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitService.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitService.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/service/GitService.kt diff --git a/src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/util/FileUtil.kt b/src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/util/FileUtil.kt similarity index 100% rename from src/backend/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/util/FileUtil.kt rename to src/backend/core/git/biz-git/src/main/kotlin/com/tencent/bkrepo/git/util/FileUtil.kt diff --git a/src/backend/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryTest.kt b/src/backend/core/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryTest.kt similarity index 100% rename from src/backend/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryTest.kt rename to src/backend/core/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/CodeRepositoryTest.kt diff --git a/src/backend/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/EmptyLockProvider.kt b/src/backend/core/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/EmptyLockProvider.kt similarity index 100% rename from src/backend/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/EmptyLockProvider.kt rename to src/backend/core/git/biz-git/src/test/kotlin/com/tencent/bkrepo/git/internal/storage/EmptyLockProvider.kt diff --git a/src/backend/maven/boot-maven/build.gradle.kts b/src/backend/core/git/boot-git/build.gradle.kts similarity index 96% rename from src/backend/maven/boot-maven/build.gradle.kts rename to src/backend/core/git/boot-git/build.gradle.kts index 6c8c69075d..ac6c8a4a77 100644 --- a/src/backend/maven/boot-maven/build.gradle.kts +++ b/src/backend/core/git/boot-git/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":maven:biz-maven")) + implementation(project(":core:git:biz-git")) } diff --git a/src/backend/git/boot-git/src/main/kotlin/com/tencent/bkrepo/git/GitApplication.kt b/src/backend/core/git/boot-git/src/main/kotlin/com/tencent/bkrepo/git/GitApplication.kt similarity index 100% rename from src/backend/git/boot-git/src/main/kotlin/com/tencent/bkrepo/git/GitApplication.kt rename to src/backend/core/git/boot-git/src/main/kotlin/com/tencent/bkrepo/git/GitApplication.kt diff --git a/src/backend/git/boot-git/src/main/resources/bootstrap.yml b/src/backend/core/git/boot-git/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/git/boot-git/src/main/resources/bootstrap.yml rename to src/backend/core/git/boot-git/src/main/resources/bootstrap.yml diff --git a/src/backend/git/build.gradle.kts b/src/backend/core/git/build.gradle.kts similarity index 100% rename from src/backend/git/build.gradle.kts rename to src/backend/core/git/build.gradle.kts diff --git a/src/backend/helm/api-helm/build.gradle.kts b/src/backend/core/helm/api-helm/build.gradle.kts similarity index 100% rename from src/backend/helm/api-helm/build.gradle.kts rename to src/backend/core/helm/api-helm/build.gradle.kts diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/api/HelmClient.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/api/HelmClient.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/api/HelmClient.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/api/HelmClient.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/Constants.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/Constants.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/Constants.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/Constants.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/HelmMessageCode.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/HelmMessageCode.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/HelmMessageCode.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/HelmMessageCode.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/QueryConstants.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/QueryConstants.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/QueryConstants.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/constants/QueryConstants.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmDomainInfo.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmDomainInfo.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmDomainInfo.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmDomainInfo.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmErrorResponse.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmErrorResponse.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmErrorResponse.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmErrorResponse.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmSuccessResponse.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmSuccessResponse.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmSuccessResponse.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/HelmSuccessResponse.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartOperationRequest.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartOperationRequest.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartOperationRequest.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartOperationRequest.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartPackageDeleteRequest.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartPackageDeleteRequest.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartPackageDeleteRequest.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartPackageDeleteRequest.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartUploadRequest.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartUploadRequest.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartUploadRequest.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartUploadRequest.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartVersionDeleteRequest.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartVersionDeleteRequest.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartVersionDeleteRequest.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/chart/ChartVersionDeleteRequest.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/DateTimeRepairResponse.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/DateTimeRepairResponse.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/DateTimeRepairResponse.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/DateTimeRepairResponse.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/PackageManagerResponse.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/PackageManagerResponse.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/PackageManagerResponse.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/fixtool/PackageManagerResponse.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionResult.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionResult.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionResult.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionResult.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionStatus.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionStatus.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionStatus.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/job/ExecutionStatus.kt diff --git a/src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/user/PackageVersionInfo.kt b/src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/user/PackageVersionInfo.kt similarity index 100% rename from src/backend/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/user/PackageVersionInfo.kt rename to src/backend/core/helm/api-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/user/PackageVersionInfo.kt diff --git a/src/backend/helm/biz-helm/build.gradle.kts b/src/backend/core/helm/biz-helm/build.gradle.kts similarity index 97% rename from src/backend/helm/biz-helm/build.gradle.kts rename to src/backend/core/helm/biz-helm/build.gradle.kts index 153d9c4e93..d03bd762f1 100644 --- a/src/backend/helm/biz-helm/build.gradle.kts +++ b/src/backend/core/helm/biz-helm/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":helm:api-helm")) + api(project(":core:helm:api-helm")) api(project(":common:common-job")) api(project(":common:common-artifact:artifact-service")) api(project(":common:common-lock")) diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/HelmArtifactConfigurer.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/HelmArtifactConfigurer.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/HelmArtifactConfigurer.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/HelmArtifactConfigurer.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmLocalRepository.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmLocalRepository.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmLocalRepository.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmLocalRepository.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmRemoteRepository.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmRemoteRepository.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmRemoteRepository.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmRemoteRepository.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmVirtualRepository.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmVirtualRepository.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmVirtualRepository.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/repository/HelmVirtualRepository.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmArtifactInfoResolver.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmArtifactInfoResolver.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmArtifactInfoResolver.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmArtifactInfoResolver.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmDeleteArtifactInfoResolver.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmDeleteArtifactInfoResolver.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmDeleteArtifactInfoResolver.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/artifact/resolver/HelmDeleteArtifactInfoResolver.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/DateConverterConfig.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/DateConverterConfig.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/DateConverterConfig.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/DateConverterConfig.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmConsumerConfig.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmConsumerConfig.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmConsumerConfig.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmConsumerConfig.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmProperties.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmProperties.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmProperties.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/config/HelmProperties.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartManipulationController.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartManipulationController.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartManipulationController.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartManipulationController.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartRepositoryController.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartRepositoryController.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartRepositoryController.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/ChartRepositoryController.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/HelmFixToolController.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/HelmFixToolController.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/HelmFixToolController.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/HelmFixToolController.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/UserHelmController.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/UserHelmController.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/UserHelmController.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/api/UserHelmController.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/service/HelmIndexController.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/service/HelmIndexController.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/service/HelmIndexController.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/controller/service/HelmIndexController.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/dao/HelmChartEventRecordDao.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/dao/HelmChartEventRecordDao.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/dao/HelmChartEventRecordDao.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/dao/HelmChartEventRecordDao.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmBadRequestException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmBadRequestException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmBadRequestException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmBadRequestException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmErrorInvalidProvenanceFileException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmErrorInvalidProvenanceFileException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmErrorInvalidProvenanceFileException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmErrorInvalidProvenanceFileException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmExceptionHandler.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmExceptionHandler.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmExceptionHandler.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmExceptionHandler.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileAlreadyExistsException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileAlreadyExistsException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileAlreadyExistsException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileAlreadyExistsException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileNotFoundException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileNotFoundException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileNotFoundException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmFileNotFoundException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmForbiddenRequestException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmForbiddenRequestException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmForbiddenRequestException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmForbiddenRequestException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmIndexFreshFailException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmIndexFreshFailException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmIndexFreshFailException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmIndexFreshFailException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmRepoNotFoundException.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmRepoNotFoundException.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmRepoNotFoundException.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/exception/HelmRepoNotFoundException.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/ChartEventListener.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/ChartEventListener.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/ChartEventListener.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/ChartEventListener.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/AbstractEventJobExecutor.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/AbstractEventJobExecutor.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/AbstractEventJobExecutor.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/AbstractEventJobExecutor.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/RemoteEventJobExecutor.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/RemoteEventJobExecutor.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/RemoteEventJobExecutor.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/base/RemoteEventJobExecutor.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/PackageReplicationEventConsumer.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/PackageReplicationEventConsumer.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/PackageReplicationEventConsumer.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/PackageReplicationEventConsumer.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/RemoteRepoEventConsumer.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/RemoteRepoEventConsumer.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/RemoteRepoEventConsumer.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/RemoteRepoEventConsumer.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/ReplicationEventListener.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/ReplicationEventListener.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/ReplicationEventListener.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/consumer/ReplicationEventListener.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartDeleteEvent.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartDeleteEvent.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartDeleteEvent.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartDeleteEvent.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartUploadEvent.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartUploadEvent.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartUploadEvent.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartUploadEvent.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartVersionDeleteEvent.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartVersionDeleteEvent.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartVersionDeleteEvent.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/event/ChartVersionDeleteEvent.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/operation/IndexRefreshTask.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/operation/IndexRefreshTask.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/operation/IndexRefreshTask.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/listener/operation/IndexRefreshTask.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/metrics/HelmMetrics.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/metrics/HelmMetrics.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/metrics/HelmMetrics.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/metrics/HelmMetrics.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/model/THelmChartEventRecord.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/model/THelmChartEventRecord.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/model/THelmChartEventRecord.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/model/THelmChartEventRecord.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmArtifactInfo.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmArtifactInfo.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmArtifactInfo.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmArtifactInfo.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmDeleteArtifactInfo.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmDeleteArtifactInfo.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmDeleteArtifactInfo.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/artifact/HelmDeleteArtifactInfo.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmChartMetadata.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmChartMetadata.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmChartMetadata.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmChartMetadata.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmIndexYamlMetadata.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmIndexYamlMetadata.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmIndexYamlMetadata.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmIndexYamlMetadata.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmMaintainerMetadata.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmMaintainerMetadata.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmMaintainerMetadata.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pojo/metadata/HelmMaintainerMetadata.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/EventHandlerThreadPoolExecutor.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/EventHandlerThreadPoolExecutor.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/EventHandlerThreadPoolExecutor.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/EventHandlerThreadPoolExecutor.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/HelmThreadPoolExecutor.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/HelmThreadPoolExecutor.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/HelmThreadPoolExecutor.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/pool/HelmThreadPoolExecutor.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationService.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationService.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationService.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationService.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryService.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryService.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryService.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryService.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/FixToolService.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/FixToolService.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/FixToolService.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/FixToolService.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartManipulationServiceImpl.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartManipulationServiceImpl.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartManipulationServiceImpl.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartManipulationServiceImpl.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/FixToolServiceImpl.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/FixToolServiceImpl.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/FixToolServiceImpl.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/FixToolServiceImpl.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/HelmOperationService.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/HelmOperationService.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/HelmOperationService.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/HelmOperationService.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ChartParserUtil.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ChartParserUtil.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ChartParserUtil.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ChartParserUtil.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/DecompressUtil.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/DecompressUtil.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/DecompressUtil.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/DecompressUtil.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtils.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtils.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtils.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtils.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmUtils.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmUtils.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmUtils.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/HelmUtils.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ObjectBuilderUtil.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ObjectBuilderUtil.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ObjectBuilderUtil.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/ObjectBuilderUtil.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/RemoteDownloadUtil.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/RemoteDownloadUtil.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/RemoteDownloadUtil.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/RemoteDownloadUtil.kt diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/TimeFormatUtil.kt b/src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/TimeFormatUtil.kt similarity index 100% rename from src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/TimeFormatUtil.kt rename to src/backend/core/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/utils/TimeFormatUtil.kt diff --git a/src/backend/helm/biz-helm/src/main/resources/i18n/messages_en.properties b/src/backend/core/helm/biz-helm/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/helm/biz-helm/src/main/resources/i18n/messages_en.properties rename to src/backend/core/helm/biz-helm/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/helm/biz-helm/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/helm/biz-helm/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/helm/biz-helm/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/helm/biz-helm/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/helm/biz-helm/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/helm/biz-helm/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/helm/biz-helm/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/helm/biz-helm/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/core/helm/boot-helm/build.gradle.kts b/src/backend/core/helm/boot-helm/build.gradle.kts new file mode 100644 index 0000000000..47b76a383e --- /dev/null +++ b/src/backend/core/helm/boot-helm/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +dependencies { + implementation(project(":core:helm:biz-helm")) +} diff --git a/src/backend/helm/boot-helm/src/main/kotlin/com/tencent/bkrepo/helm/HelmApplication.kt b/src/backend/core/helm/boot-helm/src/main/kotlin/com/tencent/bkrepo/helm/HelmApplication.kt similarity index 100% rename from src/backend/helm/boot-helm/src/main/kotlin/com/tencent/bkrepo/helm/HelmApplication.kt rename to src/backend/core/helm/boot-helm/src/main/kotlin/com/tencent/bkrepo/helm/HelmApplication.kt diff --git a/src/backend/helm/boot-helm/src/main/resources/bootstrap.yml b/src/backend/core/helm/boot-helm/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/helm/boot-helm/src/main/resources/bootstrap.yml rename to src/backend/core/helm/boot-helm/src/main/resources/bootstrap.yml diff --git a/src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartInfoServiceTest.kt b/src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartInfoServiceTest.kt similarity index 100% rename from src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartInfoServiceTest.kt rename to src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartInfoServiceTest.kt diff --git a/src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationServiceTest.kt b/src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationServiceTest.kt similarity index 100% rename from src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationServiceTest.kt rename to src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartManipulationServiceTest.kt diff --git a/src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryServiceTest.kt b/src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryServiceTest.kt similarity index 100% rename from src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryServiceTest.kt rename to src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/ChartRepositoryServiceTest.kt diff --git a/src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/HelmFixToolServiceTest.kt b/src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/HelmFixToolServiceTest.kt similarity index 100% rename from src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/HelmFixToolServiceTest.kt rename to src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/service/HelmFixToolServiceTest.kt diff --git a/src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtilsTest.kt b/src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtilsTest.kt similarity index 100% rename from src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtilsTest.kt rename to src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/HelmMetadataUtilsTest.kt diff --git a/src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/YamlUtilsTest.kt b/src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/YamlUtilsTest.kt similarity index 100% rename from src/backend/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/YamlUtilsTest.kt rename to src/backend/core/helm/boot-helm/src/test/kotlin/com/tencent/bkrepo/helm/utils/YamlUtilsTest.kt diff --git a/src/backend/helm/build.gradle.kts b/src/backend/core/helm/build.gradle.kts similarity index 100% rename from src/backend/helm/build.gradle.kts rename to src/backend/core/helm/build.gradle.kts diff --git a/src/backend/job/api-job/build.gradle.kts b/src/backend/core/job/api-job/build.gradle.kts similarity index 100% rename from src/backend/job/api-job/build.gradle.kts rename to src/backend/core/job/api-job/build.gradle.kts diff --git a/src/backend/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/api/JobClient.kt b/src/backend/core/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/api/JobClient.kt similarity index 100% rename from src/backend/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/api/JobClient.kt rename to src/backend/core/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/api/JobClient.kt diff --git a/src/backend/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ArchiveRestoreRequest.kt b/src/backend/core/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ArchiveRestoreRequest.kt similarity index 100% rename from src/backend/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ArchiveRestoreRequest.kt rename to src/backend/core/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ArchiveRestoreRequest.kt diff --git a/src/backend/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/JobDetail.kt b/src/backend/core/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/JobDetail.kt similarity index 100% rename from src/backend/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/JobDetail.kt rename to src/backend/core/job/api-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/JobDetail.kt diff --git a/src/backend/job/api-schedule/build.gradle.kts b/src/backend/core/job/api-schedule/build.gradle.kts similarity index 100% rename from src/backend/job/api-schedule/build.gradle.kts rename to src/backend/core/job/api-schedule/build.gradle.kts diff --git a/src/backend/job/api-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/api/JobScheduleClient.kt b/src/backend/core/job/api-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/api/JobScheduleClient.kt similarity index 100% rename from src/backend/job/api-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/api/JobScheduleClient.kt rename to src/backend/core/job/api-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/api/JobScheduleClient.kt diff --git a/src/backend/job/biz-job/build.gradle.kts b/src/backend/core/job/biz-job/build.gradle.kts similarity index 91% rename from src/backend/job/biz-job/build.gradle.kts rename to src/backend/core/job/biz-job/build.gradle.kts index 113e17a641..ff2a54977a 100644 --- a/src/backend/job/biz-job/build.gradle.kts +++ b/src/backend/core/job/biz-job/build.gradle.kts @@ -25,7 +25,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ dependencies { - implementation(project(":job:api-job")) + implementation(project(":core:job:api-job")) implementation(project(":common:common-service:service-servlet")) implementation(project(":common:common-job")) implementation(project(":common:common-security")) @@ -37,11 +37,11 @@ dependencies { implementation(project(":common:common-artifact:artifact-service")) implementation(project(":common:common-artifact:artifact-cache")) implementation(project(":repository:api-repository")) - implementation(project(":helm:api-helm")) - implementation(project(":oci:api-oci")) - implementation(project(":maven:api-maven")) + implementation(project(":core:helm:api-helm")) + implementation(project(":core:oci:api-oci")) + implementation(project(":core:maven:api-maven")) implementation(project(":replication:api-replication")) - implementation(project(":archive:api-archive")) + implementation(project(":core:archive:api-archive")) implementation("org.springframework.boot:spring-boot-starter-data-mongodb") implementation("io.micrometer:micrometer-registry-prometheus") implementation("com.tencent.devops:devops-schedule-common") diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/Constants.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/Constants.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/Constants.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/Constants.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/ReplicaRecordCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/ReplicaRecordCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/ReplicaRecordCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/ReplicaRecordCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ActiveProjectService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ActiveProjectService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ActiveProjectService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ActiveProjectService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/BatchJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/BatchJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/BatchJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/BatchJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CenterNodeJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CenterNodeJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CenterNodeJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CenterNodeJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildMongoDbBatchJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildMongoDbBatchJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildMongoDbBatchJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/ChildMongoDbBatchJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeMongoDbBatchJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeMongoDbBatchJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeMongoDbBatchJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/CompositeMongoDbBatchJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextMongoDbJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextMongoDbJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextMongoDbJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultContextMongoDbJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultRepoJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultRepoJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultRepoJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/DefaultRepoJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/FailoverJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/FailoverJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/FailoverJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/FailoverJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobConcurrentLevel.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobConcurrentLevel.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobConcurrentLevel.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobConcurrentLevel.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobExecuteContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobExecuteContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobExecuteContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/JobExecuteContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongoDbBatchJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongoDbBatchJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongoDbBatchJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongoDbBatchJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongodbFailoverJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongodbFailoverJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongodbFailoverJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/MongodbFailoverJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/NodeStatCompositeMongoDbBatchJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/NodeStatCompositeMongoDbBatchJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/NodeStatCompositeMongoDbBatchJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/NodeStatCompositeMongoDbBatchJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/RecoverableMongodbJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/RecoverableMongodbJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/RecoverableMongodbJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/base/RecoverableMongodbJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/DeletedNodeCleanupJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/DeletedNodeCleanupJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/DeletedNodeCleanupJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/DeletedNodeCleanupJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/EmptyFolderCleanupJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/EmptyFolderCleanupJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/EmptyFolderCleanupJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/EmptyFolderCleanupJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/FileJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/FileJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/FileJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/FileJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeCopyJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeCopyJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeCopyJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeCopyJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeFolderJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeFolderJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeFolderJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/NodeFolderJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectRepoMetricsStatJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectRepoMetricsStatJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectRepoMetricsStatJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectRepoMetricsStatJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectReportJobContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectReportJobContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectReportJobContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/context/ProjectReportJobContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/BasedRepositoryNodeRetainResolver.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/BasedRepositoryNodeRetainResolver.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/BasedRepositoryNodeRetainResolver.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/BasedRepositoryNodeRetainResolver.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/ExpireFileResolverConfig.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/ExpireFileResolverConfig.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/ExpireFileResolverConfig.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/ExpireFileResolverConfig.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/NodeRetainResolver.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/NodeRetainResolver.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/NodeRetainResolver.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/NodeRetainResolver.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/RepositoryExpireConfig.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/RepositoryExpireConfig.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/RepositoryExpireConfig.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/file/RepositoryExpireConfig.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeCompleteJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeCompleteJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeCompleteJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeCompleteJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeRestoreJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeRestoreJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeRestoreJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/ArchivedNodeRestoreJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeCompressedJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeCompressedJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeCompressedJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeCompressedJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeUncompressedJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeUncompressedJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeUncompressedJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/NodeUncompressedJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/SystemGcJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/SystemGcJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/SystemGcJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/SystemGcJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/NodeReport2BkbaseJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/NodeReport2BkbaseJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/NodeReport2BkbaseJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/NodeReport2BkbaseJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/RepoDetailReport2BkbaseJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/RepoDetailReport2BkbaseJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/RepoDetailReport2BkbaseJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/bkbase/RepoDetailReport2BkbaseJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/ExpiredCacheFileCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/ExpiredCacheFileCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/ExpiredCacheFileCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/ExpiredCacheFileCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexEvictJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexEvictJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexEvictJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexEvictJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexSyncJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexSyncJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexSyncJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexSyncJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexerCustomizer.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexerCustomizer.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexerCustomizer.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/StorageCacheIndexerCustomizer.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessLogEmbeddingJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessLogEmbeddingJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessLogEmbeddingJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessLogEmbeddingJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessRecordCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessRecordCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessRecordCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactAccessRecordCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadPlanExecuteJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadPlanExecuteJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadPlanExecuteJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadPlanExecuteJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadStrategyGenerateJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadStrategyGenerateJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadStrategyGenerateJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactPreloadStrategyGenerateJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactSimilarityPreloadPlanGenerator.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactSimilarityPreloadPlanGenerator.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactSimilarityPreloadPlanGenerator.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ArtifactSimilarityPreloadPlanGenerator.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/PreloadConfig.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/PreloadConfig.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/PreloadConfig.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/PreloadConfig.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/SimilarityPathUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/SimilarityPathUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/SimilarityPathUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/SimilarityPathUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/AiProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/AiProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/AiProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/AiProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/Document.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/Document.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/Document.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/Document.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/EmbeddingModel.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/EmbeddingModel.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/EmbeddingModel.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/EmbeddingModel.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/HttpEmbeddingModel.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/HttpEmbeddingModel.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/HttpEmbeddingModel.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/HttpEmbeddingModel.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SearchRequest.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SearchRequest.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SearchRequest.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SearchRequest.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SpringAiConfiguration.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SpringAiConfiguration.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SpringAiConfiguration.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/SpringAiConfiguration.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/VectorStore.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/VectorStore.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/VectorStore.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/VectorStore.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClient.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClient.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClient.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClient.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClientProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClientProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClientProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusClientProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusRestApiException.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusRestApiException.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusRestApiException.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusRestApiException.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStore.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStore.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStore.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStore.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStoreProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStoreProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStoreProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/MilvusVectorStoreProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CollectionSchema.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CollectionSchema.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CollectionSchema.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CollectionSchema.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/ConsistencyLevel.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/ConsistencyLevel.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/ConsistencyLevel.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/ConsistencyLevel.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CreateCollectionReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CreateCollectionReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CreateCollectionReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/CreateCollectionReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DataType.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DataType.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DataType.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DataType.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DeleteVectorReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DeleteVectorReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DeleteVectorReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DeleteVectorReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DropCollectionReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DropCollectionReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DropCollectionReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/DropCollectionReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/FieldSchema.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/FieldSchema.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/FieldSchema.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/FieldSchema.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/HasCollectionReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/HasCollectionReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/HasCollectionReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/HasCollectionReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexParam.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexParam.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexParam.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexParam.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexType.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexType.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexType.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/IndexType.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/InsertVectorReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/InsertVectorReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/InsertVectorReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/InsertVectorReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/LoadCollectionReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/LoadCollectionReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/LoadCollectionReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/LoadCollectionReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/MetricType.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/MetricType.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/MetricType.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/MetricType.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/SearchVectorReq.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/SearchVectorReq.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/SearchVectorReq.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/SearchVectorReq.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/Vector.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/Vector.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/Vector.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/request/Vector.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/HasCollectionRes.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/HasCollectionRes.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/HasCollectionRes.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/HasCollectionRes.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/MilvusResponse.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/MilvusResponse.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/MilvusResponse.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/cache/preload/ai/milvus/response/MilvusResponse.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ArtifactCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ArtifactCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ArtifactCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ArtifactCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedBlockNodeCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedBlockNodeCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedBlockNodeCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedBlockNodeCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedRepositoryCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedRepositoryCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedRepositoryCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedRepositoryCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DistributedDockerImageCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DistributedDockerImageCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DistributedDockerImageCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/DistributedDockerImageCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/FileReferenceCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/FileReferenceCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/FileReferenceCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/FileReferenceCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/OauthTokenCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/OauthTokenCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/OauthTokenCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/OauthTokenCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/PipelineArtifactCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/PipelineArtifactCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/PipelineArtifactCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/PipelineArtifactCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ProjectUsageStatisticsCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ProjectUsageStatisticsCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ProjectUsageStatisticsCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ProjectUsageStatisticsCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ReplicationLockCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ReplicationLockCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ReplicationLockCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ReplicationLockCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/RunOnceTaskCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/RunOnceTaskCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/RunOnceTaskCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/RunOnceTaskCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ShareRecordCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ShareRecordCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ShareRecordCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/ShareRecordCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/SignFileCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/SignFileCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/SignFileCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/SignFileCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/TemporaryTokenCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/TemporaryTokenCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/TemporaryTokenCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/clean/TemporaryTokenCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientCleanJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientCleanJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientCleanJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientCleanJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientOfflineJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientOfflineJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientOfflineJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/client/FsClientOfflineJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/DdcBlobCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/ddc/ExpiredDdcRefCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ArtifactPushJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ArtifactPushJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ArtifactPushJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ArtifactPushJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ExpiredNodeMarkupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ExpiredNodeMarkupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ExpiredNodeMarkupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/ExpiredNodeMarkupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/FileSynchronizeJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/FileSynchronizeJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/FileSynchronizeJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/FileSynchronizeJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/MigrateRepoStorageJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/MigrateRepoStorageJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/MigrateRepoStorageJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/MigrateRepoStorageJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/other/NodeCopyJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/project/BkciProjectMetadataSyncJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmMetadataRefreshJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmMetadataRefreshJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmMetadataRefreshJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmMetadataRefreshJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmReplicationRefreshJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmReplicationRefreshJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmReplicationRefreshJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/HelmReplicationRefreshJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/OciBlobNodeRefreshJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/OciBlobNodeRefreshJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/OciBlobNodeRefreshJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/OciBlobNodeRefreshJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoInitJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoInitJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoInitJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoInitJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoRefreshJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoRefreshJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoRefreshJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/RepoRefreshJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/ThirdPartyImageReplicationJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/ThirdPartyImageReplicationJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/ThirdPartyImageReplicationJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/refresh/ThirdPartyImageReplicationJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/DataSeparationJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/DataSeparationJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/DataSeparationJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/DataSeparationJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/FixFailedDataSeparationJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/FixFailedDataSeparationJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/FixFailedDataSeparationJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/separation/FixFailedDataSeparationJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectEmptyFolderCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectEmptyFolderCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectEmptyFolderCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectEmptyFolderCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectNodeFolderStatJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectNodeFolderStatJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectNodeFolderStatJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectNodeFolderStatJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectRepoMetricsStatJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectRepoMetricsStatJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectRepoMetricsStatJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ActiveProjectRepoMetricsStatJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/EmptyFolderCleanup.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/EmptyFolderCleanup.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/EmptyFolderCleanup.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/EmptyFolderCleanup.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/FileSystemStorageStatJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/FileSystemStorageStatJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/FileSystemStorageStatJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/FileSystemStorageStatJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectEmptyFolderCleanupJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectEmptyFolderCleanupJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectEmptyFolderCleanupJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectEmptyFolderCleanupJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectNodeFolderStatJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectNodeFolderStatJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectNodeFolderStatJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectNodeFolderStatJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectRepoMetricsStatJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectRepoMetricsStatJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectRepoMetricsStatJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/InactiveProjectRepoMetricsStatJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/NodeFolderStat.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/NodeFolderStat.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/NodeFolderStat.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/NodeFolderStat.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/ProjectRepoMetricsStatJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/StatBaseJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/StatBaseJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/StatBaseJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/stat/StatBaseJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectDailyAvgMetricsJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectDailyAvgMetricsJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectDailyAvgMetricsJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectDailyAvgMetricsJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMetricsReport2BkbaseJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMetricsReport2BkbaseJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMetricsReport2BkbaseJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMetricsReport2BkbaseJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMonthMetricReportJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMonthMetricReportJob.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMonthMetricReportJob.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/usage/ProjectMonthMetricReportJob.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/FolderUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/FolderUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/FolderUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/FolderUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/MongoShardingUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/MongoShardingUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/MongoShardingUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/MongoShardingUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/RepositoryCommonUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/RepositoryCommonUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/RepositoryCommonUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/RepositoryCommonUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/StatUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/StatUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/StatUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/StatUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobConfig.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobConfig.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobConfig.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobConfig.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobRegistryArtifactConfigurer.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobRegistryArtifactConfigurer.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobRegistryArtifactConfigurer.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/JobRegistryArtifactConfigurer.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectEmptyFolderCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectEmptyFolderCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectEmptyFolderCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectEmptyFolderCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectNodeFolderStatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectNodeFolderStatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectNodeFolderStatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectNodeFolderStatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectRepoMetricsStatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectRepoMetricsStatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectRepoMetricsStatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ActiveProjectRepoMetricsStatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeCompleteJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeCompleteJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeCompleteJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeCompleteJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeRestoreJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeRestoreJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeRestoreJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArchivedNodeRestoreJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessLogEmbeddingJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessLogEmbeddingJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessLogEmbeddingJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessLogEmbeddingJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessRecordCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessRecordCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessRecordCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactAccessRecordCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadPlanExecuteJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadPlanExecuteJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadPlanExecuteJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadPlanExecuteJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadStrategyGenerateJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadStrategyGenerateJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadStrategyGenerateJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPreloadStrategyGenerateJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPushJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPushJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPushJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ArtifactPushJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/BatchJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/BatchJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/BatchJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/BatchJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/CompositeJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/CompositeJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/CompositeJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/CompositeJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DataSeparationJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DataSeparationJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DataSeparationJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DataSeparationJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedBlockNodeCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedBlockNodeCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedBlockNodeCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedBlockNodeCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedNodeCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedNodeCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedNodeCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedNodeCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedRepositoryCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedRepositoryCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedRepositoryCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DeletedRepositoryCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DistributedDockerImageCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DistributedDockerImageCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DistributedDockerImageCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/DistributedDockerImageCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredCacheFileCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredCacheFileCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredCacheFileCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredCacheFileCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredNodeMarkupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredNodeMarkupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredNodeMarkupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ExpiredNodeMarkupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileReferenceCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileReferenceCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileReferenceCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileReferenceCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSynchronizeJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSynchronizeJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSynchronizeJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSynchronizeJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSystemStorageStatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSystemStorageStatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSystemStorageStatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FileSystemStorageStatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FixFailedDataSeparationJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FixFailedDataSeparationJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FixFailedDataSeparationJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FixFailedDataSeparationJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientCleanJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientCleanJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientCleanJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientCleanJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientOfflineProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientOfflineProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientOfflineProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/FsClientOfflineProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmMetadataRefreshJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmMetadataRefreshJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmMetadataRefreshJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmMetadataRefreshJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmReplicationRefreshJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmReplicationRefreshJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmReplicationRefreshJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/HelmReplicationRefreshJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/IdleNodeArchiveJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/IdleNodeArchiveJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/IdleNodeArchiveJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/IdleNodeArchiveJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectEmptyFolderCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectEmptyFolderCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectEmptyFolderCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectEmptyFolderCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectNodeFolderStatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectNodeFolderStatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectNodeFolderStatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectNodeFolderStatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectRepoMetricsStatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectRepoMetricsStatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectRepoMetricsStatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/InactiveProjectRepoMetricsStatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MigrateRepoStorageJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MigrateRepoStorageJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MigrateRepoStorageJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MigrateRepoStorageJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MongodbJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MongodbJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MongodbJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/MongodbJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCompressedJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCompressedJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCompressedJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCompressedJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCopyJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCopyJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCopyJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeCopyJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeReport2BkbaseJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeReport2BkbaseJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeReport2BkbaseJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeReport2BkbaseJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeStatCompositeMongoDbBatchJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeStatCompositeMongoDbBatchJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeStatCompositeMongoDbBatchJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeStatCompositeMongoDbBatchJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeUncompressedJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeUncompressedJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeUncompressedJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/NodeUncompressedJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OauthTokenCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OauthTokenCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OauthTokenCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OauthTokenCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OciBlobNodeRefreshJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OciBlobNodeRefreshJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OciBlobNodeRefreshJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/OciBlobNodeRefreshJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/PipelineArtifactCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/PipelineArtifactCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/PipelineArtifactCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/PipelineArtifactCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectDailyAvgMetricsJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectDailyAvgMetricsJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectDailyAvgMetricsJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectDailyAvgMetricsJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMetricsReport2BkbaseJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMetricsReport2BkbaseJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMetricsReport2BkbaseJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMetricsReport2BkbaseJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMonthMetricReportJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMonthMetricReportJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMonthMetricReportJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectMonthMetricReportJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectRepoMetricsStatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectRepoMetricsStatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectRepoMetricsStatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectRepoMetricsStatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectUsageStatisticsCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectUsageStatisticsCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectUsageStatisticsCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ProjectUsageStatisticsCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicaRecordCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicaRecordCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicaRecordCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicaRecordCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicationLockCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicationLockCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicationLockCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ReplicationLockCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoDetailReport2BkbaseJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoDetailReport2BkbaseJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoDetailReport2BkbaseJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoDetailReport2BkbaseJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoInitJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoInitJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoInitJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoInitJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoRefreshJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoRefreshJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoRefreshJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RepoRefreshJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RunOnceTaskCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RunOnceTaskCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RunOnceTaskCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/RunOnceTaskCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ShareRecordCleanJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ShareRecordCleanJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ShareRecordCleanJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ShareRecordCleanJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SignFileCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SignFileCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SignFileCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SignFileCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StatJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StatJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StatJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StatJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexEvictJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexEvictJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexEvictJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexEvictJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexSyncJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexSyncJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexSyncJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageCacheIndexSyncJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageReconcileJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageReconcileJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageReconcileJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/StorageReconcileJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SystemGcJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SystemGcJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SystemGcJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/SystemGcJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/TemporaryTokenCleanupJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/TemporaryTokenCleanupJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/TemporaryTokenCleanupJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/TemporaryTokenCleanupJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ThirdPartyImageReplicationJobProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ThirdPartyImageReplicationJobProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ThirdPartyImageReplicationJobProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/config/properties/ThirdPartyImageReplicationJobProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/service/JobController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/service/JobController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/service/JobController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/service/JobController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ArchiveJobController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ArchiveJobController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ArchiveJobController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ArchiveJobController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/FileCacheController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/FileCacheController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/FileCacheController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/FileCacheController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ShedlockController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ShedlockController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ShedlockController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/ShedlockController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserEmbeddingController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserEmbeddingController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserEmbeddingController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserEmbeddingController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserJobController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserJobController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserJobController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserJobController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserMigrateRepoStorageController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserMigrateRepoStorageController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserMigrateRepoStorageController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserMigrateRepoStorageController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserSeparationController.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserSeparationController.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserSeparationController.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/controller/user/UserSeparationController.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/FileMissException.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/FileMissException.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/FileMissException.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/FileMissException.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/JobExecuteException.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/JobExecuteException.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/JobExecuteException.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/JobExecuteException.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/RepoMigratingException.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/RepoMigratingException.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/RepoMigratingException.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/exception/RepoMigratingException.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/BlockThreadPoolTaskExecutorDecorator.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/BlockThreadPoolTaskExecutorDecorator.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/BlockThreadPoolTaskExecutorDecorator.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/BlockThreadPoolTaskExecutorDecorator.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTask.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTask.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTask.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTask.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTaskInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTaskInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTaskInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/executor/IdentityTaskInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/RefreshJobPropertiesListener.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/RefreshJobPropertiesListener.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/RefreshJobPropertiesListener.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/RefreshJobPropertiesListener.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/TaskEventListener.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/TaskEventListener.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/TaskEventListener.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/TaskEventListener.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/event/TaskExecutedEvent.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/event/TaskExecutedEvent.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/event/TaskExecutedEvent.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/listener/event/TaskExecutedEvent.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/JobMetrics.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/JobMetrics.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/JobMetrics.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/JobMetrics.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetrics.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetrics.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetrics.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetrics.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/Constant.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/Constant.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/Constant.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/Constant.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/config/MigrateRepoStorageProperties.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/config/MigrateRepoStorageProperties.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/config/MigrateRepoStorageProperties.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/config/MigrateRepoStorageProperties.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/ArchiveMigrateFailedNodeDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/ArchiveMigrateFailedNodeDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/ArchiveMigrateFailedNodeDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/ArchiveMigrateFailedNodeDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateFailedNodeDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateFailedNodeDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateFailedNodeDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateFailedNodeDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateRepoStorageTaskDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateRepoStorageTaskDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateRepoStorageTaskDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/dao/MigrateRepoStorageTaskDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/BaseTaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/BaseTaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/BaseTaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/BaseTaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/TaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/TaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/TaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/TaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/DefaultMigrateFailedHandler.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/DefaultMigrateFailedHandler.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/DefaultMigrateFailedHandler.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/DefaultMigrateFailedHandler.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/MigrateFailedHandler.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/MigrateFailedHandler.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/MigrateFailedHandler.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/executor/handler/MigrateFailedHandler.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TArchiveMigrateFailedNode.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TArchiveMigrateFailedNode.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TArchiveMigrateFailedNode.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TArchiveMigrateFailedNode.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateFailedNode.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateFailedNode.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateFailedNode.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateFailedNode.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateRepoStorageTask.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateRepoStorageTask.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateRepoStorageTask.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/model/TMigrateRepoStorageTask.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/CreateMigrateRepoStorageTaskRequest.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/CreateMigrateRepoStorageTaskRequest.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/CreateMigrateRepoStorageTaskRequest.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/CreateMigrateRepoStorageTaskRequest.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTask.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTask.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTask.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTask.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTaskState.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTaskState.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTaskState.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrateRepoStorageTaskState.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/Node.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/Node.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/Node.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/pojo/Node.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategy.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategy.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategy.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategy.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeAutoFixStrategy.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeAutoFixStrategy.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeAutoFixStrategy.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeAutoFixStrategy.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeFixer.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeFixer.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeFixer.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/strategy/MigrateFailedNodeFixer.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/ExecutingTaskRecorder.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/ExecutingTaskRecorder.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/ExecutingTaskRecorder.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/ExecutingTaskRecorder.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateRepoStorageUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateRepoStorageUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateRepoStorageUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateRepoStorageUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueue.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueue.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueue.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueue.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIterator.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIterator.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIterator.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIterator.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/TransferDataExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/TransferDataExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/TransferDataExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/migrate/utils/TransferDataExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheCheckRequest.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheCheckRequest.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheCheckRequest.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheCheckRequest.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheRequest.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheRequest.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheRequest.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FileCacheRequest.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FolderInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FolderInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FolderInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/FolderInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ShedlockInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ShedlockInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ShedlockInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/ShedlockInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TFileCache.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TFileCache.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TFileCache.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TFileCache.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TJobFailover.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TJobFailover.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TJobFailover.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/TJobFailover.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/Client.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/Client.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/Client.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/Client.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/DailyClient.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/DailyClient.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/DailyClient.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/client/DailyClient.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetrics.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetrics.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetrics.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetrics.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyAvgRecord.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyAvgRecord.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyAvgRecord.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyAvgRecord.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyRecord.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyRecord.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyRecord.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TProjectMetricsDailyRecord.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TRepoMetrics.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TRepoMetrics.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TRepoMetrics.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/pojo/project/TRepoMetrics.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/FileCacheRepository.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/FileCacheRepository.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/FileCacheRepository.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/FileCacheRepository.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/JobSnapshotRepository.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/JobSnapshotRepository.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/JobSnapshotRepository.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/JobSnapshotRepository.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyAvgRecordRepository.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyAvgRecordRepository.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyAvgRecordRepository.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyAvgRecordRepository.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyRecordRepository.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyRecordRepository.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyRecordRepository.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ProjectMetricsDailyRecordRepository.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ShedlockRepository.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ShedlockRepository.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ShedlockRepository.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/repository/ShedlockRepository.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Job.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Job.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Job.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Job.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobRegistrar.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobRegistrar.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobRegistrar.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobRegistrar.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleConfiguration.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleConfiguration.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleConfiguration.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleConfiguration.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleType.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleType.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleType.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleType.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Registration.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Registration.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Registration.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/Registration.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleAutoRegistration.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleAutoRegistration.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleAutoRegistration.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleAutoRegistration.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleJobRegistrar.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleJobRegistrar.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleJobRegistrar.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/schedule/SpringScheduleJobRegistrar.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/config/DataSeparationConfig.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/config/DataSeparationConfig.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/config/DataSeparationConfig.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/config/DataSeparationConfig.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationFailedRecordDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationFailedRecordDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationFailedRecordDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationFailedRecordDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationNodeDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationNodeDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationNodeDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationNodeDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageVersionDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageVersionDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageVersionDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationPackageVersionDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationTaskDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationTaskDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationTaskDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/SeparationTaskDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/repo/SeparationMavenMetadataDao.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/repo/SeparationMavenMetadataDao.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/repo/SeparationMavenMetadataDao.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/dao/repo/SeparationMavenMetadataDao.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataNotFoundException.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataNotFoundException.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataNotFoundException.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataNotFoundException.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataStoreException.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataStoreException.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataStoreException.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/exception/SeparationDataStoreException.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/AbstractSeparationTaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/AbstractSeparationTaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/AbstractSeparationTaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/AbstractSeparationTaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataRestoreTaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataRestoreTaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataRestoreTaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataRestoreTaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataSeparateTaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataSeparateTaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataSeparateTaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/ColdDataSeparateTaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/FixFailedRecordTaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/FixFailedRecordTaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/FixFailedRecordTaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/FixFailedRecordTaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/SeparationTaskExecutor.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/SeparationTaskExecutor.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/SeparationTaskExecutor.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/executor/SeparationTaskExecutor.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/listener/SeparationRecoveryEventConsumer.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/listener/SeparationRecoveryEventConsumer.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/listener/SeparationRecoveryEventConsumer.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/listener/SeparationRecoveryEventConsumer.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationFailedRecord.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationFailedRecord.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationFailedRecord.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationFailedRecord.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationNode.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationNode.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationNode.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationNode.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackage.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackage.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackage.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackage.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackageVersion.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackageVersion.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackageVersion.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationPackageVersion.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationTask.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationTask.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationTask.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/TSeparationTask.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/repo/TSeparationMavenMetadataRecord.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/repo/TSeparationMavenMetadataRecord.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/repo/TSeparationMavenMetadataRecord.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/model/repo/TSeparationMavenMetadataRecord.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/NodeFilterInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/NodeFilterInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/NodeFilterInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/NodeFilterInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/PackageFilterInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/PackageFilterInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/PackageFilterInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/PackageFilterInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryNodeInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryNodeInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryNodeInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryNodeInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryVersionInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryVersionInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryVersionInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/RecoveryVersionInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationArtifactType.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationArtifactType.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationArtifactType.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationArtifactType.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationContent.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationContent.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationContent.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationContent.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/SeparationInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionFilterInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionFilterInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionFilterInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionFilterInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionSeparationInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionSeparationInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionSeparationInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/VersionSeparationInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/FileReferenceInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/FileReferenceInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/FileReferenceInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/FileReferenceInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/MavenMetadata.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/MavenMetadata.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/MavenMetadata.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/MavenMetadata.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeBaseInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeBaseInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeBaseInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeBaseInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeDetailInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeDetailInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeDetailInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/NodeDetailInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageDetailInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageDetailInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageDetailInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageDetailInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageVersionInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageVersionInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageVersionInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/PackageVersionInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/VersionDetailInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/VersionDetailInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/VersionDetailInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/query/VersionDetailInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationContext.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationContext.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationContext.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationContext.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationProgress.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationProgress.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationProgress.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/record/SeparationProgress.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/NodeSeparationInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/NodeSeparationInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/NodeSeparationInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/NodeSeparationInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/PackageSeparationInfo.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/PackageSeparationInfo.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/PackageSeparationInfo.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/PackageSeparationInfo.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationCount.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationCount.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationCount.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationCount.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTask.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTask.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTask.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTask.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskRequest.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskRequest.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskRequest.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskRequest.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskState.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskState.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskState.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/pojo/task/SeparationTaskState.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataRestorer.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataRestorer.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataRestorer.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataRestorer.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataSeparator.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataSeparator.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataSeparator.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/DataSeparator.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/RepoSpecialDataSeparator.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/RepoSpecialDataSeparator.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/RepoSpecialDataSeparator.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/RepoSpecialDataSeparator.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationDataService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationDataService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationDataService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationDataService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationTaskService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationTaskService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationTaskService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/SeparationTaskService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/AbstractHandler.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/AbstractHandler.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/AbstractHandler.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/AbstractHandler.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataRestorerImpl.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataRestorerImpl.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataRestorerImpl.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataRestorerImpl.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataSeparatorImpl.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataSeparatorImpl.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataSeparatorImpl.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/DataSeparatorImpl.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationDataServiceImpl.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationDataServiceImpl.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationDataServiceImpl.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationDataServiceImpl.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationTaskServiceImpl.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationTaskServiceImpl.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationTaskServiceImpl.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/SeparationTaskServiceImpl.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/MavenRepoSpecialDataSeparatorHandler.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/MavenRepoSpecialDataSeparatorHandler.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/MavenRepoSpecialDataSeparatorHandler.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/MavenRepoSpecialDataSeparatorHandler.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/RepoSpecialSeparationMappings.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/RepoSpecialSeparationMappings.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/RepoSpecialSeparationMappings.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/service/impl/repo/RepoSpecialSeparationMappings.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationQueryHelper.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationQueryHelper.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationQueryHelper.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationQueryHelper.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationUtils.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/separation/util/SeparationUtils.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ArchiveJobService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ArchiveJobService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ArchiveJobService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ArchiveJobService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/FileCacheService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/FileCacheService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/FileCacheService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/FileCacheService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ShedlockService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ShedlockService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ShedlockService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/ShedlockService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/SystemJobService.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/SystemJobService.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/SystemJobService.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/SystemJobService.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImpl.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImpl.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImpl.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImpl.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/FileCacheServiceImp.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/FileCacheServiceImp.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/FileCacheServiceImp.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/FileCacheServiceImp.kt diff --git a/src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ShedlockServiceImp.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ShedlockServiceImp.kt similarity index 100% rename from src/backend/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ShedlockServiceImp.kt rename to src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/service/impl/ShedlockServiceImp.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/JobTestConfiguration.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/JobTestConfiguration.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/JobTestConfiguration.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/JobTestConfiguration.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/FileReferenceCleanupJobTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/FileReferenceCleanupJobTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/FileReferenceCleanupJobTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/FileReferenceCleanupJobTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/JobBaseTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/JobBaseTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/JobBaseTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/JobBaseTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/base/BlockThreadPoolTaskExecutorDecoratorTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/base/BlockThreadPoolTaskExecutorDecoratorTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/base/BlockThreadPoolTaskExecutorDecoratorTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/base/BlockThreadPoolTaskExecutorDecoratorTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJobTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJobTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJobTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/clean/DeletedNodeCleanupJobTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJobTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJobTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJobTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/task/storage/StorageReconcileJobTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtilsTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtilsTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtilsTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtilsTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtilsTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtilsTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtilsTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/batch/utils/TimeUtilsTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetricsTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetricsTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetricsTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/metrics/StorageCacheMetricsTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeServiceTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeServiceTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeServiceTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateFailedNodeServiceTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageServiceTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageServiceTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageServiceTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/MigrateRepoStorageServiceTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutorTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutorTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutorTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/CorrectExecutorTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/ExecutorBaseTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/ExecutorBaseTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/ExecutorBaseTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/ExecutorBaseTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutorTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutorTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutorTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/FinishExecutorTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutorTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutorTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutorTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateExecutorTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutorTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutorTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutorTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/executor/MigrateFailedNodeExecutorTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContextTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContextTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContextTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/pojo/MigrationContextTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategyTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategyTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategyTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/strategy/FileNotFoundAutoFixStrategyTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateTestUtils.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateTestUtils.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateTestUtils.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigrateTestUtils.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueueTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueueTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueueTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/MigratedTaskNumberPriorityQueueTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIteratorTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIteratorTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIteratorTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/migrate/utils/NodeIteratorTest.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/model/TNode.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/model/TNode.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/model/TNode.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/model/TNode.kt diff --git a/src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImplTest.kt b/src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImplTest.kt similarity index 100% rename from src/backend/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImplTest.kt rename to src/backend/core/job/biz-job/src/test/kotlin/com/tencent/bkrepo/job/service/impl/ArchiveJobServiceImplTest.kt diff --git a/src/backend/job/biz-job/src/test/resources/job-ut.properties b/src/backend/core/job/biz-job/src/test/resources/job-ut.properties similarity index 100% rename from src/backend/job/biz-job/src/test/resources/job-ut.properties rename to src/backend/core/job/biz-job/src/test/resources/job-ut.properties diff --git a/src/backend/job/boot-job-schedule/build.gradle.kts b/src/backend/core/job/boot-job-schedule/build.gradle.kts similarity index 80% rename from src/backend/job/boot-job-schedule/build.gradle.kts rename to src/backend/core/job/boot-job-schedule/build.gradle.kts index f5c60cf06f..bf910309df 100644 --- a/src/backend/job/boot-job-schedule/build.gradle.kts +++ b/src/backend/core/job/boot-job-schedule/build.gradle.kts @@ -1,6 +1,6 @@ dependencies { implementation(project(":common:common-service:service-servlet")) implementation(project(":common:common-security")) - implementation(project(":job:api-schedule")) + implementation(project(":core:job:api-schedule")) implementation("com.tencent.devops:devops-boot-starter-schedule-server") } diff --git a/src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleApplication.kt b/src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleApplication.kt similarity index 100% rename from src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleApplication.kt rename to src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/JobScheduleApplication.kt diff --git a/src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/config/JobScheduleConfiguration.kt b/src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/config/JobScheduleConfiguration.kt similarity index 100% rename from src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/config/JobScheduleConfiguration.kt rename to src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/config/JobScheduleConfiguration.kt diff --git a/src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobRpcController.kt b/src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobRpcController.kt similarity index 100% rename from src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobRpcController.kt rename to src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobRpcController.kt diff --git a/src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobScheduleController.kt b/src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobScheduleController.kt similarity index 100% rename from src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobScheduleController.kt rename to src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/JobScheduleController.kt diff --git a/src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/WorkerGroupRpcController.kt b/src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/WorkerGroupRpcController.kt similarity index 100% rename from src/backend/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/WorkerGroupRpcController.kt rename to src/backend/core/job/boot-job-schedule/src/main/kotlin/com/tencent/bkrepo/job/schedule/controller/WorkerGroupRpcController.kt diff --git a/src/backend/job/boot-job-schedule/src/main/resources/bootstrap.yaml b/src/backend/core/job/boot-job-schedule/src/main/resources/bootstrap.yaml similarity index 100% rename from src/backend/job/boot-job-schedule/src/main/resources/bootstrap.yaml rename to src/backend/core/job/boot-job-schedule/src/main/resources/bootstrap.yaml diff --git a/src/backend/job/boot-job-worker/build.gradle.kts b/src/backend/core/job/boot-job-worker/build.gradle.kts similarity index 83% rename from src/backend/job/boot-job-worker/build.gradle.kts rename to src/backend/core/job/boot-job-worker/build.gradle.kts index 49aa25a32b..d19235eb35 100644 --- a/src/backend/job/boot-job-worker/build.gradle.kts +++ b/src/backend/core/job/boot-job-worker/build.gradle.kts @@ -1,6 +1,6 @@ dependencies { implementation(project(":common:common-service:service-servlet")) - implementation(project(":job:biz-job")) + implementation(project(":core:job:biz-job")) implementation("org.springframework.boot:spring-boot-starter-data-mongodb") implementation("com.tencent.devops:devops-boot-starter-schedule-worker") } diff --git a/src/backend/job/boot-job-worker/shell/media-process.sh b/src/backend/core/job/boot-job-worker/shell/media-process.sh similarity index 100% rename from src/backend/job/boot-job-worker/shell/media-process.sh rename to src/backend/core/job/boot-job-worker/shell/media-process.sh diff --git a/src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/JobWorkerApplication.kt b/src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/JobWorkerApplication.kt similarity index 100% rename from src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/JobWorkerApplication.kt rename to src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/JobWorkerApplication.kt diff --git a/src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleAutoRegistration.kt b/src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleAutoRegistration.kt similarity index 100% rename from src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleAutoRegistration.kt rename to src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleAutoRegistration.kt diff --git a/src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleJobRegistrar.kt b/src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleJobRegistrar.kt similarity index 100% rename from src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleJobRegistrar.kt rename to src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/DevOpsScheduleJobRegistrar.kt diff --git a/src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobHandlerAdapter.kt b/src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobHandlerAdapter.kt similarity index 100% rename from src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobHandlerAdapter.kt rename to src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobHandlerAdapter.kt diff --git a/src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobWorkerConfiguration.kt b/src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobWorkerConfiguration.kt similarity index 100% rename from src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobWorkerConfiguration.kt rename to src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/config/JobWorkerConfiguration.kt diff --git a/src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/rpc/JobRpcClient.kt b/src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/rpc/JobRpcClient.kt similarity index 100% rename from src/backend/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/rpc/JobRpcClient.kt rename to src/backend/core/job/boot-job-worker/src/main/kotlin/com/tencent/bkrepo/job/worker/rpc/JobRpcClient.kt diff --git a/src/backend/job/boot-job-worker/src/main/resources/bootstrap.yaml b/src/backend/core/job/boot-job-worker/src/main/resources/bootstrap.yaml similarity index 100% rename from src/backend/job/boot-job-worker/src/main/resources/bootstrap.yaml rename to src/backend/core/job/boot-job-worker/src/main/resources/bootstrap.yaml diff --git a/src/backend/job/boot-job/build.gradle.kts b/src/backend/core/job/boot-job/build.gradle.kts similarity index 96% rename from src/backend/job/boot-job/build.gradle.kts rename to src/backend/core/job/boot-job/build.gradle.kts index 131bb7a1d5..25aae9c6c0 100644 --- a/src/backend/job/boot-job/build.gradle.kts +++ b/src/backend/core/job/boot-job/build.gradle.kts @@ -25,5 +25,5 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ dependencies { - implementation(project(":job:biz-job")) + implementation(project(":core:job:biz-job")) } diff --git a/src/backend/job/boot-job/src/main/kotlin/com/tencent/bkrepo/job/JobApplication.kt b/src/backend/core/job/boot-job/src/main/kotlin/com/tencent/bkrepo/job/JobApplication.kt similarity index 100% rename from src/backend/job/boot-job/src/main/kotlin/com/tencent/bkrepo/job/JobApplication.kt rename to src/backend/core/job/boot-job/src/main/kotlin/com/tencent/bkrepo/job/JobApplication.kt diff --git a/src/backend/job/boot-job/src/main/resources/bootstrap.properties b/src/backend/core/job/boot-job/src/main/resources/bootstrap.properties similarity index 100% rename from src/backend/job/boot-job/src/main/resources/bootstrap.properties rename to src/backend/core/job/boot-job/src/main/resources/bootstrap.properties diff --git a/src/backend/job/build.gradle.kts b/src/backend/core/job/build.gradle.kts similarity index 100% rename from src/backend/job/build.gradle.kts rename to src/backend/core/job/build.gradle.kts diff --git a/src/backend/lfs/api-lfs/build.gradle.kts b/src/backend/core/lfs/api-lfs/build.gradle.kts similarity index 100% rename from src/backend/lfs/api-lfs/build.gradle.kts rename to src/backend/core/lfs/api-lfs/build.gradle.kts diff --git a/src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/constant/Constants.kt b/src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/constant/Constants.kt similarity index 100% rename from src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/constant/Constants.kt rename to src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/constant/Constants.kt diff --git a/src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/ActionDetail.kt b/src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/ActionDetail.kt similarity index 100% rename from src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/ActionDetail.kt rename to src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/ActionDetail.kt diff --git a/src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchRequest.kt b/src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchRequest.kt similarity index 100% rename from src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchRequest.kt rename to src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchRequest.kt diff --git a/src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchResponse.kt b/src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchResponse.kt similarity index 100% rename from src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchResponse.kt rename to src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/BatchResponse.kt diff --git a/src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/LfsObject.kt b/src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/LfsObject.kt similarity index 100% rename from src/backend/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/LfsObject.kt rename to src/backend/core/lfs/api-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/pojo/LfsObject.kt diff --git a/src/backend/lfs/biz-lfs/build.gradle.kts b/src/backend/core/lfs/biz-lfs/build.gradle.kts similarity index 97% rename from src/backend/lfs/biz-lfs/build.gradle.kts rename to src/backend/core/lfs/biz-lfs/build.gradle.kts index 8696e35c1d..97cf50583e 100644 --- a/src/backend/lfs/biz-lfs/build.gradle.kts +++ b/src/backend/core/lfs/biz-lfs/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - implementation(project(":lfs:api-lfs")) + implementation(project(":core:lfs:api-lfs")) implementation(project(":common:common-artifact:artifact-service")) implementation(project(":repository:api-repository")) } diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactConfigurer.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactConfigurer.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactConfigurer.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactConfigurer.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfo.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfo.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfo.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfo.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfoResolver.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfoResolver.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfoResolver.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsArtifactInfoResolver.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsLocalRepository.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsLocalRepository.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsLocalRepository.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsLocalRepository.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsProperties.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsProperties.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsProperties.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsProperties.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsRemoteRepository.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsRemoteRepository.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsRemoteRepository.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsRemoteRepository.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsVirtualRepository.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsVirtualRepository.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsVirtualRepository.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/artifact/LfsVirtualRepository.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/controller/ObjectController.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/controller/ObjectController.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/controller/ObjectController.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/controller/ObjectController.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/BatchRequestException.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/BatchRequestException.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/BatchRequestException.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/BatchRequestException.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/LfsExceptionHandler.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/LfsExceptionHandler.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/LfsExceptionHandler.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/exception/LfsExceptionHandler.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/security/RemoteAuthHandler.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/security/RemoteAuthHandler.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/security/RemoteAuthHandler.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/security/RemoteAuthHandler.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/service/ObjectService.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/service/ObjectService.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/service/ObjectService.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/service/ObjectService.kt diff --git a/src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/utils/OidUtils.kt b/src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/utils/OidUtils.kt similarity index 100% rename from src/backend/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/utils/OidUtils.kt rename to src/backend/core/lfs/biz-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/utils/OidUtils.kt diff --git a/src/backend/lfs/boot-lfs/build.gradle.kts b/src/backend/core/lfs/boot-lfs/build.gradle.kts similarity index 96% rename from src/backend/lfs/boot-lfs/build.gradle.kts rename to src/backend/core/lfs/boot-lfs/build.gradle.kts index cec17d277d..7487331e40 100644 --- a/src/backend/lfs/boot-lfs/build.gradle.kts +++ b/src/backend/core/lfs/boot-lfs/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":lfs:biz-lfs")) + implementation(project(":core:lfs:biz-lfs")) } diff --git a/src/backend/lfs/boot-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/LfsApplication.kt b/src/backend/core/lfs/boot-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/LfsApplication.kt similarity index 100% rename from src/backend/lfs/boot-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/LfsApplication.kt rename to src/backend/core/lfs/boot-lfs/src/main/kotlin/com/tencent/bkrepo/lfs/LfsApplication.kt diff --git a/src/backend/lfs/boot-lfs/src/main/resources/bootstrap.yml b/src/backend/core/lfs/boot-lfs/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/lfs/boot-lfs/src/main/resources/bootstrap.yml rename to src/backend/core/lfs/boot-lfs/src/main/resources/bootstrap.yml diff --git a/src/backend/maven/api-maven/build.gradle.kts b/src/backend/core/maven/api-maven/build.gradle.kts similarity index 100% rename from src/backend/maven/api-maven/build.gradle.kts rename to src/backend/core/maven/api-maven/build.gradle.kts diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenMetadataClient.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenMetadataClient.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenMetadataClient.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenMetadataClient.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenWebResource.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenWebResource.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenWebResource.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/api/MavenWebResource.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfo.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfo.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfo.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfo.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfo.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfo.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfo.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfo.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/constants/Constant.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/constants/Constant.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/constants/Constant.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/constants/Constant.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/ChecksumPolicyType.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/ChecksumPolicyType.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/ChecksumPolicyType.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/ChecksumPolicyType.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/HashType.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/HashType.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/HashType.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/HashType.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/MavenMessageCode.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/MavenMessageCode.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/MavenMessageCode.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/MavenMessageCode.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/SnapshotBehaviorType.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/SnapshotBehaviorType.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/SnapshotBehaviorType.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/enum/SnapshotBehaviorType.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactFormatException.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactFormatException.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactFormatException.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactFormatException.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenExceptionResponse.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenExceptionResponse.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenExceptionResponse.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenExceptionResponse.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenGAVC.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenGAVC.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenGAVC.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenGAVC.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenRepoConf.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenRepoConf.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenRepoConf.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenRepoConf.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenVersion.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenVersion.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenVersion.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenVersion.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/metadata/MavenMetadataRequest.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/metadata/MavenMetadataRequest.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/metadata/MavenMetadataRequest.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/metadata/MavenMetadataRequest.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenArtifactResponse.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenArtifactResponse.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenArtifactResponse.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenArtifactResponse.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenGAVCResponse.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenGAVCResponse.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenGAVCResponse.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/response/MavenGAVCResponse.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenGAVCUtils.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenGAVCUtils.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenGAVCUtils.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenGAVCUtils.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtils.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtils.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtils.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtils.kt diff --git a/src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenUtil.kt b/src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenUtil.kt similarity index 100% rename from src/backend/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenUtil.kt rename to src/backend/core/maven/api-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenUtil.kt diff --git a/src/backend/maven/api-maven/src/main/resources/i18n/messages_en.properties b/src/backend/core/maven/api-maven/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/maven/api-maven/src/main/resources/i18n/messages_en.properties rename to src/backend/core/maven/api-maven/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/maven/api-maven/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/maven/api-maven/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/maven/api-maven/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/maven/api-maven/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/maven/api-maven/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/maven/api-maven/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/maven/api-maven/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/maven/api-maven/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/maven/biz-maven/build.gradle.kts b/src/backend/core/maven/biz-maven/build.gradle.kts similarity index 97% rename from src/backend/maven/biz-maven/build.gradle.kts rename to src/backend/core/maven/biz-maven/build.gradle.kts index f0c6644f99..8bc5bf247f 100644 --- a/src/backend/maven/biz-maven/build.gradle.kts +++ b/src/backend/core/maven/biz-maven/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies{ - api(project(":maven:api-maven")) + api(project(":core:maven:api-maven")) api(project(":common:common-artifact:artifact-service")) api(project(":common:common-mongo")) implementation("org.apache.maven:maven-repository-metadata:${Versions.MAVEN}") diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactConfigurer.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactConfigurer.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactConfigurer.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactConfigurer.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolver.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolver.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolver.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolver.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfoResolver.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfoResolver.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfoResolver.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/MavenDeleteArtifactInfoResolver.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenLocalRepository.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenLocalRepository.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenLocalRepository.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenLocalRepository.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenRemoteRepository.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenRemoteRepository.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenRemoteRepository.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenRemoteRepository.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenVirtualRepository.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenVirtualRepository.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenVirtualRepository.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/artifact/repository/MavenVirtualRepository.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/config/MavenProperties.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/config/MavenProperties.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/config/MavenProperties.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/config/MavenProperties.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenResourceController.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenResourceController.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenResourceController.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenResourceController.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenWebController.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenWebController.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenWebController.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/MavenWebController.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/service/MavenMetadataController.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/service/MavenMetadataController.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/service/MavenMetadataController.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/controller/service/MavenMetadataController.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/dao/MavenMetadataDao.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/dao/MavenMetadataDao.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/dao/MavenMetadataDao.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/dao/MavenMetadataDao.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/ConflictException.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/ConflictException.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/ConflictException.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/ConflictException.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactNotFoundException.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactNotFoundException.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactNotFoundException.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenArtifactNotFoundException.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenBadRequestException.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenBadRequestException.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenBadRequestException.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenBadRequestException.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenExceptionHandler.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenExceptionHandler.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenExceptionHandler.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenExceptionHandler.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenMetadataChecksumException.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenMetadataChecksumException.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenMetadataChecksumException.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenMetadataChecksumException.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenPathParserException.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenPathParserException.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenPathParserException.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenPathParserException.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenRequestForbiddenException.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenRequestForbiddenException.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenRequestForbiddenException.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/exception/MavenRequestForbiddenException.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/model/TMavenMetadataRecord.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/model/TMavenMetadataRecord.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/model/TMavenMetadataRecord.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/model/TMavenMetadataRecord.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/Basic.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/Basic.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/Basic.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/Basic.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenArtifactVersionData.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenArtifactVersionData.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenArtifactVersionData.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenArtifactVersionData.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenMetadataSearchPojo.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenMetadataSearchPojo.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenMetadataSearchPojo.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/pojo/MavenMetadataSearchPojo.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenExtService.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenExtService.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenExtService.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenExtService.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenMetadataService.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenMetadataService.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenMetadataService.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenMetadataService.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenService.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenService.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenService.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/MavenService.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/MavenServiceImpl.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/MavenServiceImpl.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/MavenServiceImpl.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/MavenServiceImpl.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/center/CommitEdgeCenterMavenMetadataServiceImpl.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/center/CommitEdgeCenterMavenMetadataServiceImpl.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/center/CommitEdgeCenterMavenMetadataServiceImpl.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/center/CommitEdgeCenterMavenMetadataServiceImpl.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/edge/EdgeMavenMetadataService.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/edge/EdgeMavenMetadataService.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/edge/EdgeMavenMetadataService.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/service/impl/edge/EdgeMavenMetadataService.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/DigestUtils.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/DigestUtils.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/DigestUtils.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/DigestUtils.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenConfiguration.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenConfiguration.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenConfiguration.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenConfiguration.kt diff --git a/src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenMetadataUtils.kt b/src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenMetadataUtils.kt similarity index 100% rename from src/backend/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenMetadataUtils.kt rename to src/backend/core/maven/biz-maven/src/main/kotlin/com/tencent/bkrepo/maven/util/MavenMetadataUtils.kt diff --git a/src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolverTest.kt b/src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolverTest.kt similarity index 100% rename from src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolverTest.kt rename to src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactInfoResolverTest.kt diff --git a/src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactTest.kt b/src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactTest.kt similarity index 100% rename from src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactTest.kt rename to src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/artifact/MavenArtifactTest.kt diff --git a/src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtilsTest.kt b/src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtilsTest.kt similarity index 100% rename from src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtilsTest.kt rename to src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenStringUtilsTest.kt diff --git a/src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenUtilTest.kt b/src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenUtilTest.kt similarity index 100% rename from src/backend/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenUtilTest.kt rename to src/backend/core/maven/biz-maven/src/test/kotlin/com/tencent/bkrepo/maven/util/MavenUtilTest.kt diff --git a/src/backend/generic/boot-generic/build.gradle.kts b/src/backend/core/maven/boot-maven/build.gradle.kts similarity index 96% rename from src/backend/generic/boot-generic/build.gradle.kts rename to src/backend/core/maven/boot-maven/build.gradle.kts index dce6aec371..cad7397e3c 100644 --- a/src/backend/generic/boot-generic/build.gradle.kts +++ b/src/backend/core/maven/boot-maven/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":generic:biz-generic")) + implementation(project(":core:maven:biz-maven")) } diff --git a/src/backend/maven/boot-maven/src/main/kotlin/com/tencent/bkrepo/maven/MavenApplication.kt b/src/backend/core/maven/boot-maven/src/main/kotlin/com/tencent/bkrepo/maven/MavenApplication.kt similarity index 100% rename from src/backend/maven/boot-maven/src/main/kotlin/com/tencent/bkrepo/maven/MavenApplication.kt rename to src/backend/core/maven/boot-maven/src/main/kotlin/com/tencent/bkrepo/maven/MavenApplication.kt diff --git a/src/backend/maven/boot-maven/src/main/resources/bootstrap.yml b/src/backend/core/maven/boot-maven/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/maven/boot-maven/src/main/resources/bootstrap.yml rename to src/backend/core/maven/boot-maven/src/main/resources/bootstrap.yml diff --git a/src/backend/maven/build.gradle.kts b/src/backend/core/maven/build.gradle.kts similarity index 100% rename from src/backend/maven/build.gradle.kts rename to src/backend/core/maven/build.gradle.kts diff --git a/src/backend/npm/api-npm/build.gradle.kts b/src/backend/core/npm/api-npm/build.gradle.kts similarity index 100% rename from src/backend/npm/api-npm/build.gradle.kts rename to src/backend/core/npm/api-npm/build.gradle.kts diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/AuthResource.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/AuthResource.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/AuthResource.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/AuthResource.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/ModuleDepsResource.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/ModuleDepsResource.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/ModuleDepsResource.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/ModuleDepsResource.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/NpmFixToolResource.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/NpmFixToolResource.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/NpmFixToolResource.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/NpmFixToolResource.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/PackageDependentResource.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/PackageDependentResource.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/PackageDependentResource.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/api/PackageDependentResource.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/Constants.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/Constants.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/Constants.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/Constants.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/NpmJsonConstatns.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/NpmJsonConstatns.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/NpmJsonConstatns.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/constants/NpmJsonConstatns.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDeleteResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDeleteResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDeleteResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDeleteResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDomainInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDomainInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDomainInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmDomainInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmErrorResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmErrorResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmErrorResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmErrorResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSearchResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSearchResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSearchResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSearchResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSuccessResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSuccessResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSuccessResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/NpmSuccessResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthFailResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthFailResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthFailResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthFailResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/auth/NpmAuthResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/enums/NpmOperationAction.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/enums/NpmOperationAction.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/enums/NpmOperationAction.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/enums/NpmOperationAction.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/DateTimeFormatResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/DateTimeFormatResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/DateTimeFormatResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/DateTimeFormatResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageManagerResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageManagerResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageManagerResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageManagerResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageMetadataFixResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageMetadataFixResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageMetadataFixResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/fixtool/PackageMetadataFixResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/MetadataSearchRequest.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/MetadataSearchRequest.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/MetadataSearchRequest.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/MetadataSearchRequest.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/disttags/DistTags.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/disttags/DistTags.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/disttags/DistTags.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/metadata/disttags/DistTags.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationErrorDataInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationErrorDataInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationErrorDataInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationErrorDataInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationFailDataDetailInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationFailDataDetailInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationFailDataDetailInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/MigrationFailDataDetailInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmDataMigrationResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmDataMigrationResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmDataMigrationResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmDataMigrationResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmPackageDependentMigrationResponse.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmPackageDependentMigrationResponse.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmPackageDependentMigrationResponse.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/NpmPackageDependentMigrationResponse.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/service/MigrationErrorDataCreateRequest.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/service/MigrationErrorDataCreateRequest.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/service/MigrationErrorDataCreateRequest.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/migration/service/MigrationErrorDataCreateRequest.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/ModuleDepsInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/ModuleDepsInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/ModuleDepsInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/ModuleDepsInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsCreateRequest.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsCreateRequest.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsCreateRequest.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsCreateRequest.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsDeleteRequest.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsDeleteRequest.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsDeleteRequest.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/module/des/service/DepsDeleteRequest.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageLatestVersionInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageLatestVersionInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageLatestVersionInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageLatestVersionInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageVersionInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageVersionInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageVersionInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/NpmPackageVersionInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageVersionInfo.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageVersionInfo.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageVersionInfo.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/PackageVersionInfo.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageDeleteRequest.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageDeleteRequest.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageDeleteRequest.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageDeleteRequest.kt diff --git a/src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageVersionDeleteRequest.kt b/src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageVersionDeleteRequest.kt similarity index 100% rename from src/backend/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageVersionDeleteRequest.kt rename to src/backend/core/npm/api-npm/src/main/kotlin/com/tencent/bkrepo/npm/pojo/user/request/PackageVersionDeleteRequest.kt diff --git a/src/backend/npm/biz-npm/build.gradle.kts b/src/backend/core/npm/biz-npm/build.gradle.kts similarity index 97% rename from src/backend/npm/biz-npm/build.gradle.kts rename to src/backend/core/npm/biz-npm/build.gradle.kts index 4fc66c4c63..b2dac033d2 100644 --- a/src/backend/npm/biz-npm/build.gradle.kts +++ b/src/backend/core/npm/biz-npm/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":npm:api-npm")) + api(project(":core:npm:api-npm")) api(project(":common:common-job")) api(project(":common:common-artifact:artifact-service")) implementation("org.springframework.retry:spring-retry") diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmAutoConfiguration.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmAutoConfiguration.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmAutoConfiguration.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmAutoConfiguration.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactConfigurer.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactConfigurer.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactConfigurer.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactConfigurer.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfoResolver.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfoResolver.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfoResolver.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmArtifactInfoResolver.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmLoginAuthHandler.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmLoginAuthHandler.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmLoginAuthHandler.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/NpmLoginAuthHandler.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmLocalRepository.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmLocalRepository.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmLocalRepository.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmLocalRepository.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmRemoteRepository.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmRemoteRepository.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmRemoteRepository.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmRemoteRepository.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmVirtualRepository.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmVirtualRepository.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmVirtualRepository.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/artifact/repository/NpmVirtualRepository.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/config/ArtifactWebServerCustomizer.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/config/ArtifactWebServerCustomizer.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/config/ArtifactWebServerCustomizer.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/config/ArtifactWebServerCustomizer.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/NpmClientController.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/NpmClientController.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/NpmClientController.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/NpmClientController.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserModuleDependentsController.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserModuleDependentsController.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserModuleDependentsController.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserModuleDependentsController.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserNpmController.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserNpmController.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserNpmController.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserNpmController.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserPackageMigrationController.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserPackageMigrationController.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserPackageMigrationController.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/controller/UserPackageMigrationController.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/MigrationErrorDataRepository.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/MigrationErrorDataRepository.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/MigrationErrorDataRepository.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/MigrationErrorDataRepository.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/ModuleDepsRepository.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/ModuleDepsRepository.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/ModuleDepsRepository.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/dao/repository/ModuleDepsRepository.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentNotFoundException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentNotFoundException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentNotFoundException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentNotFoundException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentResolverException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentResolverException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentResolverException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArgumentResolverException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactExistException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactExistException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactExistException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactExistException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactNotFoundException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactNotFoundException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactNotFoundException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmArtifactNotFoundException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmBadRequestException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmBadRequestException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmBadRequestException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmBadRequestException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmClientAuthException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmClientAuthException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmClientAuthException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmClientAuthException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmExceptionHandler.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmExceptionHandler.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmExceptionHandler.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmExceptionHandler.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmLoginFailException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmLoginFailException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmLoginFailException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmLoginFailException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmRepoNotFoundException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmRepoNotFoundException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmRepoNotFoundException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmRepoNotFoundException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTagNotExistException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTagNotExistException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTagNotExistException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTagNotExistException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTokenIllegalException.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTokenIllegalException.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTokenIllegalException.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/exception/NpmTokenIllegalException.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmDependentHandler.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmDependentHandler.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmDependentHandler.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmDependentHandler.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmPackageHandler.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmPackageHandler.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmPackageHandler.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/handler/NpmPackageHandler.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TMigrationErrorData.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TMigrationErrorData.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TMigrationErrorData.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TMigrationErrorData.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TModuleDeps.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TModuleDeps.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TModuleDeps.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/TModuleDeps.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/MaintainersDeserializer.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/MaintainersDeserializer.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/MaintainersDeserializer.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/MaintainersDeserializer.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmPackageMetaData.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmPackageMetaData.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmPackageMetaData.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmPackageMetaData.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmVersionMetadata.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmVersionMetadata.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmVersionMetadata.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/NpmVersionMetadata.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsDeserializer.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsDeserializer.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsDeserializer.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsDeserializer.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsSerializer.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsSerializer.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsSerializer.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/metadata/VersionsSerializer.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/properties/PackageProperties.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/properties/PackageProperties.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/properties/PackageProperties.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/model/properties/PackageProperties.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/MigrationProperties.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/MigrationProperties.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/MigrationProperties.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/MigrationProperties.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/NpmProperties.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/NpmProperties.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/NpmProperties.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/NpmProperties.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/TarballProperties.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/TarballProperties.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/TarballProperties.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/properties/TarballProperties.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/AuthResourceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/AuthResourceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/AuthResourceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/AuthResourceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/ModuleDepsResourceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/ModuleDepsResourceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/ModuleDepsResourceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/ModuleDepsResourceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/NpmFixToolResourceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/NpmFixToolResourceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/NpmFixToolResourceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/NpmFixToolResourceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/PackageDependentResourceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/PackageDependentResourceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/PackageDependentResourceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/resource/PackageDependentResourceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/DataMigrationService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/DataMigrationService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/DataMigrationService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/DataMigrationService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/ModuleDepsService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/ModuleDepsService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/ModuleDepsService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/ModuleDepsService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmClientService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmClientService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmClientService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmClientService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmFixToolService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmFixToolService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmFixToolService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmFixToolService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmWebService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmWebService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmWebService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/NpmWebService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/PackageDependentService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/PackageDependentService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/PackageDependentService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/PackageDependentService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/AbstractNpmService.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/AbstractNpmService.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/AbstractNpmService.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/AbstractNpmService.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmClientServiceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmClientServiceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmClientServiceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmClientServiceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmFixToolServiceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmFixToolServiceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmFixToolServiceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmFixToolServiceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmWebServiceImpl.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmWebServiceImpl.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmWebServiceImpl.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/service/impl/NpmWebServiceImpl.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/BeanUtils.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/BeanUtils.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/BeanUtils.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/BeanUtils.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/GsonUtils.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/GsonUtils.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/GsonUtils.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/GsonUtils.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/MigrationUtils.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/MigrationUtils.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/MigrationUtils.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/MigrationUtils.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/NpmUtils.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/NpmUtils.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/NpmUtils.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/NpmUtils.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/OkHttpUtil.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/OkHttpUtil.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/OkHttpUtil.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/OkHttpUtil.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/ThreadPoolManager.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/ThreadPoolManager.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/ThreadPoolManager.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/ThreadPoolManager.kt diff --git a/src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/TimeUtil.kt b/src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/TimeUtil.kt similarity index 100% rename from src/backend/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/TimeUtil.kt rename to src/backend/core/npm/biz-npm/src/main/kotlin/com/tencent/bkrepo/npm/utils/TimeUtil.kt diff --git a/src/backend/npm/biz-npm/src/main/resources/i18n/messages_en.properties b/src/backend/core/npm/biz-npm/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/npm/biz-npm/src/main/resources/i18n/messages_en.properties rename to src/backend/core/npm/biz-npm/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/npm/biz-npm/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/npm/biz-npm/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/npm/biz-npm/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/npm/biz-npm/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/npm/biz-npm/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/npm/biz-npm/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/npm/biz-npm/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/npm/biz-npm/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/npm/biz-npm/src/test/kotlin/com/tencent/bkrepo/npm/utils/NpmUtilsTest.kt b/src/backend/core/npm/biz-npm/src/test/kotlin/com/tencent/bkrepo/npm/utils/NpmUtilsTest.kt similarity index 100% rename from src/backend/npm/biz-npm/src/test/kotlin/com/tencent/bkrepo/npm/utils/NpmUtilsTest.kt rename to src/backend/core/npm/biz-npm/src/test/kotlin/com/tencent/bkrepo/npm/utils/NpmUtilsTest.kt diff --git a/src/backend/npm/boot-npm/build.gradle.kts b/src/backend/core/npm/boot-npm/build.gradle.kts similarity index 96% rename from src/backend/npm/boot-npm/build.gradle.kts rename to src/backend/core/npm/boot-npm/build.gradle.kts index 4817f8785c..d5df409aed 100644 --- a/src/backend/npm/boot-npm/build.gradle.kts +++ b/src/backend/core/npm/boot-npm/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":npm:biz-npm")) + implementation(project(":core:npm:biz-npm")) } diff --git a/src/backend/npm/boot-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmApplication.kt b/src/backend/core/npm/boot-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmApplication.kt similarity index 100% rename from src/backend/npm/boot-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmApplication.kt rename to src/backend/core/npm/boot-npm/src/main/kotlin/com/tencent/bkrepo/npm/NpmApplication.kt diff --git a/src/backend/npm/boot-npm/src/main/resources/bootstrap.yml b/src/backend/core/npm/boot-npm/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/npm/boot-npm/src/main/resources/bootstrap.yml rename to src/backend/core/npm/boot-npm/src/main/resources/bootstrap.yml diff --git a/src/backend/npm/build.gradle.kts b/src/backend/core/npm/build.gradle.kts similarity index 100% rename from src/backend/npm/build.gradle.kts rename to src/backend/core/npm/build.gradle.kts diff --git a/src/backend/nuget/api-nuget/build.gradle.kts b/src/backend/core/nuget/api-nuget/build.gradle.kts similarity index 100% rename from src/backend/nuget/api-nuget/build.gradle.kts rename to src/backend/core/nuget/api-nuget/build.gradle.kts diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactInfo.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactInfo.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactInfo.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactInfo.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetConstants.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetConstants.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetConstants.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetConstants.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetMessageCode.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetMessageCode.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetMessageCode.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetMessageCode.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetQueryType.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetQueryType.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetQueryType.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetQueryType.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/ResourceType.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/ResourceType.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/ResourceType.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/ResourceType.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/NugetErrorResponse.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/NugetErrorResponse.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/NugetErrorResponse.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/NugetErrorResponse.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v2/search/NuGetSearchRequest.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v2/search/NuGetSearchRequest.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v2/search/NuGetSearchRequest.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v2/search/NuGetSearchRequest.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchRequest.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchRequest.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchRequest.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchRequest.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponse.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponse.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponse.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponse.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseData.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseData.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseData.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseData.kt diff --git a/src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseDataVersion.kt b/src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseDataVersion.kt similarity index 100% rename from src/backend/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseDataVersion.kt rename to src/backend/core/nuget/api-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/model/v3/search/SearchResponseDataVersion.kt diff --git a/src/backend/nuget/biz-nuget/build.gradle.kts b/src/backend/core/nuget/biz-nuget/build.gradle.kts similarity index 97% rename from src/backend/nuget/biz-nuget/build.gradle.kts rename to src/backend/core/nuget/biz-nuget/build.gradle.kts index 517e6a2bb1..aa97a2bbc7 100644 --- a/src/backend/nuget/biz-nuget/build.gradle.kts +++ b/src/backend/core/nuget/biz-nuget/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":nuget:api-nuget")) + api(project(":core:nuget:api-nuget")) api(project(":common:common-job")) api(project(":common:common-artifact:artifact-service")) implementation("org.springframework.retry:spring-retry") diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactConfigurer.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactConfigurer.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactConfigurer.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/NugetArtifactConfigurer.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/auth/NugetApiKeyAuthHandler.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/auth/NugetApiKeyAuthHandler.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/auth/NugetApiKeyAuthHandler.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/auth/NugetApiKeyAuthHandler.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetLocalRepository.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetLocalRepository.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetLocalRepository.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetLocalRepository.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetRemoteRepository.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetRemoteRepository.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetRemoteRepository.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetRemoteRepository.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetVirtualRepository.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetVirtualRepository.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetVirtualRepository.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/repository/NugetVirtualRepository.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetArtifactInfoResolver.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetArtifactInfoResolver.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetArtifactInfoResolver.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetArtifactInfoResolver.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDeleteArtifactInfoResolver.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDeleteArtifactInfoResolver.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDeleteArtifactInfoResolver.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDeleteArtifactInfoResolver.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDownloadArtifactInfoResolver.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDownloadArtifactInfoResolver.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDownloadArtifactInfoResolver.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetDownloadArtifactInfoResolver.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetPublishInfoResolver.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetPublishInfoResolver.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetPublishInfoResolver.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetPublishInfoResolver.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetRegistrationArtifactInfoResolver.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetRegistrationArtifactInfoResolver.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetRegistrationArtifactInfoResolver.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/artifact/resolver/NugetRegistrationArtifactInfoResolver.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/NugetRemoteAndVirtualCommon.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/NugetRemoteAndVirtualCommon.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/NugetRemoteAndVirtualCommon.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/NugetRemoteAndVirtualCommon.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/UrlConvert.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/UrlConvert.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/UrlConvert.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/common/UrlConvert.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetProperties.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetProperties.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetProperties.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/constant/NugetProperties.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetClientController.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetClientController.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetClientController.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetClientController.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageContentController.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageContentController.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageContentController.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageContentController.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageMetadataController.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageMetadataController.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageMetadataController.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetPackageMetadataController.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetSearchController.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetSearchController.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetSearchController.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetSearchController.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetServiceIndexController.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetServiceIndexController.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetServiceIndexController.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetServiceIndexController.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetWebController.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetWebController.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetWebController.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/controller/NugetWebController.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetArtifactReceiveException.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetArtifactReceiveException.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetArtifactReceiveException.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetArtifactReceiveException.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetException.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetException.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetException.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetException.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetFeedNotFoundException.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetFeedNotFoundException.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetFeedNotFoundException.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetFeedNotFoundException.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetMetadataListNotFoundException.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetMetadataListNotFoundException.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetMetadataListNotFoundException.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetMetadataListNotFoundException.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetVersionListNotFoundException.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetVersionListNotFoundException.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetVersionListNotFoundException.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/exception/NugetVersionListNotFoundException.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/handler/NugetPackageHandler.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/handler/NugetPackageHandler.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/handler/NugetPackageHandler.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/handler/NugetPackageHandler.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDeleteArtifactInfo.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDeleteArtifactInfo.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDeleteArtifactInfo.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDeleteArtifactInfo.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDownloadArtifactInfo.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDownloadArtifactInfo.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDownloadArtifactInfo.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetDownloadArtifactInfo.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetPublishArtifactInfo.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetPublishArtifactInfo.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetPublishArtifactInfo.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetPublishArtifactInfo.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetRegistrationArtifactInfo.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetRegistrationArtifactInfo.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetRegistrationArtifactInfo.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/artifact/NugetRegistrationArtifactInfo.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/domain/NugetDomainInfo.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/domain/NugetDomainInfo.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/domain/NugetDomainInfo.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/domain/NugetDomainInfo.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecFile.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecFile.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecFile.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecFile.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecMetadata.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecMetadata.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecMetadata.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecMetadata.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecPackage.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecPackage.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecPackage.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/nuspec/NuspecPackage.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/NugetSearchRequest.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/NugetSearchRequest.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/NugetSearchRequest.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/NugetSearchRequest.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageDeleteRequest.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageDeleteRequest.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageDeleteRequest.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageDeleteRequest.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageVersionDeleteRequest.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageVersionDeleteRequest.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageVersionDeleteRequest.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/request/PackageVersionDeleteRequest.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/VersionListResponse.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/VersionListResponse.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/VersionListResponse.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/VersionListResponse.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/NugetSearchResponse.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/NugetSearchResponse.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/NugetSearchResponse.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/NugetSearchResponse.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseData.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseData.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseData.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseData.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataTypes.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataTypes.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataTypes.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataTypes.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataVersion.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataVersion.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataVersion.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/response/search/SearchResponseDataVersion.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/user/PackageVersionInfo.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/user/PackageVersionInfo.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/user/PackageVersionInfo.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/user/PackageVersionInfo.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Feed.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Feed.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Feed.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Feed.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Resource.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Resource.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Resource.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/feed/Resource.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/AlternatePackage.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/AlternatePackage.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/AlternatePackage.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/AlternatePackage.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Dependency.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Dependency.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Dependency.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Dependency.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/DependencyGroups.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/DependencyGroups.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/DependencyGroups.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/DependencyGroups.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Deprecation.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Deprecation.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Deprecation.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Deprecation.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationCatalogEntry.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationCatalogEntry.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationCatalogEntry.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationCatalogEntry.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationIndex.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationIndex.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationIndex.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationIndex.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationItem.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationItem.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationItem.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationItem.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationPageItem.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationPageItem.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationPageItem.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/RegistrationPageItem.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Vulnerability.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Vulnerability.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Vulnerability.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/index/Vulnerability.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/leaf/RegistrationLeaf.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/leaf/RegistrationLeaf.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/leaf/RegistrationLeaf.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/leaf/RegistrationLeaf.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/page/RegistrationPage.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/page/RegistrationPage.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/page/RegistrationPage.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/pojo/v3/metadata/page/RegistrationPage.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetClientService.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetClientService.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetClientService.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetClientService.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageContentService.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageContentService.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageContentService.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageContentService.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageMetadataService.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageMetadataService.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageMetadataService.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetPackageMetadataService.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetSearchService.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetSearchService.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetSearchService.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetSearchService.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetServiceIndexService.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetServiceIndexService.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetServiceIndexService.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetServiceIndexService.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetWebService.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetWebService.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetWebService.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/NugetWebService.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetClientServiceImpl.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetClientServiceImpl.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetClientServiceImpl.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetClientServiceImpl.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageContentServiceImpl.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageContentServiceImpl.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageContentServiceImpl.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageContentServiceImpl.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageMetadataServiceImpl.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageMetadataServiceImpl.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageMetadataServiceImpl.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetPackageMetadataServiceImpl.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetSearchServiceImpl.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetSearchServiceImpl.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetSearchServiceImpl.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetSearchServiceImpl.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetServiceIndexServiceImpl.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetServiceIndexServiceImpl.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetServiceIndexServiceImpl.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetServiceIndexServiceImpl.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetWebServiceImpl.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetWebServiceImpl.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetWebServiceImpl.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/service/impl/NugetWebServiceImpl.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/DecompressUtil.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/DecompressUtil.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/DecompressUtil.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/DecompressUtil.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetUtils.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetUtils.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetUtils.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetUtils.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetV3RegistrationUtils.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetV3RegistrationUtils.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetV3RegistrationUtils.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetV3RegistrationUtils.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetVersionUtils.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetVersionUtils.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetVersionUtils.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/NugetVersionUtils.kt diff --git a/src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/RemoteRegistrationUtils.kt b/src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/RemoteRegistrationUtils.kt similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/RemoteRegistrationUtils.kt rename to src/backend/core/nuget/biz-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/util/RemoteRegistrationUtils.kt diff --git a/src/backend/nuget/biz-nuget/src/main/resources/i18n/messages_en.properties b/src/backend/core/nuget/biz-nuget/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/resources/i18n/messages_en.properties rename to src/backend/core/nuget/biz-nuget/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/nuget/biz-nuget/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/nuget/biz-nuget/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/nuget/biz-nuget/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/nuget/biz-nuget/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/nuget/biz-nuget/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/nuget/biz-nuget/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/nuget/biz-nuget/src/main/resources/service_document.xml b/src/backend/core/nuget/biz-nuget/src/main/resources/service_document.xml similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/resources/service_document.xml rename to src/backend/core/nuget/biz-nuget/src/main/resources/service_document.xml diff --git a/src/backend/nuget/biz-nuget/src/main/resources/v3/nugetRootFeedIndex.json b/src/backend/core/nuget/biz-nuget/src/main/resources/v3/nugetRootFeedIndex.json similarity index 100% rename from src/backend/nuget/biz-nuget/src/main/resources/v3/nugetRootFeedIndex.json rename to src/backend/core/nuget/biz-nuget/src/main/resources/v3/nugetRootFeedIndex.json diff --git a/src/backend/core/nuget/boot-nuget/build.gradle.kts b/src/backend/core/nuget/boot-nuget/build.gradle.kts new file mode 100644 index 0000000000..0f38ed73ae --- /dev/null +++ b/src/backend/core/nuget/boot-nuget/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +dependencies { + implementation(project(":core:nuget:biz-nuget")) +} diff --git a/src/backend/nuget/boot-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/NugetApplication.kt b/src/backend/core/nuget/boot-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/NugetApplication.kt similarity index 100% rename from src/backend/nuget/boot-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/NugetApplication.kt rename to src/backend/core/nuget/boot-nuget/src/main/kotlin/com/tencent/bkrepo/nuget/NugetApplication.kt diff --git a/src/backend/nuget/boot-nuget/src/main/resources/bootstrap.yml b/src/backend/core/nuget/boot-nuget/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/nuget/boot-nuget/src/main/resources/bootstrap.yml rename to src/backend/core/nuget/boot-nuget/src/main/resources/bootstrap.yml diff --git a/src/backend/nuget/build.gradle.kts b/src/backend/core/nuget/build.gradle.kts similarity index 100% rename from src/backend/nuget/build.gradle.kts rename to src/backend/core/nuget/build.gradle.kts diff --git a/src/backend/oci/api-oci/build.gradle.kts b/src/backend/core/oci/api-oci/build.gradle.kts similarity index 100% rename from src/backend/oci/api-oci/build.gradle.kts rename to src/backend/core/oci/api-oci/build.gradle.kts diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/api/OciClient.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/api/OciClient.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/api/OciClient.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/api/OciClient.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciConstants.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciConstants.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciConstants.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciConstants.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciErrorMessageConstants.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciErrorMessageConstants.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciErrorMessageConstants.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciErrorMessageConstants.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciMessageCode.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciMessageCode.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciMessageCode.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/constant/OciMessageCode.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciBadRequestException.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciBadRequestException.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciBadRequestException.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciBadRequestException.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackageInfoPullExtension.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackageInfoPullExtension.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackageInfoPullExtension.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackageInfoPullExtension.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackagePullContext.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackagePullContext.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackagePullContext.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/extension/ImagePackagePullContext.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/BlobSum.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/BlobSum.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/BlobSum.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/BlobSum.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ConfigDescriptor.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ConfigDescriptor.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ConfigDescriptor.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ConfigDescriptor.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/Descriptor.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/Descriptor.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/Descriptor.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/Descriptor.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/LayerDescriptor.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/LayerDescriptor.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/LayerDescriptor.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/LayerDescriptor.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema1.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema1.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema1.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema1.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema2.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema2.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema2.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/ManifestSchema2.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/SchemaVersion.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/SchemaVersion.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/SchemaVersion.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/SchemaVersion.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciArtifactInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciArtifactInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciArtifactInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciArtifactInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciBlobArtifactInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciBlobArtifactInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciBlobArtifactInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciBlobArtifactInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciDeleteArtifactInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciDeleteArtifactInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciDeleteArtifactInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciDeleteArtifactInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciManifestArtifactInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciManifestArtifactInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciManifestArtifactInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciManifestArtifactInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciTagArtifactInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciTagArtifactInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciTagArtifactInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/artifact/OciTagArtifactInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/digest/OciDigest.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/digest/OciDigest.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/digest/OciDigest.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/digest/OciDigest.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/fixtool/PackageManagerResponse.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/fixtool/PackageManagerResponse.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/fixtool/PackageManagerResponse.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/fixtool/PackageManagerResponse.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/node/NodeProperty.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/node/NodeProperty.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/node/NodeProperty.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/node/NodeProperty.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/remote/RemoteRequestProperty.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/remote/RemoteRequestProperty.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/remote/RemoteRequestProperty.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/remote/RemoteRequestProperty.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/ResponseProperty.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/ResponseProperty.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/ResponseProperty.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/ResponseProperty.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/third/OciReplicationRecordInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/third/OciReplicationRecordInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/third/OciReplicationRecordInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/third/OciReplicationRecordInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/BasicInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/BasicInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/BasicInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/BasicInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/PackageVersionInfo.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/PackageVersionInfo.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/PackageVersionInfo.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/user/PackageVersionInfo.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/DecompressUtil.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/DecompressUtil.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/DecompressUtil.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/DecompressUtil.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciLocationUtils.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciLocationUtils.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciLocationUtils.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciLocationUtils.kt diff --git a/src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciUtils.kt b/src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciUtils.kt similarity index 100% rename from src/backend/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciUtils.kt rename to src/backend/core/oci/api-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciUtils.kt diff --git a/src/backend/oci/biz-oci/build.gradle.kts b/src/backend/core/oci/biz-oci/build.gradle.kts similarity index 97% rename from src/backend/oci/biz-oci/build.gradle.kts rename to src/backend/core/oci/biz-oci/build.gradle.kts index cb7ca0ab3f..5b5afbe412 100644 --- a/src/backend/oci/biz-oci/build.gradle.kts +++ b/src/backend/core/oci/biz-oci/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":oci:api-oci")) + api(project(":core:oci:api-oci")) api("javax.ws.rs:jsr311-api:${Versions.JSR311API}") implementation("org.glassfish.jersey.core:jersey-server:${Versions.Jersey}") } diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/OciRegistryArtifactConfigurer.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/OciRegistryArtifactConfigurer.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/OciRegistryArtifactConfigurer.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/OciRegistryArtifactConfigurer.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/auth/OciLoginAuthHandler.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/auth/OciLoginAuthHandler.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/auth/OciLoginAuthHandler.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/auth/OciLoginAuthHandler.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryLocalRepository.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryLocalRepository.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryLocalRepository.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryLocalRepository.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryRemoteRepository.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryRemoteRepository.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryRemoteRepository.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryRemoteRepository.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryVirtualRepository.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryVirtualRepository.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryVirtualRepository.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/repository/OciRegistryVirtualRepository.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciArtifactInfoResolver.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciArtifactInfoResolver.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciArtifactInfoResolver.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciArtifactInfoResolver.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciBlobArtifactInfoResolver.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciBlobArtifactInfoResolver.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciBlobArtifactInfoResolver.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciBlobArtifactInfoResolver.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciDeleteArtifactInfoResolver.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciDeleteArtifactInfoResolver.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciDeleteArtifactInfoResolver.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciDeleteArtifactInfoResolver.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciManifestArtifactInfoResolver.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciManifestArtifactInfoResolver.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciManifestArtifactInfoResolver.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciManifestArtifactInfoResolver.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciTagArtifactInfoResolver.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciTagArtifactInfoResolver.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciTagArtifactInfoResolver.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/artifact/resolver/OciTagArtifactInfoResolver.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciConsumerConfig.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciConsumerConfig.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciConsumerConfig.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciConsumerConfig.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciProperties.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciProperties.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciProperties.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/config/OciProperties.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/service/OciPackageController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/service/OciPackageController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/service/OciPackageController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/service/OciPackageController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/BaseController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/BaseController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/BaseController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/BaseController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/CatalogController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/CatalogController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/CatalogController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/CatalogController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciBlobController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciBlobController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciBlobController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciBlobController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciManifestController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciManifestController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciManifestController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciManifestController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciTagController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciTagController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciTagController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/OciTagController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/UserOciController.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/UserOciController.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/UserOciController.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/controller/user/UserOciController.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/dao/OciReplicationRecordDao.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/dao/OciReplicationRecordDao.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/dao/OciReplicationRecordDao.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/dao/OciReplicationRecordDao.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileAlreadyExistsException.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileAlreadyExistsException.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileAlreadyExistsException.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileAlreadyExistsException.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileNotFoundException.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileNotFoundException.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileNotFoundException.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciFileNotFoundException.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciForbiddenRequestException.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciForbiddenRequestException.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciForbiddenRequestException.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciForbiddenRequestException.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciRepoNotFoundException.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciRepoNotFoundException.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciRepoNotFoundException.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciRepoNotFoundException.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciVersionNotFoundException.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciVersionNotFoundException.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciVersionNotFoundException.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciVersionNotFoundException.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/base/EventExecutor.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/base/EventExecutor.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/base/EventExecutor.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/base/EventExecutor.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/RemoteImageRepoEventConsumer.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/RemoteImageRepoEventConsumer.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/RemoteImageRepoEventConsumer.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/RemoteImageRepoEventConsumer.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ReplicationEventListener.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ReplicationEventListener.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ReplicationEventListener.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ReplicationEventListener.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ThirdPartyReplicationEventConsumer.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ThirdPartyReplicationEventConsumer.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ThirdPartyReplicationEventConsumer.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/consumer/ThirdPartyReplicationEventConsumer.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/pool/EventHandlerThreadPoolExecutor.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/pool/EventHandlerThreadPoolExecutor.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/pool/EventHandlerThreadPoolExecutor.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/listener/pool/EventHandlerThreadPoolExecutor.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/TOciReplicationRecord.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/TOciReplicationRecord.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/TOciReplicationRecord.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/model/TOciReplicationRecord.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/auth/BearerToken.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/auth/BearerToken.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/auth/BearerToken.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/auth/BearerToken.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/CatalogResponse.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/CatalogResponse.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/CatalogResponse.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/CatalogResponse.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciErrorResponse.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciErrorResponse.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciErrorResponse.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciErrorResponse.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImage.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImage.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImage.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImage.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImageResult.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImageResult.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImageResult.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciImageResult.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciResponse.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciResponse.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciResponse.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciResponse.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTag.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTag.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTag.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTag.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTagResult.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTagResult.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTagResult.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/response/OciTagResult.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/tags/TagsInfo.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/tags/TagsInfo.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/tags/TagsInfo.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/pojo/tags/TagsInfo.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciBlobService.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciBlobService.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciBlobService.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciBlobService.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciCatalogService.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciCatalogService.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciCatalogService.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciCatalogService.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciManifestService.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciManifestService.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciManifestService.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciManifestService.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciOperationService.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciOperationService.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciOperationService.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciOperationService.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciTagService.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciTagService.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciTagService.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/OciTagService.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciBlobServiceImpl.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciBlobServiceImpl.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciBlobServiceImpl.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciBlobServiceImpl.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciCatalogServiceImpl.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciCatalogServiceImpl.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciCatalogServiceImpl.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciCatalogServiceImpl.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciManifestServiceImpl.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciManifestServiceImpl.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciManifestServiceImpl.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciManifestServiceImpl.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciOperationServiceImpl.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciOperationServiceImpl.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciOperationServiceImpl.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciOperationServiceImpl.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciTagServiceImpl.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciTagServiceImpl.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciTagServiceImpl.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/service/impl/OciTagServiceImpl.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/ObjectBuildUtils.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/ObjectBuildUtils.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/ObjectBuildUtils.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/ObjectBuildUtils.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciResponseUtils.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciResponseUtils.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciResponseUtils.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/OciResponseUtils.kt diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/TimeUtil.kt b/src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/TimeUtil.kt similarity index 100% rename from src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/TimeUtil.kt rename to src/backend/core/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/util/TimeUtil.kt diff --git a/src/backend/oci/biz-oci/src/main/resources/i18n/messages_en.properties b/src/backend/core/oci/biz-oci/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/oci/biz-oci/src/main/resources/i18n/messages_en.properties rename to src/backend/core/oci/biz-oci/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/oci/biz-oci/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/oci/biz-oci/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/oci/biz-oci/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/oci/biz-oci/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/oci/biz-oci/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/oci/biz-oci/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/oci/biz-oci/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/oci/biz-oci/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/test/OciTestInfo.kt b/src/backend/core/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/test/OciTestInfo.kt similarity index 100% rename from src/backend/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/test/OciTestInfo.kt rename to src/backend/core/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/test/OciTestInfo.kt diff --git a/src/backend/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/util/OciUtilsTest.kt b/src/backend/core/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/util/OciUtilsTest.kt similarity index 100% rename from src/backend/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/util/OciUtilsTest.kt rename to src/backend/core/oci/biz-oci/src/test/kotlin/com/tencent/bkrepo/oci/util/OciUtilsTest.kt diff --git a/src/backend/helm/boot-helm/build.gradle.kts b/src/backend/core/oci/boot-oci/build.gradle.kts similarity index 96% rename from src/backend/helm/boot-helm/build.gradle.kts rename to src/backend/core/oci/boot-oci/build.gradle.kts index 0d9b7fcb1e..8dc29c5bcb 100644 --- a/src/backend/helm/boot-helm/build.gradle.kts +++ b/src/backend/core/oci/boot-oci/build.gradle.kts @@ -30,5 +30,6 @@ */ dependencies { - implementation(project(":helm:biz-helm")) + implementation(project(":core:oci:biz-oci")) } + diff --git a/src/backend/oci/boot-oci/src/main/kotlin/com/tencent/bkrepo/oci/OciRegistryApplication.kt b/src/backend/core/oci/boot-oci/src/main/kotlin/com/tencent/bkrepo/oci/OciRegistryApplication.kt similarity index 100% rename from src/backend/oci/boot-oci/src/main/kotlin/com/tencent/bkrepo/oci/OciRegistryApplication.kt rename to src/backend/core/oci/boot-oci/src/main/kotlin/com/tencent/bkrepo/oci/OciRegistryApplication.kt diff --git a/src/backend/oci/boot-oci/src/main/resources/bootstrap.yml b/src/backend/core/oci/boot-oci/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/oci/boot-oci/src/main/resources/bootstrap.yml rename to src/backend/core/oci/boot-oci/src/main/resources/bootstrap.yml diff --git a/src/backend/oci/build.gradle.kts b/src/backend/core/oci/build.gradle.kts similarity index 100% rename from src/backend/oci/build.gradle.kts rename to src/backend/core/oci/build.gradle.kts diff --git a/src/backend/opdata/api-opdata/build.gradle.kts b/src/backend/core/opdata/api-opdata/build.gradle.kts similarity index 100% rename from src/backend/opdata/api-opdata/build.gradle.kts rename to src/backend/core/opdata/api-opdata/build.gradle.kts diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/constant/Constants.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/constant/Constants.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/constant/Constants.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/constant/Constants.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/extension/UsageComputerExtension.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/extension/UsageComputerExtension.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/extension/UsageComputerExtension.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/extension/UsageComputerExtension.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItem.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItem.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItem.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItem.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/message/OpDataMessageCode.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/message/OpDataMessageCode.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/message/OpDataMessageCode.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/message/OpDataMessageCode.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/AnnotationsRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/AnnotationsRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/AnnotationsRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/AnnotationsRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/CleanupRules.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/CleanupRules.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/CleanupRules.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/CleanupRules.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Columns.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Columns.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Columns.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Columns.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Filter.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Filter.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Filter.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Filter.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/MetricFilterInfo.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/MetricFilterInfo.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/MetricFilterInfo.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/MetricFilterInfo.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/NodeResult.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/NodeResult.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/NodeResult.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/NodeResult.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBill.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBill.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBill.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBill.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatement.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatement.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatement.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatement.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatementRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatementRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatementRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectBillStatementRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetrics.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetrics.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetrics.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetrics.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsOption.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsOption.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsOption.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsOption.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/ProjectMetricsRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryResult.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryResult.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryResult.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/QueryResult.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Range.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Range.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Range.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Range.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Raw.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Raw.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Raw.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Raw.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/RepoMetrics.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/RepoMetrics.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/RepoMetrics.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/RepoMetrics.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchMapResult.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchMapResult.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchMapResult.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchMapResult.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/SearchRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Target.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Target.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Target.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/Target.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/ConfigItem.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/ConfigItem.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/ConfigItem.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/ConfigItem.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/GetConfigRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/GetConfigRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/GetConfigRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/GetConfigRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/UpdateConfigRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/UpdateConfigRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/UpdateConfigRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/config/UpdateConfigRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/FilterType.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/FilterType.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/FilterType.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/FilterType.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/Metrics.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/Metrics.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/Metrics.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/Metrics.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/MetricsType.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/MetricsType.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/MetricsType.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/MetricsType.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/ProjectType.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/ProjectType.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/ProjectType.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/ProjectType.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/StatMetrics.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/StatMetrics.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/StatMetrics.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/enums/StatMetrics.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/FolderInfo.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/FolderInfo.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/FolderInfo.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/FolderInfo.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/ListOption.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/ListOption.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/ListOption.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/node/ListOption.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginCreateRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginCreateRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginCreateRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginCreateRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginDetail.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginDetail.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginDetail.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginDetail.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginListOption.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginListOption.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginListOption.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginListOption.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginUpdateRequest.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginUpdateRequest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginUpdateRequest.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/plugin/PluginUpdateRequest.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceDetail.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceDetail.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceDetail.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceDetail.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceInfo.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceInfo.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceInfo.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceInfo.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceStatus.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceStatus.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceStatus.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/InstanceStatus.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/ServiceInfo.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/ServiceInfo.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/ServiceInfo.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/registry/ServiceInfo.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/FileStorageListOption.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/FileStorageListOption.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/FileStorageListOption.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/FileStorageListOption.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/RootPathStorageMetric.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/RootPathStorageMetric.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/RootPathStorageMetric.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/RootPathStorageMetric.kt diff --git a/src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/SubFolderStorageMetric.kt b/src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/SubFolderStorageMetric.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/SubFolderStorageMetric.kt rename to src/backend/core/opdata/api-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/pojo/storage/SubFolderStorageMetric.kt diff --git a/src/backend/opdata/api-opdata/src/test/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItemTest.kt b/src/backend/core/opdata/api-opdata/src/test/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItemTest.kt similarity index 100% rename from src/backend/opdata/api-opdata/src/test/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItemTest.kt rename to src/backend/core/opdata/api-opdata/src/test/kotlin/com/tencent/bkrepo/opdata/handler/MaskConfigItemTest.kt diff --git a/src/backend/opdata/biz-opdata/build.gradle.kts b/src/backend/core/opdata/biz-opdata/build.gradle.kts similarity index 96% rename from src/backend/opdata/biz-opdata/build.gradle.kts rename to src/backend/core/opdata/biz-opdata/build.gradle.kts index d3c4a3cc0d..fb99ec5a81 100644 --- a/src/backend/opdata/biz-opdata/build.gradle.kts +++ b/src/backend/core/opdata/biz-opdata/build.gradle.kts @@ -30,12 +30,12 @@ */ dependencies { - api(project(":opdata:api-opdata")) + api(project(":core:opdata:api-opdata")) api(project(":common:common-job")) api(project(":common:common-artifact:artifact-service")) api(project(":common:common-mongo")) api(project(":fs:api-fs-server")) - api(project(":job:api-job")) + api(project(":core:job:api-job")) implementation(project(":common:common-notify:notify-service")) implementation("org.influxdb:influxdb-java") compileOnly("org.springframework.cloud:spring-cloud-starter-consul-discovery") diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/ArtifactMetricsClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/ArtifactMetricsClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/ArtifactMetricsClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/ArtifactMetricsClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/ActuatorArtifactMetricsClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/ActuatorArtifactMetricsClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/ActuatorArtifactMetricsClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/ActuatorArtifactMetricsClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/Metrics.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/Metrics.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/Metrics.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/actuator/Metrics.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/plugin/PluginClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/plugin/PluginClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/plugin/PluginClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/client/plugin/PluginClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OkHttpConfiguration.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OkHttpConfiguration.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OkHttpConfiguration.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OkHttpConfiguration.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpConfiguration.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpConfiguration.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpConfiguration.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpConfiguration.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpDataConfigurer.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpDataConfigurer.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpDataConfigurer.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpDataConfigurer.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpEmptyFolderStatJobProperties.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpEmptyFolderStatJobProperties.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpEmptyFolderStatJobProperties.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpEmptyFolderStatJobProperties.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProjectMetricsProperties.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProjectMetricsProperties.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProjectMetricsProperties.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProjectMetricsProperties.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProperties.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProperties.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProperties.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpProperties.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpStatJobProperties.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpStatJobProperties.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpStatJobProperties.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/OpStatJobProperties.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/ConfigClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/ConfigClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/ConfigClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/ConfigClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClientConfiguration.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClientConfiguration.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClientConfiguration.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/config/client/consul/ConsulConfigClientConfiguration.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/BkBaseExportController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/BkBaseExportController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/BkBaseExportController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/BkBaseExportController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ConfigController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ConfigController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ConfigController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ConfigController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FileStorageController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FileStorageController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FileStorageController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FileStorageController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FsClientController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FsClientController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FsClientController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/FsClientController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/GrafanaController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/GrafanaController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/GrafanaController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/GrafanaController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NodeController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NodeController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NodeController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NodeController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NotifyChannelCredentialController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NotifyChannelCredentialController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NotifyChannelCredentialController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/NotifyChannelCredentialController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/OpServiceController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/OpServiceController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/OpServiceController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/OpServiceController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/PluginController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/PluginController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/PluginController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/PluginController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ProjectController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ProjectController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ProjectController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/ProjectController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RepoController.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RepoController.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RepoController.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RepoController.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/exception/HttpRequestException.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/exception/HttpRequestException.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/exception/HttpRequestException.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/exception/HttpRequestException.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/QueryHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/QueryHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/QueryHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/QueryHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ArchiveInfoHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ArchiveInfoHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ArchiveInfoHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ArchiveInfoHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/BaseHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/BaseHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/BaseHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/BaseHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/CapSizeHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/CapSizeHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/CapSizeHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/CapSizeHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/EffectiveProjectNumHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/EffectiveProjectNumHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/EffectiveProjectNumHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/EffectiveProjectNumHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/FileExtensionHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/FileExtensionHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/FileExtensionHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/FileExtensionHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/GcInfoHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/GcInfoHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/GcInfoHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/GcInfoHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeCollectionHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeCollectionHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeCollectionHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeCollectionHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeNumHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeNumHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeNumHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeNumHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeSizeDistributionHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeSizeDistributionHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeSizeDistributionHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/NodeSizeDistributionHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectListHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectListHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectListHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectListHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeNumHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeNumHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeNumHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeNumHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeSizeHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeSizeHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeSizeHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNodeSizeHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNumHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNumHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNumHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectNumHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectTrafficHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectTrafficHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectTrafficHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/ProjectTrafficHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeNumHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeNumHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeNumHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeNumHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeSizeHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeSizeHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeSizeHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/RepoNodeSizeHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/StorageCredentialHandler.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/StorageCredentialHandler.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/StorageCredentialHandler.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/handler/impl/StorageCredentialHandler.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/BaseJob.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/BaseJob.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/BaseJob.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/BaseJob.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/EmptyFolderStatJob.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/EmptyFolderStatJob.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/EmptyFolderStatJob.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/EmptyFolderStatJob.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/EmptyFolderMetric.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/EmptyFolderMetric.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/EmptyFolderMetric.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/EmptyFolderMetric.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/JobContext.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/JobContext.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/JobContext.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/job/pojo/JobContext.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ArchiveInfoModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ArchiveInfoModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ArchiveInfoModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ArchiveInfoModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/FileExtensionMetricsModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/FileExtensionMetricsModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/FileExtensionMetricsModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/FileExtensionMetricsModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/GcInfoModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/GcInfoModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/GcInfoModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/GcInfoModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeCollectionModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeCollectionModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeCollectionModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeCollectionModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeInfo.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeInfo.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeInfo.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/NodeInfo.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ProjectModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ProjectModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ProjectModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/ProjectModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoInfo.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoInfo.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoInfo.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoInfo.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/RepoModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/StorageCredentialsModel.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/StorageCredentialsModel.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/StorageCredentialsModel.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/StorageCredentialsModel.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TBkRepoMetrics.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TBkRepoMetrics.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TBkRepoMetrics.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TBkRepoMetrics.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFileExtensionMetrics.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFileExtensionMetrics.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFileExtensionMetrics.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFileExtensionMetrics.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFolderMetrics.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFolderMetrics.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFolderMetrics.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TFolderMetrics.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPathStatMetric.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPathStatMetric.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPathStatMetric.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPathStatMetric.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPlugin.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPlugin.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPlugin.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TPlugin.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TProjectMetrics.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TProjectMetrics.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TProjectMetrics.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TProjectMetrics.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TSizeDistributionMetrics.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TSizeDistributionMetrics.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TSizeDistributionMetrics.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/model/TSizeDistributionMetrics.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/RegistryClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/RegistryClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/RegistryClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/RegistryClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClient.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClient.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClient.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClient.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClientConfiguration.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClientConfiguration.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClientConfiguration.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/ConsulRegistryClientConfiguration.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/exception/ConsulApiException.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/exception/ConsulApiException.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/exception/ConsulApiException.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/exception/ConsulApiException.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstance.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstance.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstance.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstance.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceCheck.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceCheck.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceCheck.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceCheck.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceHealth.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceHealth.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceHealth.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceHealth.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceId.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceId.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceId.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulInstanceId.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulNode.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulNode.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulNode.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulNode.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/registry/consul/pojo/ConsulService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/BkRepoMetricsRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/BkRepoMetricsRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/BkRepoMetricsRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/BkRepoMetricsRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileExtensionMetricsRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileExtensionMetricsRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileExtensionMetricsRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileExtensionMetricsRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileSystemMetricsRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileSystemMetricsRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileSystemMetricsRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FileSystemMetricsRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FolderMetricsRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FolderMetricsRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FolderMetricsRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/FolderMetricsRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/PluginRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/PluginRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/PluginRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/PluginRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/ProjectMetricsRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/ProjectMetricsRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/ProjectMetricsRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/ProjectMetricsRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/SizeDistributionMetricsRepository.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/SizeDistributionMetricsRepository.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/SizeDistributionMetricsRepository.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/repository/SizeDistributionMetricsRepository.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/FileSystemStorageService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/FileSystemStorageService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/FileSystemStorageService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/FileSystemStorageService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/GrafanaService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/GrafanaService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/GrafanaService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/GrafanaService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/NodeService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/NodeService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/NodeService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/NodeService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/OpServiceService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/OpServiceService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/OpServiceService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/OpServiceService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/PluginService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/PluginService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/PluginService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/PluginService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/ProjectMetricsService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/ProjectMetricsService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/ProjectMetricsService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/ProjectMetricsService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/RepoService.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/RepoService.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/RepoService.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/service/RepoService.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/EasyExcelUtils.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/EasyExcelUtils.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/EasyExcelUtils.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/EasyExcelUtils.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/HttpUtils.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/HttpUtils.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/HttpUtils.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/HttpUtils.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsCacheUtil.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsCacheUtil.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsCacheUtil.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsCacheUtil.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsHandlerThreadPoolExecutor.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsHandlerThreadPoolExecutor.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsHandlerThreadPoolExecutor.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/MetricsHandlerThreadPoolExecutor.kt diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/StatDateUtil.kt b/src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/StatDateUtil.kt similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/StatDateUtil.kt rename to src/backend/core/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/util/StatDateUtil.kt diff --git a/src/backend/opdata/biz-opdata/src/main/resources/bootstrap.properties b/src/backend/core/opdata/biz-opdata/src/main/resources/bootstrap.properties similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/resources/bootstrap.properties rename to src/backend/core/opdata/biz-opdata/src/main/resources/bootstrap.properties diff --git a/src/backend/opdata/biz-opdata/src/main/resources/i18n/messages_en.properties b/src/backend/core/opdata/biz-opdata/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/resources/i18n/messages_en.properties rename to src/backend/core/opdata/biz-opdata/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/opdata/biz-opdata/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/opdata/biz-opdata/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/opdata/biz-opdata/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/opdata/biz-opdata/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/opdata/biz-opdata/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/opdata/biz-opdata/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/opdata/biz-opdata/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/composer/boot-composer/build.gradle.kts b/src/backend/core/opdata/boot-opdata/build.gradle.kts similarity index 96% rename from src/backend/composer/boot-composer/build.gradle.kts rename to src/backend/core/opdata/boot-opdata/build.gradle.kts index f2ff331589..c008e3e0bf 100644 --- a/src/backend/composer/boot-composer/build.gradle.kts +++ b/src/backend/core/opdata/boot-opdata/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":composer:biz-composer")) + implementation(project(":core:opdata:biz-opdata")) } diff --git a/src/backend/opdata/boot-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/OpDataApplication.kt b/src/backend/core/opdata/boot-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/OpDataApplication.kt similarity index 100% rename from src/backend/opdata/boot-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/OpDataApplication.kt rename to src/backend/core/opdata/boot-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/OpDataApplication.kt diff --git a/src/backend/opdata/boot-opdata/src/main/resources/bootstrap.yml b/src/backend/core/opdata/boot-opdata/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/opdata/boot-opdata/src/main/resources/bootstrap.yml rename to src/backend/core/opdata/boot-opdata/src/main/resources/bootstrap.yml diff --git a/src/backend/pypi/api-pypi/build.gradle.kts b/src/backend/core/pypi/api-pypi/build.gradle.kts similarity index 100% rename from src/backend/pypi/api-pypi/build.gradle.kts rename to src/backend/core/pypi/api-pypi/build.gradle.kts diff --git a/src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactInfo.kt b/src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactInfo.kt similarity index 100% rename from src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactInfo.kt rename to src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactInfo.kt diff --git a/src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiSimpleArtifactInfo.kt b/src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiSimpleArtifactInfo.kt similarity index 100% rename from src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiSimpleArtifactInfo.kt rename to src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiSimpleArtifactInfo.kt diff --git a/src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/constants/Constant.kt b/src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/constants/Constant.kt similarity index 100% rename from src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/constants/Constant.kt rename to src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/constants/Constant.kt diff --git a/src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiExceptionResponse.kt b/src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiExceptionResponse.kt similarity index 100% rename from src/backend/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiExceptionResponse.kt rename to src/backend/core/pypi/api-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiExceptionResponse.kt diff --git a/src/backend/pypi/biz-pypi/build.gradle.kts b/src/backend/core/pypi/biz-pypi/build.gradle.kts similarity index 97% rename from src/backend/pypi/biz-pypi/build.gradle.kts rename to src/backend/core/pypi/biz-pypi/build.gradle.kts index 8c6cd3f667..17f1e26950 100644 --- a/src/backend/pypi/biz-pypi/build.gradle.kts +++ b/src/backend/core/pypi/biz-pypi/build.gradle.kts @@ -31,7 +31,7 @@ dependencies { api(project(":common:common-artifact:artifact-service")) - api(project(":pypi:api-pypi")) + api(project(":core:pypi:api-pypi")) api(project(":common:common-job")) implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactConfigurer.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactConfigurer.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactConfigurer.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiArtifactConfigurer.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiProperties.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiProperties.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiProperties.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/PypiProperties.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiLocalRepository.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiLocalRepository.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiLocalRepository.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiLocalRepository.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiRemoteRepository.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiRemoteRepository.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiRemoteRepository.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiRemoteRepository.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiVirtualRepository.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiVirtualRepository.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiVirtualRepository.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/repository/PypiVirtualRepository.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiArtifactInfoResolver.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiArtifactInfoResolver.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiArtifactInfoResolver.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiArtifactInfoResolver.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiSimpleArtifactInfoResolver.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiSimpleArtifactInfoResolver.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiSimpleArtifactInfoResolver.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/resolver/PypiSimpleArtifactInfoResolver.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Array.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Array.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Array.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Array.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Data.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Data.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Data.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Data.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Member.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Member.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Member.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Member.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodCall.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodCall.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodCall.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodCall.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodResponse.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodResponse.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodResponse.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/MethodResponse.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Param.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Param.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Param.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Param.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Params.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Params.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Params.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Params.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Struct.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Struct.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Struct.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Struct.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Value.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Value.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Value.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/Value.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiResourceController.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiResourceController.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiResourceController.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiResourceController.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiWebResourceController.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiWebResourceController.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiWebResourceController.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/controller/PypiWebResourceController.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiExceptionHandler.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiExceptionHandler.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiExceptionHandler.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiExceptionHandler.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiRemoteSearchException.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiRemoteSearchException.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiRemoteSearchException.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiRemoteSearchException.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSearchParamException.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSearchParamException.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSearchParamException.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSearchParamException.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSecurityExceptionHandler.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSecurityExceptionHandler.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSecurityExceptionHandler.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSecurityExceptionHandler.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSimpleNotFoundException.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSimpleNotFoundException.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSimpleNotFoundException.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiSimpleNotFoundException.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiUnSupportCompressException.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiUnSupportCompressException.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiUnSupportCompressException.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/exception/PypiUnSupportCompressException.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/Basic.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/Basic.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/Basic.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/Basic.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiArtifactVersionData.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiArtifactVersionData.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiArtifactVersionData.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiArtifactVersionData.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiPackagePojo.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiPackagePojo.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiPackagePojo.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiPackagePojo.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiSearchPojo2.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiSearchPojo2.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiSearchPojo2.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/pojo/PypiSearchPojo2.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiService.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiService.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiService.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiService.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiWebService.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiWebService.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiWebService.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/service/PypiWebService.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/ArtifactFileUtils.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/ArtifactFileUtils.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/ArtifactFileUtils.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/ArtifactFileUtils.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/DecompressUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/DecompressUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/DecompressUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/DecompressUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/FileNameUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/FileNameUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/FileNameUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/FileNameUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/HtmlUtils.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/HtmlUtils.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/HtmlUtils.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/HtmlUtils.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsonUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsonUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsonUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsonUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsoupUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsoupUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsoupUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/JsoupUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PropertiesUtil.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PropertiesUtil.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PropertiesUtil.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PropertiesUtil.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PypiVersionUtils.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PypiVersionUtils.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PypiVersionUtils.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/PypiVersionUtils.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/UrlUtils.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/UrlUtils.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/UrlUtils.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/UrlUtils.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/XmlUtils.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/XmlUtils.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/XmlUtils.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/XmlUtils.kt diff --git a/src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/pojo/PypiInfo.kt b/src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/pojo/PypiInfo.kt similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/pojo/PypiInfo.kt rename to src/backend/core/pypi/biz-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/util/pojo/PypiInfo.kt diff --git a/src/backend/pypi/biz-pypi/src/main/resources/templates/welcome.html b/src/backend/core/pypi/biz-pypi/src/main/resources/templates/welcome.html similarity index 100% rename from src/backend/pypi/biz-pypi/src/main/resources/templates/welcome.html rename to src/backend/core/pypi/biz-pypi/src/main/resources/templates/welcome.html diff --git a/src/backend/core/pypi/boot-pypi/build.gradle.kts b/src/backend/core/pypi/boot-pypi/build.gradle.kts new file mode 100644 index 0000000000..bf6027ca00 --- /dev/null +++ b/src/backend/core/pypi/boot-pypi/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +dependencies { + implementation(project(":core:pypi:biz-pypi")) +} diff --git a/src/backend/pypi/boot-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/PypiApplication.kt b/src/backend/core/pypi/boot-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/PypiApplication.kt similarity index 100% rename from src/backend/pypi/boot-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/PypiApplication.kt rename to src/backend/core/pypi/boot-pypi/src/main/kotlin/com/tencent/bkrepo/pypi/PypiApplication.kt diff --git a/src/backend/pypi/boot-pypi/src/main/resources/bootstrap.yml b/src/backend/core/pypi/boot-pypi/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/pypi/boot-pypi/src/main/resources/bootstrap.yml rename to src/backend/core/pypi/boot-pypi/src/main/resources/bootstrap.yml diff --git a/src/backend/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtilTest.kt b/src/backend/core/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtilTest.kt similarity index 100% rename from src/backend/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtilTest.kt rename to src/backend/core/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/url/UrlPatternUtilTest.kt diff --git a/src/backend/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtilTest.kt b/src/backend/core/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtilTest.kt similarity index 100% rename from src/backend/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtilTest.kt rename to src/backend/core/pypi/boot-pypi/src/test/kotlin/com/tencent/bkrepo/pypi/artifact/xml/XmlConvertUtilTest.kt diff --git a/src/backend/pypi/build.gradle.kts b/src/backend/core/pypi/build.gradle.kts similarity index 100% rename from src/backend/pypi/build.gradle.kts rename to src/backend/core/pypi/build.gradle.kts diff --git a/src/backend/router-controller/api-router-controller/build.gradle.kts b/src/backend/core/router-controller/api-router-controller/build.gradle.kts similarity index 100% rename from src/backend/router-controller/api-router-controller/build.gradle.kts rename to src/backend/core/router-controller/api-router-controller/build.gradle.kts diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/api/RouterControllerClient.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/api/RouterControllerClient.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/api/RouterControllerClient.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/api/RouterControllerClient.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterControllerMessageCode.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterControllerMessageCode.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterControllerMessageCode.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterControllerMessageCode.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterNodeType.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterNodeType.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterNodeType.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/enum/RouterNodeType.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterNodeRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterNodeRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterNodeRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterNodeRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterPolicyRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterPolicyRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterPolicyRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/AddRouterPolicyRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/NodeLocation.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/NodeLocation.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/NodeLocation.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/NodeLocation.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterNodeRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterNodeRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterNodeRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterNodeRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterPolicyRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterPolicyRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterPolicyRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RemoveRouterPolicyRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterNode.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterNode.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterNode.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterNode.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterPolicy.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterPolicy.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterPolicy.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/RouterPolicy.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterNodeRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterNodeRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterNodeRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterNodeRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterPolicyRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterPolicyRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterPolicyRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserAddRouterPolicyRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterNodeRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterNodeRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterNodeRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterNodeRequest.kt diff --git a/src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterPolicyRequest.kt b/src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterPolicyRequest.kt similarity index 100% rename from src/backend/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterPolicyRequest.kt rename to src/backend/core/router-controller/api-router-controller/src/main/kotlin/com/tencent/bkrepo/router/pojo/user/UserRemoveRouterPolicyRequest.kt diff --git a/src/backend/router-controller/biz-router-controller/build.gradle.kts b/src/backend/core/router-controller/biz-router-controller/build.gradle.kts similarity index 96% rename from src/backend/router-controller/biz-router-controller/build.gradle.kts rename to src/backend/core/router-controller/biz-router-controller/build.gradle.kts index 3f50a083bb..5c32232949 100644 --- a/src/backend/router-controller/biz-router-controller/build.gradle.kts +++ b/src/backend/core/router-controller/biz-router-controller/build.gradle.kts @@ -26,7 +26,7 @@ */ dependencies { - api(project(":router-controller:api-router-controller")) + api(project(":core:router-controller:api-router-controller")) api(project(":common:common-mongo")) api(project(":common:common-query:query-mongo")) api(project(":common:common-service:service-servlet")) diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/config/RouterControllerConfiguration.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/config/RouterControllerConfiguration.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/config/RouterControllerConfiguration.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/config/RouterControllerConfiguration.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/service/RouterController.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/service/RouterController.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/service/RouterController.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/service/RouterController.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/user/RouterAdminController.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/user/RouterAdminController.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/user/RouterAdminController.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/contoller/user/RouterAdminController.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TNodeLocation.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TNodeLocation.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TNodeLocation.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TNodeLocation.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterNode.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterNode.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterNode.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterNode.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterPolicy.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterPolicy.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterPolicy.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/model/TRouterPolicy.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/NodeLocationRepository.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/NodeLocationRepository.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/NodeLocationRepository.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/NodeLocationRepository.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterNodeRepository.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterNodeRepository.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterNodeRepository.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterNodeRepository.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterPolicyRepository.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterPolicyRepository.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterPolicyRepository.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/repository/RouterPolicyRepository.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/NodeRedirectService.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/NodeRedirectService.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/NodeRedirectService.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/NodeRedirectService.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterAdminService.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterAdminService.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterAdminService.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterAdminService.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterControllerService.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterControllerService.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterControllerService.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/RouterControllerService.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/NodeRedirectServiceImpl.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/NodeRedirectServiceImpl.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/NodeRedirectServiceImpl.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/NodeRedirectServiceImpl.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterAdminServiceImpl.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterAdminServiceImpl.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterAdminServiceImpl.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterAdminServiceImpl.kt diff --git a/src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterControllerServiceImpl.kt b/src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterControllerServiceImpl.kt similarity index 100% rename from src/backend/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterControllerServiceImpl.kt rename to src/backend/core/router-controller/biz-router-controller/src/main/kotlin/com/tencent/bkrepo/router/service/impl/RouterControllerServiceImpl.kt diff --git a/src/backend/router-controller/boot-router-controller/build.gradle.kts b/src/backend/core/router-controller/boot-router-controller/build.gradle.kts similarity index 95% rename from src/backend/router-controller/boot-router-controller/build.gradle.kts rename to src/backend/core/router-controller/boot-router-controller/build.gradle.kts index 98be9c6cc8..d9f9090247 100644 --- a/src/backend/router-controller/boot-router-controller/build.gradle.kts +++ b/src/backend/core/router-controller/boot-router-controller/build.gradle.kts @@ -26,6 +26,6 @@ */ dependencies { - implementation(project(":router-controller:biz-router-controller")) + implementation(project(":core:router-controller:biz-router-controller")) } diff --git a/src/backend/router-controller/boot-router-controller/src/main/kotlin/com/tencent/bkrepo/router/RouterControllerApplication.kt b/src/backend/core/router-controller/boot-router-controller/src/main/kotlin/com/tencent/bkrepo/router/RouterControllerApplication.kt similarity index 100% rename from src/backend/router-controller/boot-router-controller/src/main/kotlin/com/tencent/bkrepo/router/RouterControllerApplication.kt rename to src/backend/core/router-controller/boot-router-controller/src/main/kotlin/com/tencent/bkrepo/router/RouterControllerApplication.kt diff --git a/src/backend/router-controller/boot-router-controller/src/main/resources/bootstrap.yml b/src/backend/core/router-controller/boot-router-controller/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/router-controller/boot-router-controller/src/main/resources/bootstrap.yml rename to src/backend/core/router-controller/boot-router-controller/src/main/resources/bootstrap.yml diff --git a/src/backend/router-controller/build.gradle.kts b/src/backend/core/router-controller/build.gradle.kts similarity index 100% rename from src/backend/router-controller/build.gradle.kts rename to src/backend/core/router-controller/build.gradle.kts diff --git a/src/backend/rpm/api-rpm/build.gradle.kts b/src/backend/core/rpm/api-rpm/build.gradle.kts similarity index 100% rename from src/backend/rpm/api-rpm/build.gradle.kts rename to src/backend/core/rpm/api-rpm/build.gradle.kts diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constants.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constants.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constants.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constants.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmResource.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmResource.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmResource.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmResource.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmWebResource.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmWebResource.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmWebResource.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/api/RpmWebResource.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfo.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfo.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfo.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfo.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmDeleteResponse.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmDeleteResponse.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmDeleteResponse.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmDeleteResponse.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmExceptionResponse.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmExceptionResponse.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmExceptionResponse.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmExceptionResponse.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmUploadResponse.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmUploadResponse.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmUploadResponse.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmUploadResponse.kt diff --git a/src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/StrUtils.kt b/src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/StrUtils.kt similarity index 100% rename from src/backend/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/StrUtils.kt rename to src/backend/core/rpm/api-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/StrUtils.kt diff --git a/src/backend/rpm/biz-rpm/build.gradle.kts b/src/backend/core/rpm/biz-rpm/build.gradle.kts similarity index 97% rename from src/backend/rpm/biz-rpm/build.gradle.kts rename to src/backend/core/rpm/biz-rpm/build.gradle.kts index 77f4fd52ab..41e99af3dc 100644 --- a/src/backend/rpm/biz-rpm/build.gradle.kts +++ b/src/backend/core/rpm/biz-rpm/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":rpm:api-rpm")) + api(project(":core:rpm:api-rpm")) api(project(":common:common-job")) implementation("org.redline-rpm:redline:${Versions.Redline}") implementation("com.thoughtworks.xstream:xstream:${Versions.XStream}") diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constant.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constant.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constant.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/Constant.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactConfigurer.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactConfigurer.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactConfigurer.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactConfigurer.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfoResolver.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfoResolver.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfoResolver.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/RpmArtifactInfoResolver.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmLocalRepository.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmLocalRepository.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmLocalRepository.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmLocalRepository.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmRemoteRepository.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmRemoteRepository.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmRemoteRepository.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmRemoteRepository.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmVirtualRepository.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmVirtualRepository.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmVirtualRepository.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/artifact/repository/RpmVirtualRepository.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmDebugController.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmDebugController.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmDebugController.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmDebugController.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceController.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceController.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceController.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceController.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceWebController.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceWebController.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceWebController.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/controller/RpmResourceWebController.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactFormatNotSupportedException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactFormatNotSupportedException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactFormatNotSupportedException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactFormatNotSupportedException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactMetadataResolveException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactMetadataResolveException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactMetadataResolveException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmArtifactMetadataResolveException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmConfNotFoundException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmConfNotFoundException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmConfNotFoundException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmConfNotFoundException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmExceptionHandler.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmExceptionHandler.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmExceptionHandler.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmExceptionHandler.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexNotFoundException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexNotFoundException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexNotFoundException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexNotFoundException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexTypeResolveException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexTypeResolveException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexTypeResolveException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmIndexTypeResolveException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRepoDataException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRepoDataException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRepoDataException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRepoDataException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRequestParamMissException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRequestParamMissException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRequestParamMissException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmRequestParamMissException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmVersionNotFoundException.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmVersionNotFoundException.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmVersionNotFoundException.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/exception/RpmVersionNotFoundException.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/FileListsJob.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/FileListsJob.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/FileListsJob.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/FileListsJob.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/JobService.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/JobService.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/JobService.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/JobService.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/OthersJob.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/OthersJob.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/OthersJob.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/OthersJob.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/PrimaryJob.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/PrimaryJob.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/PrimaryJob.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/job/PrimaryJob.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactFormat.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactFormat.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactFormat.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactFormat.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactRepeat.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactRepeat.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactRepeat.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/ArtifactRepeat.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Basic.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Basic.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Basic.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Basic.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Index.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Index.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Index.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/Index.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/IndexType.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/IndexType.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/IndexType.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/IndexType.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RepoDataPojo.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RepoDataPojo.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RepoDataPojo.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RepoDataPojo.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmArtifactVersionData.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmArtifactVersionData.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmArtifactVersionData.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmArtifactVersionData.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmPackagePojo.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmPackagePojo.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmPackagePojo.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmPackagePojo.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmRepoConf.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmRepoConf.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmRepoConf.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmRepoConf.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmVersion.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmVersion.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmVersion.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/RpmVersion.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/XmlIndex.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/XmlIndex.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/XmlIndex.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/pojo/XmlIndex.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmDebugService.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmDebugService.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmDebugService.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmDebugService.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmService.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmService.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmService.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmService.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmWebService.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmWebService.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmWebService.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/servcie/RpmWebService.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmCollectionUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmCollectionUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmCollectionUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmCollectionUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmConfiguration.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmConfiguration.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmConfiguration.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmConfiguration.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmHeaderUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmHeaderUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmHeaderUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmHeaderUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/FormatWithType.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/FormatWithType.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/FormatWithType.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/FormatWithType.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/LeadWithType.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/LeadWithType.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/LeadWithType.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/LeadWithType.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/RpmFormat.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/RpmFormat.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/RpmFormat.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/redline/model/RpmFormat.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmFormatUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmFormatUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmFormatUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmFormatUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmMetadataUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmMetadataUtils.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmMetadataUtils.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/rpm/RpmMetadataUtils.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/XStreamUtil.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/XStreamUtil.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/XStreamUtil.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/XStreamUtil.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChangeLog.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChangeLog.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChangeLog.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChangeLog.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChecksum.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChecksum.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChecksum.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmChecksum.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmEntry.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmEntry.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmEntry.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmEntry.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFile.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFile.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFile.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFile.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFormat.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFormat.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFormat.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmFormat.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmHeaderRange.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmHeaderRange.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmHeaderRange.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmHeaderRange.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmLocation.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmLocation.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmLocation.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmLocation.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadata.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadata.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadata.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadata.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataChangeLog.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataChangeLog.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataChangeLog.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataChangeLog.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataFileList.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataFileList.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataFileList.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmMetadataFileList.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackage.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackage.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackage.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackage.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageChangeLog.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageChangeLog.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageChangeLog.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageChangeLog.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageFileList.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageFileList.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageFileList.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmPackageFileList.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmSize.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmSize.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmSize.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmSize.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmTime.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmTime.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmTime.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmTime.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmVersion.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmVersion.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmVersion.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmVersion.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlMetadata.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlMetadata.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlMetadata.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlMetadata.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlPackage.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlPackage.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlPackage.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/pojo/RpmXmlPackage.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoData.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoData.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoData.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoData.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoGroup.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoGroup.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoGroup.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoGroup.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoIndex.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoIndex.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoIndex.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/RepoIndex.kt diff --git a/src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/Repomd.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/Repomd.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/Repomd.kt rename to src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/xStream/repomd/Repomd.kt diff --git a/src/backend/rpm/biz-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtilsTest.kt b/src/backend/core/rpm/biz-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtilsTest.kt similarity index 100% rename from src/backend/rpm/biz-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtilsTest.kt rename to src/backend/core/rpm/biz-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmVersionUtilsTest.kt diff --git a/src/backend/rpm/boot-rpm/build.gradle.kts b/src/backend/core/rpm/boot-rpm/build.gradle.kts similarity index 97% rename from src/backend/rpm/boot-rpm/build.gradle.kts rename to src/backend/core/rpm/boot-rpm/build.gradle.kts index 59d8d978d6..79bb94b884 100644 --- a/src/backend/rpm/boot-rpm/build.gradle.kts +++ b/src/backend/core/rpm/boot-rpm/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - api(project(":rpm:biz-rpm")) + api(project(":core:rpm:biz-rpm")) } diff --git a/src/backend/rpm/boot-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/RpmApplication.kt b/src/backend/core/rpm/boot-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/RpmApplication.kt similarity index 100% rename from src/backend/rpm/boot-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/RpmApplication.kt rename to src/backend/core/rpm/boot-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/RpmApplication.kt diff --git a/src/backend/rpm/boot-rpm/src/main/resources/bootstrap.yml b/src/backend/core/rpm/boot-rpm/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/rpm/boot-rpm/src/main/resources/bootstrap.yml rename to src/backend/core/rpm/boot-rpm/src/main/resources/bootstrap.yml diff --git a/src/backend/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmStringUtilsTest.kt b/src/backend/core/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmStringUtilsTest.kt similarity index 100% rename from src/backend/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmStringUtilsTest.kt rename to src/backend/core/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/RpmStringUtilsTest.kt diff --git a/src/backend/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtilsTest.kt b/src/backend/core/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtilsTest.kt similarity index 100% rename from src/backend/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtilsTest.kt rename to src/backend/core/rpm/boot-rpm/src/test/kotlin/com/tencent/bkrepo/rpm/util/XmlStrUtilsTest.kt diff --git a/src/backend/rpm/build.gradle.kts b/src/backend/core/rpm/build.gradle.kts similarity index 100% rename from src/backend/rpm/build.gradle.kts rename to src/backend/core/rpm/build.gradle.kts diff --git a/src/backend/s3/api-s3/build.gradle.kts b/src/backend/core/s3/api-s3/build.gradle.kts similarity index 100% rename from src/backend/s3/api-s3/build.gradle.kts rename to src/backend/core/s3/api-s3/build.gradle.kts diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3ArtifactInfo.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3ArtifactInfo.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3ArtifactInfo.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3ArtifactInfo.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/Constants.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/Constants.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/Constants.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/Constants.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3ErrorTypes.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3ErrorTypes.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3ErrorTypes.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3ErrorTypes.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3HttpHeaders.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3HttpHeaders.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3HttpHeaders.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3HttpHeaders.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3MessageCode.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3MessageCode.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3MessageCode.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/constant/S3MessageCode.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/CopyObjectResult.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/CopyObjectResult.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/CopyObjectResult.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/CopyObjectResult.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/ListBucketResult.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/ListBucketResult.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/ListBucketResult.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/ListBucketResult.kt diff --git a/src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/VersioningConfiguration.kt b/src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/VersioningConfiguration.kt similarity index 100% rename from src/backend/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/VersioningConfiguration.kt rename to src/backend/core/s3/api-s3/src/main/kotlin/com/tencent/bkrepo/s3/pojo/VersioningConfiguration.kt diff --git a/src/backend/s3/biz-s3/build.gradle.kts b/src/backend/core/s3/biz-s3/build.gradle.kts similarity index 97% rename from src/backend/s3/biz-s3/build.gradle.kts rename to src/backend/core/s3/biz-s3/build.gradle.kts index 730ea084e9..6a04131b31 100644 --- a/src/backend/s3/biz-s3/build.gradle.kts +++ b/src/backend/core/s3/biz-s3/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":s3:api-s3")) + api(project(":core:s3:api-s3")) api(project(":common:common-generic")) api(project(":common:common-artifact:artifact-service")) api("org.dom4j:dom4j:${Versions.Dom4j}") diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3LocalRepository.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3LocalRepository.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3LocalRepository.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3LocalRepository.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3RemoteRepository.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3RemoteRepository.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3RemoteRepository.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3RemoteRepository.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3VirtualRepository.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3VirtualRepository.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3VirtualRepository.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/S3VirtualRepository.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthCredentials.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthCredentials.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthCredentials.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthCredentials.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthHandler.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthHandler.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthHandler.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AWS4AuthHandler.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AbstractAuthValidator.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AbstractAuthValidator.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AbstractAuthValidator.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/AbstractAuthValidator.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/CacheAuthValidator.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/CacheAuthValidator.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/CacheAuthValidator.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/CacheAuthValidator.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/PasswordAuthValidator.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/PasswordAuthValidator.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/PasswordAuthValidator.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/PasswordAuthValidator.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/TokenAuthValidator.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/TokenAuthValidator.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/TokenAuthValidator.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/auth/TokenAuthValidator.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3ArtifactInfoResolver.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3ArtifactInfoResolver.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3ArtifactInfoResolver.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3ArtifactInfoResolver.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3RegistryArtifactConfigurer.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3RegistryArtifactConfigurer.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3RegistryArtifactConfigurer.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/S3RegistryArtifactConfigurer.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ExceptionCommonResponse.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ExceptionCommonResponse.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ExceptionCommonResponse.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ExceptionCommonResponse.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/AWS4AuthUtil.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/AWS4AuthUtil.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/AWS4AuthUtil.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/AWS4AuthUtil.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/ContextUtil.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/ContextUtil.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/ContextUtil.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/utils/ContextUtil.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/config/S3WebConfig.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/config/S3WebConfig.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/config/S3WebConfig.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/config/S3WebConfig.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/controller/S3ObjectController.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/controller/S3ObjectController.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/controller/S3ObjectController.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/controller/S3ObjectController.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/AWS4AuthenticationException.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/AWS4AuthenticationException.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/AWS4AuthenticationException.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/AWS4AuthenticationException.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3AccessDeniedException.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3AccessDeniedException.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3AccessDeniedException.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3AccessDeniedException.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3ExceptionHandler.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3ExceptionHandler.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3ExceptionHandler.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3ExceptionHandler.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3InternalException.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3InternalException.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3InternalException.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3InternalException.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3NotFoundException.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3NotFoundException.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3NotFoundException.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/exception/S3NotFoundException.kt diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt similarity index 99% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt index dd150e898d..674f8cfc14 100644 --- a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt +++ b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/service/S3ObjectService.kt @@ -52,7 +52,6 @@ import com.tencent.bkrepo.common.artifact.audit.NODE_CREATE_ACTION import com.tencent.bkrepo.common.artifact.audit.NODE_DOWNLOAD_ACTION import com.tencent.bkrepo.common.artifact.audit.NODE_RESOURCE import com.tencent.bkrepo.common.artifact.audit.NODE_VIEW_ACTION -import com.tencent.bkrepo.common.artifact.audit.NODE_CREATE_ACTION import com.tencent.bkrepo.common.generic.configuration.AutoIndexRepositorySettings import com.tencent.bkrepo.common.metadata.service.metadata.MetadataService import com.tencent.bkrepo.common.metadata.service.node.NodeSearchService diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/utils/TimeUtil.kt b/src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/utils/TimeUtil.kt similarity index 100% rename from src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/utils/TimeUtil.kt rename to src/backend/core/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/utils/TimeUtil.kt diff --git a/src/backend/s3/biz-s3/src/main/resources/i18n/messages_en.properties b/src/backend/core/s3/biz-s3/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/s3/biz-s3/src/main/resources/i18n/messages_en.properties rename to src/backend/core/s3/biz-s3/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/s3/biz-s3/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/s3/biz-s3/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/s3/biz-s3/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/s3/biz-s3/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/s3/biz-s3/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/s3/biz-s3/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/s3/biz-s3/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/s3/biz-s3/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/git/boot-git/build.gradle.kts b/src/backend/core/s3/boot-s3/build.gradle.kts similarity index 96% rename from src/backend/git/boot-git/build.gradle.kts rename to src/backend/core/s3/boot-s3/build.gradle.kts index f6e16dcd89..f58cbce580 100644 --- a/src/backend/git/boot-git/build.gradle.kts +++ b/src/backend/core/s3/boot-s3/build.gradle.kts @@ -30,5 +30,5 @@ */ dependencies { - implementation(project(":git:biz-git")) + implementation(project(":core:s3:biz-s3")) } diff --git a/src/backend/s3/boot-s3/src/main/kotlin/com/tencent/bkrepo/s3/S3Application.kt b/src/backend/core/s3/boot-s3/src/main/kotlin/com/tencent/bkrepo/s3/S3Application.kt similarity index 100% rename from src/backend/s3/boot-s3/src/main/kotlin/com/tencent/bkrepo/s3/S3Application.kt rename to src/backend/core/s3/boot-s3/src/main/kotlin/com/tencent/bkrepo/s3/S3Application.kt diff --git a/src/backend/s3/boot-s3/src/main/resources/bootstrap.yml b/src/backend/core/s3/boot-s3/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/s3/boot-s3/src/main/resources/bootstrap.yml rename to src/backend/core/s3/boot-s3/src/main/resources/bootstrap.yml diff --git a/src/backend/s3/build.gradle.kts b/src/backend/core/s3/build.gradle.kts similarity index 100% rename from src/backend/s3/build.gradle.kts rename to src/backend/core/s3/build.gradle.kts diff --git a/src/backend/svn/api-svn/build.gradle.kts b/src/backend/core/svn/api-svn/build.gradle.kts similarity index 100% rename from src/backend/svn/api-svn/build.gradle.kts rename to src/backend/core/svn/api-svn/build.gradle.kts diff --git a/src/backend/svn/biz-svn/build.gradle.kts b/src/backend/core/svn/biz-svn/build.gradle.kts similarity index 97% rename from src/backend/svn/biz-svn/build.gradle.kts rename to src/backend/core/svn/biz-svn/build.gradle.kts index 828e523b61..4544099e0a 100644 --- a/src/backend/svn/biz-svn/build.gradle.kts +++ b/src/backend/core/svn/biz-svn/build.gradle.kts @@ -26,7 +26,7 @@ */ dependencies { - api(project(":svn:api-svn")) + api(project(":core:svn:api-svn")) api(project(":common:common-service:service-servlet")) implementation(project(":common:common-api")) implementation(project(":common:common-artifact:artifact-service")) diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/UserProxyController.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/UserProxyController.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/UserProxyController.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/UserProxyController.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/SvnArtifactConfigurer.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/SvnArtifactConfigurer.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/SvnArtifactConfigurer.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/SvnArtifactConfigurer.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnLocalRepository.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnLocalRepository.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnLocalRepository.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnLocalRepository.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnRemoteRepository.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnRemoteRepository.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnRemoteRepository.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnRemoteRepository.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnVirtualRepository.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnVirtualRepository.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnVirtualRepository.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/artifact/repository/SvnVirtualRepository.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnConfiguration.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnConfiguration.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnConfiguration.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnConfiguration.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnProperties.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnProperties.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnProperties.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/config/SvnProperties.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ProxyInterceptor.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ProxyInterceptor.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ProxyInterceptor.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ProxyInterceptor.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/SvnDevXAccessInterceptor.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/SvnDevXAccessInterceptor.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/SvnDevXAccessInterceptor.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/SvnDevXAccessInterceptor.kt diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/utils/SvnProxyHelper.kt b/src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/utils/SvnProxyHelper.kt similarity index 100% rename from src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/utils/SvnProxyHelper.kt rename to src/backend/core/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/utils/SvnProxyHelper.kt diff --git a/src/backend/svn/biz-svn/src/test/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorFilterTest.kt b/src/backend/core/svn/biz-svn/src/test/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorFilterTest.kt similarity index 100% rename from src/backend/svn/biz-svn/src/test/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorFilterTest.kt rename to src/backend/core/svn/biz-svn/src/test/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorFilterTest.kt diff --git a/src/backend/svn/biz-svn/src/test/resources/testdata/test.xml b/src/backend/core/svn/biz-svn/src/test/resources/testdata/test.xml similarity index 100% rename from src/backend/svn/biz-svn/src/test/resources/testdata/test.xml rename to src/backend/core/svn/biz-svn/src/test/resources/testdata/test.xml diff --git a/src/backend/svn/boot-svn/build.gradle.kts b/src/backend/core/svn/boot-svn/build.gradle.kts similarity index 96% rename from src/backend/svn/boot-svn/build.gradle.kts rename to src/backend/core/svn/boot-svn/build.gradle.kts index 14d887eb32..25a6ba609d 100644 --- a/src/backend/svn/boot-svn/build.gradle.kts +++ b/src/backend/core/svn/boot-svn/build.gradle.kts @@ -26,5 +26,5 @@ */ dependencies { - implementation(project(":svn:biz-svn")) + implementation(project(":core:svn:biz-svn")) } diff --git a/src/backend/svn/boot-svn/src/main/kotlin/com/tencent/bkrepo/svn/SvnApplication.kt b/src/backend/core/svn/boot-svn/src/main/kotlin/com/tencent/bkrepo/svn/SvnApplication.kt similarity index 100% rename from src/backend/svn/boot-svn/src/main/kotlin/com/tencent/bkrepo/svn/SvnApplication.kt rename to src/backend/core/svn/boot-svn/src/main/kotlin/com/tencent/bkrepo/svn/SvnApplication.kt diff --git a/src/backend/svn/boot-svn/src/main/resources/bootstrap.yml b/src/backend/core/svn/boot-svn/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/svn/boot-svn/src/main/resources/bootstrap.yml rename to src/backend/core/svn/boot-svn/src/main/resources/bootstrap.yml diff --git a/src/backend/svn/build.gradle.kts b/src/backend/core/svn/build.gradle.kts similarity index 100% rename from src/backend/svn/build.gradle.kts rename to src/backend/core/svn/build.gradle.kts diff --git a/src/backend/webhook/api-webhook/build.gradle.kts b/src/backend/core/webhook/api-webhook/build.gradle.kts similarity index 100% rename from src/backend/webhook/api-webhook/build.gradle.kts rename to src/backend/core/webhook/api-webhook/build.gradle.kts diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/AssociationType.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/AssociationType.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/AssociationType.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/AssociationType.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/WebHookRequestStatus.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/WebHookRequestStatus.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/WebHookRequestStatus.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/constant/WebHookRequestStatus.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/exception/WebHookMessageCode.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/exception/WebHookMessageCode.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/exception/WebHookMessageCode.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/exception/WebHookMessageCode.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/CreateWebHookRequest.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/CreateWebHookRequest.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/CreateWebHookRequest.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/CreateWebHookRequest.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/ListWebHookLogOption.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/ListWebHookLogOption.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/ListWebHookLogOption.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/ListWebHookLogOption.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/UpdateWebHookRequest.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/UpdateWebHookRequest.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/UpdateWebHookRequest.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/UpdateWebHookRequest.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHook.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHook.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHook.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHook.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHookLog.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHookLog.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHookLog.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/WebHookLog.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/CommonEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/CommonEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/CommonEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/CommonEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataDeletedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataDeletedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataDeletedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataDeletedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataSavedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataSavedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataSavedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/metadata/MetedataSavedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCopiedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCopiedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCopiedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCopiedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCreatedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCreatedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCreatedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeCreatedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDeletedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDeletedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDeletedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDeletedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDownloadedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDownloadedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDownloadedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeDownloadedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeMovedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeMovedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeMovedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeMovedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeRenamedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeRenamedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeRenamedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/node/NodeRenamedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/project/ProjectCreatedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/project/ProjectCreatedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/project/ProjectCreatedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/project/ProjectCreatedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoCreatedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoCreatedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoCreatedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoCreatedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoDeletedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoDeletedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoDeletedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoDeletedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoUpdatedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoUpdatedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoUpdatedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/repo/RepoUpdatedEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/test/WebHookTestEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/test/WebHookTestEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/test/WebHookTestEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/test/WebHookTestEventPayload.kt diff --git a/src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/version/VersionCreatedEventPayload.kt b/src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/version/VersionCreatedEventPayload.kt similarity index 100% rename from src/backend/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/version/VersionCreatedEventPayload.kt rename to src/backend/core/webhook/api-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/pojo/payload/version/VersionCreatedEventPayload.kt diff --git a/src/backend/webhook/biz-webhook/build.gradle.kts b/src/backend/core/webhook/biz-webhook/build.gradle.kts similarity index 97% rename from src/backend/webhook/biz-webhook/build.gradle.kts rename to src/backend/core/webhook/biz-webhook/build.gradle.kts index 5bce62dac3..8f0f589dbb 100644 --- a/src/backend/webhook/biz-webhook/build.gradle.kts +++ b/src/backend/core/webhook/biz-webhook/build.gradle.kts @@ -30,7 +30,7 @@ */ dependencies { - api(project(":webhook:api-webhook")) + api(project(":core:webhook:api-webhook")) api(project(":common:common-job")) api(project(":common:common-stream")) api(project(":common:common-artifact:artifact-service")) diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConfigurer.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConfigurer.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConfigurer.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConfigurer.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConsumerConfig.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConsumerConfig.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConsumerConfig.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookConsumerConfig.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookProperties.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookProperties.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookProperties.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/config/WebHookProperties.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserLogController.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserLogController.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserLogController.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserLogController.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserWebHookController.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserWebHookController.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserWebHookController.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/controller/UserWebHookController.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookDao.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookDao.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookDao.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookDao.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookLogDao.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookLogDao.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookLogDao.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/dao/WebHookLogDao.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/event/WebHookTestEvent.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/event/WebHookTestEvent.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/event/WebHookTestEvent.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/event/WebHookTestEvent.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebHookExecutor.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebHookExecutor.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebHookExecutor.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebHookExecutor.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebhookArtifactEventConsumer.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebhookArtifactEventConsumer.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebhookArtifactEventConsumer.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/executor/WebhookArtifactEventConsumer.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/MetricsConstant.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/MetricsConstant.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/MetricsConstant.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/MetricsConstant.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/WebHookMetrics.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/WebHookMetrics.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/WebHookMetrics.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/metrics/WebHookMetrics.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHook.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHook.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHook.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHook.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHookLog.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHookLog.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHookLog.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/model/TWebHookLog.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/EventPayloadFactory.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/EventPayloadFactory.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/EventPayloadFactory.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/EventPayloadFactory.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/EventPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/EventPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/EventPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/EventPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataDeletedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataDeletedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataDeletedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataDeletedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataSavedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataSavedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataSavedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/metedata/MetadataSavedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCopiedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCopiedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCopiedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCopiedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCreatedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCreatedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCreatedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeCreatedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDeletedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDeletedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDeletedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDeletedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDownloadedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDownloadedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDownloadedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeDownloadedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeMovedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeMovedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeMovedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeMovedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodePayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodePayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodePayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodePayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeRenamedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeRenamedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeRenamedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/node/NodeRenamedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/project/ProjectCreatedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/project/ProjectCreatedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/project/ProjectCreatedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/project/ProjectCreatedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoCreatedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoCreatedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoCreatedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoCreatedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoDeletedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoDeletedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoDeletedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoDeletedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoUpdatedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoUpdatedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoUpdatedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/repo/RepoUpdatedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/test/TestPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/test/TestPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/test/TestPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/test/TestPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/version/VersionCreatedPayloadBuilder.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/version/VersionCreatedPayloadBuilder.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/version/VersionCreatedPayloadBuilder.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/payload/builder/version/VersionCreatedPayloadBuilder.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/LogService.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/LogService.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/LogService.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/LogService.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/WebHookService.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/WebHookService.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/WebHookService.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/WebHookService.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/LogServiceImpl.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/LogServiceImpl.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/LogServiceImpl.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/LogServiceImpl.kt diff --git a/src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/WebHookServiceImpl.kt b/src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/WebHookServiceImpl.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/WebHookServiceImpl.kt rename to src/backend/core/webhook/biz-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/service/impl/WebHookServiceImpl.kt diff --git a/src/backend/webhook/biz-webhook/src/main/resources/i18n/messages_en.properties b/src/backend/core/webhook/biz-webhook/src/main/resources/i18n/messages_en.properties similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/resources/i18n/messages_en.properties rename to src/backend/core/webhook/biz-webhook/src/main/resources/i18n/messages_en.properties diff --git a/src/backend/webhook/biz-webhook/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/core/webhook/biz-webhook/src/main/resources/i18n/messages_zh_CN.properties similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/resources/i18n/messages_zh_CN.properties rename to src/backend/core/webhook/biz-webhook/src/main/resources/i18n/messages_zh_CN.properties diff --git a/src/backend/webhook/biz-webhook/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/core/webhook/biz-webhook/src/main/resources/i18n/messages_zh_TW.properties similarity index 100% rename from src/backend/webhook/biz-webhook/src/main/resources/i18n/messages_zh_TW.properties rename to src/backend/core/webhook/biz-webhook/src/main/resources/i18n/messages_zh_TW.properties diff --git a/src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConfiguration.kt b/src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConfiguration.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConfiguration.kt rename to src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConfiguration.kt diff --git a/src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConstants.kt b/src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConstants.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConstants.kt rename to src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/WebHookTestConstants.kt diff --git a/src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/ServiceBaseTest.kt b/src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/ServiceBaseTest.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/ServiceBaseTest.kt rename to src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/ServiceBaseTest.kt diff --git a/src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/WebHookServiceTest.kt b/src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/WebHookServiceTest.kt similarity index 100% rename from src/backend/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/WebHookServiceTest.kt rename to src/backend/core/webhook/biz-webhook/src/test/kotlin/com/tencent/bkrepo/webhook/service/WebHookServiceTest.kt diff --git a/src/backend/webhook/biz-webhook/src/test/resources/bootstrap-ut.properties b/src/backend/core/webhook/biz-webhook/src/test/resources/bootstrap-ut.properties similarity index 100% rename from src/backend/webhook/biz-webhook/src/test/resources/bootstrap-ut.properties rename to src/backend/core/webhook/biz-webhook/src/test/resources/bootstrap-ut.properties diff --git a/src/backend/oci/boot-oci/build.gradle.kts b/src/backend/core/webhook/boot-webhook/build.gradle.kts similarity index 97% rename from src/backend/oci/boot-oci/build.gradle.kts rename to src/backend/core/webhook/boot-webhook/build.gradle.kts index 306530c64a..430c1c1d46 100644 --- a/src/backend/oci/boot-oci/build.gradle.kts +++ b/src/backend/core/webhook/boot-webhook/build.gradle.kts @@ -30,6 +30,5 @@ */ dependencies { - implementation(project(":oci:biz-oci")) + api(project(":core:webhook:biz-webhook")) } - diff --git a/src/backend/webhook/boot-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/WebHookApplication.kt b/src/backend/core/webhook/boot-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/WebHookApplication.kt similarity index 100% rename from src/backend/webhook/boot-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/WebHookApplication.kt rename to src/backend/core/webhook/boot-webhook/src/main/kotlin/com/tencent/bkrepo/webhook/WebHookApplication.kt diff --git a/src/backend/webhook/boot-webhook/src/main/resources/bootstrap.yml b/src/backend/core/webhook/boot-webhook/src/main/resources/bootstrap.yml similarity index 100% rename from src/backend/webhook/boot-webhook/src/main/resources/bootstrap.yml rename to src/backend/core/webhook/boot-webhook/src/main/resources/bootstrap.yml diff --git a/src/backend/webhook/build.gradle.kts b/src/backend/core/webhook/build.gradle.kts similarity index 100% rename from src/backend/webhook/build.gradle.kts rename to src/backend/core/webhook/build.gradle.kts diff --git a/src/backend/gradle/publish-api.gradle.kts b/src/backend/gradle/publish-api.gradle.kts index 98964b40c3..27aea6e2d2 100644 --- a/src/backend/gradle/publish-api.gradle.kts +++ b/src/backend/gradle/publish-api.gradle.kts @@ -34,7 +34,7 @@ listOf( ":common:common-artifact:artifact-api", ":common:common-query:query-api", ":common:common-storage:storage-api", - ":generic:api-generic", + ":core:generic:api-generic", ":repository:api-repository", ":auth:api-auth", ":replication:api-replication" diff --git a/src/backend/media/biz-media/build.gradle.kts b/src/backend/media/biz-media/build.gradle.kts index 08e58450fa..c1f4aadd67 100644 --- a/src/backend/media/biz-media/build.gradle.kts +++ b/src/backend/media/biz-media/build.gradle.kts @@ -1,6 +1,6 @@ dependencies { api(project(":common:common-artifact:artifact-service")) - api(project(":job:api-schedule")) + api(project(":core:job:api-schedule")) implementation("org.bytedeco:javacpp:${Versions.JavaCpp}") implementation("org.bytedeco:ffmpeg:${Versions.FFmpegPlatform}") implementation("org.bytedeco:javacpp:${Versions.JavaCpp}:windows-x86_64") diff --git a/src/backend/nuget/boot-nuget/build.gradle.kts b/src/backend/nuget/boot-nuget/build.gradle.kts deleted file mode 100644 index acfb6f5034..0000000000 --- a/src/backend/nuget/boot-nuget/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. - * - * A copy of the MIT License is included in this file. - * - * - * Terms of the MIT License: - * --------------------------------------------------- - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -dependencies { - implementation(project(":nuget:biz-nuget")) -} diff --git a/src/backend/opdata/boot-opdata/build.gradle.kts b/src/backend/opdata/boot-opdata/build.gradle.kts deleted file mode 100644 index 52ef8a7ba3..0000000000 --- a/src/backend/opdata/boot-opdata/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. - * - * A copy of the MIT License is included in this file. - * - * - * Terms of the MIT License: - * --------------------------------------------------- - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -dependencies { - implementation(project(":opdata:biz-opdata")) -} diff --git a/src/backend/pypi/boot-pypi/build.gradle.kts b/src/backend/pypi/boot-pypi/build.gradle.kts deleted file mode 100644 index 3400bd0597..0000000000 --- a/src/backend/pypi/boot-pypi/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. - * - * A copy of the MIT License is included in this file. - * - * - * Terms of the MIT License: - * --------------------------------------------------- - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -dependencies { - implementation(project(":pypi:biz-pypi")) -} diff --git a/src/backend/repository/biz-repository/build.gradle.kts b/src/backend/repository/biz-repository/build.gradle.kts index e992c620ab..b88afc4740 100644 --- a/src/backend/repository/biz-repository/build.gradle.kts +++ b/src/backend/repository/biz-repository/build.gradle.kts @@ -33,7 +33,7 @@ dependencies { api(project(":repository:api-repository")) api(project(":common:common-job")) api(project(":common:common-mongo")) - api(project(":analyst:api-analyst")) + api(project(":core:analyst:api-analyst")) api(project(":common:common-query:query-mongo")) api(project(":common:common-artifact:artifact-service")) implementation(project(":common:common-redis")) diff --git a/src/backend/s3/boot-s3/build.gradle.kts b/src/backend/s3/boot-s3/build.gradle.kts deleted file mode 100644 index 5e6c32b86a..0000000000 --- a/src/backend/s3/boot-s3/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. - * - * A copy of the MIT License is included in this file. - * - * - * Terms of the MIT License: - * --------------------------------------------------- - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -dependencies { - implementation(project(":s3:biz-s3")) -} diff --git a/src/backend/settings.gradle.kts b/src/backend/settings.gradle.kts index 8792746a34..6d17cc1d18 100644 --- a/src/backend/settings.gradle.kts +++ b/src/backend/settings.gradle.kts @@ -62,33 +62,33 @@ includeAll(":common:common-storage") includeAll(":common:common-query") includeAll(":common:common-artifact") includeAll(":common:common-notify") -includeAll(":composer") -includeAll(":generic") -includeAll(":helm") -includeAll(":maven") -includeAll(":npm") -includeAll(":nuget") -includeAll(":opdata") -includeAll(":pypi") +includeAll(":core:composer") +includeAll(":core:generic") +includeAll(":core:helm") +includeAll(":core:maven") +includeAll(":core:npm") +includeAll(":core:nuget") +includeAll(":core:opdata") +includeAll(":core:pypi") includeAll(":replication") includeAll(":repository") -includeAll(":rpm") -includeAll(":git") -includeAll(":oci") -includeAll(":webhook") -includeAll(":job") -includeAll(":analyst") -includeAll(":analysis-executor") +includeAll(":core:rpm") +includeAll(":core:git") +includeAll(":core:oci") +includeAll(":core:webhook") +includeAll(":core:job") +includeAll(":core:analyst") +includeAll(":core:analysis-executor") includeAll(":common:common-checker") -includeAll(":conan") +includeAll(":core:conan") includeAll(":fs") includeAll(":config") -includeAll(":lfs") -includeAll(":ddc") -includeAll(":svn") -includeAll(":archive") -includeAll(":s3") -includeAll(":router-controller") +includeAll(":core:lfs") +includeAll(":core:ddc") +includeAll(":core:svn") +includeAll(":core:archive") +includeAll(":core:s3") +includeAll(":core:router-controller") includeAll(":media") includeAll(":common:common-metadata") includeAll(":common:common-service") diff --git a/src/backend/webhook/boot-webhook/build.gradle.kts b/src/backend/webhook/boot-webhook/build.gradle.kts deleted file mode 100644 index 3d0ce38e94..0000000000 --- a/src/backend/webhook/boot-webhook/build.gradle.kts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. - * - * A copy of the MIT License is included in this file. - * - * - * Terms of the MIT License: - * --------------------------------------------------- - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -dependencies { - api(project(":webhook:biz-webhook")) -} From 4401758f9cb41d9bc7f3fda7d85c4119427302e9 Mon Sep 17 00:00:00 2001 From: zacYL <100330102+zacYL@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:58:33 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=99=90?= =?UTF-8?q?=E6=B5=81=E6=A8=A1=E5=9D=97=20#1539?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 增加限流功能#1539 * feat: 添加执行机器判断#1539 * feat: 代码调整#1539 * feat: 代码调整#1539 * feat: 针对带宽限流调整#1539 * feat: 只针对上传流量进行判断#1539 * feat: 添加测试代码#1539 * feat: 添加限流相关测试用例#1539 * feat: 测试代码调整#1539 * feat: 代码调整#1539 * feat: 上传限流调整#1539 * feat: 上传下载限流异常捕获#1539 * feat: 测试代码调整#1539 * feat: 测试代码调整#1539 * feat: 配置参数调整#1539 * feat: 由于redis expire只支持秒为单位,所以周期最小单位为秒#1539 * feat: contentLengthLong为-1的情况特殊处理#1539 * feat: 去掉多余引用#1539 * feat: 测试用例调整#1539 * feat: 时间参数从redisserver读取#1539 * feat: embeddedredis版本调整#1539 * feat: 测试用例调整#1539 * feat: 支持对url进行仓库维度限频#1539 * feat: 代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 代码回滚,因redis版本问题,获取统一时间逻辑调整#1539 * feat: 代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 异常显示调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 正则匹配规则修改#1539 * feat: 正则匹配规则修改#1539 * feat: 下载容量限制添加#1539 * feat: 后台增加限流配置页面 #2655 * feat: 后台增加限流配置页面 #2655 * feat: 代码调整#1539 * feat: 滑动窗口脚本调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: targets过滤调整#1539 * feat: 代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 读取项目仓库信息增加异常捕获#1539 * feat: 读取项目仓库信息增加异常捕获#1539 * feat: 使用globalexceptionhandler处理#1539 * feat: targets校验调整#1539 * feat: 测试代码调整#1539 * feat: 后台增加限流配置页面 #2655 * feat: 代码调整#1539 * feat: 代码调整#1539 * feat: 代码调整#1539 --------- Co-authored-by: lannoy0523 <46735290+lannoy0523@users.noreply.github.com> Co-authored-by: lannoy0523 <935275025@qq.com> --- .../common/api/exception/OverloadException.kt | 38 ++ .../common/api/message/CommonMessageCode.kt | 3 + .../resources/i18n/messages_en.properties | 3 + .../resources/i18n/messages_zh_CN.properties | 3 + .../resources/i18n/messages_zh_TW.properties | 3 + .../artifact-service/build.gradle.kts | 1 + .../resolve/ArtifactResolverConfiguration.kt | 11 +- .../resolve/file/ArtifactDataReceiver.kt | 53 +- .../resolve/file/ArtifactFileFactory.kt | 43 +- .../file/chunk/RandomAccessArtifactFile.kt | 6 +- .../file/multipart/MultipartArtifactFile.kt | 7 +- .../ArtifactFileMethodArgumentResolver.kt | 2 +- .../resolve/file/stream/StreamArtifactFile.kt | 8 +- .../AbstractArtifactResourceHandler.kt | 38 +- .../response/DefaultArtifactResourceWriter.kt | 34 +- .../common-ratelimiter/build.gradle.kts | 47 ++ .../RateLimiterAutoConfiguration.kt | 265 ++++++++ .../DistributedFixedWindowRateLimiter.kt | 79 +++ .../algorithm/DistributedLeakyRateLimiter.kt | 91 +++ .../DistributedSlidingWindowRateLimiter.kt | 94 +++ .../DistributedTokenBucketRateLimiter.kt | 91 +++ .../algorithm/FixedWindowRateLimiter.kt | 75 +++ .../ratelimiter/algorithm/LeakyRateLimiter.kt | 86 +++ .../ratelimiter/algorithm/RateLimiter.kt | 36 ++ .../algorithm/SlidingWindowRateLimiter.kt | 114 ++++ .../algorithm/TokenBucketRateLimiter.kt | 54 ++ .../config/RateLimiterProperties.kt | 51 ++ .../common/ratelimiter/constant/Constants.kt | 47 ++ .../common/ratelimiter/enums/Algorithms.kt | 38 ++ .../ratelimiter/enums/LimitDimension.kt | 44 ++ .../common/ratelimiter/enums/WorkScope.kt | 36 ++ .../exception/AcquireLockFailedException.kt | 39 ++ .../exception/InvalidResourceException.kt | 39 ++ .../MonitorRateLimiterInterceptorAdaptor.kt | 49 ++ .../RateLimitHandlerInterceptor.kt | 45 ++ .../interceptor/RateLimiterInterceptor.kt | 49 ++ .../RateLimiterInterceptorAdapter.kt | 42 ++ .../RateLimiterInterceptorChain.kt | 73 +++ .../TargetRateLimiterInterceptorAdaptor.kt | 51 ++ .../common/ratelimiter/metrics/MetricType.kt | 38 ++ .../ratelimiter/metrics/RateLimiterMetrics.kt | 97 +++ .../model/RateLimitCreatOrUpdateRequest.kt | 54 ++ .../common/ratelimiter/model/TRateLimit.kt | 71 +++ .../common/ratelimiter/redis/LuaScript.kt | 68 +++ .../repository/RateLimitRepository.kt | 88 +++ .../ratelimiter/rule/PathResourceLimitRule.kt | 216 +++++++ .../common/ratelimiter/rule/RateLimitRule.kt | 66 ++ .../bandwidth/BandwidthResourceLimitRule.kt | 63 ++ .../DownloadBandwidthRateLimitRule.kt | 55 ++ .../bandwidth/UploadBandwidthRateLimitRule.kt | 96 +++ .../ratelimiter/rule/common/PathNode.kt | 53 ++ .../common/ratelimiter/rule/common/ResInfo.kt | 37 ++ .../ratelimiter/rule/common/ResLimitInfo.kt | 38 ++ .../ratelimiter/rule/common/ResourceLimit.kt | 55 ++ .../ratelimiter/rule/url/UrlRateLimitRule.kt | 97 +++ .../rule/url/UrlRepoRateLimitRule.kt | 98 +++ .../rule/url/UrlResourceLimitRule.kt | 60 ++ .../rule/url/user/UserUrlRateLimitRule.kt | 128 ++++ .../rule/url/user/UserUrlRepoRateLimitRule.kt | 138 +++++ .../url/user/UserUrlRepoResourceLimitRule.kt | 72 +++ .../rule/url/user/UserUrlResourceLimitRule.kt | 74 +++ .../rule/usage/DownloadUsageRateLimitRule.kt | 55 ++ .../rule/usage/UploadUsageRateLimitRule.kt | 98 +++ .../user/UserDownloadUsageRateLimitRule.kt | 57 ++ .../user/UserUploadUsageRateLimitRule.kt | 140 +++++ .../usage/user/UserUsageResourceLimitRule.kt | 78 +++ .../AbstractBandwidthRateLimiterService.kt | 158 +++++ .../service/AbstractRateLimiterService.kt | 560 +++++++++++++++++ .../ratelimiter/service/RateLimiterService.kt | 47 ++ .../service/RequestLimitCheckService.kt | 176 ++++++ .../DownloadBandwidthRateLimiterService.kt | 76 +++ .../UploadBandwidthRateLimiterService.kt | 101 +++ .../service/url/UrlRateLimiterService.kt | 85 +++ .../service/url/UrlRepoRateLimiterService.kt | 112 ++++ .../url/user/UserUrlRateLimiterService.kt | 90 +++ .../url/user/UserUrlRepoRateLimiterService.kt | 118 ++++ .../usage/DownloadUsageRateLimiterService.kt | 84 +++ .../usage/UploadUsageRateLimiterService.kt | 110 ++++ .../UserDownloadUsageRateLimiterService.kt | 84 +++ .../user/UserUploadUsageRateLimiterService.kt | 115 ++++ .../service/user/RateLimiterConfigService.kt | 139 +++++ .../stream/CommonRateLimitInputStream.kt | 127 ++++ .../ratelimiter/stream/RateCheckContext.kt | 40 ++ .../ratelimiter/utils/ResourcePathUtils.kt | 99 +++ .../main/resources/META-INF/spring.factories | 2 + .../resources/fix-window-rate-limiter.lua | 14 + .../src/main/resources/leaky-rate-limiter.lua | 58 ++ .../resources/sliding-window-rate-limiter.lua | 36 ++ .../resources/token-bucket-rate-limiter.lua | 51 ++ .../RateLimiterAutoConfigurationTest.kt | 35 ++ .../DistributedFixedWindowRateLimiterTest.kt | 105 ++++ .../DistributedLeakyRateLimiterTest.kt | 105 ++++ ...DistributedSlidingWindowRateLimiterTest.kt | 101 +++ .../ratelimiter/algorithm/DistributedTest.kt | 47 ++ .../DistributedTokenBucketRateLimiterTest.kt | 103 ++++ .../algorithm/FixedWindowRateLimiterTest.kt | 106 ++++ .../algorithm/LeakyRateLimiterTest.kt | 91 +++ .../algorithm/RedisTestConfiguration.kt | 49 ++ .../algorithm/SlidingWindowRateLimiterTest.kt | 92 +++ .../algorithm/TokenBucketRateLimiterTest.kt | 97 +++ .../RateLimiterInterceptorChainTest.kt | 151 +++++ .../common/ratelimiter/rule/BaseRuleTest.kt | 44 ++ .../DownloadBandwidthRateLimitRuleTest.kt | 236 +++++++ .../UploadBandwidthRateLimitRuleTest.kt | 236 +++++++ .../rule/url/UrlRateLimitRuleTest.kt | 296 +++++++++ .../rule/url/UrlRepoRateLimitRuleTest.kt | 236 +++++++ .../rule/url/user/UserUrlRateLimitRuleTest.kt | 339 ++++++++++ .../url/user/UserUrlRepoRateLimitRuleTest.kt | 340 +++++++++++ .../usage/DownloadUsageRateLimitRuleTest.kt | 236 +++++++ .../usage/UploadUsageRateLimitRuleTest.kt | 236 +++++++ .../UserDownloadUsageRateLimitRuleTest.kt | 340 +++++++++++ .../user/UserUploadUsageRateLimitRuleTest.kt | 340 +++++++++++ .../service/AbstractRateLimiterServiceTest.kt | 275 +++++++++ ...DownloadBandwidthRateLimiterServiceTest.kt | 239 ++++++++ .../UploadBandwidthRateLimiterServiceTest.kt | 295 +++++++++ .../service/url/UrlRateLimiterServiceTest.kt | 215 +++++++ .../url/UrlRepoRateLimiterServiceTest.kt | 287 +++++++++ .../url/user/UserUrlRateLimiterServiceTest.kt | 263 ++++++++ .../user/UserUrlRepoRateLimiterServiceTest.kt | 337 ++++++++++ .../DownloadUsageRateLimiterServiceTest.kt | 262 ++++++++ .../UploadUsageRateLimiterServiceTest.kt | 263 ++++++++ ...UserDownloadUsageRateLimiterServiceTest.kt | 309 ++++++++++ .../UserUploadUsageRateLimiterServiceTest.kt | 298 +++++++++ .../stream/CommonRateLimitInputStreamTest.kt | 160 +++++ .../utils/ResourcePathUtilsTest.kt | 155 +++++ .../exception/GlobalExceptionHandler.kt | 20 + .../storage/config/ReceiveProperties.kt | 6 +- .../impl/ChartRepositoryServiceImpl.kt | 7 + .../oci/exception/OciExceptionHandler.kt | 12 +- .../opdata/controller/RateLimitController.kt | 118 ++++ .../bkrepo/replication/fdtp/FdtpAFTTest.kt | 11 +- .../configuration/ResourceWriterConfigurer.kt | 12 +- .../response/S3ArtifactResourceWriter.kt | 14 +- src/backend/settings.gradle.kts | 1 + src/frontend/devops-op/src/api/rateLimit.js | 51 ++ src/frontend/devops-op/src/router/index.js | 13 + .../src/views/rateLimitConfg/RateLimiter.vue | 246 ++++++++ .../CreateOrUpdateRateLimitDialog.vue | 577 ++++++++++++++++++ .../src/views/repoGeneric/index.vue | 5 + 139 files changed, 14911 insertions(+), 61 deletions(-) create mode 100644 src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/exception/OverloadException.kt create mode 100644 src/backend/common/common-ratelimiter/build.gradle.kts create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfiguration.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/config/RateLimiterProperties.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/constant/Constants.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/Algorithms.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/LimitDimension.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/WorkScope.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/AcquireLockFailedException.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/InvalidResourceException.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/MonitorRateLimiterInterceptorAdaptor.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimitHandlerInterceptor.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptor.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorAdapter.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChain.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/TargetRateLimiterInterceptorAdaptor.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/MetricType.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/RateLimiterMetrics.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/RateLimitCreatOrUpdateRequest.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/TRateLimit.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/redis/LuaScript.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/repository/RateLimitRepository.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/PathResourceLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/RateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/BandwidthResourceLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/PathNode.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResInfo.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResLimitInfo.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResourceLimit.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlResourceLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoResourceLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlResourceLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUsageResourceLimitRule.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractBandwidthRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RequestLimitCheckService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/user/RateLimiterConfigService.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStream.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/RateCheckContext.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtils.kt create mode 100644 src/backend/common/common-ratelimiter/src/main/resources/META-INF/spring.factories create mode 100644 src/backend/common/common-ratelimiter/src/main/resources/fix-window-rate-limiter.lua create mode 100644 src/backend/common/common-ratelimiter/src/main/resources/leaky-rate-limiter.lua create mode 100644 src/backend/common/common-ratelimiter/src/main/resources/sliding-window-rate-limiter.lua create mode 100644 src/backend/common/common-ratelimiter/src/main/resources/token-bucket-rate-limiter.lua create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfigurationTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RedisTestConfiguration.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiterTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChainTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/BaseRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRuleTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterServiceTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStreamTest.kt create mode 100644 src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtilsTest.kt create mode 100644 src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RateLimitController.kt create mode 100644 src/frontend/devops-op/src/api/rateLimit.js create mode 100644 src/frontend/devops-op/src/views/rateLimitConfg/RateLimiter.vue create mode 100644 src/frontend/devops-op/src/views/rateLimitConfg/components/CreateOrUpdateRateLimitDialog.vue diff --git a/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/exception/OverloadException.kt b/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/exception/OverloadException.kt new file mode 100644 index 0000000000..35150db7d7 --- /dev/null +++ b/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/exception/OverloadException.kt @@ -0,0 +1,38 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.api.exception + +import com.tencent.bkrepo.common.api.constant.HttpStatus +import com.tencent.bkrepo.common.api.message.CommonMessageCode + +/** + * 超过限流配置异常 + */ +class OverloadException( + val resource: String +) : ErrorCodeException(CommonMessageCode.RATE_LIMITER_OVERLOAD, resource, status = HttpStatus.TOO_MANY_REQUESTS) \ No newline at end of file diff --git a/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/message/CommonMessageCode.kt b/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/message/CommonMessageCode.kt index 84a3d35d8d..280eb767d8 100644 --- a/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/message/CommonMessageCode.kt +++ b/src/backend/common/common-api/src/main/kotlin/com/tencent/bkrepo/common/api/message/CommonMessageCode.kt @@ -61,6 +61,9 @@ enum class CommonMessageCode(private val key: String) : MessageCode { MEDIA_TYPE_UNACCEPTABLE("system.media-type.unacceptable"), TOO_MANY_REQUESTS("too.many.requests"), PIPELINE_NOT_RUNNING("pipeline.not-running"), + INVALID_CONFIG("system.config.invalid"), + ACQUIRE_LOCK_FAILED("acquire.lock.failed"), + RATE_LIMITER_OVERLOAD("rate.limiter.overload") ; override fun getBusinessCode() = ordinal + 1 diff --git a/src/backend/common/common-api/src/main/resources/i18n/messages_en.properties b/src/backend/common/common-api/src/main/resources/i18n/messages_en.properties index c5923db62d..1dbf17a2bd 100644 --- a/src/backend/common/common-api/src/main/resources/i18n/messages_en.properties +++ b/src/backend/common/common-api/src/main/resources/i18n/messages_en.properties @@ -55,3 +55,6 @@ operation.cross-cluster.not-allowed=Cross location operation is not allowed system.media-type.unacceptable=Unacceptable Media Type too.many.requests=Too Many Requests: {0} pipeline.not-running=Pipeline[{0}] is not running status +system.config.invalid=Config [{0}] is invalid +acquire.lock.failed=acquire lock failed:[{0}] +rate.limiter.overload=resource requests reached rate limit:[{0}] \ No newline at end of file diff --git a/src/backend/common/common-api/src/main/resources/i18n/messages_zh_CN.properties b/src/backend/common/common-api/src/main/resources/i18n/messages_zh_CN.properties index a298ce086a..afda36c8c1 100644 --- a/src/backend/common/common-api/src/main/resources/i18n/messages_zh_CN.properties +++ b/src/backend/common/common-api/src/main/resources/i18n/messages_zh_CN.properties @@ -55,3 +55,6 @@ operation.cross-cluster.not-allowed=不允许跨地点操作 system.media-type.unacceptable=不接受的Media Type too.many.requests=请求过多: {0} pipeline.not-running=流水线[{0}]不是运行状态 +system.config.invalid=配置[{0}]无效 +acquire.lock.failed=获取锁失败: [{0}] +rate.limiter.overload=资源请求量超过限流值: [{0}] \ No newline at end of file diff --git a/src/backend/common/common-api/src/main/resources/i18n/messages_zh_TW.properties b/src/backend/common/common-api/src/main/resources/i18n/messages_zh_TW.properties index 815c32bce1..bbac10f772 100644 --- a/src/backend/common/common-api/src/main/resources/i18n/messages_zh_TW.properties +++ b/src/backend/common/common-api/src/main/resources/i18n/messages_zh_TW.properties @@ -55,3 +55,6 @@ operation.cross-cluster.not-allowed=不允許跨地點操作 system.media-type.unacceptable=不接受的Media Type too.many.requests=請求過多: {0} pipeline.not-running=流水線[{0}]不是運行狀態 +system.config.invalid=配置[{0}]無效 +acquire.lock.failed=獲取鎖失敗: [{0}] +rate.limiter.overload=資源請求量超過限流值: [{0}] \ No newline at end of file diff --git a/src/backend/common/common-artifact/artifact-service/build.gradle.kts b/src/backend/common/common-artifact/artifact-service/build.gradle.kts index 20e2df9adc..5036f200fb 100644 --- a/src/backend/common/common-artifact/artifact-service/build.gradle.kts +++ b/src/backend/common/common-artifact/artifact-service/build.gradle.kts @@ -40,6 +40,7 @@ dependencies { api(project(":common:common-security")) api(project(":common:common-artifact:artifact-api")) api(project(":common:common-storage:storage-service")) + api(project(":common:common-ratelimiter")) api(project(":common:common-stream")) api(project(":common:common-metrics-push")) api(project(":common:common-metadata:metadata-service")) diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/ArtifactResolverConfiguration.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/ArtifactResolverConfiguration.kt index 22d3dbfb65..5bb8d5741b 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/ArtifactResolverConfiguration.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/ArtifactResolverConfiguration.kt @@ -39,6 +39,7 @@ import com.tencent.bkrepo.common.artifact.resolve.path.ResolverMap import com.tencent.bkrepo.common.artifact.resolve.response.ArtifactResourceWriter import com.tencent.bkrepo.common.artifact.resolve.response.DefaultArtifactResourceWriter import com.tencent.bkrepo.common.storage.config.StorageProperties +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration @@ -84,8 +85,14 @@ class ArtifactResolverConfiguration { @Bean @ConditionalOnMissingBean(ArtifactResourceWriter::class) - fun artifactResourceWriter(storageProperties: StorageProperties): ArtifactResourceWriter { - return DefaultArtifactResourceWriter(storageProperties) + fun artifactResourceWriter( + storageProperties: StorageProperties, + requestLimitCheckService: RequestLimitCheckService + ): ArtifactResourceWriter { + return DefaultArtifactResourceWriter( + storageProperties, + requestLimitCheckService + ) } @Bean diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactDataReceiver.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactDataReceiver.kt index 1fa20ddcc6..bcf75261e3 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactDataReceiver.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactDataReceiver.kt @@ -28,6 +28,7 @@ package com.tencent.bkrepo.common.artifact.resolve.file import com.tencent.bkrepo.common.api.constant.retry +import com.tencent.bkrepo.common.api.exception.OverloadException import com.tencent.bkrepo.common.artifact.exception.ArtifactReceiveException import com.tencent.bkrepo.common.artifact.hash.sha256 import com.tencent.bkrepo.common.artifact.metrics.ArtifactMetrics @@ -35,14 +36,15 @@ import com.tencent.bkrepo.common.artifact.metrics.TrafficHandler import com.tencent.bkrepo.common.artifact.stream.DigestCalculateListener import com.tencent.bkrepo.common.artifact.stream.rateLimit import com.tencent.bkrepo.common.artifact.util.http.IOExceptionUtils +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService +import com.tencent.bkrepo.common.ratelimiter.stream.CommonRateLimitInputStream +import com.tencent.bkrepo.common.storage.config.MonitorProperties import com.tencent.bkrepo.common.storage.config.ReceiveProperties import com.tencent.bkrepo.common.storage.core.locator.HashFileLocator -import com.tencent.bkrepo.common.storage.config.MonitorProperties import com.tencent.bkrepo.common.storage.monitor.StorageHealthMonitor import com.tencent.bkrepo.common.storage.monitor.Throughput import com.tencent.bkrepo.common.storage.util.createFile import com.tencent.bkrepo.common.storage.util.delete -import org.slf4j.LoggerFactory import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.io.IOException @@ -57,6 +59,7 @@ import java.security.SecureRandom import java.time.Duration import kotlin.math.abs import kotlin.system.measureTimeMillis +import org.slf4j.LoggerFactory /** * artifact数据接收类,作用: @@ -75,6 +78,8 @@ class ArtifactDataReceiver( private val filename: String = generateRandomName(), private val randomPath: Boolean = false, private val originPath: Path = path, + private val requestLimitCheckService: RequestLimitCheckService? = null, + private val contentLength: Long? = null, ) : StorageHealthMonitor.Observer, AutoCloseable { /** @@ -187,9 +192,15 @@ class ArtifactDataReceiver( startTime = System.nanoTime() } try { + requestLimitCheckService?.uploadBandwidthCheck( + length.toLong(), + receiveProperties.circuitBreakerThreshold + ) writeData(chunk, offset, length) } catch (exception: IOException) { handleIOException(exception) + } catch (overloadEx: OverloadException) { + handleOverloadException(overloadEx) } } @@ -203,6 +214,9 @@ class ArtifactDataReceiver( startTime = System.nanoTime() } try { + requestLimitCheckService?.uploadBandwidthCheck( + 1, receiveProperties.circuitBreakerThreshold + ) checkFallback() outputStream.write(b) listener.data(b) @@ -210,6 +224,8 @@ class ArtifactDataReceiver( checkThreshold() } catch (exception: IOException) { handleIOException(exception) + } catch (overloadEx: OverloadException) { + handleOverloadException(overloadEx) } } @@ -222,8 +238,13 @@ class ArtifactDataReceiver( if (startTime == 0L) { startTime = System.nanoTime() } + var rateLimitFlag = false + var exp: Exception? = null try { - val input = source.rateLimit(receiveProperties.rateLimit.toBytes()) + val input = requestLimitCheckService?.bandwidthCheck( + source, receiveProperties.circuitBreakerThreshold, contentLength + ) ?: source.rateLimit(receiveProperties.rateLimit.toBytes()) + rateLimitFlag = input is CommonRateLimitInputStream val buffer = ByteArray(bufferSize) input.use { var bytes = input.read(buffer) @@ -233,7 +254,15 @@ class ArtifactDataReceiver( } } } catch (exception: IOException) { + exp = exception handleIOException(exception) + } catch (overloadEx: OverloadException) { + exp = overloadEx + handleOverloadException(overloadEx) + } finally { + if (rateLimitFlag) { + requestLimitCheckService?.bandwidthFinish(exp) + } } } @@ -322,9 +351,7 @@ class ArtifactDataReceiver( * 处理IO异常 */ private fun handleIOException(exception: IOException) { - finished = true - endTime = System.nanoTime() - close() + finishWithException() if (IOExceptionUtils.isClientBroken(exception)) { throw ArtifactReceiveException(exception.message.orEmpty()) } else { @@ -332,6 +359,20 @@ class ArtifactDataReceiver( } } + /** + * 处理限流请求 + */ + private fun handleOverloadException(exception: OverloadException) { + finishWithException() + throw exception + } + + private fun finishWithException() { + finished = true + endTime = System.nanoTime() + close() + } + /** * 检查是否需要fall back操作 */ diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactFileFactory.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactFileFactory.kt index d99b4b93c5..90de9a6769 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactFileFactory.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/ArtifactFileFactory.kt @@ -37,6 +37,7 @@ import com.tencent.bkrepo.common.artifact.resolve.file.multipart.MultipartArtifa import com.tencent.bkrepo.common.artifact.resolve.file.stream.StreamArtifactFile import com.tencent.bkrepo.common.bksync.BlockChannel import com.tencent.bkrepo.common.storage.config.StorageProperties +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import com.tencent.bkrepo.common.storage.credentials.StorageCredentials import com.tencent.bkrepo.common.storage.monitor.StorageHealthMonitor import com.tencent.bkrepo.common.storage.monitor.StorageHealthMonitorHelper @@ -54,17 +55,20 @@ import java.io.InputStream class ArtifactFileFactory( storageProperties: StorageProperties, storageHealthMonitorHelper: StorageHealthMonitorHelper, + private val limitCheckService: RequestLimitCheckService ) { init { monitorHelper = storageHealthMonitorHelper properties = storageProperties + requestLimitCheckService = limitCheckService } companion object { private lateinit var monitorHelper: StorageHealthMonitorHelper private lateinit var properties: StorageProperties + private lateinit var requestLimitCheckService: RequestLimitCheckService const val ARTIFACT_FILES = "artifact.files" @@ -89,34 +93,49 @@ class ArtifactFileFactory( * 构造分块接收数据的artifact file */ fun buildChunked(): ChunkedArtifactFile { - return ChunkedArtifactFile(getMonitor(), properties, getStorageCredentials()).apply { + return ChunkedArtifactFile( + getMonitor(), properties, getStorageCredentials(), + ).apply { track(this) } } fun buildChunked(storageCredentials: StorageCredentials): ChunkedArtifactFile { - return ChunkedArtifactFile(getMonitor(storageCredentials), properties, storageCredentials).apply { + return ChunkedArtifactFile( + getMonitor(storageCredentials), properties, storageCredentials, + ).apply { track(this) } } fun buildDfsArtifactFile(): RandomAccessArtifactFile { - return RandomAccessArtifactFile(getMonitor(), getStorageCredentials(), properties).apply { + return RandomAccessArtifactFile( + getMonitor(), getStorageCredentials(), properties, + ).apply { + track(this) + } + } + + /** + * 通过输入流构造artifact file, 主要针对上传请求对其做限流操作 + * @param inputStream 输入流 + */ + fun buildWithRateLimiter(inputStream: InputStream, contentLength: Long? = null): ArtifactFile { + return StreamArtifactFile( + inputStream, getMonitor(), properties, getStorageCredentials(), contentLength, + requestLimitCheckService = requestLimitCheckService + ).apply { track(this) } } /** - * 通过输入流构造artifact file + * 通过输入流构造artifact file,服务内部输入流转换成文件使用 * @param inputStream 输入流 */ fun build(inputStream: InputStream, contentLength: Long? = null): ArtifactFile { return StreamArtifactFile( - inputStream, - getMonitor(), - properties, - getStorageCredentials(), - contentLength, + inputStream, getMonitor(), properties, getStorageCredentials(), contentLength ).apply { track(this) } @@ -137,10 +156,8 @@ class ArtifactFileFactory( */ fun build(multipartFile: MultipartFile, storageCredentials: StorageCredentials): ArtifactFile { return MultipartArtifactFile( - multipartFile, - getMonitor(storageCredentials), - properties, - storageCredentials, + multipartFile, getMonitor(storageCredentials), properties, storageCredentials, + requestLimitCheckService = requestLimitCheckService ).apply { track(this) } diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/chunk/RandomAccessArtifactFile.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/chunk/RandomAccessArtifactFile.kt index cbea40ee8b..1855681dcd 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/chunk/RandomAccessArtifactFile.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/chunk/RandomAccessArtifactFile.kt @@ -23,7 +23,7 @@ import java.nio.file.NoSuchFileException class RandomAccessArtifactFile( private val monitor: StorageHealthMonitor, private val storageCredentials: StorageCredentials, - storageProperties: StorageProperties + storageProperties: StorageProperties, ) : ArtifactFile { /** @@ -43,7 +43,9 @@ class RandomAccessArtifactFile( init { val path = storageCredentials.upload.location.toPath() - receiver = ArtifactDataReceiver(storageProperties.receive, storageProperties.monitor, path) + receiver = ArtifactDataReceiver( + storageProperties.receive, storageProperties.monitor, path, + ) monitor.add(receiver) if (!monitor.healthy.get()) { receiver.unhealthy(monitor.getFallbackPath(), monitor.fallBackReason) diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/multipart/MultipartArtifactFile.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/multipart/MultipartArtifactFile.kt index 657a4db3ce..75b207f496 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/multipart/MultipartArtifactFile.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/multipart/MultipartArtifactFile.kt @@ -29,6 +29,7 @@ package com.tencent.bkrepo.common.artifact.resolve.file.multipart import com.tencent.bkrepo.common.artifact.resolve.file.stream.StreamArtifactFile import com.tencent.bkrepo.common.storage.config.StorageProperties +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import com.tencent.bkrepo.common.storage.credentials.StorageCredentials import com.tencent.bkrepo.common.storage.monitor.StorageHealthMonitor import org.springframework.web.multipart.MultipartFile @@ -37,9 +38,11 @@ class MultipartArtifactFile( private val multipartFile: MultipartFile, monitor: StorageHealthMonitor, storageProperties: StorageProperties, - storageCredentials: StorageCredentials + storageCredentials: StorageCredentials, + requestLimitCheckService: RequestLimitCheckService ) : StreamArtifactFile( - multipartFile.inputStream, monitor, storageProperties, storageCredentials, multipartFile.size + multipartFile.inputStream, monitor, storageProperties, storageCredentials, multipartFile.size, + requestLimitCheckService ) { fun getOriginalFilename() = multipartFile.originalFilename.orEmpty() } diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/ArtifactFileMethodArgumentResolver.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/ArtifactFileMethodArgumentResolver.kt index 524fe08496..ed7d4e06ff 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/ArtifactFileMethodArgumentResolver.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/ArtifactFileMethodArgumentResolver.kt @@ -60,6 +60,6 @@ class ArtifactFileMethodArgumentResolver : HandlerMethodArgumentResolver { } private fun resolveOctetStream(request: HttpServletRequest): ArtifactFile { - return ArtifactFileFactory.build(request.inputStream, request.contentLengthLong) + return ArtifactFileFactory.buildWithRateLimiter(request.inputStream, request.contentLengthLong) } } diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/StreamArtifactFile.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/StreamArtifactFile.kt index f08f0c7445..dad470cfbc 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/StreamArtifactFile.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/file/stream/StreamArtifactFile.kt @@ -31,6 +31,7 @@ import com.tencent.bkrepo.common.artifact.api.ArtifactFile import com.tencent.bkrepo.common.artifact.event.ArtifactReceivedEvent import com.tencent.bkrepo.common.artifact.hash.sha1 import com.tencent.bkrepo.common.artifact.resolve.file.ArtifactDataReceiver +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import com.tencent.bkrepo.common.service.util.SpringContextUtils import com.tencent.bkrepo.common.storage.config.StorageProperties import com.tencent.bkrepo.common.storage.credentials.StorageCredentials @@ -47,7 +48,8 @@ open class StreamArtifactFile( private val monitor: StorageHealthMonitor, private val storageProperties: StorageProperties, private val storageCredentials: StorageCredentials, - private val contentLength: Long? = null + private val contentLength: Long? = null, + private val requestLimitCheckService: RequestLimitCheckService? = null ) : ArtifactFile { /** @@ -83,7 +85,9 @@ open class StreamArtifactFile( storageProperties.receive, storageProperties.monitor, receivePath, - randomPath = !useLocalPath + randomPath = !useLocalPath, + requestLimitCheckService = requestLimitCheckService, + contentLength = contentLength ) if (!storageProperties.receive.resolveLazily) { init() diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/AbstractArtifactResourceHandler.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/AbstractArtifactResourceHandler.kt index 403c4d16c4..cf7078da6a 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/AbstractArtifactResourceHandler.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/AbstractArtifactResourceHandler.kt @@ -36,6 +36,9 @@ import com.tencent.bkrepo.common.artifact.repository.context.ArtifactContextHold import com.tencent.bkrepo.common.artifact.stream.rateLimit import com.tencent.bkrepo.common.artifact.util.http.IOExceptionUtils import com.tencent.bkrepo.common.storage.config.StorageProperties +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService +import com.tencent.bkrepo.common.ratelimiter.stream.CommonRateLimitInputStream import com.tencent.bkrepo.common.storage.monitor.Throughput import com.tencent.bkrepo.common.storage.monitor.measureThroughput import org.slf4j.LoggerFactory @@ -47,7 +50,8 @@ import javax.servlet.http.HttpServletResponse abstract class AbstractArtifactResourceHandler( - private val storageProperties: StorageProperties + private val storageProperties: StorageProperties, + private val requestLimitCheckService: RequestLimitCheckService ) : ArtifactResourceWriter { /** * 获取动态buffer size @@ -88,6 +92,14 @@ abstract class AbstractArtifactResourceHandler( } } + /** + * 当仓库配置下载限速小于等于最低限速时则直接将请求断开, 避免占用过多连接 + */ + protected fun downloadRateLimitCheck(resource: ArtifactResource) { + val applyPermits = resource.getSingleStream().range.length + requestLimitCheckService.postLimitCheck(applyPermits) + } + /** * 将数据流以Range方式写入响应 */ @@ -100,13 +112,23 @@ abstract class AbstractArtifactResourceHandler( if (request.method == HttpMethod.HEAD.name) { return Throughput.EMPTY } + val length = inputStream.range.length + var rateLimitFlag = false + var exp: Exception? = null val recordAbleInputStream = RecordAbleInputStream(inputStream) try { return measureThroughput { - recordAbleInputStream.rateLimit(responseRateLimitWrapper(storageProperties.response.rateLimit)).use { + val stream = requestLimitCheckService.bandwidthCheck( + recordAbleInputStream, storageProperties.response.circuitBreakerThreshold, + length + ) ?: recordAbleInputStream.rateLimit( + responseRateLimitWrapper(storageProperties.response.rateLimit) + ) + rateLimitFlag = stream is CommonRateLimitInputStream + stream.use { it.copyTo( out = response.outputStream, - bufferSize = getBufferSize(inputStream.range.length) + bufferSize = getBufferSize(length) ) } } @@ -116,13 +138,21 @@ abstract class AbstractArtifactResourceHandler( // org.springframework.http.converter.HttpMessageNotWritableException异常,会重定向到/error页面 // 又因为/error页面不存在,最终返回404,所以要对IOException进行包装,在上一层捕捉处理 val message = exception.message.orEmpty() - val status = if (IOExceptionUtils.isClientBroken(exception)){ + val status = if (IOExceptionUtils.isClientBroken(exception)) { HttpStatus.BAD_REQUEST } else { logger.warn("write range stream failed", exception) HttpStatus.INTERNAL_SERVER_ERROR } + exp = exception throw ArtifactResponseException(message, status) + } catch (overloadEx: OverloadException) { + exp = overloadEx + throw overloadEx + } finally { + if (rateLimitFlag) { + requestLimitCheckService.bandwidthFinish(exp) + } } } diff --git a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/DefaultArtifactResourceWriter.kt b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/DefaultArtifactResourceWriter.kt index 12e9fefee9..df9b39d9c0 100644 --- a/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/DefaultArtifactResourceWriter.kt +++ b/src/backend/common/common-artifact/artifact-service/src/main/kotlin/com/tencent/bkrepo/common/artifact/resolve/response/DefaultArtifactResourceWriter.kt @@ -31,6 +31,7 @@ import com.tencent.bkrepo.common.api.constant.HttpHeaders import com.tencent.bkrepo.common.api.constant.HttpStatus import com.tencent.bkrepo.common.api.constant.MediaTypes import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.api.exception.OverloadException import com.tencent.bkrepo.common.artifact.constant.X_CHECKSUM_MD5 import com.tencent.bkrepo.common.artifact.constant.X_CHECKSUM_SHA256 import com.tencent.bkrepo.common.artifact.exception.ArtifactResponseException @@ -43,6 +44,8 @@ import com.tencent.bkrepo.common.artifact.stream.rateLimit import com.tencent.bkrepo.common.artifact.util.http.HttpHeaderUtils.determineMediaType import com.tencent.bkrepo.common.artifact.util.http.HttpHeaderUtils.encodeDisposition import com.tencent.bkrepo.common.artifact.util.http.IOExceptionUtils.isClientBroken +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService +import com.tencent.bkrepo.common.ratelimiter.stream.CommonRateLimitInputStream import com.tencent.bkrepo.common.service.otel.util.TraceHeaderUtils import com.tencent.bkrepo.common.service.util.HttpContextHolder import com.tencent.bkrepo.common.storage.config.StorageProperties @@ -55,6 +58,7 @@ import java.io.IOException import java.time.LocalDateTime import java.time.ZoneOffset import java.time.format.DateTimeFormatter +import java.util.Locale import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream import javax.servlet.http.HttpServletRequest @@ -64,12 +68,16 @@ import javax.servlet.http.HttpServletResponse * ArtifactResourceWriter默认实现 */ open class DefaultArtifactResourceWriter( - private val storageProperties: StorageProperties -) : AbstractArtifactResourceHandler(storageProperties) { + private val storageProperties: StorageProperties, + private val requestLimitCheckService: RequestLimitCheckService +) : AbstractArtifactResourceHandler( + storageProperties, requestLimitCheckService +) { - @Throws(ArtifactResponseException::class) + @Throws(ArtifactResponseException::class, OverloadException::class) override fun write(resource: ArtifactResource): Throughput { responseRateLimitCheck() + downloadRateLimitCheck(resource) TraceHeaderUtils.setResponseHeader() return if (resource.containsMultiArtifact()) { writeMultiArtifact(resource) @@ -88,7 +96,7 @@ open class DefaultArtifactResourceWriter( val name = resource.getSingleName() val range = resource.getSingleStream().range val cacheControl = resource.node?.metadata?.get(HttpHeaders.CACHE_CONTROL)?.toString() - ?: resource.node?.metadata?.get(HttpHeaders.CACHE_CONTROL.toLowerCase())?.toString() + ?: resource.node?.metadata?.get(HttpHeaders.CACHE_CONTROL.lowercase(Locale.getDefault()))?.toString() ?: StringPool.NO_CACHE response.bufferSize = getBufferSize(range.length) @@ -176,6 +184,8 @@ open class DefaultArtifactResourceWriter( if (request.method == HttpMethod.HEAD.name) { return Throughput.EMPTY } + var rateLimitFlag = false + var exp: Exception? = null try { return measureThroughput { val zipOutput = ZipOutputStream(response.outputStream.buffered()) @@ -184,9 +194,14 @@ open class DefaultArtifactResourceWriter( resource.artifactMap.forEach { (name, inputStream) -> val recordAbleInputStream = RecordAbleInputStream(inputStream) zipOutput.putNextEntry(generateZipEntry(name, inputStream)) - recordAbleInputStream.rateLimit( + val stream = requestLimitCheckService.bandwidthCheck( + recordAbleInputStream, storageProperties.response.circuitBreakerThreshold, + inputStream.range.length + ) ?: recordAbleInputStream.rateLimit( responseRateLimitWrapper(storageProperties.response.rateLimit) - ).use { + ) + rateLimitFlag = stream is CommonRateLimitInputStream + stream.use { it.copyTo( out = zipOutput, bufferSize = getBufferSize(inputStream.range.length) @@ -205,8 +220,15 @@ open class DefaultArtifactResourceWriter( logger.warn("write zip stream failed", exception) HttpStatus.INTERNAL_SERVER_ERROR } + exp = exception throw ArtifactResponseException(message, status) + } catch (overloadEx: OverloadException) { + exp = overloadEx + throw overloadEx } finally { + if (rateLimitFlag) { + requestLimitCheckService.bandwidthFinish(exp) + } resource.artifactMap.values.forEach { it.closeQuietly() } } } diff --git a/src/backend/common/common-ratelimiter/build.gradle.kts b/src/backend/common/common-ratelimiter/build.gradle.kts new file mode 100644 index 0000000000..aca0432d66 --- /dev/null +++ b/src/backend/common/common-ratelimiter/build.gradle.kts @@ -0,0 +1,47 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +dependencies { + api("io.micrometer:micrometer-registry-prometheus") + api(project(":common:common-artifact:artifact-api")) + api(project(":common:common-redis")) + api(project(":common:common-api")) + api(project(":common:common-security")) + api(project(":common:common-mongo")) + testImplementation("org.springframework.boot:spring-boot-starter-test") + testImplementation("de.flapdoodle.embed:de.flapdoodle.embed.mongo") + testImplementation("org.mockito.kotlin:mockito-kotlin") + testImplementation("io.mockk:mockk") + testImplementation(project(":common:common-redis")) + testImplementation("it.ozimov:embedded-redis:${Versions.EmbeddedRedis}") { + exclude("org.slf4j", "slf4j-simple") + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfiguration.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfiguration.kt new file mode 100644 index 0000000000..37731778cc --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfiguration.kt @@ -0,0 +1,265 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.interceptor.RateLimitHandlerInterceptor +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.repository.RateLimitRepository +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService +import com.tencent.bkrepo.common.ratelimiter.service.bandwidth.DownloadBandwidthRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.bandwidth.UploadBandwidthRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.UrlRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.UrlRepoRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.user.UserUrlRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.user.UserUrlRepoRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.DownloadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.UploadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.user.UserDownloadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.user.UserUploadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import io.micrometer.core.instrument.MeterRegistry +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication +import org.springframework.boot.context.properties.EnableConfigurationProperties +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.context.annotation.Import +import org.springframework.core.Ordered +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.web.servlet.config.annotation.InterceptorRegistry +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer + +@Configuration +@EnableConfigurationProperties(RateLimiterProperties::class) +@ConditionalOnWebApplication +@Import(RateLimitRepository::class) +class RateLimiterAutoConfiguration { + + @Bean + fun rateLimitService(rateLimitRepository: RateLimitRepository): RateLimiterConfigService { + return RateLimiterConfigService(rateLimitRepository) + } + + @Bean + fun rateLimiterMetrics(registry: MeterRegistry): RateLimiterMetrics { + return RateLimiterMetrics(registry) + } + + @Bean(URL_REPO_RATELIMITER_SERVICE) + fun urlRepoRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UrlRepoRateLimiterService { + return UrlRepoRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService + ) + } + + @Bean(URL_RATELIMITER_SERVICE) + fun urlRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UrlRateLimiterService { + return UrlRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService + ) + } + + @Bean(USER_URL_REPO_RATELIMITER_SERVICE) + fun userUrlRepoRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UserUrlRepoRateLimiterService { + return UserUrlRepoRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService + ) + } + + @Bean(UPLOAD_USAGE_RATELIMITER_SERVICE) + fun uploadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UploadUsageRateLimiterService { + return UploadUsageRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService + ) + } + + @Bean(DOWNLOAD_USAGE_RATELIMITER_SERVICE) + fun downloadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): DownloadUsageRateLimiterService { + return DownloadUsageRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService + ) + } + + @Bean(USER_DOWNLOAD_USAGE_RATELIMITER_SERVICE) + fun userDownloadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UserDownloadUsageRateLimiterService { + return UserDownloadUsageRateLimiterService( + taskScheduler, rateLimiterProperties, rateLimiterMetrics, redisTemplate, rateLimiterConfigService + ) + } + + @Bean(USER_UPLOAD_USAGE_RATELIMITER_SERVICE) + fun userUploadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UserUploadUsageRateLimiterService { + return UserUploadUsageRateLimiterService( + taskScheduler, rateLimiterProperties, rateLimiterMetrics, redisTemplate, rateLimiterConfigService + ) + } + + @Bean(USER_URL_RATELIMITER_SERVICE) + fun userUrlRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UserUrlRateLimiterService { + return UserUrlRateLimiterService( + taskScheduler, rateLimiterProperties, rateLimiterMetrics, redisTemplate, rateLimiterConfigService + ) + } + + @Bean(UPLOAD_BANDWIDTH_RATELIMITER_ERVICE) + fun uploadBandwidthRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): UploadBandwidthRateLimiterService { + return UploadBandwidthRateLimiterService( + taskScheduler, rateLimiterProperties, rateLimiterMetrics, redisTemplate, rateLimiterConfigService + ) + } + + @Bean(DOWNLOAD_BANDWIDTH_RATELIMITER_SERVICE) + fun downloadBandwidthRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService + ): DownloadBandwidthRateLimiterService { + return DownloadBandwidthRateLimiterService( + taskScheduler, rateLimiterProperties, rateLimiterMetrics, redisTemplate, rateLimiterConfigService + ) + } + + @Bean + fun requestLimitCheckService( + rateLimiterProperties: RateLimiterProperties, + ): RequestLimitCheckService { + return RequestLimitCheckService(rateLimiterProperties) + } + + @Bean + @ConditionalOnWebApplication + fun rateLimitHandlerInterceptorRegister( + requestLimitCheckService: RequestLimitCheckService + ): WebMvcConfigurer { + return object : WebMvcConfigurer { + override fun addInterceptors(registry: InterceptorRegistry) { + registry.addInterceptor( + RateLimitHandlerInterceptor( + requestLimitCheckService = requestLimitCheckService + ) + ) + .excludePathPatterns("/service/**", "/replica/**") + .order(Ordered.LOWEST_PRECEDENCE) + super.addInterceptors(registry) + } + } + } + + + companion object { + const val DOWNLOAD_BANDWIDTH_RATELIMITER_SERVICE = "downloadBandwidthRateLimiterService" + const val UPLOAD_BANDWIDTH_RATELIMITER_ERVICE = "uploadBandwidthRateLimiterService" + const val USER_URL_RATELIMITER_SERVICE = "userUrlRateLimiterService" + const val USER_UPLOAD_USAGE_RATELIMITER_SERVICE = "userUploadUsageRateLimiterService" + const val USER_DOWNLOAD_USAGE_RATELIMITER_SERVICE = "userDownloadUsageRateLimiterService" + const val DOWNLOAD_USAGE_RATELIMITER_SERVICE = "downloadUsageRateLimiterService" + const val UPLOAD_USAGE_RATELIMITER_SERVICE = "uploadUsageRateLimiterService" + const val URL_RATELIMITER_SERVICE = "urlRateLimiterService" + const val URL_REPO_RATELIMITER_SERVICE = "urlRepoRateLimiterService" + const val USER_URL_REPO_RATELIMITER_SERVICE = "userUrlRepoRateLimiterService" + + } + +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiter.kt new file mode 100644 index 0000000000..c6322b576e --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiter.kt @@ -0,0 +1,79 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.redis.LuaScript +import java.time.Duration +import kotlin.system.measureTimeMillis +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.data.redis.core.script.DefaultRedisScript + +/** + * 分布式固定时间窗口算法实现 + */ +class DistributedFixedWindowRateLimiter( + private val key: String, + private val limit: Long, + private val duration: Duration, + private val redisTemplate: RedisTemplate, +) : RateLimiter { + override fun tryAcquire(permits: Long): Boolean { + try { + var acquireResult = false + val elapsedTime = measureTimeMillis { + val redisScript = DefaultRedisScript(LuaScript.fixWindowRateLimiterScript, Long::class.java) + // 注意, 由于redis expire只支持秒为单位,所以周期最小单位为秒 + val result = redisTemplate.execute( + redisScript, listOf(key), limit.toString(), permits.toString(), duration.seconds.toString() + ) + acquireResult = result == 1L + } + if (logger.isDebugEnabled) { + logger.debug( + "acquire distributed fixed window rateLimiter " + + "elapsed time: $elapsedTime ms, acquireResult: $acquireResult" + ) + } + return acquireResult + } catch (e: Exception) { + logger.warn("${this.javaClass.simpleName} acquire error: ${e.message}") + throw AcquireLockFailedException("distributed lock acquire failed: $e") + } + } + + override fun removeCacheLimit(key: String) { + redisTemplate.delete(key) + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(DistributedFixedWindowRateLimiter::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiter.kt new file mode 100644 index 0000000000..ed03b9e806 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiter.kt @@ -0,0 +1,91 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.redis.LuaScript +import kotlin.system.measureTimeMillis +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.data.redis.core.script.DefaultRedisScript + +/** + * 分布式漏桶算法实现 + */ +class DistributedLeakyRateLimiter( + private val key: String, + private val permitsPerSecond: Double, + private val capacity: Long, + private val redisTemplate: RedisTemplate, +) : RateLimiter { + override fun tryAcquire(permits: Long): Boolean { + try { + var acquireResult = false + val elapsedTime = measureTimeMillis { + val redisScript = DefaultRedisScript(LuaScript.leakyRateLimiterScript, List::class.java) + // 时间统一从redis server获取 + // lua脚本中使用命令获取时间指令需要配合replicate_commands()使用,但是由于redis只有在某个特定版本上才支持该指令, + // 所以无法从lua脚本中去获取时间,只能分为多次调用。 + val currentTime = redisTemplate.execute { connection -> + connection.time() + } ?: System.currentTimeMillis() + val currentSeconds = (currentTime / 1000) + val results = redisTemplate.execute( + redisScript, getKeys(key), permitsPerSecond.toString(), + capacity.toString(), permits.toString(), currentSeconds.toString() + ) + acquireResult = results[0] == 1L + } + if (logger.isDebugEnabled) { + logger.debug( + "acquire distributed leaky rateLimiter" + + " elapsed time: $elapsedTime ms, acquireResult: $acquireResult" + ) + } + return acquireResult + } catch (e: Exception) { + logger.warn("${this.javaClass.simpleName} acquire error: ${e.message}") + throw AcquireLockFailedException("distributed lock acquire failed: $e") + } + } + + private fun getKeys(key: String): List { + return listOf(key, "$key.timestamp") + } + + override fun removeCacheLimit(key: String) { + getKeys(key).forEach { + redisTemplate.delete(it) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(DistributedLeakyRateLimiter::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiter.kt new file mode 100644 index 0000000000..ef4d460988 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiter.kt @@ -0,0 +1,94 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.redis.LuaScript +import java.time.Duration +import kotlin.system.measureTimeMillis +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.data.redis.core.script.DefaultRedisScript + +/** + * 分布式滑动窗口算法实现 + */ +class DistributedSlidingWindowRateLimiter( + private val key: String, + private val limit: Long, + private val duration: Duration, + private val redisTemplate: RedisTemplate, +) : RateLimiter { + override fun tryAcquire(permits: Long): Boolean { + try { + var acquireResult = false + val elapsedTime = measureTimeMillis { + val redisScript = DefaultRedisScript(LuaScript.slidingWindowRateLimiterScript, List::class.java) + // 时间统一从redis server获取 + // lua脚本中使用命令获取时间指令需要配合replicate_commands()使用,但是由于redis只有在某个特定版本上才支持该指令, + // 所以无法从lua脚本中去获取时间,只能分为多次调用。 + val currentTime = redisTemplate.execute { connection -> + connection.time() + } ?: System.currentTimeMillis() + val currentSeconds = (currentTime / 1000) + val random = (currentTime % 1000) + // 注意, 由于redis expire只支持秒为单位,所以周期最小单位为秒 + val results = redisTemplate.execute( + redisScript, getKeys(key), limit.toString(), (duration.seconds).toString(), + permits.toString(), currentSeconds.toString(), random.toString() + ) + acquireResult = results[0] == 1L + } + if (logger.isDebugEnabled) { + logger.debug( + "acquire distributed sliding window rateLimiter" + + " elapsed time: $elapsedTime ms, acquireResult: $acquireResult" + ) + } + return acquireResult + } catch (e: Exception) { + logger.warn("${this.javaClass.simpleName} acquire error: ${e.message}") + throw AcquireLockFailedException("distributed lock acquire failed: $e") + } + } + + private fun getKeys(key: String): List { + return listOf(key) + } + + override fun removeCacheLimit(key: String) { + getKeys(key).forEach { + redisTemplate.delete(it) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(DistributedSlidingWindowRateLimiter::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiter.kt new file mode 100644 index 0000000000..26dfe401ab --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiter.kt @@ -0,0 +1,91 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.redis.LuaScript +import kotlin.system.measureTimeMillis +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.data.redis.core.script.DefaultRedisScript + +/** + * 分布式令牌桶算法实现 + */ +class DistributedTokenBucketRateLimiter( + private val key: String, + private val permitsPerSecond: Double, + private val capacity: Long, + private val redisTemplate: RedisTemplate, +) : RateLimiter { + override fun tryAcquire(permits: Long): Boolean { + try { + var acquireResult: Boolean + val elapsedTime = measureTimeMillis { + val redisScript = DefaultRedisScript(LuaScript.tokenBucketRateLimiterScript, List::class.java) + // 时间统一从redis server获取 + // lua脚本中使用命令获取时间指令需要配合replicate_commands()使用,但是由于redis只有在某个特定版本上才支持该指令, + // 所以无法从lua脚本中去获取时间,只能分为多次调用。 + val currentTime = redisTemplate.execute { connection -> + connection.time() + } ?: System.currentTimeMillis() + val currentSeconds = (currentTime / 1000) + val results = redisTemplate.execute( + redisScript, getKeys(key), permitsPerSecond.toString(), + capacity.toString(), permits.toString(), currentSeconds.toString() + ) + acquireResult = results[0] == 1L + } + if (logger.isDebugEnabled) { + logger.debug( + "acquire distributed token bucket rateLimiter" + + " elapsed time: $elapsedTime ms, acquireResult: $acquireResult" + ) + } + return acquireResult + } catch (e: Exception) { + logger.warn("${this.javaClass.simpleName} acquire error: ${e.message}") + throw AcquireLockFailedException("distributed lock acquire failed: $e") + } + } + + private fun getKeys(key: String): List { + return listOf(key, "$key.timestamp") + } + + override fun removeCacheLimit(key: String) { + getKeys(key).forEach { + redisTemplate.delete(it) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(DistributedTokenBucketRateLimiter::class.java) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiter.kt new file mode 100644 index 0000000000..af71989aea --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiter.kt @@ -0,0 +1,75 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.google.common.base.Stopwatch +import com.tencent.bkrepo.common.ratelimiter.constant.TRY_LOCK_TIMEOUT +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import java.time.Duration +import java.util.concurrent.TimeUnit +import java.util.concurrent.locks.Lock +import java.util.concurrent.locks.ReentrantLock + +/** + * 单机固定窗口算法实现 + */ +class FixedWindowRateLimiter( + private val limit: Long, + private val duration: Duration, + private val stopWatch: Stopwatch = Stopwatch.createStarted() +) : RateLimiter { + + private var currentValue: Long = 0 + private val lock: Lock = ReentrantLock() + + override fun tryAcquire(permits: Long): Boolean { + // TODO 当剩余容量少于permit时,会导致一直获取不到 + try { + if (!lock.tryLock(TRY_LOCK_TIMEOUT, TimeUnit.MILLISECONDS)) { + throw AcquireLockFailedException("fix window tryLock wait too long: $TRY_LOCK_TIMEOUT ms") + } + try { + if (stopWatch.elapsed(TimeUnit.MILLISECONDS) > duration.toMillis()) { + currentValue = 0 + stopWatch.reset() + } + if (currentValue + permits > limit) return false + currentValue += permits + return true + } finally { + lock.unlock() + } + } catch (e: InterruptedException) { + throw AcquireLockFailedException("fix window tryLock is interrupted by lock timeout: $e") + } + } + + override fun removeCacheLimit(key: String) { + // 非redis类实现不需要处理 + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiter.kt new file mode 100644 index 0000000000..902d2d1e30 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiter.kt @@ -0,0 +1,86 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.constant.TRY_LOCK_TIMEOUT +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import java.util.concurrent.TimeUnit +import java.util.concurrent.locks.Lock +import java.util.concurrent.locks.ReentrantLock + + +/** + * 单机漏桶算法实现 + */ +class LeakyRateLimiter( + private val rate: Double, + private val capacity: Long, +) : RateLimiter { + + // 计算的起始时间 + private var lastLeakTime = System.currentTimeMillis() + private var water: Long = 0 + private val lock: Lock = ReentrantLock() + + + override fun tryAcquire(permits: Long): Boolean { + try { + if (!lock.tryLock(TRY_LOCK_TIMEOUT, TimeUnit.MILLISECONDS)) { + throw AcquireLockFailedException("leaky tryLock wait too long: $TRY_LOCK_TIMEOUT ms") + } + try { + return allow(permits) + } finally { + lock.unlock() + } + } catch (e: InterruptedException) { + throw AcquireLockFailedException("leaky tryLock is interrupted by lock timeout: $e") + } + } + + override fun removeCacheLimit(key: String) { + // 非redis类实现不需要处理 + } + + private fun allow(permits: Long): Boolean { + if (water == 0L) { + lastLeakTime = System.currentTimeMillis() + water += permits + return true + } + val waterLeaked: Double = ((System.currentTimeMillis() - lastLeakTime) / 1000) * rate + val waterLeft = (water - waterLeaked).toLong() + water = Math.max(0, waterLeft) // 漏水 + lastLeakTime = System.currentTimeMillis() + if (water + permits <= capacity) { + water += permits + return true + } + return false + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RateLimiter.kt new file mode 100644 index 0000000000..c8a654fa11 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RateLimiter.kt @@ -0,0 +1,36 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +interface RateLimiter { + + fun tryAcquire(permits: Long): Boolean + + fun removeCacheLimit(key: String) + +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiter.kt new file mode 100644 index 0000000000..ce17cc7f83 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiter.kt @@ -0,0 +1,114 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.constant.TRY_LOCK_TIMEOUT +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import java.time.Duration +import java.util.concurrent.TimeUnit +import java.util.concurrent.locks.Lock +import java.util.concurrent.locks.ReentrantLock + + +/** + * 单机滑动窗口算法实现 + * -- limit: 窗口时间单位内的阈值 + * -- interval: 窗口大小, + * -- limitUnit 窗口时间单位 + */ +class SlidingWindowRateLimiter( + private val limit: Long, + private val duration: Duration, +) : RateLimiter { + + private val lock: Lock = ReentrantLock() + + /** + * 子窗口个数 + */ + private val subWindowNum = 10 + + /** + * 窗口列表 + */ + private var windowArray = Array(subWindowNum) { WindowInfo() } + private val windowSize = duration.toMillis() * subWindowNum + + override fun tryAcquire(permits: Long): Boolean { + try { + if (!lock.tryLock(TRY_LOCK_TIMEOUT, TimeUnit.MILLISECONDS)) { + throw AcquireLockFailedException("sliding window tryLock wait too long: $TRY_LOCK_TIMEOUT ms") + } + try { + return allow(permits) + } finally { + lock.unlock() + } + } catch (e: InterruptedException) { + throw AcquireLockFailedException("sliding window tryLock is interrupted by lock timeout: $e") + } + } + + override fun removeCacheLimit(key: String) { + // 非redis类实现不需要处理 + } + + private fun allow(permits: Long): Boolean { + val currentTimeMillis = System.currentTimeMillis() + // 1. 计算当前时间窗口 + val currentIndex = (currentTimeMillis % windowSize / (windowSize / subWindowNum)).toInt() + // 2. 更新当前窗口计数 & 重置过期窗口计数 + var sum = 0L + val windowArrayCopy = windowArray.map { it.copy() }.toTypedArray() + for (i in windowArray.indices) { + val windowInfo = windowArray[i] + if (currentTimeMillis - windowInfo.time > windowSize) { + windowInfo.count = 0 + windowInfo.time = currentTimeMillis + } + if (currentIndex == i && windowInfo.count <= limit) { + windowInfo.count += permits + } + sum += windowInfo.count + } + // 3. 当前是否超过限制 + return if (sum <= limit) { + true + } else { + //如果最终sum>limit, windowInfo.count需要减掉permits + windowArray = windowArrayCopy + false + } + } + + data class WindowInfo( + var time: Long = System.currentTimeMillis(), + var count: Long = 0 + ) + +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiter.kt new file mode 100644 index 0000000000..6c3d39156b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiter.kt @@ -0,0 +1,54 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.constant.TRY_LOCK_TIMEOUT +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import java.util.concurrent.TimeUnit + +/** + * 单机令牌桶算法实现 + */ +class TokenBucketRateLimiter( + private val permitsPerSecond: Double, +) : RateLimiter { + + private val guavaRateLimiter = com.google.common.util.concurrent.RateLimiter.create(permitsPerSecond) + + override fun tryAcquire(permits: Long): Boolean { + try { + return guavaRateLimiter.tryAcquire(permits.toInt(), TRY_LOCK_TIMEOUT, TimeUnit.MILLISECONDS) + } catch (e: Exception) { + throw AcquireLockFailedException("lock acquire failed: $e") + } + } + + override fun removeCacheLimit(key: String) { + // 非redis类实现不需要处理 + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/config/RateLimiterProperties.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/config/RateLimiterProperties.kt new file mode 100644 index 0000000000..1136d45645 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/config/RateLimiterProperties.kt @@ -0,0 +1,51 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.config + +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.springframework.boot.context.properties.ConfigurationProperties + +@ConfigurationProperties(prefix = "rate.limiter") +data class RateLimiterProperties( + var enabled: Boolean = false, + var dryRun: Boolean = false, + // 配置规则刷新频率 单位为秒 + var refreshDuration: Long = 10L, + // 本地缓存限流算法实现的最大个数 + var cacheCapacity: Long = 1024L, + // 限流配置 + var rules: List = mutableListOf(), + // 等待时间,单位毫秒 + var latency: Long = 70, + // 重试次数 + var waitRound: Int = 5, + // 针对读流的请求,避免频繁去请求,每次申请固定大小 + var permitsOnce: Long = 1024 * 1024, + // 只对指定url进行从request body解析项目仓库信息 + var specialUrls: List = emptyList() +) diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/constant/Constants.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/constant/Constants.kt new file mode 100644 index 0000000000..6de61b22ca --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/constant/Constants.kt @@ -0,0 +1,47 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.constant + +const val TRY_LOCK_TIMEOUT = 10L +const val KEY_PREFIX = "rateLimiter:" +const val SLEEP_TIME = 10 + +const val TAG_STATUS = "status" +const val TAG_NAME = "name" + +const val RATE_LIMITER_TOTAL_COUNT = "rate.limiter.total.count" +const val RATE_LIMITER_TOTAL_COUNT_DESC = "总请求数" + +const val RATE_LIMITER_PASSED_COUNT = "rate.limiter.passed.count" +const val RATE_LIMITER_PASSED_COUNT_DESC = "通过请求数" + +const val RATE_LIMITER_LIMITED_COUNT = "rate.limiter.limited.count" +const val RATE_LIMITER_LIMITED_COUNT_DESC = "限流请求数" + +const val RATE_LIMITER_EXCEPTION_COUNT = "rate.limiter.exception.count" +const val RATE_LIMITER_EXCEPTION_COUNT_DESC = "异常请求数" diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/Algorithms.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/Algorithms.kt new file mode 100644 index 0000000000..6d4447f9bb --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/Algorithms.kt @@ -0,0 +1,38 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.enums + +/** + * 限流算法类型 + */ +enum class Algorithms { + FIXED_WINDOW, + SLIDING_WINDOW, + LEAKY_BUCKET, + TOKEN_BUCKET; +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/LimitDimension.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/LimitDimension.kt new file mode 100644 index 0000000000..8ffd9890de --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/LimitDimension.kt @@ -0,0 +1,44 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.enums + +/** + * 限流维度: + */ +enum class LimitDimension { + URL, // 针对指定URL限流 + URL_REPO, // 针对访问指定项目/仓库的url进行限流 + UPLOAD_USAGE, // 针对仓库上传总大小进行限流 + DOWNLOAD_USAGE, // 针对仓库下载总大小进行限流 + USER_URL, // 针对指定用户指定请求进行限流 + USER_URL_REPO, // 针对指定用户访问指定项目/仓库的url进行限流 + USER_UPLOAD_USAGE, // 针对指定用户上传总大小进行限流 + USER_DOWNLOAD_USAGE, // 针对指定用户下载总大小进行限流 + UPLOAD_BANDWIDTH, // 针对项目维度上传带宽进行限流 + DOWNLOAD_BANDWIDTH, // 针对项目维度下载带宽进行限流 +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/WorkScope.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/WorkScope.kt new file mode 100644 index 0000000000..53bce5d00a --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/enums/WorkScope.kt @@ -0,0 +1,36 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.enums + +/** + * 配置生效范围, 全局生效或者本地生效 + */ +enum class WorkScope { + LOCAL, + GLOBAL +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/AcquireLockFailedException.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/AcquireLockFailedException.kt new file mode 100644 index 0000000000..0490d90567 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/AcquireLockFailedException.kt @@ -0,0 +1,39 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.exception + +import com.tencent.bkrepo.common.api.exception.ErrorCodeException +import com.tencent.bkrepo.common.api.message.CommonMessageCode + +/** + * 获取对应执行计划失败 + */ +data class AcquireLockFailedException( + val reason: String +) : ErrorCodeException(CommonMessageCode.ACQUIRE_LOCK_FAILED, reason) + diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/InvalidResourceException.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/InvalidResourceException.kt new file mode 100644 index 0000000000..0255af6676 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/exception/InvalidResourceException.kt @@ -0,0 +1,39 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.exception + +import com.tencent.bkrepo.common.api.exception.ErrorCodeException +import com.tencent.bkrepo.common.api.message.CommonMessageCode + +/** + * 资源无效异常 + */ +data class InvalidResourceException( + val reason: String +) : ErrorCodeException(CommonMessageCode.INVALID_CONFIG, reason) + diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/MonitorRateLimiterInterceptorAdaptor.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/MonitorRateLimiterInterceptorAdaptor.kt new file mode 100644 index 0000000000..f7681dd10e --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/MonitorRateLimiterInterceptorAdaptor.kt @@ -0,0 +1,49 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * 限流相关指标采集拦截器 + */ +class MonitorRateLimiterInterceptorAdaptor( + private val rateLimiterMetrics: RateLimiterMetrics +) : RateLimiterInterceptorAdapter() { + + override fun beforeLimitCheck(resource: String, resourceLimit: ResourceLimit) = Unit + + override fun afterLimitCheck( + resource: String, resourceLimit: ResourceLimit?, + result: Boolean, e: Exception? + ) { + if (resourceLimit == null) return + rateLimiterMetrics.collectMetrics(resource = resource, result = result, e = e) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimitHandlerInterceptor.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimitHandlerInterceptor.kt new file mode 100644 index 0000000000..c3bac2ce38 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimitHandlerInterceptor.kt @@ -0,0 +1,45 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService +import org.springframework.web.servlet.HandlerInterceptor +import javax.servlet.http.HttpServletRequest +import javax.servlet.http.HttpServletResponse + +/** + * 针对http请求添加限流拦截 + */ +class RateLimitHandlerInterceptor( + private val requestLimitCheckService: RequestLimitCheckService +) : HandlerInterceptor { + override fun preHandle(request: HttpServletRequest, response: HttpServletResponse, handler: Any): Boolean { + requestLimitCheckService.preLimitCheck(request) + return super.preHandle(request, response, handler) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptor.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptor.kt new file mode 100644 index 0000000000..a2e532231e --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptor.kt @@ -0,0 +1,49 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * 限流执行拦截器 + */ +interface RateLimiterInterceptor { + + /** + * 限流判断前处理 + */ + fun beforeLimitCheck(resource: String, resourceLimit: ResourceLimit) + + /** + * 限流判断后处理 + */ + fun afterLimitCheck( + resource: String, resourceLimit: ResourceLimit?, + result: Boolean, e: Exception? + ) +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorAdapter.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorAdapter.kt new file mode 100644 index 0000000000..a9f61df5df --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorAdapter.kt @@ -0,0 +1,42 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * 限流算法执行前后校验拦截器 + */ +abstract class RateLimiterInterceptorAdapter : RateLimiterInterceptor { + override fun beforeLimitCheck(resource: String, resourceLimit: ResourceLimit) = Unit + + override fun afterLimitCheck( + resource: String, resourceLimit: ResourceLimit?, + result: Boolean, e: Exception? + ) = Unit +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChain.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChain.kt new file mode 100644 index 0000000000..5165ce3912 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChain.kt @@ -0,0 +1,73 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * 限流拦截器链 + */ +class RateLimiterInterceptorChain( + private val interceptors: MutableList = mutableListOf() +) { + + fun doBeforeLimitCheck(resource: String, resourceLimit: ResourceLimit) { + this.interceptors.forEach { + it.beforeLimitCheck(resource, resourceLimit) + } + } + + fun doAfterLimitCheck( + resource: String, resourceLimit: ResourceLimit?, + result: Boolean, e: Exception? + ) { + this.interceptors.forEach { + it.afterLimitCheck(resource, resourceLimit, result, e) + } + } + + fun addInterceptor(interceptor: RateLimiterInterceptor) { + this.interceptors.add(interceptor) + } + + fun addInterceptors(interceptors: Collection) { + this.interceptors.addAll(interceptors) + } + + fun clear() { + this.interceptors.clear() + } + + fun isEmpty(): Boolean { + return this.interceptors.isEmpty() + } + + fun size(): Int { + return this.interceptors.size + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/TargetRateLimiterInterceptorAdaptor.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/TargetRateLimiterInterceptorAdaptor.kt new file mode 100644 index 0000000000..8780b6b7c8 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/TargetRateLimiterInterceptorAdaptor.kt @@ -0,0 +1,51 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService + +/** + * 执行限流机器判断 + */ +class TargetRateLimiterInterceptorAdaptor( + private val rateLimiterConfigService: RateLimiterConfigService, +) : RateLimiterInterceptorAdapter() { + + override fun beforeLimitCheck(resource: String, resourceLimit: ResourceLimit) { + if (resourceLimit.targets.isNotEmpty() && !resourceLimit.targets.contains(rateLimiterConfigService.host)) { + throw InvalidResourceException("targets not contain ${rateLimiterConfigService.host}") + } + } + + override fun afterLimitCheck( + resource: String, resourceLimit: ResourceLimit?, + result: Boolean, e: Exception? + ) = Unit +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/MetricType.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/MetricType.kt new file mode 100644 index 0000000000..7f0513980b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/MetricType.kt @@ -0,0 +1,38 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.metrics + +/** + * 指标类型 + */ +enum class MetricType { + TOTAL, // 总请求数量 + PASSED, // 通过数量 + LIMITED, //限流数量 + EXCEPTION, //异常请求数量 +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/RateLimiterMetrics.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/RateLimiterMetrics.kt new file mode 100644 index 0000000000..05a56b27e2 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/metrics/RateLimiterMetrics.kt @@ -0,0 +1,97 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.metrics + +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_EXCEPTION_COUNT +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_EXCEPTION_COUNT_DESC +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_LIMITED_COUNT +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_LIMITED_COUNT_DESC +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_PASSED_COUNT +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_PASSED_COUNT_DESC +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_TOTAL_COUNT +import com.tencent.bkrepo.common.ratelimiter.constant.RATE_LIMITER_TOTAL_COUNT_DESC +import com.tencent.bkrepo.common.ratelimiter.constant.TAG_NAME +import com.tencent.bkrepo.common.ratelimiter.constant.TAG_STATUS +import io.micrometer.core.instrument.Counter +import io.micrometer.core.instrument.MeterRegistry + +/** + * 限流指标写入 + */ +class RateLimiterMetrics(private val registry: MeterRegistry) { + + fun collectMetrics( + resource: String, result: Boolean, e: Exception? + ) { + try { + getTotalCounter(resource).increment() + if (result) { + getPassedCounter(resource).increment() + } else { + getLimitedCounter(resource).increment() + } + if (e != null) { + getExceptionCounter(resource).increment() + } + } catch (ignore: Exception) { + } + + } + + private fun getTotalCounter(resource: String): Counter { + return getMetricsCount( + RATE_LIMITER_TOTAL_COUNT, RATE_LIMITER_TOTAL_COUNT_DESC, MetricType.TOTAL.name, resource + ) + } + + private fun getPassedCounter(resource: String): Counter { + return getMetricsCount( + RATE_LIMITER_PASSED_COUNT, RATE_LIMITER_PASSED_COUNT_DESC, MetricType.PASSED.name, resource + ) + } + + private fun getLimitedCounter(resource: String): Counter { + return getMetricsCount( + RATE_LIMITER_LIMITED_COUNT, RATE_LIMITER_LIMITED_COUNT_DESC, MetricType.LIMITED.name, resource + ) + } + + private fun getExceptionCounter(resource: String): Counter { + return getMetricsCount( + RATE_LIMITER_EXCEPTION_COUNT, RATE_LIMITER_EXCEPTION_COUNT_DESC, MetricType.EXCEPTION.name, resource + ) + } + + private fun getMetricsCount(metricsName: String, metricsDes: String, status: String, resource: String): Counter { + return Counter.builder(metricsName) + .description(metricsDes) + .tag(TAG_STATUS, status) + .tag(TAG_NAME, resource) + .register(registry) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/RateLimitCreatOrUpdateRequest.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/RateLimitCreatOrUpdateRequest.kt new file mode 100644 index 0000000000..4d2b2ddd99 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/RateLimitCreatOrUpdateRequest.kt @@ -0,0 +1,54 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.model + +data class RateLimitCreatOrUpdateRequest( + val id: String? = null, + // 算法选择 + var algo: String, + // 资源标识 + var resource: String, + // 限流维度 + var limitDimension: String, + // 限流值 + var limit: Long, + // 限流周期 + var duration: Long, + // 桶容量(令牌桶和漏桶使用) + var capacity: Long? = null, + // 生效范围 + var scope: String, + // 指定机器上运行 + var targets: List? = emptyList(), + // 模块名 + var moduleName: List +) diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/TRateLimit.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/TRateLimit.kt new file mode 100644 index 0000000000..8b00c843df --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/model/TRateLimit.kt @@ -0,0 +1,71 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.model + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import org.springframework.data.mongodb.core.index.CompoundIndex +import org.springframework.data.mongodb.core.index.CompoundIndexes +import org.springframework.data.mongodb.core.mapping.Document +import java.time.Duration + +@Document(collection = "rate_limit") +@CompoundIndexes( + CompoundIndex( + name = "resource_limitDimension_idx", + def = "{'resource': 1,'limitDimension': 1}", + background = true + ), + CompoundIndex( + name = "limitDimension_idx", + def = "{'limitDimension': 1}", + background = true + ) +) +data class TRateLimit( + var id: String?, + // 算法选择 + var algo: String = Algorithms.FIXED_WINDOW.name, + // 资源标识 + var resource: String = "/", + // 限流维度 + var limitDimension: String = LimitDimension.URL.name, + // 限流值 + var limit: Long = -1, + // 限流周期 + var duration: Duration = Duration.ofSeconds(1), + // 桶容量(令牌桶和漏桶使用) + var capacity: Long? = null, + // 生效范围 + var scope: String = WorkScope.LOCAL.name, + // 指定机器上运行 + var targets: List = emptyList(), + // 模块名 + var moduleName: List +) diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/redis/LuaScript.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/redis/LuaScript.kt new file mode 100644 index 0000000000..9d5e45975c --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/redis/LuaScript.kt @@ -0,0 +1,68 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.redis + +import org.slf4j.LoggerFactory +import org.springframework.util.StreamUtils +import java.io.IOException +import java.nio.charset.StandardCharsets + +/** + * lua脚本加载 + */ +object LuaScript { + private val logger = LoggerFactory.getLogger(LuaScript::class.java) + private const val FIX_WINDOW_RATE_LIMITER_FILE_PATH = "fix-window-rate-limiter.lua" + private const val TOKEN_BUCKET_RATE_LIMITER_FILE_PATH = "token-bucket-rate-limiter.lua" + private const val SLIDING_WINDOW_RATE_LIMITER_FILE_PATH = "sliding-window-rate-limiter.lua" + private const val LEAKY_RATE_LIMITER_FILE_PATH = "leaky-rate-limiter.lua" + + lateinit var fixWindowRateLimiterScript: String + lateinit var tokenBucketRateLimiterScript: String + lateinit var slidingWindowRateLimiterScript: String + lateinit var leakyRateLimiterScript: String + + init { + val fixWindowInput = Thread.currentThread().contextClassLoader + .getResourceAsStream(FIX_WINDOW_RATE_LIMITER_FILE_PATH) + val tokenBucketInput = Thread.currentThread().contextClassLoader + .getResourceAsStream(TOKEN_BUCKET_RATE_LIMITER_FILE_PATH) + val slidingWindowInput = Thread.currentThread().contextClassLoader + .getResourceAsStream(SLIDING_WINDOW_RATE_LIMITER_FILE_PATH) + val leakyInput = Thread.currentThread().contextClassLoader + .getResourceAsStream(LEAKY_RATE_LIMITER_FILE_PATH) + try { + fixWindowRateLimiterScript = StreamUtils.copyToString(fixWindowInput, StandardCharsets.UTF_8) + tokenBucketRateLimiterScript = StreamUtils.copyToString(tokenBucketInput, StandardCharsets.UTF_8) + slidingWindowRateLimiterScript = StreamUtils.copyToString(slidingWindowInput, StandardCharsets.UTF_8) + leakyRateLimiterScript = StreamUtils.copyToString(leakyInput, StandardCharsets.UTF_8) + } catch (e: IOException) { + logger.error("lua script Initialization failed, $e") + } + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/repository/RateLimitRepository.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/repository/RateLimitRepository.kt new file mode 100644 index 0000000000..25736c10a9 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/repository/RateLimitRepository.kt @@ -0,0 +1,88 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.repository + +import com.tencent.bkrepo.common.mongo.dao.simple.SimpleMongoDao +import com.tencent.bkrepo.common.ratelimiter.model.TRateLimit +import org.springframework.data.mongodb.core.query.Criteria +import org.springframework.data.mongodb.core.query.Query +import org.springframework.data.mongodb.core.query.isEqualTo +import org.springframework.stereotype.Repository + +@Repository +class RateLimitRepository : SimpleMongoDao() { + + fun existsById(id: String) : Boolean { + return find(Query(TRateLimit::id.isEqualTo(id))).isNotEmpty() + } + + fun existsByResourceAndLimitDimension(resource: String, limitDimension: String) : Boolean { + return exists( + Query( + Criteria.where(TRateLimit::resource.name).isEqualTo(resource) + .and(TRateLimit::limitDimension.name).isEqualTo(limitDimension) + ) + ) + } + + fun findByResourceAndLimitDimension(resource: String, limitDimension: String) : List { + return find( + Query( + Criteria.where(TRateLimit::resource.name).isEqualTo(resource) + .and(TRateLimit::limitDimension.name).isEqualTo(limitDimension) + ) + ) + } + + fun findByModuleNameAndLimitDimension(moduleName: String, limitDimension: String): List { + return find( + Query( + Criteria.where(TRateLimit::moduleName.name).regex("$moduleName") + .and(TRateLimit::limitDimension.name).isEqualTo(limitDimension) + ) + ) + } + + fun findByModuleNameAndLimitDimensionAndResource( + resource: String, + moduleName: List, + limitDimension: String + ): TRateLimit? { + return findOne( + Query( + Criteria.where(TRateLimit::moduleName.name).isEqualTo("$moduleName") + .and(TRateLimit::limitDimension.name).isEqualTo(limitDimension) + .and(TRateLimit::resource.name).isEqualTo(resource) + ) + ) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/PathResourceLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/PathResourceLimitRule.kt new file mode 100644 index 0000000000..4e7fc5add4 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/PathResourceLimitRule.kt @@ -0,0 +1,216 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule + +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.common.PathNode +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.util.concurrent.ConcurrentHashMap +import java.util.regex.Pattern + +/** + * path资源规则类 + * pathLengthCheck : 当为false时,不校验resource根据/分割后的字符个数与查出的队友匹配规则的resource按照/分割后的字符个数是否相等 + * 如果是url 类型的路径, 如果配置resource为/project1/, 则其子目录都遵循该规则, 此时pathLengthCheck设置为false + * 如果是project/repo类型的路径,如何配置resource为/project1/,则只有当查询资源为/project1/才能够匹配。 此时pathLengthCheck应该设置为 true + */ +open class PathResourceLimitRule( + private val root: PathNode = PathNode("/"), + private val pathLengthCheck: Boolean = false +) { + + fun isEmpty(): Boolean { + return root.getEdges().isEmpty() && root.getResourceLimit() == null + } + + /** + * 添加资源对应的规则 + */ + fun addPathResourceLimit(resourceLimit: ResourceLimit, limits: List) { + if (!limits.contains(resourceLimit.limitDimension)) { + return + } + val resourcePath = resourceLimit.resource + if (!resourcePath.startsWith("/")) { + throw InvalidResourceException(resourcePath) + } + // TODO 配置/*/blueking/* 能识别/api/node/blueking/generic-local + addPathNode(resourcePath, resourceLimit) + } + + fun addPathResourceLimits(resourceLimits: List, limits: List) { + resourceLimits.forEach { + addPathResourceLimit(it, limits) + } + } + + /** + * 根据资源获取对应规则 + */ + open fun getPathResourceLimit(resource: String): ResourceLimit? { + if (resource.isBlank()) { + return null + } + if (resource == "/") { + return root.getResourceLimit() + } + val pathDirs = ResourcePathUtils.tokenizeResourcePath(resource) + if (pathDirs.isEmpty()) { + logger.warn("config resource path $resource is empty!") + return null + } + return findResourceLimit(pathDirs) + } + + private fun findResourceLimit(pathDirs: List): ResourceLimit? { + var p = root + var currentLimit: ResourceLimit? = null + if (p.getResourceLimit() != null) { + currentLimit = p.getResourceLimit() + } + for (path in pathDirs) { + val children = p.getEdges() + var matchedNode = children[path] + if (matchedNode == null) { + val child = findInChildren(children, path) + if (child != null) { + matchedNode = child + } + } + if (matchedNode == null) { + break + } + p = matchedNode + if (matchedNode.getResourceLimit() != null) { + currentLimit = matchedNode.getResourceLimit() + } + } + if (pathLengthCheck) { + return if (pathLengthCheck(currentLimit, pathDirs.size)) { + currentLimit + } else { + null + } + } + return currentLimit + } + + private fun pathLengthCheck(currentLimit: ResourceLimit?, pathDirSize: Int): Boolean { + val length = if (currentLimit?.resource.isNullOrEmpty()) { + 0 + } else { + ResourcePathUtils.tokenizeResourcePath(currentLimit!!.resource).size + } + if (length == pathDirSize) { + return true + } + return false + } + + /** + * 将资源路径按照/拆分,存对应每级对应规则 + */ + private fun addPathNode( + resourcePath: String, + resourceLimit: ResourceLimit + ) { + if (resourcePath == "/") { + root.setResourceLimit(resourceLimit) + return + } + + val pathDirs = ResourcePathUtils.tokenizeResourcePath(resourcePath) + if (pathDirs.isEmpty()) { + logger.warn("config resource path $resourcePath is empty!") + return + } + + var p = root + pathDirs.forEach { + val children = p.getEdges() + var pathDirPattern = it + var isPattern = false + if (isTemplateVariable(it)) { + pathDirPattern = getPathDirPatten(it) + isPattern = true + } + val newNode = PathNode(pathDirPattern, isPattern) + p = children.putIfAbsent(pathDirPattern, newNode) ?: newNode + } + p.setResourceLimit(resourceLimit) + logger.debug("$resourcePath set limit info $resourceLimit") + } + + private fun findInChildren( + children: ConcurrentHashMap, + path: String, + ): PathNode? { + children.entries.forEach { entry -> + val n = entry.value + if (n.isPattern) { + if (Pattern.matches(n.pathDir, path)) { + return n + } + } + } + return null + } + + /** + * 判断是否是模板 + */ + private fun isTemplateVariable(pathDir: String): Boolean { + return pathDir.startsWith("{") && pathDir.endsWith("}") || + pathDir == "*" || pathDir == "**" || pathDir.contains('*') + } + + /** + * 如果模板自带正则表达式,则格式必须为{(^[a-zA-Z]*$)}, ()内味对应正则表达式 + */ + private fun getPathDirPatten(pathDir: String): String { + val patternBuilder = StringBuilder() + val isRegex = pathDir.contains("{(") && pathDir.contains(")}") + if (isRegex) { + val variablePattern = pathDir.substring(2, pathDir.length - 2) + patternBuilder.append('(') + patternBuilder.append(variablePattern) + patternBuilder.append(')') + } else { + patternBuilder.append(PATH_REGEX) + } + return patternBuilder.toString() + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(PathResourceLimitRule::class.java) + private const val PATH_REGEX = ".*" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/RateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/RateLimitRule.kt new file mode 100644 index 0000000000..e570801c3c --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/RateLimitRule.kt @@ -0,0 +1,66 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule + +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * 限流配置规则处理 + */ +interface RateLimitRule { + + /** + * 是否存在相应配置规则 + */ + fun isEmpty(): Boolean + + /** + * 获取资源对应的规则 + * 优先查找resource, 如查不到对应规则,则通过extraResource查找 + * resource一般是特定类型,如特定用户,特定URL,特定项目仓库等 + * extraResource一般是某一类类型,如所有用户、URL模版、所有仓库等 + */ + fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? + + /** + * 添加限流规则 + */ + fun addRateLimitRule(resourceLimit: ResourceLimit) + + /** + * 批量添加限流规则 + */ + fun addRateLimitRules(resourceLimit: List) + + /** + * 过滤不符合条件的规则 + */ + fun filterResourceLimit(resourceLimit: ResourceLimit) +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/BandwidthResourceLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/BandwidthResourceLimitRule.kt new file mode 100644 index 0000000000..6094dc6f9d --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/BandwidthResourceLimitRule.kt @@ -0,0 +1,63 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.PathNode +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * 带宽资源规则类 + * 如果配置了仓库级别限流配置,则仓库下所有请求遵循这个配置,即同一仓库下所有请求共享这个带宽限额; + * 如果配置了项目级别限流配置,则项目下所有请求遵循这个配置,即同一项目下所有请求共享这个带宽限额。 + */ +class BandwidthResourceLimitRule( + root: PathNode = PathNode("/"), + pathLengthCheck: Boolean = true +) : PathResourceLimitRule(root, pathLengthCheck) { + + /** + * 添加资源对应对应的规则 + */ + fun addUrlResourceLimit(resourceLimit: ResourceLimit) { + addPathResourceLimit(resourceLimit, bandwidthDimensionList) + } + + fun addUrlResourceLimits(resourceLimits: List) { + resourceLimits.forEach { + addUrlResourceLimit(it) + } + } + + companion object { + private val bandwidthDimensionList = listOf( + LimitDimension.UPLOAD_BANDWIDTH.name, LimitDimension.DOWNLOAD_BANDWIDTH.name + ) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRule.kt new file mode 100644 index 0000000000..fa5428338d --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRule.kt @@ -0,0 +1,55 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 下载带宽限流配置规则实现 + */ +class DownloadBandwidthRateLimitRule( + bandwidthLimitRules: BandwidthResourceLimitRule = BandwidthResourceLimitRule() +) : UploadBandwidthRateLimitRule(bandwidthLimitRules) { + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.DOWNLOAD_BANDWIDTH.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(DownloadBandwidthRateLimitRule::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRule.kt new file mode 100644 index 0000000000..8e7b35ca7f --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRule.kt @@ -0,0 +1,96 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 上传带宽限流配置规则实现 + */ +open class UploadBandwidthRateLimitRule( + private val bandwidthLimitRules: BandwidthResourceLimitRule = BandwidthResourceLimitRule() +) : RateLimitRule { + + override fun isEmpty(): Boolean { + return bandwidthLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var realResource = resInfo.resource + if (realResource.isBlank()) { + return null + } + var ruleLimit = bandwidthLimitRules.getPathResourceLimit(realResource) + if (ruleLimit == null && resInfo.extraResource.isNotEmpty()) { + for (res in resInfo.extraResource) { + ruleLimit = bandwidthLimitRules.getPathResourceLimit(res) + if (ruleLimit != null) { + realResource = res + break + } + } + } + if (ruleLimit == null) return null + return ResLimitInfo(realResource, ruleLimit) + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + bandwidthLimitRules.addUrlResourceLimit(resourceLimit) + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.UPLOAD_BANDWIDTH.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UploadBandwidthRateLimitRule::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/PathNode.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/PathNode.kt new file mode 100644 index 0000000000..6a05e7c575 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/PathNode.kt @@ -0,0 +1,53 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.common + +import java.util.concurrent.ConcurrentHashMap + +/** + * path 对应配置 + */ +class PathNode( + val pathDir: String, + val isPattern: Boolean = false, +) { + private val edges: ConcurrentHashMap = ConcurrentHashMap() + private var resourceLimit: ResourceLimit? = null + + fun getEdges(): ConcurrentHashMap { + return edges + } + + fun setResourceLimit(resourceLimit: ResourceLimit) { + this.resourceLimit = resourceLimit + } + + fun getResourceLimit(): ResourceLimit? { + return this.resourceLimit + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResInfo.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResInfo.kt new file mode 100644 index 0000000000..3e3a1014bb --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResInfo.kt @@ -0,0 +1,37 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.common + +/** + * 资源信息 + */ +data class ResInfo( + val resource: String, + val extraResource: List = emptyList() +) + diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResLimitInfo.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResLimitInfo.kt new file mode 100644 index 0000000000..f7dc5d33ce --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResLimitInfo.kt @@ -0,0 +1,38 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.common + +/** + * 请求资源以及对应的限流配置 + */ +data class ResLimitInfo( + // 请求资源 + val resource: String, + // 请求资源对应的限流配置 + val resourceLimit: ResourceLimit +) diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResourceLimit.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResourceLimit.kt new file mode 100644 index 0000000000..68ebc0526e --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/common/ResourceLimit.kt @@ -0,0 +1,55 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.common + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import java.time.Duration + +/** + * 限流规则 + */ +data class ResourceLimit( + // 算法选择 + var algo: String = Algorithms.FIXED_WINDOW.name, + // 资源标识 + var resource: String = "/", + // 限流维度 + var limitDimension: String = LimitDimension.URL.name, + // 限流值 + var limit: Long = -1, + // 限流周期 + var duration: Duration = Duration.ofSeconds(1), + // 桶容量(令牌桶和漏桶使用) + var capacity: Long? = null, + // 生效范围 + var scope: String = WorkScope.LOCAL.name, + // 指定机器上运行 + var targets: List = emptyList() +) diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRule.kt new file mode 100644 index 0000000000..c5eef29ac6 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRule.kt @@ -0,0 +1,97 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * URL限流配置规则实现 + */ +class UrlRateLimitRule : RateLimitRule { + + // 指定URL规则 + private val urlLimitRules: UrlResourceLimitRule = UrlResourceLimitRule() + + override fun isEmpty(): Boolean { + return urlLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var realResource = resInfo.resource + if (realResource.isBlank()) { + return null + } + var ruleLimit = urlLimitRules.getPathResourceLimit(realResource) + if (ruleLimit == null && resInfo.extraResource.isNotEmpty()) { + for (res in resInfo.extraResource) { + ruleLimit = urlLimitRules.getPathResourceLimit(res) + if (ruleLimit != null) { + realResource = res + break + } + } + } + if (ruleLimit == null) return null + return ResLimitInfo(realResource, ruleLimit) + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + urlLimitRules.addUrlResourceLimit(resourceLimit) + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.URL.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UrlRateLimitRule::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRule.kt new file mode 100644 index 0000000000..5a698ded10 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRule.kt @@ -0,0 +1,98 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 基于项目/仓库的URL限流配置规则实现 + */ +class UrlRepoRateLimitRule : RateLimitRule { + + val urlRepoLimitRules: PathResourceLimitRule = PathResourceLimitRule(pathLengthCheck = true) + + override fun isEmpty(): Boolean { + return urlRepoLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var realResource = resInfo.resource + if (realResource.isBlank()) { + return null + } + var ruleLimit = urlRepoLimitRules.getPathResourceLimit(realResource) + if (ruleLimit == null && resInfo.extraResource.isNotEmpty()) { + for (res in resInfo.extraResource) { + ruleLimit = urlRepoLimitRules.getPathResourceLimit(res) + if (ruleLimit != null) { + realResource = res + break + } + } + } + if (ruleLimit == null) return null + return ResLimitInfo(realResource, ruleLimit) + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + urlRepoLimitRules.addPathResourceLimit(resourceLimit, urlRepoDimensionList) + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.URL_REPO.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UrlRepoRateLimitRule::class.java) + private val urlRepoDimensionList = listOf(LimitDimension.URL_REPO.name) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlResourceLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlResourceLimitRule.kt new file mode 100644 index 0000000000..b921a4c24c --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlResourceLimitRule.kt @@ -0,0 +1,60 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.PathNode +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit + +/** + * url资源规则类: + * 如果配置了父路径,则子路径也会遵循父路径对应的配置规则,即每个子路径单独拥有对应父路径所配置的限流规则; + * 如果配置指定路径,则只有该指定路径遵循对应的配置规则,即该指定路径独享所配置的限流规则。 + */ +class UrlResourceLimitRule( + root: PathNode = PathNode("/") +) : PathResourceLimitRule(root) { + + /** + * 添加URL对应的规则 + */ + fun addUrlResourceLimit(resourceLimit: ResourceLimit) { + addPathResourceLimit(resourceLimit, urlDimensionList) + } + + fun addUrlResourceLimits(resourceLimits: List) { + resourceLimits.forEach { + addUrlResourceLimit(it) + } + } + + companion object { + private val urlDimensionList = listOf(LimitDimension.URL.name) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRule.kt new file mode 100644 index 0000000000..9a00605c8a --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRule.kt @@ -0,0 +1,128 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url.user + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils.buildUserPath +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils.getUserAndPath +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.util.concurrent.ConcurrentHashMap + +/** + * 用户级别的URL限流配置规则实现 + */ +class UserUrlRateLimitRule : RateLimitRule { + + // 用户+指定url对应规则(限制每个用户对应URL的请求次数) + private val userUrlLimitRules: ConcurrentHashMap = ConcurrentHashMap() + + // 用户对应规则(限制每个用户的总请求次数) + private val userLimitRules: ConcurrentHashMap = ConcurrentHashMap() + + override fun isEmpty(): Boolean { + return userUrlLimitRules.isEmpty() && userLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var resLimitInfo = findConfigRule(resInfo.resource) + if (resLimitInfo == null) { + resLimitInfo = findConfigRule(resInfo.resource, true) + } + if (resLimitInfo == null && resInfo.extraResource.isNotEmpty()) { + val res = resInfo.extraResource.first() + val (user, _) = getUserAndPath(res) + val userRule = userLimitRules[user] + if (userRule != null) { + resLimitInfo = ResLimitInfo(res, userRule) + } + if (resLimitInfo == null && userLimitRules.containsKey(StringPool.POUND)) { + resLimitInfo = ResLimitInfo(res, userLimitRules[StringPool.POUND]!!) + } + } + return resLimitInfo + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + val (userId, path) = getUserAndPath(resourceLimit.resource) + if (path.isEmpty()) { + userLimitRules[userId] = resourceLimit + } else { + val userUrlResourceLimitRule = userUrlLimitRules.getOrDefault(userId, UserUrlResourceLimitRule()) + userUrlResourceLimitRule.addUserUrlResourceLimit(resourceLimit) + userUrlLimitRules.putIfAbsent(userId, userUrlResourceLimitRule) + } + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.USER_URL.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + /** + * 根据资源获取配置 + */ + private fun findConfigRule(resource: String, userPattern: Boolean = false): ResLimitInfo? { + if (resource.isBlank()) { + return null + } + var (user, resWithoutUser) = getUserAndPath(resource) + if (userPattern) { + user = StringPool.POUND + } + val userUrlRule = userUrlLimitRules[user] + val ruleLimit = userUrlRule?.getPathResourceLimit(resWithoutUser) ?: return null + val resourceLimitCopy = ruleLimit.copy(resource = buildUserPath(user, ruleLimit.resource)) + return ResLimitInfo(resource, resourceLimitCopy) + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserUrlRateLimitRule::class.java) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRule.kt new file mode 100644 index 0000000000..6c2bf11cc9 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRule.kt @@ -0,0 +1,138 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url.user + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.util.concurrent.ConcurrentHashMap + +class UserUrlRepoRateLimitRule( + // 用户+urlRepo对应规则 + private val userUrlRepoLimitRules: ConcurrentHashMap = ConcurrentHashMap(), + // 用户对应规则 + private val userLimitRules: ConcurrentHashMap = ConcurrentHashMap() +) : RateLimitRule { + + override fun isEmpty(): Boolean { + return userUrlRepoLimitRules.isEmpty() && userLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var resLimitInfo = findConfigRule(resInfo.resource, resInfo.extraResource) + if (resLimitInfo == null) { + resLimitInfo = findConfigRule(resInfo.resource, resInfo.extraResource, true) + } + if (resLimitInfo == null && resInfo.extraResource.isNotEmpty()) { + val res = resInfo.extraResource.last() + val (user, _) = ResourcePathUtils.getUserAndPath(res) + val userRule = userLimitRules[user] + if (userRule != null) { + resLimitInfo = ResLimitInfo(res, userRule) + } + if (resLimitInfo == null && userLimitRules.containsKey(StringPool.POUND)) { + resLimitInfo = ResLimitInfo(res, userLimitRules[StringPool.POUND]!!) + } + } + return resLimitInfo + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + val (userId, path) = ResourcePathUtils.getUserAndPath(resourceLimit.resource) + if (path.isEmpty()) { + userLimitRules[userId] = resourceLimit + } else { + val userUrlRepoResourceLimitRule = + userUrlRepoLimitRules.getOrDefault(userId, UserUrlRepoResourceLimitRule()) + userUrlRepoResourceLimitRule.addUserUrlRepoResourceLimit(resourceLimit) + userUrlRepoLimitRules.putIfAbsent(userId, userUrlRepoResourceLimitRule) + } + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.USER_URL_REPO.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + /** + * 根据资源获取配置 + */ + private fun findConfigRule( + resource: String, extraResource: List, userPattern: Boolean = false + ): ResLimitInfo? { + var realResource = resource + if (realResource.isBlank()) { + return null + } + var (user, resWithoutUser) = ResourcePathUtils.getUserAndPath(realResource) + if (userPattern) { + user = StringPool.POUND + } + val userUsageRule = userUrlRepoLimitRules[user] + var ruleLimit = userUsageRule?.getPathResourceLimit(resWithoutUser) + if (ruleLimit == null && extraResource.isNotEmpty()) { + for (res in extraResource) { + var (_, resWithoutUser) = ResourcePathUtils.getUserAndPath(res) + ruleLimit = userUsageRule?.getPathResourceLimit(resWithoutUser) + if (ruleLimit != null) { + realResource = res + break + } + } + } + if (ruleLimit == null) return null + val resourceLimitCopy = ruleLimit.copy(resource = ResourcePathUtils.buildUserPath(user, ruleLimit.resource)) + return ResLimitInfo(realResource, resourceLimitCopy) + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserUrlRepoRateLimitRule::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoResourceLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoResourceLimitRule.kt new file mode 100644 index 0000000000..4f2f04937b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoResourceLimitRule.kt @@ -0,0 +1,72 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url.user + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.PathNode +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils.getUserAndPath +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +class UserUrlRepoResourceLimitRule( + root: PathNode = PathNode("/"), + pathLengthCheck: Boolean = true, + private var user: String = StringPool.POUND, +) : PathResourceLimitRule(root, pathLengthCheck) { + + fun addUserUrlRepoResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension !in userUrlRepoDimensionList) { + return + } + val (userId, urlPath) = getUserAndPath(resourceLimit.resource) + if (!urlPath.startsWith("/") || user.isBlank()) { + logger.warn("$resourceLimit is invalid") + throw InvalidResourceException(urlPath) + } + user = userId + val resourceLimitCopy = resourceLimit.copy(resource = urlPath) + addPathResourceLimit(resourceLimitCopy, userUrlRepoDimensionList) + } + + fun addUserUrlRepoResourceLimits(resourceLimits: List) { + resourceLimits.forEach { + addUserUrlRepoResourceLimit(it) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserUrlRepoResourceLimitRule::class.java) + private val userUrlRepoDimensionList = listOf( + LimitDimension.USER_URL_REPO.name + ) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlResourceLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlResourceLimitRule.kt new file mode 100644 index 0000000000..892d837d1c --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlResourceLimitRule.kt @@ -0,0 +1,74 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url.user + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.PathNode +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils.getUserAndPath +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 用户+url对应规则 + * 如果配置了父路径,则该用户对应访问的子路径也会遵循父路径对应的配置规则,即每个子路径单独拥有对应父路径所配置的限流规则; + * 如果配置指定路径,则只有该用户访问的指定路径遵循对应的配置规则,即该指定路径独享所配置的限流规则。 + */ +class UserUrlResourceLimitRule( + root: PathNode = PathNode("/"), + private var user: String = StringPool.POUND +) : PathResourceLimitRule(root) { + + fun addUserUrlResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension !in userLimitDimensionList) { + return + } + val (userId, urlPath) = getUserAndPath(resourceLimit.resource) + if (!urlPath.startsWith("/") || user.isBlank()) { + logger.warn("$resourceLimit is invalid") + throw InvalidResourceException(urlPath) + } + user = userId + val resourceLimitCopy = resourceLimit.copy(resource = urlPath) + addPathResourceLimit(resourceLimitCopy, userLimitDimensionList) + } + + fun addUserUrlResourceLimits(resourceLimits: List) { + resourceLimits.forEach { + addUserUrlResourceLimit(it) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserUrlResourceLimitRule::class.java) + private val userLimitDimensionList = listOf(LimitDimension.USER_URL.name) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRule.kt new file mode 100644 index 0000000000..c79f93af95 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRule.kt @@ -0,0 +1,55 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 下载用量限流配置规则实现 + * 如果配置了仓库级别限流配置,则该对应仓库下所有请求遵循这个配置,即同一仓库下所有请求共享这个容量限额; + * 如果配置了项目级别限流配置,则对应项目下所有请求遵循这个配置,即同一项目下所有请求共享这个容量限额。 + */ +class DownloadUsageRateLimitRule : UploadUsageRateLimitRule() { + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.DOWNLOAD_USAGE.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(DownloadUsageRateLimitRule::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRule.kt new file mode 100644 index 0000000000..55a5759094 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRule.kt @@ -0,0 +1,98 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 上传用量限流配置规则实现 + */ +open class UploadUsageRateLimitRule : RateLimitRule { + + val usageLimitRules: PathResourceLimitRule = PathResourceLimitRule(pathLengthCheck = true) + + override fun isEmpty(): Boolean { + return usageLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var realResource = resInfo.resource + if (realResource.isBlank()) { + return null + } + var ruleLimit = usageLimitRules.getPathResourceLimit(realResource) + if (ruleLimit == null && resInfo.extraResource.isNotEmpty()) { + for (res in resInfo.extraResource) { + ruleLimit = usageLimitRules.getPathResourceLimit(res) + if (ruleLimit != null) { + realResource = res + break + } + } + } + if (ruleLimit == null) return null + return ResLimitInfo(realResource, ruleLimit) + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + usageLimitRules.addPathResourceLimit(resourceLimit, usageDimensionList) + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.UPLOAD_USAGE.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UploadUsageRateLimitRule::class.java) + private val usageDimensionList = listOf(LimitDimension.UPLOAD_USAGE.name, LimitDimension.DOWNLOAD_USAGE.name) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRule.kt new file mode 100644 index 0000000000..49d24c8548 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRule.kt @@ -0,0 +1,57 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage.user + +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.util.concurrent.ConcurrentHashMap + +/** + * 用户下载用量限流规则实现 + */ +class UserDownloadUsageRateLimitRule( + userUsageLimitRules: ConcurrentHashMap = ConcurrentHashMap(), + userLimitRules: ConcurrentHashMap = ConcurrentHashMap() +) : UserUploadUsageRateLimitRule(userUsageLimitRules, userLimitRules) { + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.USER_DOWNLOAD_USAGE.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserDownloadUsageRateLimitRule::class.java) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRule.kt new file mode 100644 index 0000000000..3f79d1b61a --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRule.kt @@ -0,0 +1,140 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage.user + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import java.util.concurrent.ConcurrentHashMap + +/** + * 用户上传用量限流配置规则实现 + */ +open class UserUploadUsageRateLimitRule( + // 用户+用量对应规则 + private val userUsageLimitRules: ConcurrentHashMap = ConcurrentHashMap(), + // 用户对应规则 + private val userLimitRules: ConcurrentHashMap = ConcurrentHashMap() +) : RateLimitRule { + + override fun isEmpty(): Boolean { + return userUsageLimitRules.isEmpty() && userLimitRules.isEmpty() + } + + override fun getRateLimitRule(resInfo: ResInfo): ResLimitInfo? { + var resLimitInfo = findConfigRule(resInfo.resource, resInfo.extraResource) + if (resLimitInfo == null) { + resLimitInfo = findConfigRule(resInfo.resource, resInfo.extraResource, true) + } + if (resLimitInfo == null && resInfo.extraResource.isNotEmpty()) { + val res = resInfo.extraResource.last() + val (user, _) = ResourcePathUtils.getUserAndPath(res) + val userRule = userLimitRules[user] + if (userRule != null) { + resLimitInfo = ResLimitInfo(res, userRule) + } + if (resLimitInfo == null && userLimitRules.containsKey(StringPool.POUND)) { + resLimitInfo = ResLimitInfo(res, userLimitRules[StringPool.POUND]!!) + } + } + return resLimitInfo + } + + override fun addRateLimitRule(resourceLimit: ResourceLimit) { + filterResourceLimit(resourceLimit) + val (userId, path) = ResourcePathUtils.getUserAndPath(resourceLimit.resource) + if (path.isEmpty()) { + userLimitRules[userId] = resourceLimit + } else { + val userUsageResourceLimitRule = userUsageLimitRules.getOrDefault(userId, UserUsageResourceLimitRule()) + userUsageResourceLimitRule.addUserUsageResourceLimit(resourceLimit) + userUsageLimitRules.putIfAbsent(userId, userUsageResourceLimitRule) + } + } + + override fun addRateLimitRules(resourceLimit: List) { + resourceLimit.forEach { + try { + addRateLimitRule(it) + } catch (e: Exception) { + logger.error("add config $it for ${this.javaClass.simpleName} failed, error is ${e.message}") + } + } + } + + override fun filterResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension != LimitDimension.USER_UPLOAD_USAGE.name) { + throw InvalidResourceException(resourceLimit.limitDimension) + } + if (resourceLimit.resource.isBlank()) { + throw InvalidResourceException(resourceLimit.resource) + } + } + + /** + * 根据资源获取配置 + */ + private fun findConfigRule( + resource: String, extraResource: List, userPattern: Boolean = false + ): ResLimitInfo? { + var realResource = resource + if (realResource.isBlank()) { + return null + } + var (user, resWithoutUser) = ResourcePathUtils.getUserAndPath(realResource) + if (userPattern) { + user = StringPool.POUND + } + val userUsageRule = userUsageLimitRules[user] + var ruleLimit = userUsageRule?.getPathResourceLimit(resWithoutUser) + if (ruleLimit == null && extraResource.isNotEmpty()) { + for (res in extraResource) { + var (_, resWithoutUser) = ResourcePathUtils.getUserAndPath(res) + ruleLimit = userUsageRule?.getPathResourceLimit(resWithoutUser) + if (ruleLimit != null) { + realResource = res + break + } + } + } + if (ruleLimit == null) return null + val resourceLimitCopy = ruleLimit.copy(resource = ResourcePathUtils.buildUserPath(user, ruleLimit.resource)) + return ResLimitInfo(realResource, resourceLimitCopy) + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserUploadUsageRateLimitRule::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUsageResourceLimitRule.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUsageResourceLimitRule.kt new file mode 100644 index 0000000000..0ae86f9fef --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUsageResourceLimitRule.kt @@ -0,0 +1,78 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage.user + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.PathResourceLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.PathNode +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.utils.ResourcePathUtils.getUserAndPath +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * 用户+用量对应规则 + * 如果配置了仓库级别限流配置,则该用户下对应仓库下所有请求遵循这个配置,即同一仓库下所有请求共享这个容量限额; + * 如果配置了项目级别限流配置,则用户下对应项目下所有请求遵循这个配置,即同一项目下所有请求共享这个容量限额。 + */ +class UserUsageResourceLimitRule( + root: PathNode = PathNode("/"), + pathLengthCheck: Boolean = true, + private var user: String = StringPool.POUND, +) : PathResourceLimitRule(root, pathLengthCheck) { + + fun addUserUsageResourceLimit(resourceLimit: ResourceLimit) { + if (resourceLimit.limitDimension !in userUsageDimensionList) { + return + } + val (userId, urlPath) = getUserAndPath(resourceLimit.resource) + if (!urlPath.startsWith("/") || user.isBlank()) { + logger.warn("$resourceLimit is invalid") + throw InvalidResourceException(urlPath) + } + user = userId + val resourceLimitCopy = resourceLimit.copy(resource = urlPath) + addPathResourceLimit(resourceLimitCopy, userUsageDimensionList) + } + + fun addUserUsageResourceLimits(resourceLimits: List) { + resourceLimits.forEach { + addUserUsageResourceLimit(it) + } + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(UserUsageResourceLimitRule::class.java) + private val userUsageDimensionList = listOf( + LimitDimension.USER_DOWNLOAD_USAGE.name, + LimitDimension.USER_UPLOAD_USAGE.name + ) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractBandwidthRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractBandwidthRateLimiterService.kt new file mode 100644 index 0000000000..cdcea5f9e0 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractBandwidthRateLimiterService.kt @@ -0,0 +1,158 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service + +import com.tencent.bkrepo.common.ratelimiter.algorithm.RateLimiter +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import com.tencent.bkrepo.common.ratelimiter.stream.CommonRateLimitInputStream +import com.tencent.bkrepo.common.ratelimiter.stream.RateCheckContext +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.util.unit.DataSize +import java.io.InputStream +import javax.servlet.http.HttpServletRequest + +/** + * 带宽限流器抽象实现 + */ +abstract class AbstractBandwidthRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterProperties: RateLimiterProperties, + rateLimiterConfigService: RateLimiterConfigService, +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun limit(request: HttpServletRequest, applyPermits: Long?) { + throw UnsupportedOperationException() + } + + /** + * 根据资源返回对应带限流实现的InputStream + */ + fun bandwidthRateStart( + request: HttpServletRequest, + inputStream: InputStream, + circuitBreakerPerSecond: DataSize, + rangeLength: Long? = null, + ): CommonRateLimitInputStream? { + val resLimitInfo = getResLimitInfo(request) ?: return null + logger.info("will check the bandwidth with length $rangeLength of ${resLimitInfo.resource}") + return try { + interceptorChain.doBeforeLimitCheck(resLimitInfo.resource, resLimitInfo.resourceLimit) + circuitBreakerCheck(resLimitInfo.resourceLimit, circuitBreakerPerSecond.toBytes()) + val rateLimiter = getAlgorithmOfRateLimiter(resLimitInfo.resource, resLimitInfo.resourceLimit) + val context = RateCheckContext( + rateLimiter = rateLimiter, latency = rateLimiterProperties.latency, + waitRound = rateLimiterProperties.waitRound, rangeLength = rangeLength, + dryRun = rateLimiterProperties.dryRun, permitsOnce = rateLimiterProperties.permitsOnce, + limitPerSecond = getPermitsPerSecond(resLimitInfo.resourceLimit) + ) + CommonRateLimitInputStream( + delegate = inputStream, + rateCheckContext = context + ) + } catch (e: AcquireLockFailedException) { + logger.warn( + "acquire lock failed for ${resLimitInfo.resource} " + + "with ${resLimitInfo.resourceLimit}, e: ${e.message}" + ) + null + } catch (e: InvalidResourceException) { + logger.warn("${resLimitInfo.resourceLimit} is invalid for ${resLimitInfo.resource} , e: ${e.message}") + null + } + } + + fun bandwidthRateLimitFinish( + request: HttpServletRequest, + exception: Exception? = null, + ) { + val resLimitInfo = getResLimitInfo(request) ?: return + afterRateLimitCheck(resLimitInfo, exception == null, exception) + } + + fun bandwidthRateLimit( + request: HttpServletRequest, + permits: Long, + circuitBreakerPerSecond: DataSize, + ) { + val resLimitInfo = getResLimitInfo(request) ?: return + rateLimitCatch( + request = request, + resLimitInfo = resLimitInfo, + applyPermits = permits, + circuitBreakerPerSecond = circuitBreakerPerSecond.toBytes() + ) { rateLimiter, realPermits -> + bandwidthLimitHandler(rateLimiter, realPermits) + } + } + + fun bandwidthLimitHandler( + rateLimiter: RateLimiter, + permits: Long + ): Boolean { + var flag = false + var failedNum = 0 + while (!flag) { + flag = rateLimiter.tryAcquire(permits) + if (!flag && failedNum < rateLimiterProperties.waitRound) { + failedNum++ + try { + Thread.sleep(rateLimiterProperties.latency) + } catch (ignore: InterruptedException) { + } + } + if (!flag && failedNum >= rateLimiterProperties.waitRound) { + return false + } + } + return true + } + + private fun getPermitsPerSecond(resourceLimit: ResourceLimit): Long { + return resourceLimit.limit / resourceLimit.duration.seconds + } + + companion object { + private val logger: Logger = LoggerFactory.getLogger(AbstractBandwidthRateLimiterService::class.java) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterService.kt new file mode 100644 index 0000000000..a9c3c60457 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterService.kt @@ -0,0 +1,560 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service + + +import com.fasterxml.jackson.module.kotlin.readValue +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.api.util.JsonUtils.objectMapper +import com.tencent.bkrepo.common.api.util.readJsonString +import com.tencent.bkrepo.common.artifact.constant.PROJECT_ID +import com.tencent.bkrepo.common.artifact.constant.REPO_NAME +import com.tencent.bkrepo.common.query.enums.OperationType +import com.tencent.bkrepo.common.query.model.QueryModel +import com.tencent.bkrepo.common.query.model.Rule +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedFixedWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedLeakyRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedSlidingWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedTokenBucketRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.FixedWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.LeakyRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.RateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.SlidingWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.TokenBucketRateLimiter +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.interceptor.MonitorRateLimiterInterceptorAdaptor +import com.tencent.bkrepo.common.ratelimiter.interceptor.RateLimiterInterceptor +import com.tencent.bkrepo.common.ratelimiter.interceptor.RateLimiterInterceptorChain +import com.tencent.bkrepo.common.ratelimiter.interceptor.TargetRateLimiterInterceptorAdaptor +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.bandwidth.DownloadBandwidthRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.bandwidth.UploadBandwidthRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResLimitInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.UrlRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.url.UrlRepoRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.url.user.UserUrlRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.url.user.UserUrlRepoRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.usage.DownloadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.usage.UploadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.usage.user.UserDownloadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.usage.user.UserUploadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import com.tencent.bkrepo.common.service.servlet.MultipleReadHttpRequest +import java.util.concurrent.ConcurrentHashMap +import javax.servlet.http.HttpServletRequest +import org.slf4j.Logger +import org.slf4j.LoggerFactory +import org.springframework.beans.factory.annotation.Value +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.http.HttpMethod +import org.springframework.http.MediaType +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.util.unit.DataSize +import org.springframework.web.servlet.HandlerMapping + +/** + * 限流器抽象实现 + */ +abstract class AbstractRateLimiterService( + private val taskScheduler: ThreadPoolTaskScheduler, + val rateLimiterProperties: RateLimiterProperties, + private val rateLimiterMetrics: RateLimiterMetrics, + private val redisTemplate: RedisTemplate? = null, + private val rateLimiterConfigService: RateLimiterConfigService, +) : RateLimiterService { + + @Value("\${spring.application.name}") + var moduleName: String = StringPool.EMPTY + + + // 资源对应限限流算法缓存 + private var rateLimiterCache: ConcurrentHashMap = ConcurrentHashMap(256) + + val interceptorChain: RateLimiterInterceptorChain = + RateLimiterInterceptorChain( + mutableListOf( + MonitorRateLimiterInterceptorAdaptor(rateLimiterMetrics), + TargetRateLimiterInterceptorAdaptor(rateLimiterConfigService) + ) + ) + + // 限流规则配置 + var rateLimitRule: RateLimitRule? = null + + // 当前限流规则配置hashcode + var currentRuleHashCode: Int? = null + + init { + taskScheduler.scheduleWithFixedDelay(this::refreshRateLimitRule, rateLimiterProperties.refreshDuration * 1000) + } + + /** + * 获取对应资源限流规则配置 + */ + fun getResLimitInfo(request: HttpServletRequest): ResLimitInfo? { + if (!rateLimiterProperties.enabled) { + return null + } + val resLimitInfo = try { + val resInfo = ResInfo( + resource = buildResource(request), + extraResource = buildExtraResource(request) + ) + rateLimitRule?.getRateLimitRule(resInfo) + } catch (e: InvalidResourceException) { + logger.warn("Config is invalid for request ${request.requestURI}, e: ${e.message}") + null + } + + if (resLimitInfo == null) { + return null + } + return resLimitInfo + } + + override fun limit(request: HttpServletRequest, applyPermits: Long?) { + if (!rateLimiterProperties.enabled) { + return + } + if (ignoreRequest(request)) return + if (rateLimitRule == null || rateLimitRule!!.isEmpty()) return + val resLimitInfo = getResLimitInfo(request) ?: return + rateLimitCatch( + request = request, + resLimitInfo = resLimitInfo, + applyPermits = applyPermits, + ) { rateLimiter, permits -> + rateLimiter.tryAcquire(permits) + } + } + + override fun addInterceptor(interceptor: RateLimiterInterceptor) { + this.interceptorChain.addInterceptor(interceptor) + } + + override fun addInterceptors(interceptors: List) { + if (interceptors.isNotEmpty()) { + this.interceptorChain.addInterceptors(interceptors) + } + } + + /** + * 生成资源对应的唯一key + */ + abstract fun generateKey(resource: String, resourceLimit: ResourceLimit): String + + /** + * 根据请求获取对应的资源,用于查找对应限流规则 + */ + abstract fun buildResource(request: HttpServletRequest): String + + /** + * 根据请求获取对其他资源信息,用于查找对应限流规则 + */ + abstract fun buildExtraResource(request: HttpServletRequest): List + + /** + * 根据请求获取需要申请的许可数 + */ + abstract fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long + + /** + * 限流器实现对应的维度 + */ + abstract fun getLimitDimensions(): List + + /** + * 获取对应限流规则配置实现 + */ + abstract fun getRateLimitRuleClass(): Class + + /** + * 对请求进行过滤,不进行限流 + */ + open fun ignoreRequest(request: HttpServletRequest): Boolean { + return false + } + + /** + * 根据资源和限流规则生成对应限流算法 + */ + open fun createAlgorithmOfRateLimiter(resource: String, resourceLimit: ResourceLimit): RateLimiter { + if (resourceLimit.limit < 0) { + throw InvalidResourceException("config limit is ${resourceLimit.limit}") + } + return when (resourceLimit.algo) { + Algorithms.FIXED_WINDOW.name -> { + buildFixedWindowRateLimiter(resource, resourceLimit) + } + + Algorithms.TOKEN_BUCKET.name -> { + buildTokenBucketRateLimiter(resource, resourceLimit) + } + + Algorithms.SLIDING_WINDOW.name -> { + buildSlidingWindowRateLimiter(resource, resourceLimit) + } + + Algorithms.LEAKY_BUCKET.name -> { + buildLeakyRateLimiter(resource, resourceLimit) + } + + else -> { + throw InvalidResourceException("config algo is ${resourceLimit.algo}") + } + } + } + + fun getRepoInfoFromAttribute(request: HttpServletRequest): Pair { + var projectId: String? = null + var repoName: String? = null + try { + projectId = ((request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE)) + as Map<*, *>)["projectId"] as String? + repoName = ((request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE)) + as Map<*, *>)["repoName"] as String? + } catch (ignore: Exception) { + } + if (projectId.isNullOrEmpty()) { + throw InvalidResourceException("Could not find projectId from request ${request.requestURI}") + } + return Pair(projectId, repoName) + } + + fun getRepoInfoFromBody(request: HttpServletRequest): Pair { + val limit = DataSize.ofMegabytes(1).toBytes() + val lengthCondition = request.contentLength in 1..limit + val typeCondition = request.contentType?.startsWith(MediaType.APPLICATION_JSON_VALUE) == true + // 限制缓存大小 + if (lengthCondition && typeCondition) { + val multiReadRequest = MultipleReadHttpRequest(request, limit) + val (projectId, repoName) = getRepoInfoFromQueryModel(multiReadRequest) + if (!projectId.isNullOrEmpty()) return Pair(projectId, repoName) + val (newProjectId, newRepoName) = getRepoInfoFromOtherRequest(multiReadRequest) + if (newProjectId.isNullOrEmpty()) { + throw InvalidResourceException("Could not find projectId from request ${request.requestURI}") + } + return Pair(newProjectId, newRepoName) + } + throw InvalidResourceException("Could not find projectId from body of request ${request.requestURI}") + } + + private fun getRepoInfoFromQueryModel(multiReadRequest: MultipleReadHttpRequest): Pair { + try { + val queryModel = multiReadRequest.inputStream.readJsonString() + val rule = queryModel.rule + if (rule is Rule.NestedRule && rule.relation == Rule.NestedRule.RelationType.AND) { + return findRepoInfoFromRule(rule) + } + } catch (ignore: Exception) { + } + return Pair(null, null) + } + + private fun getRepoInfoFromOtherRequest(multiReadRequest: MultipleReadHttpRequest): Pair { + try { + val mappedValue = objectMapper.readValue>(multiReadRequest.inputStream) + return Pair((mappedValue[PROJECT_ID] as? String), (mappedValue[REPO_NAME] as? String)) + } catch (ignore: Exception) { + return Pair(null, null) + } + } + + private fun findRepoInfoFromRule(rule: Rule.NestedRule): Pair { + var projectId: String? = null + var repoName: String? = null + findKeyRule(PROJECT_ID, rule.rules)?.let { + it.value.toString().apply { projectId = this } + } + findKeyRule(REPO_NAME, rule.rules)?.let { + if (it.operation == OperationType.EQ) { + it.value.toString().apply { repoName = this } + } + } + return Pair(projectId, repoName) + } + + private fun findKeyRule(key: String, rules: List): Rule.QueryRule? { + for (rule in rules) { + if (rule is Rule.QueryRule && rule.field == key) { + return rule + } + } + return null + } + + /** + * 配置规则刷新 + */ + fun refreshRateLimitRule() { + if (!rateLimiterProperties.enabled) return + val usageRuleConfigs = rateLimiterProperties.rules.filter { + it.limitDimension in getLimitDimensions() + } + val databaseConfig = try { + rateLimiterConfigService.findByModuleNameAndLimitDimension( + moduleName, getLimitDimensions().first() + ) + } catch (e: Exception) { + logger.error("system error: $e") + listOf() + } + val configs = usageRuleConfigs.plus(databaseConfig.map { tRateLimit -> + ResourceLimit( + algo = tRateLimit.algo, + resource = tRateLimit.resource, + limit = tRateLimit.limit, + limitDimension = tRateLimit.limitDimension, + duration = tRateLimit.duration, + capacity = tRateLimit.capacity, + scope = tRateLimit.scope, + targets = tRateLimit.targets + ) + }) + // 配置规则变更后需要清理缓存的限流算法实现 + val newRuleHashCode = configs.hashCode() + if (currentRuleHashCode == newRuleHashCode) { + if (rateLimiterCache.size > rateLimiterProperties.cacheCapacity) { + clearLimiterCache() + } + return + } + val usageRules = getRuleClass() ?: return + usageRules.addRateLimitRules(configs) + rateLimitRule = usageRules + clearLimiterCache() + currentRuleHashCode = newRuleHashCode + logger.info("rules in ${this.javaClass.simpleName} for request has been refreshed!") + } + + private fun getRuleClass(): RateLimitRule? { + return when (getRateLimitRuleClass()) { + UrlRateLimitRule::class.java -> UrlRateLimitRule() + UploadUsageRateLimitRule::class.java -> UploadUsageRateLimitRule() + DownloadUsageRateLimitRule::class.java -> DownloadUsageRateLimitRule() + UserDownloadUsageRateLimitRule::class.java -> UserDownloadUsageRateLimitRule() + UserUploadUsageRateLimitRule::class.java -> UserUploadUsageRateLimitRule() + UserUrlRateLimitRule::class.java -> UserUrlRateLimitRule() + UploadBandwidthRateLimitRule::class.java -> UploadBandwidthRateLimitRule() + DownloadBandwidthRateLimitRule::class.java -> DownloadBandwidthRateLimitRule() + UrlRepoRateLimitRule::class.java -> UrlRepoRateLimitRule() + UserUrlRepoRateLimitRule::class.java -> UserUrlRepoRateLimitRule() + else -> null + } + } + + private fun clearLimiterCache() { + rateLimiterCache.forEach { + try { + it.value.removeCacheLimit(it.key) + } catch (e: Exception) { + logger.warn("clear limiter cache error: ${e.cause}, ${e.message}") + } + } + rateLimiterCache.clear() + } + + private fun beforeRateLimitCheck( + request: HttpServletRequest, + applyPermits: Long? = null, + resLimitInfo: ResLimitInfo, + circuitBreakerPerSecond: Long? = null, + ): Pair { + with(resLimitInfo) { + val realPermits = getApplyPermits(request, applyPermits) + interceptorChain.doBeforeLimitCheck(resource, resourceLimit) + circuitBreakerCheck(resourceLimit, circuitBreakerPerSecond) + val rateLimiter = getAlgorithmOfRateLimiter(resource, resourceLimit) + return Pair(rateLimiter, realPermits) + } + } + + fun afterRateLimitCheck( + resLimitInfo: ResLimitInfo, + pass: Boolean, + exception: Exception? = null, + ) { + with(resLimitInfo) { + interceptorChain.doAfterLimitCheck(resource, resourceLimit, pass, exception) + } + } + + fun rateLimitCatch( + request: HttpServletRequest, + resLimitInfo: ResLimitInfo, + applyPermits: Long? = null, + circuitBreakerPerSecond: Long? = null, + action: (RateLimiter, Long) -> Boolean + ) { + var exception: Exception? = null + var pass = false + try { + val (rateLimiter, permits) = beforeRateLimitCheck( + request = request, + applyPermits = applyPermits, + resLimitInfo = resLimitInfo, + circuitBreakerPerSecond = circuitBreakerPerSecond + ) + val realPermits = permits + pass = action(rateLimiter, realPermits) + if (!pass) { + val msg = "${resLimitInfo.resource} has exceeded max rate limit: " + + "${resLimitInfo.resourceLimit.limit} /${resLimitInfo.resourceLimit.duration}" + if (rateLimiterProperties.dryRun) { + logger.warn(msg) + } else { + throw OverloadException(msg) + } + } + } catch (e: OverloadException) { + throw e + } catch (e: AcquireLockFailedException) { + logger.warn( + "acquire lock failed for ${resLimitInfo.resource}" + + " with ${resLimitInfo.resourceLimit}, e: ${e.message}" + ) + exception = e + } catch (e: InvalidResourceException) { + logger.warn("${resLimitInfo.resourceLimit} is invalid ${resLimitInfo.resource} , e: ${e.message}") + exception = e + } catch (e: Exception) { + logger.error("internal error: $e") + exception = e + } finally { + afterRateLimitCheck(resLimitInfo, pass, exception) + } + } + + /** + * 获取对应限流算法实现 + */ + fun getAlgorithmOfRateLimiter( + resource: String, resourceLimit: ResourceLimit + ): RateLimiter { + val limitKey = generateKey(resource, resourceLimit) + var rateLimiter = rateLimiterCache[limitKey] + if (rateLimiter == null) { + val newRateLimiter = createAlgorithmOfRateLimiter(limitKey, resourceLimit) + rateLimiter = rateLimiterCache.putIfAbsent(limitKey, newRateLimiter) + if (rateLimiter == null) { + rateLimiter = newRateLimiter + } + } + return rateLimiter + } + + /** + * (特殊操作)如果配置的限流规则比熔断配置小,则直接限流 + */ + fun circuitBreakerCheck( + resourceLimit: ResourceLimit, + circuitBreakerPerSecond: Long? = null, + ) { + if (circuitBreakerPerSecond == null) return + val permitsPerSecond = resourceLimit.limit / resourceLimit.duration.seconds + if (circuitBreakerPerSecond >= permitsPerSecond) { + throw OverloadException( + "The circuit breaker is activated when too many download requests are made to the service!" + ) + } + } + + private fun buildFixedWindowRateLimiter( + resource: String, + resourceLimit: ResourceLimit, + ): RateLimiter { + return if (resourceLimit.scope == WorkScope.LOCAL.name) { + FixedWindowRateLimiter(resourceLimit.limit, resourceLimit.duration) + } else { + DistributedFixedWindowRateLimiter( + resource, resourceLimit.limit, resourceLimit.duration, redisTemplate!! + ) + } + } + + private fun buildTokenBucketRateLimiter( + resource: String, + resourceLimit: ResourceLimit, + ): RateLimiter { + val permitsPerSecond = (resourceLimit.limit / resourceLimit.duration.seconds.toDouble()) + return if (resourceLimit.scope == WorkScope.LOCAL.name) { + TokenBucketRateLimiter(permitsPerSecond) + } else { + if (resourceLimit.capacity == null || resourceLimit.capacity!! <= 0) { + throw InvalidResourceException("Resource limit config $resourceLimit is illegal") + } + DistributedTokenBucketRateLimiter( + resource, permitsPerSecond, resourceLimit.capacity!!, redisTemplate!! + ) + } + } + + private fun buildSlidingWindowRateLimiter( + resource: String, + resourceLimit: ResourceLimit, + ): RateLimiter { + return if (resourceLimit.scope == WorkScope.LOCAL.name) { + SlidingWindowRateLimiter(resourceLimit.limit, resourceLimit.duration) + } else { + DistributedSlidingWindowRateLimiter( + resource, resourceLimit.limit, resourceLimit.duration, redisTemplate!! + ) + } + } + + private fun buildLeakyRateLimiter( + resource: String, + resourceLimit: ResourceLimit, + ): RateLimiter { + if (resourceLimit.capacity == null || resourceLimit.capacity!! <= 0) { + throw InvalidResourceException("Resource limit config $resourceLimit is illegal") + } + val rate = resourceLimit.limit / resourceLimit.duration.seconds.toDouble() + return if (resourceLimit.scope == WorkScope.LOCAL.name) { + LeakyRateLimiter(rate, resourceLimit.capacity!!) + } else { + DistributedLeakyRateLimiter( + resource, rate, resourceLimit.capacity!!, redisTemplate!! + ) + } + } + + companion object { + val logger: Logger = LoggerFactory.getLogger(AbstractRateLimiterService::class.java) + val UPLOAD_REQUEST_METHOD = listOf(HttpMethod.POST.name, HttpMethod.PUT.name, HttpMethod.PATCH.name) + val DOWNLOAD_REQUEST_METHOD = listOf(HttpMethod.GET.name) + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RateLimiterService.kt new file mode 100644 index 0000000000..5d1e0761d0 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RateLimiterService.kt @@ -0,0 +1,47 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service + +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.interceptor.RateLimiterInterceptor +import javax.servlet.http.HttpServletRequest + +interface RateLimiterService { + + /** + * 限流判断 + */ + @Throws(AcquireLockFailedException::class, InvalidResourceException::class, OverloadException::class) + fun limit(request: HttpServletRequest, applyPermits: Long? = null) + + fun addInterceptor(interceptor: RateLimiterInterceptor) + + fun addInterceptors(interceptors: List) +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RequestLimitCheckService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RequestLimitCheckService.kt new file mode 100644 index 0000000000..315ebe8011 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/RequestLimitCheckService.kt @@ -0,0 +1,176 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service + +import com.tencent.bkrepo.common.ratelimiter.RateLimiterAutoConfiguration +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.service.bandwidth.DownloadBandwidthRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.bandwidth.UploadBandwidthRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.UrlRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.UrlRepoRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.user.UserUrlRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.url.user.UserUrlRepoRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.DownloadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.UploadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.user.UserDownloadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.usage.user.UserUploadUsageRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.stream.CommonRateLimitInputStream +import com.tencent.bkrepo.common.service.util.HttpContextHolder +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.beans.factory.annotation.Qualifier +import org.springframework.util.unit.DataSize +import java.io.InputStream +import javax.servlet.http.HttpServletRequest + +class RequestLimitCheckService( + private val rateLimiterProperties: RateLimiterProperties, +) { + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.URL_REPO_RATELIMITER_SERVICE) + private lateinit var urlRepoRateLimiterService: UrlRepoRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.URL_RATELIMITER_SERVICE) + private lateinit var urlRateLimiterService: UrlRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.USER_URL_REPO_RATELIMITER_SERVICE) + private lateinit var userUrlRepoRateLimiterService: UserUrlRepoRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.UPLOAD_USAGE_RATELIMITER_SERVICE) + private lateinit var uploadUsageRateLimiterService: UploadUsageRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.USER_URL_RATELIMITER_SERVICE) + private lateinit var userUrlRateLimiterService: UserUrlRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.USER_UPLOAD_USAGE_RATELIMITER_SERVICE) + private lateinit var userUploadUsageRateLimiterService: UserUploadUsageRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.DOWNLOAD_USAGE_RATELIMITER_SERVICE) + private lateinit var downloadUsageRateLimiterService: DownloadUsageRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.USER_DOWNLOAD_USAGE_RATELIMITER_SERVICE) + private lateinit var userDownloadUsageRateLimiterService: UserDownloadUsageRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.DOWNLOAD_BANDWIDTH_RATELIMITER_SERVICE) + private lateinit var downloadBandwidthRateLimiterService: DownloadBandwidthRateLimiterService + + @Autowired + @Qualifier(RateLimiterAutoConfiguration.UPLOAD_BANDWIDTH_RATELIMITER_ERVICE) + private lateinit var uploadBandwidthRateLimiterService: UploadBandwidthRateLimiterService + + fun preLimitCheck(request: HttpServletRequest) { + if (!rateLimiterProperties.enabled) { + return + } + // TODO 可以优化 + urlRepoRateLimiterService.limit(request) + userUrlRepoRateLimiterService.limit(request) + userUrlRateLimiterService.limit(request) + userUploadUsageRateLimiterService.limit(request) + urlRateLimiterService.limit(request) + uploadUsageRateLimiterService.limit(request) + } + + fun postLimitCheck(applyPermits: Long) { + if (!rateLimiterProperties.enabled) { + return + } + val request = getRequest() ?: return + downloadUsageRateLimiterService.limit(request, applyPermits) + userDownloadUsageRateLimiterService.limit(request, applyPermits) + + } + + fun bandwidthCheck( + inputStream: InputStream, + circuitBreakerPerSecond: DataSize, + rangeLength: Long? = null, + ): CommonRateLimitInputStream? { + if (!rateLimiterProperties.enabled) { + return null + } + val request = getRequest() ?: return null + if (!downloadBandwidthRateLimiterService.ignoreRequest(request)) { + return downloadBandwidthRateLimiterService.bandwidthRateStart( + request, inputStream, circuitBreakerPerSecond, rangeLength + ) + } + if (!uploadBandwidthRateLimiterService.ignoreRequest(request)) { + return uploadBandwidthRateLimiterService.bandwidthRateStart( + request, inputStream, circuitBreakerPerSecond, rangeLength + ) + } + return null + } + + fun bandwidthFinish(exception: Exception? = null) { + if (!rateLimiterProperties.enabled) { + return + } + val request = getRequest() ?: return + if (!downloadBandwidthRateLimiterService.ignoreRequest(request)) { + return downloadBandwidthRateLimiterService.bandwidthRateLimitFinish( + request, exception + ) + } + if (!uploadBandwidthRateLimiterService.ignoreRequest(request)) { + return uploadBandwidthRateLimiterService.bandwidthRateLimitFinish( + request, exception + ) + } + } + + fun uploadBandwidthCheck( + applyPermits: Long, + circuitBreakerPerSecond: DataSize, + ) { + if (!rateLimiterProperties.enabled) { + return + } + val request = getRequest() ?: return + uploadBandwidthRateLimiterService.bandwidthRateLimit( + request, applyPermits, circuitBreakerPerSecond + ) + } + + private fun getRequest(): HttpServletRequest? { + return try { + HttpContextHolder.getRequest() + } catch (e: IllegalArgumentException) { + return null + } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterService.kt new file mode 100644 index 0000000000..ddfd54edc5 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterService.kt @@ -0,0 +1,76 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.bandwidth.DownloadBandwidthRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 下载带宽限流器实现,针对project/repo进行限流 + */ +class DownloadBandwidthRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : UploadBandwidthRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun getLimitDimensions(): List { + return listOf( + LimitDimension.DOWNLOAD_BANDWIDTH.name + ) + } + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + return request.method !in DOWNLOAD_REQUEST_METHOD + } + + override fun getRateLimitRuleClass(): Class { + return DownloadBandwidthRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "DownloadBandwidth:$resource" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterService.kt new file mode 100644 index 0000000000..1c99e58b9c --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterService.kt @@ -0,0 +1,101 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.bandwidth + + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.bandwidth.UploadBandwidthRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.AbstractBandwidthRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 上传带宽限流器实现, 针对project/repo进行限流 + */ +open class UploadBandwidthRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : AbstractBandwidthRateLimiterService( + taskScheduler, + rateLimiterMetrics, + redisTemplate, + rateLimiterProperties, + rateLimiterConfigService +) { + + override fun buildResource(request: HttpServletRequest): String { + val (projectId, repoName) = getRepoInfoFromAttribute(request) + return if (repoName.isNullOrEmpty()) { + "/$projectId/" + } else { + "/$projectId/$repoName/" + } + } + + override fun buildExtraResource(request: HttpServletRequest): List { + val (projectId, repoName) = getRepoInfoFromAttribute(request) + if (repoName.isNullOrEmpty()) return emptyList() + return listOf("/$projectId/") + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + if (applyPermits == null) { + throw AcquireLockFailedException("apply permits is null") + } + return applyPermits + } + + override fun getLimitDimensions(): List { + return listOf( + LimitDimension.UPLOAD_BANDWIDTH.name + ) + } + + override fun getRateLimitRuleClass(): Class { + return UploadBandwidthRateLimitRule::class.java + } + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + return request.method !in UPLOAD_REQUEST_METHOD + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UploadBandwidth:$resource" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterService.kt new file mode 100644 index 0000000000..8df65479fc --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterService.kt @@ -0,0 +1,85 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url + + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.UrlRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * url限流器实现 + */ +class UrlRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + + override fun buildResource(request: HttpServletRequest): String { + return request.requestURI + } + + override fun buildExtraResource(request: HttpServletRequest): List { + return emptyList() + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + return 1 + } + + override fun getLimitDimensions(): List { + return listOf(LimitDimension.URL.name) + } + + override fun getRateLimitRuleClass(): Class { + return UrlRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "Url:$resource" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterService.kt new file mode 100644 index 0000000000..3189f7f0b1 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterService.kt @@ -0,0 +1,112 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url + +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.UrlRepoRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.web.servlet.HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE +import javax.servlet.http.HttpServletRequest + +/** + * urlRepo限流器实现 + */ +class UrlRepoRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + if (rateLimiterProperties.specialUrls.contains(StringPool.POUND)) { + return false + } + return !rateLimiterProperties.specialUrls.contains(request.getAttribute(BEST_MATCHING_PATTERN_ATTRIBUTE)) + } + + override fun buildResource(request: HttpServletRequest): String { + val (projectId, repoName) = try { + getRepoInfoFromAttribute(request) + } catch (e: InvalidResourceException) { + getRepoInfoFromBody(request) + } + return if (repoName.isNullOrEmpty()) { + "/$projectId/" + } else { + "/$projectId/$repoName/" + } + } + + override fun buildExtraResource(request: HttpServletRequest): List { + val (projectId, repoName) = try { + getRepoInfoFromAttribute(request) + } catch (e: InvalidResourceException) { + getRepoInfoFromBody(request) + } + val result = mutableListOf() + if (!repoName.isNullOrEmpty()) { + result.add("/$projectId/") + } + return result + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + return 1 + } + + override fun getLimitDimensions(): List { + return listOf(LimitDimension.URL_REPO.name) + } + + override fun getRateLimitRuleClass(): Class { + return UrlRepoRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UrlRepo:$resource" + } + +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterService.kt new file mode 100644 index 0000000000..a98975b789 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterService.kt @@ -0,0 +1,90 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url.user + + +import com.tencent.bkrepo.common.api.constant.ANONYMOUS_USER +import com.tencent.bkrepo.common.api.constant.USER_KEY +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.user.UserUrlRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import com.tencent.bkrepo.common.service.util.HttpContextHolder +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 用户+url限流器实现 + */ +class UserUrlRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService, +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun buildResource(request: HttpServletRequest): String { + val userId = HttpContextHolder.getRequestOrNull()?.getAttribute(USER_KEY) as? String ?: ANONYMOUS_USER + val realUrl = request.requestURI + return "$userId:$realUrl" + } + + override fun buildExtraResource(request: HttpServletRequest): List { + val userId = HttpContextHolder.getRequestOrNull()?.getAttribute(USER_KEY) as? String ?: ANONYMOUS_USER + return listOf("$userId:") + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + return 1 + } + + override fun getLimitDimensions(): List { + return listOf(LimitDimension.USER_URL.name) + } + + override fun getRateLimitRuleClass(): Class { + return UserUrlRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UserUrl:$resource" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterService.kt new file mode 100644 index 0000000000..b6e29a06a7 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterService.kt @@ -0,0 +1,118 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url.user + +import com.tencent.bkrepo.common.api.constant.ANONYMOUS_USER +import com.tencent.bkrepo.common.api.constant.StringPool +import com.tencent.bkrepo.common.api.constant.USER_KEY +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.user.UserUrlRepoRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import com.tencent.bkrepo.common.service.util.HttpContextHolder +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.web.servlet.HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE +import javax.servlet.http.HttpServletRequest + +/** + * user+urlRepo限流器实现 + */ +class UserUrlRepoRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + private val rateLimiterConfigService: RateLimiterConfigService +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + if (rateLimiterProperties.specialUrls.contains(StringPool.POUND)) { + return false + } + return !rateLimiterProperties.specialUrls.contains(request.getAttribute(BEST_MATCHING_PATTERN_ATTRIBUTE)) + } + + override fun buildResource(request: HttpServletRequest): String { + val userId = HttpContextHolder.getRequestOrNull()?.getAttribute(USER_KEY) as? String ?: ANONYMOUS_USER + val (projectId, repoName) = try { + getRepoInfoFromAttribute(request) + } catch (e: InvalidResourceException) { + getRepoInfoFromBody(request) + } + return if (repoName.isNullOrEmpty()) { + "$userId:/$projectId/" + } else { + "$userId:/$projectId/$repoName/" + } + } + + override fun buildExtraResource(request: HttpServletRequest): List { + val userId = HttpContextHolder.getRequestOrNull()?.getAttribute(USER_KEY) as? String ?: ANONYMOUS_USER + val (projectId, repoName) = try { + getRepoInfoFromAttribute(request) + } catch (e: InvalidResourceException) { + getRepoInfoFromBody(request) + } + val result = mutableListOf() + if (!repoName.isNullOrEmpty()) { + result.add("$userId:/$projectId/") + } + result.add("$userId:") + return result + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + return 1 + } + + override fun getLimitDimensions(): List { + return listOf(LimitDimension.USER_URL_REPO.name) + } + + override fun getRateLimitRuleClass(): Class { + return UserUrlRepoRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UserUrlRepo:$resource" + } + +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterService.kt new file mode 100644 index 0000000000..8d8a0cbc64 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterService.kt @@ -0,0 +1,84 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.DownloadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 下载容量限流器实现, 针对project和repo + */ +class DownloadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : UploadUsageRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + if (applyPermits == null) { + throw AcquireLockFailedException("apply permits is null") + } + return applyPermits + } + + override fun getLimitDimensions(): List { + return listOf( + LimitDimension.DOWNLOAD_USAGE.name + ) + } + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + return request.method !in DOWNLOAD_REQUEST_METHOD + } + + override fun getRateLimitRuleClass(): Class { + return DownloadUsageRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "DownloadUsage:$resource" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterService.kt new file mode 100644 index 0000000000..2a38210253 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterService.kt @@ -0,0 +1,110 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage + + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.UploadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 上传容量限流器实现,针对project和repo + */ +open class UploadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService, +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun buildResource(request: HttpServletRequest): String { + val (projectId, repoName) = getRepoInfoFromAttribute(request) + return if (repoName.isNullOrEmpty()) { + "/$projectId/" + } else { + "/$projectId/$repoName/" + } + } + + override fun buildExtraResource(request: HttpServletRequest): List { + val (projectId, repoName) = getRepoInfoFromAttribute(request) + val result = mutableListOf() + if (!repoName.isNullOrEmpty()) { + result.add("/$projectId/") + } + return result + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + return when (request.method) { + in UPLOAD_REQUEST_METHOD -> { + var length = request.contentLengthLong + if (length == -1L) { + logger.warn("content length of ${request.requestURI} is -1") + length = 0 + } + length + } + else -> 0 + } + } + + override fun getLimitDimensions(): List { + return listOf( + LimitDimension.UPLOAD_USAGE.name + ) + } + + override fun getRateLimitRuleClass(): Class { + return UploadUsageRateLimitRule::class.java + } + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + return request.method !in UPLOAD_REQUEST_METHOD + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UploadUsage:$resource" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterService.kt new file mode 100644 index 0000000000..3952414e63 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterService.kt @@ -0,0 +1,84 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage.user + +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.user.UserDownloadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 用户下载容量限流器实现,针对user、project和repo + */ +class UserDownloadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : UserUploadUsageRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + if (applyPermits == null) { + throw AcquireLockFailedException("response content is null") + } + return applyPermits + } + + override fun getLimitDimensions(): List { + return listOf( + LimitDimension.USER_DOWNLOAD_USAGE.name + ) + } + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + return request.method !in DOWNLOAD_REQUEST_METHOD + } + + override fun getRateLimitRuleClass(): Class { + return UserDownloadUsageRateLimitRule::class.java + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UserDownloadUsage:$resource" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterService.kt new file mode 100644 index 0000000000..42c714d3ad --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterService.kt @@ -0,0 +1,115 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage.user + +import com.tencent.bkrepo.common.api.constant.ANONYMOUS_USER +import com.tencent.bkrepo.common.api.constant.USER_KEY +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.rule.RateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.user.UserUploadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterService +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import com.tencent.bkrepo.common.service.util.HttpContextHolder +import org.springframework.data.redis.core.RedisTemplate +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import javax.servlet.http.HttpServletRequest + +/** + * 用户上传容量限流器实现, 针对user、project和repo + */ +open class UserUploadUsageRateLimiterService( + taskScheduler: ThreadPoolTaskScheduler, + rateLimiterProperties: RateLimiterProperties, + rateLimiterMetrics: RateLimiterMetrics, + redisTemplate: RedisTemplate? = null, + rateLimiterConfigService: RateLimiterConfigService +) : AbstractRateLimiterService( + taskScheduler, + rateLimiterProperties, + rateLimiterMetrics, + redisTemplate, + rateLimiterConfigService +) { + + override fun buildResource(request: HttpServletRequest): String { + val (projectId, repoName) = getRepoInfoFromAttribute(request) + val userId = HttpContextHolder.getRequestOrNull()?.getAttribute(USER_KEY) as? String ?: ANONYMOUS_USER + return if (repoName.isNullOrEmpty()) { + "$userId:/$projectId/" + } else { + "$userId:/$projectId/$repoName/" + } + } + + override fun buildExtraResource(request: HttpServletRequest): List { + val (projectId, repoName) = getRepoInfoFromAttribute(request) + val userId = HttpContextHolder.getRequestOrNull()?.getAttribute(USER_KEY) as? String ?: ANONYMOUS_USER + val result = mutableListOf() + if (!repoName.isNullOrEmpty()) { + result.add("$userId:/$projectId/") + } + result.add("$userId:") + return result + } + + override fun getApplyPermits(request: HttpServletRequest, applyPermits: Long?): Long { + return when (request.method) { + in UPLOAD_REQUEST_METHOD -> { + var length = request.contentLengthLong + if (length == -1L) { + logger.warn("content length of ${request.requestURI} is -1") + length = 0 + } + length + } + else -> 0 + } + } + + override fun getLimitDimensions(): List { + return listOf( + LimitDimension.USER_UPLOAD_USAGE.name + ) + } + + override fun getRateLimitRuleClass(): Class { + return UserUploadUsageRateLimitRule::class.java + } + + override fun ignoreRequest(request: HttpServletRequest): Boolean { + return request.method !in UPLOAD_REQUEST_METHOD + } + + override fun generateKey(resource: String, resourceLimit: ResourceLimit): String { + return KEY_PREFIX + "UserUploadUsage:$resource" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/user/RateLimiterConfigService.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/user/RateLimiterConfigService.kt new file mode 100644 index 0000000000..fa8c6c0431 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/service/user/RateLimiterConfigService.kt @@ -0,0 +1,139 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.user + +import com.tencent.bkrepo.common.ratelimiter.model.RateLimitCreatOrUpdateRequest +import com.tencent.bkrepo.common.ratelimiter.model.TRateLimit +import com.tencent.bkrepo.common.ratelimiter.repository.RateLimitRepository +import java.time.Duration +import org.springframework.beans.factory.annotation.Value +import org.springframework.stereotype.Service + +@Service +class RateLimiterConfigService( + private val rateLimitRepository: RateLimitRepository +) { + + @Value("\${spring.cloud.client.ip-address}") + var host: String = "127.0.0.1" + + fun list(): List { + return rateLimitRepository.findAll() + } + + fun create(fileCacheRequest: RateLimitCreatOrUpdateRequest) { + with(fileCacheRequest) { + rateLimitRepository.insert( + TRateLimit( + id = null, + resource = resource, + limitDimension = limitDimension, + algo = algo, + limit = limit, + duration = Duration.ofSeconds(duration), + capacity = capacity, + scope = scope, + moduleName = moduleName + ) + ) + } + } + + fun checkExist(id: String): Boolean { + return rateLimitRepository.existsById(id) + } + + fun checkExist(fileCacheRequest: RateLimitCreatOrUpdateRequest): Boolean { + with(fileCacheRequest) { + return rateLimitRepository.existsByResourceAndLimitDimension(resource, limitDimension) + } + } + + fun delete(id: String) { + rateLimitRepository.removeById(id) + } + + fun getById(id: String): TRateLimit? { + return rateLimitRepository.findById(id) + } + + fun update(fileCacheRequest: RateLimitCreatOrUpdateRequest) { + with(fileCacheRequest) { + targets?.let { + rateLimitRepository.save( + TRateLimit( + id = id, + resource = resource, + limitDimension = limitDimension, + algo = algo, + limit = limit, + duration = Duration.ofSeconds(duration), + capacity = capacity, + scope = scope, + moduleName = moduleName, + targets = it + ) + ) + } ?: run { + rateLimitRepository.save( + TRateLimit( + id = id, + resource = resource, + limitDimension = limitDimension, + algo = algo, + limit = limit, + duration = Duration.ofSeconds(duration), + capacity = capacity, + scope = scope, + moduleName = moduleName + ) + ) + } + } + } + + fun findByModuleNameAndLimitDimension(moduleName: String, limitDimension: String): List { + return rateLimitRepository.findByModuleNameAndLimitDimension(moduleName, limitDimension) + } + + fun findByResourceAndLimitDimension(resource: String, limitDimension: String): List { + return rateLimitRepository.findByResourceAndLimitDimension(resource, limitDimension) + } + + fun findByModuleNameAndLimitDimensionAndResource( + resource: String, + moduleName: List, + limitDimension: String + ): TRateLimit? { + return rateLimitRepository.findByModuleNameAndLimitDimensionAndResource(resource, moduleName, limitDimension) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStream.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStream.kt new file mode 100644 index 0000000000..2ce9d3cc9b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStream.kt @@ -0,0 +1,127 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.stream + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.artifact.stream.DelegateInputStream +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import java.io.InputStream + +class CommonRateLimitInputStream( + delegate: InputStream, + private val rateCheckContext: RateCheckContext +) : DelegateInputStream(delegate) { + + private var bytesRead: Long = 0 + private var applyNum: Long = 0 + + override fun read(): Int { + tryAcquire(1) + val data = super.read() + if (data != -1) { + bytesRead++ + } + return data + } + + override fun read(byteArray: ByteArray): Int { + tryAcquire(byteArray.size) + val readLen = super.read(byteArray) + if (readLen != -1) { + bytesRead += readLen + } + return readLen + } + + override fun read(byteArray: ByteArray, off: Int, len: Int): Int { + tryAcquire(len) + val readLen = super.read(byteArray, off, len) + if (readLen != -1) { + bytesRead += readLen + } + return readLen + } + + private fun tryAcquire(bytes: Int) { + with(rateCheckContext) { + if (rangeLength == null || rangeLength!! <= 0) { + // 当不知道文件大小时,没办法进行大小预估,无法降低申请频率, 只能每次读取都进行判断 + acquire(bytes.toLong()) + } else { + // 避免频繁申请,增加耗时,降低申请频率, 每次申请一定数量 + // 当申请的bytes比limitPerSecond还大时,直接限流 + if (limitPerSecond < bytes) { + if (rateCheckContext.dryRun) { + return + } + throw OverloadException("request reached bandwidth limit") + } + // 此处避免限流带宽大小比每次申请的还少的情况下,每次都被限流 + val realPermitOnce = limitPerSecond.coerceAtMost(permitsOnce) + if (bytesRead == 0L || (bytesRead + bytes) > applyNum) { + val leftLength = rangeLength!! - bytesRead + val permits = if (leftLength >= 0) { + leftLength.coerceAtMost(realPermitOnce) + } else { + // 当剩余文件大小小于0时,说明文件大小不正确,无法确认剩余多少 + realPermitOnce + } + acquire(permits) + applyNum += permits + } + } + } + } + + private fun acquire(permits: Long) { + var flag = false + var failedNum = 0 + while (!flag) { + // 当限制小于读取大小时,会进入死循环,增加等待轮次,如果达到等待轮次上限后还是无法获取,则抛异常结束 + try { + flag = rateCheckContext.rateLimiter.tryAcquire(permits) + } catch (ignore: AcquireLockFailedException) { + return + } + if (!flag && failedNum < rateCheckContext.waitRound) { + failedNum++ + try { + Thread.sleep(rateCheckContext.latency * failedNum) + } catch (ignore: InterruptedException) { + } + continue + } + if (!flag && failedNum >= rateCheckContext.waitRound) { + if (rateCheckContext.dryRun) { + return + } + throw OverloadException("request reached bandwidth limit") + } + } + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/RateCheckContext.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/RateCheckContext.kt new file mode 100644 index 0000000000..588266debe --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/RateCheckContext.kt @@ -0,0 +1,40 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.stream + +import com.tencent.bkrepo.common.ratelimiter.algorithm.RateLimiter + +data class RateCheckContext( + var rateLimiter: RateLimiter, + var latency: Long, + var waitRound: Int, + var limitPerSecond: Long, + var rangeLength: Long? = null, + var dryRun: Boolean = false, + var permitsOnce: Long = 1024 * 1024, +) diff --git a/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtils.kt b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtils.kt new file mode 100644 index 0000000000..3e777bdedf --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtils.kt @@ -0,0 +1,99 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.utils + +import com.tencent.bkrepo.common.api.constant.CharPool +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import java.net.URI +import java.net.URISyntaxException + +object ResourcePathUtils { + + /** + * 分割路径, 支持带template变量路径 + */ + @Throws(InvalidResourceException::class) + fun tokenizeResourcePath(resourcePath: String): List { + if (resourcePath.isBlank()) { + return emptyList() + } + if (!resourcePath.startsWith("/")) { + throw InvalidResourceException("invalid resource path: $resourcePath") + } + val dirs = resourcePath.split("/").toTypedArray() + val dirList: MutableList = ArrayList() + for (i in dirs.indices) { + if (dirs[i].contains("?") + && (!dirs[i].startsWith("{") || !dirs[i].endsWith("}"))) { + throw InvalidResourceException("invalid resource path: $resourcePath") + } + if (dirs[i].isNotEmpty()) { + dirList.add(dirs[i]) + } + } + return dirList + } + + /** + * 获取URL路径,不带host等信息 + */ + fun getPathOfUrl(url: String): String? { + if (url.isBlank()) { + return null + } + val uri: URI + try { + uri = URI(url) + } catch (e: URISyntaxException) { + throw InvalidResourceException(url) + } + val path = uri.path + if (path.isNullOrEmpty()) { + return "/" + } + return path + } + + /** + * 截取user和path + */ + fun getUserAndPath(resource: String): Pair { + val index = resource.indexOfFirst { it == CharPool.COLON } + if (index == -1) { + throw InvalidResourceException(resource) + } + return Pair(resource.substring(0, index), resource.substring(index + 1)) + } + + /** + * 根据userId和path生成对应配置格式 + */ + fun buildUserPath(userId: String, resource: String): String { + return "$userId:$resource" + } +} diff --git a/src/backend/common/common-ratelimiter/src/main/resources/META-INF/spring.factories b/src/backend/common/common-ratelimiter/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000..4de49fafff --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +com.tencent.bkrepo.common.ratelimiter.RateLimiterAutoConfiguration diff --git a/src/backend/common/common-ratelimiter/src/main/resources/fix-window-rate-limiter.lua b/src/backend/common/common-ratelimiter/src/main/resources/fix-window-rate-limiter.lua new file mode 100644 index 0000000000..9d3c918b1b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/resources/fix-window-rate-limiter.lua @@ -0,0 +1,14 @@ +local key = KEYS[1] +local limit = tonumber(ARGV[1]) +local adder = tonumber(ARGV[2]) +local ttl = tonumber(ARGV[3]) +local current = tonumber(redis.call('get', key) or "0") +if current + adder > limit then + return 0 +else + redis.call('incrby', key, adder) + if (current == 0) then + redis.call('EXPIRE', key, ttl) + end + return 1 +end \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/main/resources/leaky-rate-limiter.lua b/src/backend/common/common-ratelimiter/src/main/resources/leaky-rate-limiter.lua new file mode 100644 index 0000000000..7819c1cb6a --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/resources/leaky-rate-limiter.lua @@ -0,0 +1,58 @@ +local leaky_bucket_key = KEYS[1] +-- last update key +local last_bucket_key = KEYS[2] +-- the rate of leak water +local rate = tonumber(ARGV[1]) +-- capacity +local capacity = tonumber(ARGV[2]) +-- request count +local requested = tonumber(ARGV[3]) +-- current timestamp seconds +local now = tonumber(ARGV[4]) + +-- the key life time +local key_lifetime = math.ceil((capacity / rate) + 1) + +-- the yield of water in the bucket default 0 +local key_bucket_count = tonumber(redis.call("GET", leaky_bucket_key)) or 0 + +-- the last update time default now +local last_time = tonumber(redis.call("GET", last_bucket_key)) or now + +-- the time difference +local millis_since_last_leak = now - last_time + +-- the yield of water had lasted +local leaks = millis_since_last_leak * rate + +if leaks > 0 then + -- clean up the bucket + if leaks >= key_bucket_count then + key_bucket_count = 0 + else + -- compute the yield of water in the bucket + key_bucket_count = key_bucket_count - leaks + end + last_time = now +end + +-- is allowed pass default not allow +local is_allow = 0 + +local new_bucket_count = key_bucket_count + requested +-- allow +if new_bucket_count <= capacity then + is_allow = 1 +else + -- not allow + return {is_allow, new_bucket_count} +end + +-- update the key bucket water yield +redis.call("SETEX", leaky_bucket_key, key_lifetime, new_bucket_count) + +-- update last update time +redis.call("SETEX", last_bucket_key, key_lifetime, now) + +-- return +return {is_allow, new_bucket_count} diff --git a/src/backend/common/common-ratelimiter/src/main/resources/sliding-window-rate-limiter.lua b/src/backend/common/common-ratelimiter/src/main/resources/sliding-window-rate-limiter.lua new file mode 100644 index 0000000000..7c8b5d5cd5 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/resources/sliding-window-rate-limiter.lua @@ -0,0 +1,36 @@ +-- key: 限流器的键名 +-- limit: 限流器的容量 +-- interval: 时间窗口的长度(单位为秒) +-- count: 一次获取的令牌数量 +local key = KEYS[1] +local limit = tonumber(ARGV[1]) +local interval = tonumber(ARGV[2]) +local count = tonumber(ARGV[3]) +local now_sec = tonumber(ARGV[4]) +local random = tonumber(ARGV[5]) + +-- 删除时间窗口之外的令牌 +redis.call('zremrangebyscore', key, 0, now_sec - interval) + +-- 获取当前时间窗口内的令牌数量 +local current = tonumber(redis.call('zcard', key)) + +-- 如果当前令牌数量已经达到限流器的容量,则不再生成新的令牌 +if current >= limit then + return 0 +end + +-- 计算需要生成的令牌数量 +local remaining = limit - current +local allowed_num = 0 +if (remaining < count) then + return { allowed_num, remaining } +end +allowed_num = 1 +-- 生成令牌,并返回生成的令牌数量 +local tokens = {} +for i = 1, count do + redis.call('zadd', key, now_sec, random..i) +end +redis.call('expire', key, interval) +return { allowed_num, remaining } diff --git a/src/backend/common/common-ratelimiter/src/main/resources/token-bucket-rate-limiter.lua b/src/backend/common/common-ratelimiter/src/main/resources/token-bucket-rate-limiter.lua new file mode 100644 index 0000000000..b0c8f44645 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/main/resources/token-bucket-rate-limiter.lua @@ -0,0 +1,51 @@ +local tokens_key = KEYS[1] +local timestamp_key = KEYS[2] +-- 每秒填充速率 +local rate = tonumber(ARGV[1]) +-- 令牌桶最大数量 +local capacity = tonumber(ARGV[2]) +-- 消耗令牌数量 +local requested = tonumber(ARGV[3]) +-- now 当前时间秒 +local now = tonumber(ARGV[4]) + +-- 计算令牌桶填充满需要多久 +local fill_time = capacity/rate +-- *2保证时间充足 +local ttl = math.floor(fill_time*2) + +-- 防止小于0 +if ttl < 1 then + ttl = 10 +end +-- 获取令牌桶内剩余数量 +local last_tokens = tonumber(redis.call("get", tokens_key)) +-- 第一次没有数值,设置桶为满的 +if last_tokens == nil then + last_tokens = capacity +end +-- 获取上次更新时间 +local last_refreshed = tonumber(redis.call("get", timestamp_key)) +if last_refreshed == nil then + last_refreshed = 0 +end +-- 本次校验和上次更新时间的间隔 +local delta = math.max(0, now-last_refreshed) +-- 填充令牌,计算新的令牌桶剩余令牌数,填充不超过令牌桶上限 +local filled_tokens = math.min(capacity, last_tokens+(delta*rate)) + +-- 判断令牌数量是否足够 +local allowed = filled_tokens >= requested +local new_tokens = filled_tokens +local allowed_num = 0 +if allowed then + -- 如成功,令牌桶剩余令牌数减消耗令牌数 + new_tokens = filled_tokens - requested + allowed_num = 1 +end + +-- 设置令牌桶剩余令牌数,令牌桶最后填充时间now, ttl超时时间 +redis.call("setex", tokens_key, ttl, new_tokens) +redis.call("setex", timestamp_key, ttl, now) + +return { allowed_num, new_tokens } diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfigurationTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfigurationTest.kt new file mode 100644 index 0000000000..3d08fcdb28 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/RateLimiterAutoConfigurationTest.kt @@ -0,0 +1,35 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter + +import org.springframework.boot.SpringBootConfiguration +import org.springframework.boot.autoconfigure.EnableAutoConfiguration + +@SpringBootConfiguration +@EnableAutoConfiguration +class RateLimiterAutoConfigurationTest \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiterTest.kt new file mode 100644 index 0000000000..33d1a40b0d --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedFixedWindowRateLimiterTest.kt @@ -0,0 +1,105 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.springframework.test.annotation.DirtiesContext +import java.time.Duration +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class DistributedFixedWindowRateLimiterTest : DistributedTest() { + + + @Test + fun testTryAcquire() { + val key = KEY + "testTryAcquire" + val ratelimiter = DistributedFixedWindowRateLimiter(key, 5, Duration.ofSeconds(1), redisTemplate) + println(System.currentTimeMillis()) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + Thread.sleep(1000) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + println(System.currentTimeMillis()) + val passed6 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed6) + println(System.currentTimeMillis()) + val passed7 = ratelimiter.tryAcquire(1) + Assertions.assertFalse(passed7) + clean(key) + } + + @Test + fun testTryAcquireOnMultiThreads() { + val key = KEY + "testTryAcquireOnMultiThreads" + val ratelimiter = DistributedFixedWindowRateLimiter(key, 5, Duration.ofSeconds(1), redisTemplate) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + clean(key) + } + + + companion object { + private const val KEY = "DistributedFixedKey" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiterTest.kt new file mode 100644 index 0000000000..4815debe65 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedLeakyRateLimiterTest.kt @@ -0,0 +1,105 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.springframework.test.annotation.DirtiesContext +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class DistributedLeakyRateLimiterTest : DistributedTest() { + + @Test + fun testTryAcquire() { + val key = KEY + "testTryAcquire" + val ratelimiter = DistributedLeakyRateLimiter(key, 5.0, 5, redisTemplate) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + println(System.currentTimeMillis()) + Thread.sleep(1000) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + println(System.currentTimeMillis()) + val passed6 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed6) + println(System.currentTimeMillis()) + val passed7 = ratelimiter.tryAcquire(1) + Assertions.assertFalse(passed7) + Thread.sleep(1000) + val passed8 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed8) + clean(key) + } + + @Test + fun testTryAcquireOnMultiThreads() { + val key = KEY + "testTryAcquireOnMultiThreads" + val ratelimiter = DistributedLeakyRateLimiter(key, 5.0, 5, redisTemplate) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + clean(key) + } + + companion object { + private const val KEY = "DistributedLeakyKey" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiterTest.kt new file mode 100644 index 0000000000..3bd57c3844 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedSlidingWindowRateLimiterTest.kt @@ -0,0 +1,101 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.springframework.test.annotation.DirtiesContext +import java.time.Duration +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class DistributedSlidingWindowRateLimiterTest : DistributedTest() { + @Test + fun testTryAcquire() { + val key = KEY + "testTryAcquire" + val ratelimiter = DistributedSlidingWindowRateLimiter(key, 5, Duration.ofSeconds(1), redisTemplate) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + var passed6 = ratelimiter.tryAcquire(1) + Assertions.assertFalse(passed6) + Thread.sleep(1000) + var passed7 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed7) + val passed8 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed8) + clean(key) + } + + @Test + fun testTryAcquireOnMultiThreads() { + val key = KEY + "testTryAcquireOnMultiThreads" + val ratelimiter = DistributedSlidingWindowRateLimiter(key, 5, Duration.ofSeconds(1), redisTemplate) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + clean(key) + } + + companion object { + private const val KEY = "DistributedSlidingKey" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTest.kt new file mode 100644 index 0000000000..ef38441481 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTest.kt @@ -0,0 +1,47 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.redis.RedisAutoConfiguration +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.autoconfigure.ImportAutoConfiguration +import org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest +import org.springframework.data.redis.core.RedisTemplate + +@DataRedisTest +@ImportAutoConfiguration(RedisTestConfiguration::class, RedisAutoConfiguration::class) +open class DistributedTest : BaseRuleTest() { + + @Autowired + lateinit var redisTemplate: RedisTemplate + + fun clean(key: String) { + redisTemplate.delete(key) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiterTest.kt new file mode 100644 index 0000000000..e8efdd8ee0 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/DistributedTokenBucketRateLimiterTest.kt @@ -0,0 +1,103 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.springframework.test.annotation.DirtiesContext +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class DistributedTokenBucketRateLimiterTest : DistributedTest() { + @Test + fun testTryAcquire1() { + val key = KEY + "testTryAcquire1" + var ratelimiter = DistributedTokenBucketRateLimiter(key, 5.0, 5, redisTemplate) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + Thread.sleep(1000) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + println(System.currentTimeMillis()) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + println(System.currentTimeMillis()) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + println(System.currentTimeMillis()) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + println(System.currentTimeMillis()) + val passed6 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed6) + val passed7 = ratelimiter.tryAcquire(1) + Assertions.assertFalse(passed7) + clean(key) + } + + + @Test + fun testTryAcquireOnMultiThreads() { + val key = KEY + "testTryAcquireOnMultiThreads" + var ratelimiter = DistributedTokenBucketRateLimiter(key, 5.0, 5, redisTemplate) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + clean(key) + } + + companion object { + private const val KEY = "DistributedTokenKey" + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiterTest.kt new file mode 100644 index 0000000000..49487c7165 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/FixedWindowRateLimiterTest.kt @@ -0,0 +1,106 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.google.common.base.Stopwatch +import com.google.common.base.Ticker +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Assertions.assertTrue +import org.junit.jupiter.api.Test +import org.mockito.Mockito +import java.time.Duration +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.random.Random +import kotlin.system.measureTimeMillis + +class FixedWindowRateLimiterTest { + + @Test + fun testTryAcquire() { + val ticker = Mockito.mock(Ticker::class.java) + Mockito.`when`(ticker.read()).thenReturn(0 * 1000 * 1000L) + val ratelimiter: RateLimiter = FixedWindowRateLimiter(5, Duration.ofSeconds(1), Stopwatch.createStarted(ticker)) + Mockito.`when`(ticker.read()).thenReturn(100 * 1000 * 1000L) + val passed1 = ratelimiter.tryAcquire(1) + assertTrue(passed1) + Mockito.`when`(ticker.read()).thenReturn(200 * 1000 * 1000L) + val passed2 = ratelimiter.tryAcquire(1) + assertTrue(passed2) + Mockito.`when`(ticker.read()).thenReturn(300 * 1000 * 1000L) + val passed3 = ratelimiter.tryAcquire(1) + assertTrue(passed3) + Mockito.`when`(ticker.read()).thenReturn(400 * 1000 * 1000L) + val passed4 = ratelimiter.tryAcquire(1) + assertTrue(passed4) + Mockito.`when`(ticker.read()).thenReturn(500 * 1000 * 1000L) + val passed5 = ratelimiter.tryAcquire(1) + assertTrue(passed5) + Mockito.`when`(ticker.read()).thenReturn(600 * 1000 * 1000L) + val passed6 = ratelimiter.tryAcquire(1) + assertFalse(passed6) + Mockito.`when`(ticker.read()).thenReturn(1001 * 1000 * 1000L) + val passed7 = ratelimiter.tryAcquire(1) + assertTrue(passed7) + } + + @Test + fun testTryAcquireOnMultiThreads() { + val ticker = Mockito.mock(Ticker::class.java) + Mockito.`when`(ticker.read()).thenReturn(0 * 1000 * 1000L) + val ratelimiter: RateLimiter = FixedWindowRateLimiter(5, Duration.ofSeconds(1), Stopwatch.createStarted(ticker)) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + Thread.sleep((Random.nextInt(5) * 2).toLong()) + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiterTest.kt new file mode 100644 index 0000000000..77924e66d6 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/LeakyRateLimiterTest.kt @@ -0,0 +1,91 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +class LeakyRateLimiterTest { + + @Test + fun testTryAcquire() { + val ratelimiter = LeakyRateLimiter(5.0, 5) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + val passed6 = ratelimiter.tryAcquire(1) + Assertions.assertFalse(passed6) + try { + Thread.sleep(1000) + } catch (ignore: InterruptedException) { + } + val passed7 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed7) + } + + @Test + fun testTryAcquireOnMultiThreads() { + val ratelimiter = LeakyRateLimiter(5.0, 5) + var successNum = 0 + var failedNum = 0 + var errorNun = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNun++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RedisTestConfiguration.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RedisTestConfiguration.kt new file mode 100644 index 0000000000..710c226a80 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/RedisTestConfiguration.kt @@ -0,0 +1,49 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import org.springframework.boot.test.context.TestConfiguration +import redis.embedded.RedisServer +import javax.annotation.PostConstruct +import javax.annotation.PreDestroy + + +@TestConfiguration +class RedisTestConfiguration { + private val redisServer = RedisServer.builder().build() + + @PostConstruct + fun postConstruct() { + redisServer.start() + } + + @PreDestroy + fun preDestroy() { + redisServer.stop() + } +} diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiterTest.kt new file mode 100644 index 0000000000..6d742545bb --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/SlidingWindowRateLimiterTest.kt @@ -0,0 +1,92 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import java.time.Duration +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +class SlidingWindowRateLimiterTest { + + @Test + fun testTryAcquire() { + val ratelimiter = SlidingWindowRateLimiter(5, Duration.ofMillis(100)) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + Thread.sleep(1200) + var passed6 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed6) + var passed7 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed7) + val passed8 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed8) + } + + @Test + fun testTryAcquireOnMultiThreads() { + val ratelimiter = SlidingWindowRateLimiter(5, Duration.ofMillis(100)) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiterTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiterTest.kt new file mode 100644 index 0000000000..96cea7389a --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/algorithm/TokenBucketRateLimiterTest.kt @@ -0,0 +1,97 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.algorithm + +import com.tencent.bkrepo.common.api.util.HumanReadable +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +class TokenBucketRateLimiterTest { + + @Test + fun testTryAcquire() { + var ratelimiter = TokenBucketRateLimiter(5.0) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + Thread.sleep(1000) + val passed2 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed2) + println(System.currentTimeMillis()) + val passed3 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed3) + println(System.currentTimeMillis()) + val passed4 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed4) + println(System.currentTimeMillis()) + val passed5 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed5) + println(System.currentTimeMillis()) + val passed6 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed6) + val passed7 = ratelimiter.tryAcquire(1) + Assertions.assertFalse(passed7) + } + + + @Test + fun testTryAcquireOnMultiThreads() { + val ratelimiter = TokenBucketRateLimiter(5.0) + val passed1 = ratelimiter.tryAcquire(1) + Assertions.assertTrue(passed1) + Thread.sleep(1000) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + val passed = ratelimiter.tryAcquire(1) + if (passed) { + successNum++ + } else { + failedNum++ + } + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChainTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChainTest.kt new file mode 100644 index 0000000000..f850ea4252 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/interceptor/RateLimiterInterceptorChainTest.kt @@ -0,0 +1,151 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.interceptor + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.repository.RateLimitRepository +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + + +class RateLimiterInterceptorChainTest { + + open class InterceptorA : RateLimiterInterceptor { + + override fun beforeLimitCheck(resource: String, resourceLimit: ResourceLimit) { + list.add(identity() + ":before") + } + + + override fun afterLimitCheck( + resource: String, resourceLimit: ResourceLimit?, + result: Boolean, e: Exception? + ) { + list.add(identity() + ":after") + } + + protected open fun identity(): String { + return InterceptorA::class.java.simpleName + } + } + + class InterceptorB : InterceptorA() { + override fun identity(): String { + return InterceptorB::class.java.simpleName + } + } + + class InterceptorC : InterceptorA() { + override fun identity(): String { + return InterceptorC::class.java.simpleName + } + } + + @BeforeEach + fun reInit() { + list.clear() + } + + @Test + fun testDoBeforeLimit() { + val chain = RateLimiterInterceptorChain() + chain.addInterceptor(InterceptorA()) + chain.addInterceptor(InterceptorB()) + chain.addInterceptor(InterceptorC()) + val resourceLimit = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + chain.doBeforeLimitCheck("test1", resourceLimit) + assertEquals(Companion.list.size, 3) + assertEquals(Companion.list[0], "InterceptorA:before") + assertEquals(Companion.list[1], "InterceptorB:before") + assertEquals(Companion.list[2], "InterceptorC:before") + } + + @Test + fun testTargetDoBeforeLimit() { + val chain = RateLimiterInterceptorChain() + val rateLimitRepository: RateLimitRepository = RateLimitRepository() + chain.addInterceptor(TargetRateLimiterInterceptorAdaptor(RateLimiterConfigService(rateLimitRepository))) + val resourceLimit = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name, + targets = listOf("127.0.0.2") + ) + assertThrows { + chain.doBeforeLimitCheck("test1", resourceLimit) + } + } + + @Test + fun testDoAfterLimit() { + val chain = RateLimiterInterceptorChain() + chain.addInterceptor(InterceptorC()) + chain.addInterceptor(InterceptorB()) + chain.addInterceptor(InterceptorA()) + chain.doAfterLimitCheck("test1", null, true, null) + assertEquals(Companion.list.size, 3) + assertEquals(Companion.list[0], "InterceptorC:after") + assertEquals(Companion.list[1], "InterceptorB:after") + assertEquals(Companion.list[2], "InterceptorA:after") + } + + @Test + fun testIsEmpty() { + val chain = RateLimiterInterceptorChain() + val isEmpty = chain.isEmpty() + Assertions.assertTrue(isEmpty) + } + + @Test + fun testClear() { + val chain = RateLimiterInterceptorChain() + chain.addInterceptor(InterceptorB()) + chain.addInterceptor(InterceptorA()) + chain.addInterceptor(InterceptorC()) + assertEquals(chain.size(), 3) + chain.clear() + assertEquals(chain.size(), 0) + } + + companion object { + val list: MutableList = ArrayList() + } +} diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/BaseRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/BaseRuleTest.kt new file mode 100644 index 0000000000..b309208bbf --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/BaseRuleTest.kt @@ -0,0 +1,44 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule + +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions + +open class BaseRuleTest { + + fun assertEqualsLimitInfo(actualInfo: ResourceLimit?, expectedInfo: ResourceLimit?) { + Assertions.assertEquals(actualInfo?.limit, expectedInfo?.limit) + Assertions.assertEquals(actualInfo?.algo, expectedInfo?.algo) + Assertions.assertEquals(actualInfo?.limitDimension, expectedInfo?.limitDimension) + Assertions.assertEquals(actualInfo?.capacity, expectedInfo?.capacity) + Assertions.assertEquals(actualInfo?.resource, expectedInfo?.resource) + Assertions.assertEquals(actualInfo?.scope, expectedInfo?.scope) + Assertions.assertEquals(actualInfo?.duration, expectedInfo?.duration) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRuleTest.kt new file mode 100644 index 0000000000..26817c58e9 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/DownloadBandwidthRateLimitRuleTest.kt @@ -0,0 +1,236 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class DownloadBandwidthRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/repo1/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/repo1/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/*/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/*/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/repo3/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val downloadBandwidthRateLimitRule = DownloadBandwidthRateLimitRule() + assertEquals(downloadBandwidthRateLimitRule.isEmpty(), true) + downloadBandwidthRateLimitRule.addRateLimitRule(l1) + assertEquals(downloadBandwidthRateLimitRule.isEmpty(), false) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRule() { + val downloadBandwidthRateLimitRule = DownloadBandwidthRateLimitRule() + downloadBandwidthRateLimitRule.addRateLimitRule(l1) + downloadBandwidthRateLimitRule.addRateLimitRule(l2) + downloadBandwidthRateLimitRule.addRateLimitRule(l3) + downloadBandwidthRateLimitRule.addRateLimitRule(l4) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, null) + assertEquals(actualInfo?.resource, null) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + downloadBandwidthRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/") + + downloadBandwidthRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project2/repo2/") + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + downloadBandwidthRateLimitRule.addRateLimitRule(l7) + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = downloadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + assertEquals(actualInfo?.resource, "/project3/repo3/") + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = DownloadBandwidthRateLimitRule() + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var info = rule.getRateLimitRule(resInfo) + assertNull(info) + resInfo = ResInfo("/", listOf()) + info = rule.getRateLimitRule(resInfo) + assertNull(info) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = DownloadBandwidthRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf()) + var actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + resInfo = ResInfo("//", listOf()) + actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = DownloadBandwidthRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l2) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = DownloadBandwidthRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l3) + val resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testBandwidthRateLimitRuleWithInvalidLimitInfo() { + val rule = DownloadBandwidthRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testBandwidthRateLimitRuleWithInvalidUrl() { + val rule = DownloadBandwidthRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url", listOf("invalid url")) + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRuleTest.kt new file mode 100644 index 0000000000..33ac193447 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/bandwidth/UploadBandwidthRateLimitRuleTest.kt @@ -0,0 +1,236 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class UploadBandwidthRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/repo1/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/repo1/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/*/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/*/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/repo3/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val uploadBandwidthRateLimitRule = UploadBandwidthRateLimitRule() + assertEquals(uploadBandwidthRateLimitRule.isEmpty(), true) + uploadBandwidthRateLimitRule.addRateLimitRule(l1) + assertEquals(uploadBandwidthRateLimitRule.isEmpty(), false) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRule() { + val uploadBandwidthRateLimitRule = UploadBandwidthRateLimitRule() + uploadBandwidthRateLimitRule.addRateLimitRule(l1) + uploadBandwidthRateLimitRule.addRateLimitRule(l2) + uploadBandwidthRateLimitRule.addRateLimitRule(l3) + uploadBandwidthRateLimitRule.addRateLimitRule(l4) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, null) + assertEquals(actualInfo?.resource, null) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + uploadBandwidthRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/") + + uploadBandwidthRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project2/repo2/") + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + uploadBandwidthRateLimitRule.addRateLimitRule(l7) + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = uploadBandwidthRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + assertEquals(actualInfo?.resource, "/project3/repo3/") + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UploadBandwidthRateLimitRule() + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var info = rule.getRateLimitRule(resInfo) + assertNull(info) + resInfo = ResInfo("/", listOf()) + info = rule.getRateLimitRule(resInfo) + assertNull(info) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UploadBandwidthRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf()) + var actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + resInfo = ResInfo("//", listOf()) + actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UploadBandwidthRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l2) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testBandwidthRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UploadBandwidthRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l3) + val resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testBandwidthRateLimitRuleWithInvalidLimitInfo() { + val rule = UploadBandwidthRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testBandwidthRateLimitRuleWithInvalidUrl() { + val rule = UploadBandwidthRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url", listOf("invalid url")) + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRuleTest.kt new file mode 100644 index 0000000000..a043023d71 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRateLimitRuleTest.kt @@ -0,0 +1,296 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class UrlRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/repo1/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project2/*/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/*/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/repo3/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l8 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/{(^[a-zA-Z]*\$)}/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l9 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/{(^[0-9]*\$)}/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l10 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/{repo}}/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l11 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val urlRateLimitRule = UrlRateLimitRule() + assertEquals(urlRateLimitRule.isEmpty(), true) + urlRateLimitRule.addRateLimitRule(l1) + assertEquals(urlRateLimitRule.isEmpty(), false) + } + + @Test + fun testUrlRateLimitRuleAndGetRateLimitRule() { + val urlRateLimitRule = UrlRateLimitRule() + urlRateLimitRule.addRateLimitRule(l1) + urlRateLimitRule.addRateLimitRule(l2) + urlRateLimitRule.addRateLimitRule(l3) + urlRateLimitRule.addRateLimitRule(l4) + + var resInfo = ResInfo("///") + var actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertNull(actualInfo) + + resInfo = ResInfo("/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/") + + resInfo = ResInfo("/project1/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/") + + resInfo = ResInfo("/project2/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project2/") + + urlRateLimitRule.addRateLimitRule(l11) + resInfo = ResInfo("/project3/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + assertEquals(actualInfo?.resource, "/project3/") + + resInfo = ResInfo("/project1/repo1/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project3/repo3/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + assertEquals(actualInfo?.resource, "/project3/repo3/") + + urlRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("/project4/repo4/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + urlRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("/project4/repo4/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + resInfo = ResInfo("/project1/repo1/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project2/repo2/") + + resInfo = ResInfo("/project3/repo1/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + assertEquals(actualInfo?.resource, "/project3/repo1/") + + resInfo = ResInfo("/project4/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/") + + resInfo = ResInfo("/project4/repo4/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + urlRateLimitRule.addRateLimitRule(l7) + urlRateLimitRule.addRateLimitRule(l8) + urlRateLimitRule.addRateLimitRule(l9) + + resInfo = ResInfo("/project3/repo3/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + assertEquals(actualInfo?.resource, "/project3/repo3/") + + resInfo = ResInfo("/project3/repo4/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + assertEquals(actualInfo?.resource, "/project3/repo4/") + + resInfo = ResInfo("/project3/xxxx/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l8) + assertEquals(actualInfo?.resource, "/project3/xxxx/") + + resInfo = ResInfo("/project3/1234/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l9) + assertEquals(actualInfo?.resource, "/project3/1234/") + + urlRateLimitRule.addRateLimitRule(l10) + resInfo = ResInfo("/project3/xxxx/") + actualInfo = urlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l10) + assertEquals(actualInfo?.resource, "/project3/xxxx/") + + + } + + @Test + fun testUrlRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UrlRateLimitRule() + var resInfo = ResInfo("/project1/repo1/") + var info = rule.getRateLimitRule(resInfo) + assertNull(info) + resInfo = ResInfo("/", listOf()) + info = rule.getRateLimitRule(resInfo) + assertNull(info) + } + + @Test + fun testUrlRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UrlRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf()) + var actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + resInfo = ResInfo("//", listOf()) + actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testUrlRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UrlRateLimitRule() + rule.addRateLimitRule(l5) + + val resInfo = ResInfo("/project1/repo1/") + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + + rule.addRateLimitRule(l3) + + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUrlRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UrlRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l3) + val resInfo = ResInfo("/project1/repo1/") + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUrlRateLimitRuleWithInvalidLimitInfo() { + val rule = UrlRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUrlRateLimitRuleWithInvalidUrl() { + val rule = UrlRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url", listOf("invalid url")) + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRuleTest.kt new file mode 100644 index 0000000000..f74009cf46 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/UrlRepoRateLimitRuleTest.kt @@ -0,0 +1,236 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import java.time.Duration +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + +class UrlRepoRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/repo1/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/repo1/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/*/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/*/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/repo3/", + limitDimension = LimitDimension.URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val urlRepoRateLimitRule = UrlRepoRateLimitRule() + assertEquals(urlRepoRateLimitRule.isEmpty(), true) + urlRepoRateLimitRule.addRateLimitRule(l1) + assertEquals(urlRepoRateLimitRule.isEmpty(), false) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRule() { + val urlRepoRateLimitRule = UrlRepoRateLimitRule() + urlRepoRateLimitRule.addRateLimitRule(l1) + urlRepoRateLimitRule.addRateLimitRule(l2) + urlRepoRateLimitRule.addRateLimitRule(l3) + urlRepoRateLimitRule.addRateLimitRule(l4) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, null) + assertEquals(actualInfo?.resource, null) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + urlRepoRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/") + + urlRepoRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project2/repo2/") + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + urlRepoRateLimitRule.addRateLimitRule(l7) + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = urlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + assertEquals(actualInfo?.resource, "/project3/repo3/") + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UrlRepoRateLimitRule() + var resInfo = ResInfo("/project1/repo1/") + var info = rule.getRateLimitRule(resInfo) + assertNull(info) + resInfo = ResInfo("/", listOf()) + info = rule.getRateLimitRule(resInfo) + assertNull(info) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UrlRepoRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf()) + var actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + resInfo = ResInfo("//", listOf()) + actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UrlRepoRateLimitRule() + rule.addRateLimitRule(l5) + + val resInfo = ResInfo("/project1/repo1/") + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + + rule.addRateLimitRule(l3) + + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UrlRepoRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l3) + val resInfo = ResInfo("/project1/repo1/") + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUserUrlRateLimitRuleWithInvalidLimitInfo() { + val rule = UrlRepoRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUserUrlRateLimitRuleWithInvalidUrl() { + val rule = UrlRepoRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url", listOf("invalid url")) + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRuleTest.kt new file mode 100644 index 0000000000..ae75f399a4 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRateLimitRuleTest.kt @@ -0,0 +1,339 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url.user + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class UserUrlRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project2/*/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/*/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/repo3/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l8 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[a-zA-Z]*\$)}/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l9 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[0-9]*\$)}/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l10 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{repo}}/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l11 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l12 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l13 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l14 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:", + limitDimension = LimitDimension.USER_URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val userUrlRateLimitRule = UserUrlRateLimitRule() + assertEquals(userUrlRateLimitRule.isEmpty(), true) + userUrlRateLimitRule.addRateLimitRule(l1) + assertEquals(userUrlRateLimitRule.isEmpty(), false) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRule() { + val userUrlRateLimitRule = UserUrlRateLimitRule() + userUrlRateLimitRule.addRateLimitRule(l13) + var resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:")) + var actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userUrlRateLimitRule.addRateLimitRule(l14) + resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + userUrlRateLimitRule.addRateLimitRule(l1) + + resInfo = ResInfo("user1:///", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + resInfo = ResInfo("user1:/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user1:/") + + + + userUrlRateLimitRule.addRateLimitRule(l2) + userUrlRateLimitRule.addRateLimitRule(l3) + userUrlRateLimitRule.addRateLimitRule(l4) + + resInfo = ResInfo("user1:/project1/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user1:/project2/") + + userUrlRateLimitRule.addRateLimitRule(l11) + resInfo = ResInfo("user1:/project3/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo3/") + + userUrlRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + userUrlRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project1/repo2/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo2/") + + resInfo = ResInfo("user1:/project2/repo2/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + Assertions.assertEquals(actualInfo?.resource, "user1:/project2/repo2/") + + resInfo = ResInfo("user1:/project3/repo1/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo1/") + + resInfo = ResInfo("user1:/project4/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + userUrlRateLimitRule.addRateLimitRule(l7) + userUrlRateLimitRule.addRateLimitRule(l8) + userUrlRateLimitRule.addRateLimitRule(l9) + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo3/") + + resInfo = ResInfo("user1:/project3/repo4/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo4/") + + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l8) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + resInfo = ResInfo("user1:/project3/1234/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l9) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/1234/") + + userUrlRateLimitRule.addRateLimitRule(l10) + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l10) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + + resInfo = ResInfo("user2:/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user2:/") + + resInfo = ResInfo("user2:/project3/xxxx/", listOf("user1:")) + actualInfo = userUrlRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user2:/project3/xxxx/") + + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UserUrlRateLimitRule() + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + var info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + resInfo = ResInfo("user1:/", listOf("user1:")) + info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UserUrlRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf("user1:")) + var actualInfo = rule.getRateLimitRule(resInfo) + Assertions.assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UserUrlRateLimitRule() + rule.addRateLimitRule(l5) + + val resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + + rule.addRateLimitRule(l3) + + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUserUrlRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UserUrlRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l12) + val resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l12) + } + + @Test + fun testUserUrlRateLimitRuleWithInvalidLimitInfo() { + val rule = UserUrlRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUserUrlRateLimitRuleWithInvalidUrl() { + val rule = UserUrlRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url") + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRuleTest.kt new file mode 100644 index 0000000000..efdd708692 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/url/user/UserUrlRepoRateLimitRuleTest.kt @@ -0,0 +1,340 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.url.user + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + +class UserUrlRepoRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project2/*/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/*/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/repo3/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l8 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[a-zA-Z]*\$)}/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l9 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[0-9]*\$)}/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l10 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{repo}}/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l11 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l12 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l13 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l14 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val userUrlRepoRateLimitRule = UserUrlRepoRateLimitRule() + assertEquals(userUrlRepoRateLimitRule.isEmpty(), true) + userUrlRepoRateLimitRule.addRateLimitRule(l1) + assertEquals(userUrlRepoRateLimitRule.isEmpty(), false) + } + + @Test + fun testUserUrlRepoRateLimitRuleAndGetRateLimitRule() { + val userUrlRepoRateLimitRule = UserUrlRepoRateLimitRule() + userUrlRepoRateLimitRule.addRateLimitRule(l13) + var resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:/project3/", "user1:")) + var actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userUrlRepoRateLimitRule.addRateLimitRule(l14) + + resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + userUrlRepoRateLimitRule.addRateLimitRule(l1) + + resInfo = ResInfo("user1:///", listOf("user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + resInfo = ResInfo("user1:/", listOf("user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user1:/") + + + + userUrlRepoRateLimitRule.addRateLimitRule(l2) + userUrlRepoRateLimitRule.addRateLimitRule(l3) + userUrlRepoRateLimitRule.addRateLimitRule(l4) + + resInfo = ResInfo("user1:/project1/", listOf("user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/", listOf("user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userUrlRepoRateLimitRule.addRateLimitRule(l11) + + resInfo = ResInfo("user1:/project3/", listOf("user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + userUrlRepoRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + userUrlRepoRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project1/repo2/", listOf("user1:/project1/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/repo2/", listOf("user1:/project2/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + Assertions.assertEquals(actualInfo?.resource, "user1:/project2/repo2/") + + resInfo = ResInfo("user1:/project3/repo1/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project4/", listOf("user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + userUrlRepoRateLimitRule.addRateLimitRule(l7) + userUrlRepoRateLimitRule.addRateLimitRule(l8) + userUrlRepoRateLimitRule.addRateLimitRule(l9) + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo3/") + + resInfo = ResInfo("user1:/project3/repo4/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l8) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + resInfo = ResInfo("user1:/project3/1234/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l9) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/1234/") + + userUrlRepoRateLimitRule.addRateLimitRule(l10) + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:/project3/", "user1:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l10) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + + resInfo = ResInfo("user2:/", listOf("user2:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user2:/") + + resInfo = ResInfo("user2:/project3/xxxx/", listOf("user2:/project3/", "user2:")) + actualInfo = userUrlRepoRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user2:") + } + + @Test + fun testUserUrlRepoRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UserUrlRepoRateLimitRule() + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + var info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + resInfo = ResInfo("user1:/", listOf("user1:")) + info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + } + + @Test + fun testUserUrlRepoRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UserUrlRepoRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf("user1:")) + var actualInfo = rule.getRateLimitRule(resInfo) + Assertions.assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testUserUrlRepoRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UserUrlRepoRateLimitRule() + rule.addRateLimitRule(l5) + + val resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + + rule.addRateLimitRule(l3) + + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUserUrlRepoRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UserUrlRepoRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l12) + val resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l12) + } + + @Test + fun testUserUrlRepoRateLimitRuleWithInvalidLimitInfo() { + val rule = UserUrlRepoRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUserUrlRepoRateLimitRuleWithInvalidUrl() { + val rule = UserUrlRepoRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url") + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRuleTest.kt new file mode 100644 index 0000000000..04aac62941 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/DownloadUsageRateLimitRuleTest.kt @@ -0,0 +1,236 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class DownloadUsageRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/repo1/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/repo1/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/*/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/*/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/repo3/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val downloadUsageRateLimitRule = DownloadUsageRateLimitRule() + assertEquals(downloadUsageRateLimitRule.isEmpty(), true) + downloadUsageRateLimitRule.addRateLimitRule(l1) + assertEquals(downloadUsageRateLimitRule.isEmpty(), false) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRule() { + val downloadUsageRateLimitRule = DownloadUsageRateLimitRule() + downloadUsageRateLimitRule.addRateLimitRule(l1) + downloadUsageRateLimitRule.addRateLimitRule(l2) + downloadUsageRateLimitRule.addRateLimitRule(l3) + downloadUsageRateLimitRule.addRateLimitRule(l4) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, null) + assertEquals(actualInfo?.resource, null) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + downloadUsageRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/") + + downloadUsageRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project2/repo2/") + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + downloadUsageRateLimitRule.addRateLimitRule(l7) + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = downloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + assertEquals(actualInfo?.resource, "/project3/repo3/") + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = DownloadUsageRateLimitRule() + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var info = rule.getRateLimitRule(resInfo) + assertNull(info) + resInfo = ResInfo("/", listOf()) + info = rule.getRateLimitRule(resInfo) + assertNull(info) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = DownloadUsageRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf()) + var actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + resInfo = ResInfo("//", listOf()) + actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = DownloadUsageRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l2) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = DownloadUsageRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l3) + val resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUsageRateLimitRuleWithInvalidLimitInfo() { + val rule = DownloadUsageRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUsageRateLimitRuleWithInvalidUrl() { + val rule = DownloadUsageRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url", listOf("invalid url")) + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRuleTest.kt new file mode 100644 index 0000000000..8d634f519b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/UploadUsageRateLimitRuleTest.kt @@ -0,0 +1,236 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class UploadUsageRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/repo1/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/repo1/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project1/*/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/*/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/project3/repo3/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val uploadUsageRateLimitRule = UploadUsageRateLimitRule() + assertEquals(uploadUsageRateLimitRule.isEmpty(), true) + uploadUsageRateLimitRule.addRateLimitRule(l1) + assertEquals(uploadUsageRateLimitRule.isEmpty(), false) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRule() { + val uploadUsageRateLimitRule = UploadUsageRateLimitRule() + uploadUsageRateLimitRule.addRateLimitRule(l1) + uploadUsageRateLimitRule.addRateLimitRule(l2) + uploadUsageRateLimitRule.addRateLimitRule(l3) + uploadUsageRateLimitRule.addRateLimitRule(l4) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, null) + assertEquals(actualInfo?.resource, null) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + uploadUsageRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + assertEquals(actualInfo?.resource, "/project4/") + + uploadUsageRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("/project4/repo4/", listOf("/project4/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project4/repo4/") + + resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + assertEquals(actualInfo?.resource, "/project1/repo1/") + + resInfo = ResInfo("/project1/repo2/", listOf("/project1/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + assertEquals(actualInfo?.resource, "/project1/repo2/") + + resInfo = ResInfo("/project2/repo2/", listOf("/project2/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + assertEquals(actualInfo?.resource, "/project2/repo2/") + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEquals(actualInfo?.resource, "/project2/repo1/") + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + assertEquals(actualInfo?.resource, "/project3/") + + uploadUsageRateLimitRule.addRateLimitRule(l7) + + resInfo = ResInfo("/project3/repo3/", listOf("/project3/")) + actualInfo = uploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + assertEquals(actualInfo?.resource, "/project3/repo3/") + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UploadUsageRateLimitRule() + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var info = rule.getRateLimitRule(resInfo) + assertNull(info) + resInfo = ResInfo("/", listOf()) + info = rule.getRateLimitRule(resInfo) + assertNull(info) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UploadUsageRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf()) + var actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + resInfo = ResInfo("//", listOf()) + actualInfo = rule.getRateLimitRule(resInfo) + assertNull(actualInfo?.resourceLimit) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UploadUsageRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l2) + + var resInfo = ResInfo("/project1/repo1/", listOf("/project1/")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + + resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUsageRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UploadUsageRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l3) + val resInfo = ResInfo("/project2/repo1/", listOf("/project2/")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUsageRateLimitRuleWithInvalidLimitInfo() { + val rule = UploadUsageRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUsageRateLimitRuleWithInvalidUrl() { + val rule = UploadUsageRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url", listOf("invalid url")) + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRuleTest.kt new file mode 100644 index 0000000000..5ec3ae822b --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserDownloadUsageRateLimitRuleTest.kt @@ -0,0 +1,340 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage.user + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class UserDownloadUsageRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project2/*/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/*/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/repo3/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l8 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[a-zA-Z]*\$)}/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l9 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[0-9]*\$)}/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l10 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{repo}}/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l11 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l12 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l13 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l14 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val userDownloadUsageRateLimitRule = UserDownloadUsageRateLimitRule() + assertEquals(userDownloadUsageRateLimitRule.isEmpty(), true) + userDownloadUsageRateLimitRule.addRateLimitRule(l1) + assertEquals(userDownloadUsageRateLimitRule.isEmpty(), false) + } + + @Test + fun testUserDownloadUsageRateLimitRuleAndGetRateLimitRule() { + val userDownloadUsageRateLimitRule = UserDownloadUsageRateLimitRule() + userDownloadUsageRateLimitRule.addRateLimitRule(l13) + var resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:/project3/", "user1:")) + var actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userDownloadUsageRateLimitRule.addRateLimitRule(l14) + + resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + userDownloadUsageRateLimitRule.addRateLimitRule(l1) + + resInfo = ResInfo("user1:///", listOf("user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + resInfo = ResInfo("user1:/", listOf("user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user1:/") + + + + userDownloadUsageRateLimitRule.addRateLimitRule(l2) + userDownloadUsageRateLimitRule.addRateLimitRule(l3) + userDownloadUsageRateLimitRule.addRateLimitRule(l4) + + resInfo = ResInfo("user1:/project1/", listOf("user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/", listOf("user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userDownloadUsageRateLimitRule.addRateLimitRule(l11) + + resInfo = ResInfo("user1:/project3/", listOf("user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + userDownloadUsageRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + userDownloadUsageRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project1/repo2/", listOf("user1:/project1/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/repo2/", listOf("user1:/project2/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + Assertions.assertEquals(actualInfo?.resource, "user1:/project2/repo2/") + + resInfo = ResInfo("user1:/project3/repo1/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project4/", listOf("user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + userDownloadUsageRateLimitRule.addRateLimitRule(l7) + userDownloadUsageRateLimitRule.addRateLimitRule(l8) + userDownloadUsageRateLimitRule.addRateLimitRule(l9) + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo3/") + + resInfo = ResInfo("user1:/project3/repo4/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l8) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + resInfo = ResInfo("user1:/project3/1234/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l9) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/1234/") + + userDownloadUsageRateLimitRule.addRateLimitRule(l10) + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:/project3/", "user1:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l10) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + + resInfo = ResInfo("user2:/", listOf("user2:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user2:/") + + resInfo = ResInfo("user2:/project3/xxxx/", listOf("user2:/project3/", "user2:")) + actualInfo = userDownloadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user2:") + + } + + @Test + fun testUserDownloadUsageRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UserDownloadUsageRateLimitRule() + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + var info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + resInfo = ResInfo("user1:/", listOf("user1:")) + info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + } + + @Test + fun testUserDownloadUsageRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UserDownloadUsageRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf("")) + assertThrows { rule.getRateLimitRule(resInfo) } + } + + @Test + fun testUserDownloadUsageRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UserDownloadUsageRateLimitRule() + rule.addRateLimitRule(l5) + + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + + rule.addRateLimitRule(l3) + + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUserDownloadUsageRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UserDownloadUsageRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l12) + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l12) + } + + @Test + fun testUserDownloadUsageRateLimitRuleWithInvalidLimitInfo() { + val rule = UserDownloadUsageRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUserDownloadUsageRateLimitRuleWithInvalidUrl() { + val rule = UserDownloadUsageRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url") + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRuleTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRuleTest.kt new file mode 100644 index 0000000000..65fa3d0723 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/rule/usage/user/UserUploadUsageRateLimitRuleTest.kt @@ -0,0 +1,340 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.rule.usage.user + +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.rule.BaseRuleTest +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows +import java.time.Duration + +class UserUploadUsageRateLimitRuleTest : BaseRuleTest() { + + private val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l2 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l3 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l4 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project2/*/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l5 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/*/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l6 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/*/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l7 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/repo3/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l8 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[a-zA-Z]*\$)}/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l9 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{(^[0-9]*\$)}/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l10 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/{repo}}/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l11 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project3/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + private val l12 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:/project1/repo1/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l13 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + private val l14 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "user1:", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @Test + fun testIsEmpty() { + val userUploadUsageRateLimitRule = UserUploadUsageRateLimitRule() + assertEquals(userUploadUsageRateLimitRule.isEmpty(), true) + userUploadUsageRateLimitRule.addRateLimitRule(l1) + assertEquals(userUploadUsageRateLimitRule.isEmpty(), false) + } + + @Test + fun testUserUploadUsageRateLimitRuleAndGetRateLimitRule() { + val userUploadUsageRateLimitRule = UserUploadUsageRateLimitRule() + userUploadUsageRateLimitRule.addRateLimitRule(l13) + var resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:/project3/", "user1:")) + var actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userUploadUsageRateLimitRule.addRateLimitRule(l14) + + resInfo = ResInfo("user1:/project3/repo2/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + userUploadUsageRateLimitRule.addRateLimitRule(l1) + + resInfo = ResInfo("user1:///", listOf("user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + + resInfo = ResInfo("user1:/", listOf("user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user1:/") + + + + userUploadUsageRateLimitRule.addRateLimitRule(l2) + userUploadUsageRateLimitRule.addRateLimitRule(l3) + userUploadUsageRateLimitRule.addRateLimitRule(l4) + + resInfo = ResInfo("user1:/project1/", listOf("user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/", listOf("user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l14) + Assertions.assertEquals(actualInfo?.resource, "user1:") + + userUploadUsageRateLimitRule.addRateLimitRule(l11) + + resInfo = ResInfo("user1:/project3/", listOf("user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + userUploadUsageRateLimitRule.addRateLimitRule(l6) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + userUploadUsageRateLimitRule.addRateLimitRule(l5) + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/repo1/") + + resInfo = ResInfo("user1:/project1/repo2/", listOf("user1:/project1/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l2) + Assertions.assertEquals(actualInfo?.resource, "user1:/project1/") + + resInfo = ResInfo("user1:/project2/repo2/", listOf("user1:/project2/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l4) + Assertions.assertEquals(actualInfo?.resource, "user1:/project2/repo2/") + + resInfo = ResInfo("user1:/project3/repo1/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project4/", listOf("user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l6) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/") + + resInfo = ResInfo("user1:/project4/repo4/", listOf("user1:/project4/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + Assertions.assertEquals(actualInfo?.resource, "user1:/project4/repo4/") + + userUploadUsageRateLimitRule.addRateLimitRule(l7) + userUploadUsageRateLimitRule.addRateLimitRule(l8) + userUploadUsageRateLimitRule.addRateLimitRule(l9) + + resInfo = ResInfo("user1:/project3/repo3/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l7) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/repo3/") + + resInfo = ResInfo("user1:/project3/repo4/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l11) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/") + + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l8) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + resInfo = ResInfo("user1:/project3/1234/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l9) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/1234/") + + userUploadUsageRateLimitRule.addRateLimitRule(l10) + resInfo = ResInfo("user1:/project3/xxxx/", listOf("user1:/project3/", "user1:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l10) + Assertions.assertEquals(actualInfo?.resource, "user1:/project3/xxxx/") + + + resInfo = ResInfo("user2:/", listOf("user2:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l1) + Assertions.assertEquals(actualInfo?.resource, "user2:/") + + resInfo = ResInfo("user2:/project3/xxxx/", listOf("user2:/project3/", "user2:")) + actualInfo = userUploadUsageRateLimitRule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l13) + Assertions.assertEquals(actualInfo?.resource, "user2:") + + } + + @Test + fun testUserUploadUsageRateLimitRuleAndGetRateLimitRuleWithEmptyRule() { + val rule = UserUploadUsageRateLimitRule() + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + var info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + resInfo = ResInfo("user1:/", listOf("user1:")) + info = rule.getRateLimitRule(resInfo) + Assertions.assertNull(info) + } + + @Test + fun testUserUploadUsageRateLimitRuleAndGetRateLimitRuleWithResEmpty() { + val rule = UserUploadUsageRateLimitRule() + rule.addRateLimitRule(l1) + var resInfo = ResInfo("", listOf("")) + assertThrows { rule.getRateLimitRule(resInfo) } + } + + @Test + fun testUserUploadUsageRateLimitRuleAndGetRateLimitRuleWithDifferentOrder() { + val rule = UserUploadUsageRateLimitRule() + rule.addRateLimitRule(l5) + + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + var actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l5) + + rule.addRateLimitRule(l3) + + actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + } + + @Test + fun testUserUploadUsageRateLimitRuleAndGetRateLimitRuleWithDuplicatedLimitInfos() { + val rule = UserUploadUsageRateLimitRule() + rule.addRateLimitRule(l3) + rule.addRateLimitRule(l12) + var resInfo = ResInfo("user1:/project1/repo1/", listOf("user1:/project1/", "user1:")) + val actualInfo = rule.getRateLimitRule(resInfo) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l3) + assertEqualsLimitInfo(actualInfo?.resourceLimit, l12) + } + + @Test + fun testUserUploadUsageRateLimitRuleWithInvalidLimitInfo() { + val rule = UserUploadUsageRateLimitRule() + val rl = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/2/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + assertThrows { rule.addRateLimitRule(rl) } + } + + @Test + fun testUserUploadUsageRateLimitRuleWithInvalidUrl() { + val rule = UserUploadUsageRateLimitRule() + rule.addRateLimitRule(l1) + rule.addRateLimitRule(l2) + val resInfo = ResInfo("invalid url") + assertThrows { rule.getRateLimitRule(resInfo) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterServiceTest.kt new file mode 100644 index 0000000000..090da664cf --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/AbstractRateLimiterServiceTest.kt @@ -0,0 +1,275 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedFixedWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedLeakyRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedSlidingWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedTest +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedTokenBucketRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.FixedWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.LeakyRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.SlidingWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.TokenBucketRateLimiter +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics +import com.tencent.bkrepo.common.ratelimiter.repository.RateLimitRepository +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import io.micrometer.core.instrument.MeterRegistry +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.TestInstance +import org.springframework.boot.test.mock.mockito.MockBean +import org.springframework.mock.web.MockHttpServletRequest +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import java.time.Duration + + +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +open class AbstractRateLimiterServiceTest : DistributedTest() { + + lateinit var request: MockHttpServletRequest + lateinit var rateLimiterService: RateLimiterService + lateinit var rateLimiterProperties: RateLimiterProperties + lateinit var taskScheduler: ThreadPoolTaskScheduler + lateinit var rateLimiterMetrics: RateLimiterMetrics + lateinit var rateLimiterConfigService: RateLimiterConfigService + + @MockBean + private lateinit var meterRegistry: MeterRegistry + + @MockBean + private lateinit var rateLimitRepository: RateLimitRepository + + fun init() { + request = MockHttpServletRequest() + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + taskScheduler = scheduler + rateLimiterProperties = RateLimiterProperties() + rateLimiterMetrics = RateLimiterMetrics(meterRegistry) + rateLimiterConfigService = RateLimiterConfigService(rateLimitRepository) + } + + + open fun createAlgorithmOfRateLimiterTest() { + val resource = (rateLimiterService as AbstractRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as AbstractRateLimiterService).buildExtraResource(request) + ) + val resourceLimit = (rateLimiterService as AbstractRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + // 测试固定窗口本地算法生成 + var rateLimiter = (rateLimiterService as AbstractRateLimiterService) + .createAlgorithmOfRateLimiter(resource, resourceLimit!!.resourceLimit) + Assertions.assertInstanceOf( + FixedWindowRateLimiter::class.java, + rateLimiter + ) + // 测试固定窗口分布式算法生成 + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/", + limitDimension = LimitDimension.URL.name, limit = 1, + duration = Duration.ofSeconds(1), scope = WorkScope.GLOBAL.name + ) + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l1) + Assertions.assertInstanceOf( + DistributedFixedWindowRateLimiter::class.java, + rateLimiter + ) + // 测试limit < 0的场景 + val l2 = ResourceLimit( + algo = Algorithms.SLIDING_WINDOW.name, resource = "/project3/{(^[a-zA-Z]*\$)}/", + limitDimension = LimitDimension.URL.name, limit = -1, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + Assertions.assertThrows(InvalidResourceException::class.java) { + (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l2) + } + // 测试滑动窗口本地算法生成 + l2.limit = 1 + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l2) + Assertions.assertInstanceOf( + SlidingWindowRateLimiter::class.java, + rateLimiter + ) + // 测试滑动窗口分布式算法生成 + l2.scope = WorkScope.GLOBAL.name + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l2) + Assertions.assertInstanceOf( + DistributedSlidingWindowRateLimiter::class.java, + rateLimiter + ) + // 测试不支持的算法类型 + val l3 = ResourceLimit( + algo = "", resource = "/project3/{(^[0-9]*\$)}/", + limitDimension = LimitDimension.URL.name, limit = 52428800, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + Assertions.assertThrows(InvalidResourceException::class.java) { + (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l3) + } + //测试 capacity 不合规的场景 + val l4 = ResourceLimit( + algo = Algorithms.LEAKY_BUCKET.name, resource = "/project3/{repo}}/", + limitDimension = LimitDimension.URL.name, limit = 1, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + Assertions.assertThrows(InvalidResourceException::class.java) { + (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l4) + } + l4.capacity = -2 + Assertions.assertThrows(InvalidResourceException::class.java) { + (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l4) + } + // 测试漏桶本地算法生成 + l4.capacity = 5 + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l4) + Assertions.assertInstanceOf( + LeakyRateLimiter::class.java, + rateLimiter + ) + // 测试漏桶分布式算法生成 + l4.scope = WorkScope.GLOBAL.name + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l4) + Assertions.assertInstanceOf( + DistributedLeakyRateLimiter::class.java, + rateLimiter + ) + // 测试令牌桶本地算法生成 + val l5 = ResourceLimit( + algo = Algorithms.TOKEN_BUCKET.name, resource = "/project3/", + limitDimension = LimitDimension.URL.name, limit = 1, capacity = 5, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l5) + Assertions.assertInstanceOf( + TokenBucketRateLimiter::class.java, + rateLimiter + ) + // 测试令牌桶分布式算法生成 + l5.scope = WorkScope.GLOBAL.name + rateLimiter = (rateLimiterService as AbstractRateLimiterService).createAlgorithmOfRateLimiter(resource, l5) + Assertions.assertInstanceOf( + DistributedTokenBucketRateLimiter::class.java, + rateLimiter + ) + } + + + open fun refreshRateLimitRuleTest() { + val hashCode = rateLimiterProperties.rules.hashCode() + (rateLimiterService as AbstractRateLimiterService).refreshRateLimitRule() + Assertions.assertEquals(hashCode, (rateLimiterService as AbstractRateLimiterService).currentRuleHashCode) + } + + + open fun getAlgorithmOfRateLimiterTest() { + val resource = (rateLimiterService as AbstractRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as AbstractRateLimiterService).buildExtraResource(request) + ) + val resourceLimit = (rateLimiterService as AbstractRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + assertEqualsLimitInfo(resourceLimit!!.resourceLimit, rateLimiterProperties.rules.first()) + val rateLimiter = (rateLimiterService as AbstractRateLimiterService) + .getAlgorithmOfRateLimiter(resource, resourceLimit.resourceLimit) + Assertions.assertInstanceOf( + FixedWindowRateLimiter::class.java, + rateLimiter + ) + Assertions.assertEquals( + rateLimiter, + (rateLimiterService as AbstractRateLimiterService) + .getAlgorithmOfRateLimiter(resource, resourceLimit.resourceLimit) + ) + } + + + open fun getResLimitInfoTest() { + val resourceLimit = (rateLimiterService as AbstractRateLimiterService).getResLimitInfo(request) + Assertions.assertNotNull(resourceLimit) + assertEqualsLimitInfo(resourceLimit!!.resourceLimit, rateLimiterProperties.rules.first()) + } + + + open fun circuitBreakerCheckTest() { + + var circuitBreakerPerSecond: Long? = null + (rateLimiterService as AbstractRateLimiterService).circuitBreakerCheck( + rateLimiterProperties.rules.first(), circuitBreakerPerSecond + ) + + circuitBreakerPerSecond = Long.MAX_VALUE + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as AbstractRateLimiterService).circuitBreakerCheck( + rateLimiterProperties.rules.first(), circuitBreakerPerSecond + ) + } + circuitBreakerPerSecond = Long.MIN_VALUE + (rateLimiterService as AbstractRateLimiterService).circuitBreakerCheck( + rateLimiterProperties.rules.first(), circuitBreakerPerSecond + ) + } + + + open fun rateLimitCatchTest() { + val resourceLimit = (rateLimiterService as AbstractRateLimiterService).getResLimitInfo(request) + Assertions.assertNotNull(resourceLimit) + val rateLimiter = (rateLimiterService as AbstractRateLimiterService) + .getAlgorithmOfRateLimiter(resourceLimit!!.resource, resourceLimit.resourceLimit) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as AbstractRateLimiterService).rateLimitCatch( + request = request, + resLimitInfo = resourceLimit, + applyPermits = Long.MAX_VALUE, + circuitBreakerPerSecond = null, + ) { rateLimiter, permits -> + false + } + } + rateLimiterProperties.dryRun = true + (rateLimiterService as AbstractRateLimiterService).rateLimitCatch( + request = request, + resLimitInfo = resourceLimit, + applyPermits = Long.MAX_VALUE, + circuitBreakerPerSecond = null, + ) { rateLimiter, permits -> + false + } + rateLimiterProperties.dryRun = false + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterServiceTest.kt new file mode 100644 index 0000000000..c3126425fc --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/DownloadBandwidthRateLimiterServiceTest.kt @@ -0,0 +1,239 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.bandwidth + +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.rule.bandwidth.DownloadBandwidthRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.servlet.HandlerMapping + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class DownloadBandwidthRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.DOWNLOAD_BANDWIDTH.name, limit = 10, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + request.method = "GET" + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = DownloadBandwidthRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as DownloadBandwidthRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals( + false, + (rateLimiterService as DownloadBandwidthRateLimiterService).ignoreRequest(request) + ) + request.method = "POST" + Assertions.assertEquals( + true, + (rateLimiterService as DownloadBandwidthRateLimiterService).ignoreRequest(request) + ) + request.method = "PATCH" + Assertions.assertEquals( + true, + (rateLimiterService as DownloadBandwidthRateLimiterService).ignoreRequest(request) + ) + request.method = "PUT" + Assertions.assertEquals( + true, + (rateLimiterService as DownloadBandwidthRateLimiterService).ignoreRequest(request) + ) + request.method = "GET" + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = + (rateLimiterService as DownloadBandwidthRateLimiterService).getRepoInfoFromAttribute(request) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "/blueking/generic-local/", + (rateLimiterService as DownloadBandwidthRateLimiterService).buildResource(request) + ) + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("/blueking/"), + (rateLimiterService as DownloadBandwidthRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertThrows(AcquireLockFailedException::class.java) { + (rateLimiterService as DownloadBandwidthRateLimiterService).getApplyPermits(request, null) + } + Assertions.assertEquals( + 10, + (rateLimiterService as DownloadBandwidthRateLimiterService).getApplyPermits(request, 10) + ) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + DownloadBandwidthRateLimitRule::class.java, + (rateLimiterService as DownloadBandwidthRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.DOWNLOAD_BANDWIDTH.name), + (rateLimiterService as DownloadBandwidthRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as DownloadBandwidthRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as DownloadBandwidthRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as DownloadBandwidthRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "DownloadBandwidth:" + "/blueking/", + (rateLimiterService as DownloadBandwidthRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadBandwidthRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as DownloadBandwidthRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "DownloadBandwidth:" + "/blueking/generic-local/", + (rateLimiterService as DownloadBandwidthRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadBandwidthRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTestNull() { + val resource = (rateLimiterService as DownloadBandwidthRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as DownloadBandwidthRateLimiterService).buildExtraResource(request) + ) + l1.resource = "/test/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadBandwidthRateLimiterService).refreshRateLimitRule() + val resourceLimit = (rateLimiterService as DownloadBandwidthRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadBandwidthRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + Assertions.assertThrows(UnsupportedOperationException::class.java) { rateLimiterService.limit(request) } + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterServiceTest.kt new file mode 100644 index 0000000000..108c7eb237 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/bandwidth/UploadBandwidthRateLimiterServiceTest.kt @@ -0,0 +1,295 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.bandwidth + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.rule.bandwidth.UploadBandwidthRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.util.unit.DataSize +import org.springframework.web.servlet.HandlerMapping + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UploadBandwidthRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.UPLOAD_BANDWIDTH.name, limit = 10, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + val content = byteArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) + request.setContent(content) + request.method = "PUT" + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UploadBandwidthRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UploadBandwidthRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals(false, (rateLimiterService as UploadBandwidthRateLimiterService).ignoreRequest(request)) + request.method = "POST" + Assertions.assertEquals(false, (rateLimiterService as UploadBandwidthRateLimiterService).ignoreRequest(request)) + request.method = "PATCH" + Assertions.assertEquals(false, (rateLimiterService as UploadBandwidthRateLimiterService).ignoreRequest(request)) + request.method = "GET" + Assertions.assertEquals(true, (rateLimiterService as UploadBandwidthRateLimiterService).ignoreRequest(request)) + request.method = "PUT" + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = (rateLimiterService as UploadBandwidthRateLimiterService).getRepoInfoFromAttribute( + request + ) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "/blueking/generic-local/", + (rateLimiterService as UploadBandwidthRateLimiterService).buildResource(request) + ) + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("/blueking/"), + (rateLimiterService as UploadBandwidthRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertThrows(AcquireLockFailedException::class.java) { + (rateLimiterService as UploadBandwidthRateLimiterService).getApplyPermits(request, null) + } + Assertions.assertEquals( + 10, + (rateLimiterService as UploadBandwidthRateLimiterService).getApplyPermits(request, 10) + ) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UploadBandwidthRateLimitRule::class.java, + (rateLimiterService as UploadBandwidthRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.UPLOAD_BANDWIDTH.name), + (rateLimiterService as UploadBandwidthRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UploadBandwidthRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UploadBandwidthRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as UploadBandwidthRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UploadBandwidth:" + "/blueking/", + (rateLimiterService as UploadBandwidthRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadBandwidthRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UploadBandwidthRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UploadBandwidth:" + "/blueking/generic-local/", + (rateLimiterService as UploadBandwidthRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadBandwidthRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTestNull() { + val resource = (rateLimiterService as UploadBandwidthRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UploadBandwidthRateLimiterService).buildExtraResource(request) + ) + l1.resource = "/test/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadBandwidthRateLimiterService).refreshRateLimitRule() + val resourceLimit = (rateLimiterService as UploadBandwidthRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadBandwidthRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + Assertions.assertThrows(UnsupportedOperationException::class.java) { + (rateLimiterService as UploadBandwidthRateLimiterService).limit(request) + } + } + + @Test + fun bandwidthRateLimitTest() { + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthRateLimit( + request = request, + permits = 1, + circuitBreakerPerSecond = DataSize.ofBytes(0) + ) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthRateLimit( + request = request, + permits = 10000, + circuitBreakerPerSecond = DataSize.ofBytes(0) + ) + } + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthRateLimit( + request = request, + permits = 1, + circuitBreakerPerSecond = DataSize.ofTerabytes(1) + ) + } + } + + @Test + fun bandwidthRateLimit1Test() { + val content = "1234567891" + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthRateStart( + request = request, + inputStream = content.byteInputStream(), + circuitBreakerPerSecond = DataSize.ofTerabytes(1), + rangeLength = null + ) + } + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthRateStart( + request = request, + inputStream = content.byteInputStream(), + circuitBreakerPerSecond = DataSize.ofBytes(1), + rangeLength = null + ) + } + + @Test + fun bandwidthLimitHandlerTest() { + val resourceLimit = (rateLimiterService as UploadBandwidthRateLimiterService).getResLimitInfo(request) + Assertions.assertNotNull(resourceLimit) + assertEqualsLimitInfo(resourceLimit!!.resourceLimit, rateLimiterProperties.rules.first()) + val rateLimiter = (rateLimiterService as UploadBandwidthRateLimiterService) + .getAlgorithmOfRateLimiter(resourceLimit.resource, resourceLimit.resourceLimit) + Assertions.assertEquals( + true, + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthLimitHandler(rateLimiter, 1) + ) + Assertions.assertEquals( + false, + (rateLimiterService as UploadBandwidthRateLimiterService).bandwidthLimitHandler(rateLimiter, 100) + ) + } + + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterServiceTest.kt new file mode 100644 index 0000000000..ec3baac926 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRateLimiterServiceTest.kt @@ -0,0 +1,215 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.UrlRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import java.time.Duration + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UrlRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/", + limitDimension = LimitDimension.URL.name, limit = 1, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UrlRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UrlRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals(false, (rateLimiterService as UrlRateLimiterService).ignoreRequest(request)) + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "/blueking/generic-local/test.txt", + (rateLimiterService as UrlRateLimiterService).buildResource(request) + ) + request.requestURI = "/api/node/batch/blueking/generic-local" + Assertions.assertEquals( + "/api/node/batch/blueking/generic-local", + (rateLimiterService as UrlRateLimiterService).buildResource(request) + ) + request.requestURI = "/blueking/generic-local/test.txt" + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + emptyList(), + (rateLimiterService as UrlRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertEquals(1, (rateLimiterService as UrlRateLimiterService).getApplyPermits(request, null)) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UrlRateLimitRule::class.java, + (rateLimiterService as UrlRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.URL.name), + (rateLimiterService as UrlRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UrlRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UrlRateLimiterService).buildExtraResource(request) + ) + val resourceLimit = (rateLimiterService as UrlRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "Url:" + "/blueking/generic-local/test.txt", + (rateLimiterService as UrlRateLimiterService).generateKey( + resourceLimit!!.resource, resourceLimit.resourceLimit + ) + ) + } + + @Test + fun generateKeyTestNull() { + l1.resource = "/test/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRateLimiterService).refreshRateLimitRule() + + val resource = (rateLimiterService as UrlRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UrlRateLimiterService).buildExtraResource(request) + ) + val resourceLimit = (rateLimiterService as UrlRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + // 本地限流验证 + (rateLimiterService as UrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UrlRateLimiterService).limit(request) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UrlRateLimiterService).limit(request) + } + + l1.resource = "/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UrlRateLimiterService).limit(request) + (rateLimiterService as UrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UrlRateLimiterService).limit(request) + } + } + +} diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterServiceTest.kt new file mode 100644 index 0000000000..80af9fbb42 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/UrlRepoRateLimiterServiceTest.kt @@ -0,0 +1,287 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.api.util.toJsonString +import com.tencent.bkrepo.common.artifact.constant.PROJECT_ID +import com.tencent.bkrepo.common.artifact.constant.REPO_NAME +import com.tencent.bkrepo.common.artifact.pojo.RepositoryCategory +import com.tencent.bkrepo.common.artifact.pojo.RepositoryType +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.UrlRepoRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import com.tencent.bkrepo.repository.pojo.repo.UserRepoCreateRequest +import com.tencent.bkrepo.repository.pojo.search.NodeQueryBuilder +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.servlet.HandlerMapping +import org.springframework.web.servlet.HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UrlRepoRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.URL_REPO.name, limit = 1, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + request.setAttribute(BEST_MATCHING_PATTERN_ATTRIBUTE, "/{projectId}/{repoName}/**") + request.contentType = "application/json" + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UrlRepoRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UrlRepoRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + rateLimiterProperties.specialUrls = listOf("*") + Assertions.assertEquals(false, (rateLimiterService as UrlRepoRateLimiterService).ignoreRequest(request)) + rateLimiterProperties.specialUrls = listOf("/{projectId}/{repoName}/**") + Assertions.assertEquals(false, (rateLimiterService as UrlRepoRateLimiterService).ignoreRequest(request)) + rateLimiterProperties.specialUrls = listOf() + Assertions.assertEquals(true, (rateLimiterService as UrlRepoRateLimiterService).ignoreRequest(request)) + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "/blueking/generic-local/", + (rateLimiterService as UrlRepoRateLimiterService).buildResource(request) + ) + request.requestURI = "/api/node/batch/blueking/generic-local" + Assertions.assertEquals( + "/blueking/generic-local/", + (rateLimiterService as UrlRepoRateLimiterService).buildResource(request) + ) + request.requestURI = "/blueking/generic-local/test.txt" + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("/blueking/"), + (rateLimiterService as UrlRepoRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertEquals(1, (rateLimiterService as UrlRepoRateLimiterService).getApplyPermits(request, null)) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UrlRepoRateLimitRule::class.java, + (rateLimiterService as UrlRepoRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.URL_REPO.name), + (rateLimiterService as UrlRepoRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UrlRepoRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UrlRepoRateLimiterService).buildExtraResource(request) + ) + val resourceLimit = (rateLimiterService as UrlRepoRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UrlRepo:" + "/blueking/", + (rateLimiterService as UrlRepoRateLimiterService).generateKey( + resourceLimit!!.resource, resourceLimit.resourceLimit + ) + ) + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = (rateLimiterService as UrlRepoRateLimiterService).getRepoInfoFromAttribute( + request + ) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + } + + @Test + fun getRepoInfoFromBodyTest() { + request.requestURI = "/api/node/search" + request.contentType = "application/json" + val queryModelBuilder = NodeQueryBuilder() + .select(PROJECT_ID, REPO_NAME) + .sortByAsc("fullPath") + .page(1, 10) + .projectId("test-projectId") + .repoName("test-repoName") + + val queryModel = queryModelBuilder.build() + request.setContent(queryModel.toJsonString().toByteArray()) + val (projectId, repoName) = (rateLimiterService as UrlRepoRateLimiterService).getRepoInfoFromBody( + request + ) + Assertions.assertEquals("test-projectId", projectId) + Assertions.assertEquals("test-repoName", repoName) + + request.setContent( + UserRepoCreateRequest( + projectId = "test-projectId1", + name = "test-repoName1", + type = RepositoryType.GENERIC, + category = RepositoryCategory.COMPOSITE, + display = false + ).toJsonString().toByteArray() + ) + val (projectId1, repoName1) = (rateLimiterService as UrlRepoRateLimiterService).getRepoInfoFromBody( + request + ) + Assertions.assertEquals("test-projectId1", projectId1) + Assertions.assertEquals(null, repoName1) + + request.requestURI = "/blueking/generic-local/test.txt" + } + + @Test + fun generateKeyTestNull() { + l1.resource = "/test/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRepoRateLimiterService).refreshRateLimitRule() + + val resource = (rateLimiterService as UrlRepoRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UrlRepoRateLimiterService).buildExtraResource(request) + ) + val resourceLimit = (rateLimiterService as UrlRepoRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRepoRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + rateLimiterProperties.specialUrls = listOf("*") + // 本地限流验证 + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRepoRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + } + + l1.resource = "/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRepoRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UrlRepoRateLimiterService).limit(request) + } + + l1.resource = "/*/" + l1.limit = 1 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UrlRepoRateLimiterService).refreshRateLimitRule() + } + +} diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterServiceTest.kt new file mode 100644 index 0000000000..fe89d23cbb --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRateLimiterServiceTest.kt @@ -0,0 +1,263 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url.user + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.user.UserUrlRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import java.time.Duration + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UserUrlRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/", + limitDimension = LimitDimension.USER_URL.name, limit = 1, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + request.setAttribute("userId", "admin") + val attributes = ServletRequestAttributes(request) + RequestContextHolder.setRequestAttributes(attributes) + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UserUrlRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals(false, (rateLimiterService as UserUrlRateLimiterService).ignoreRequest(request)) + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "admin:/blueking/generic-local/test.txt", + (rateLimiterService as UserUrlRateLimiterService).buildResource(request) + ) + request.requestURI = "/api/node/batch/blueking/generic-local" + request.setAttribute("userId", "test") + Assertions.assertEquals( + "test:/api/node/batch/blueking/generic-local", + (rateLimiterService as UserUrlRateLimiterService).buildResource(request) + ) + request.requestURI = "/blueking/generic-local/test.txt" + request.setAttribute("userId", "admin") + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("admin:"), + (rateLimiterService as UserUrlRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertEquals( + 1, + (rateLimiterService as UserUrlRateLimiterService).getApplyPermits(request, null) + ) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UserUrlRateLimitRule::class.java, + (rateLimiterService as UserUrlRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.USER_URL.name), + (rateLimiterService as UserUrlRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UserUrlRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserUrlRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as UserUrlRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUrl:" + "admin:/blueking/generic-local/test.txt", + (rateLimiterService as UserUrlRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "admin:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + + resourceLimit = (rateLimiterService as UserUrlRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUrl:" + "admin:", + (rateLimiterService as UserUrlRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "*:/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTestNull() { + l1.resource = "test:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + + val resource = (rateLimiterService as UserUrlRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserUrlRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as UserUrlRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "test:/blueking/generic-local/test.txt" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserUrlRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + + l1.resource = "*:/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + // 本地限流验证 + (rateLimiterService as UserUrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRateLimiterService).limit(request) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRateLimiterService).limit(request) + } + + l1.resource = "admin:/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRateLimiterService).limit(request) + (rateLimiterService as UserUrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRateLimiterService).limit(request) + } + + l1.resource = "admin:" + l1.limit = 1 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRateLimiterService).limit(request) + } + + l1.resource = "test:/blueking" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRateLimiterService).limit(request) + (rateLimiterService as UserUrlRateLimiterService).limit(request) + Assertions.assertDoesNotThrow { (rateLimiterService as UserUrlRateLimiterService).limit(request) } + } + + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterServiceTest.kt new file mode 100644 index 0000000000..74fa8ccfd0 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/url/user/UserUrlRepoRateLimiterServiceTest.kt @@ -0,0 +1,337 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.url.user + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.api.util.toJsonString +import com.tencent.bkrepo.common.artifact.constant.PROJECT_ID +import com.tencent.bkrepo.common.artifact.constant.REPO_NAME +import com.tencent.bkrepo.common.artifact.pojo.RepositoryCategory +import com.tencent.bkrepo.common.artifact.pojo.RepositoryType +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.url.user.UserUrlRepoRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import com.tencent.bkrepo.repository.pojo.repo.UserRepoCreateRequest +import com.tencent.bkrepo.repository.pojo.search.NodeQueryBuilder +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import org.springframework.web.servlet.HandlerMapping +import org.springframework.web.servlet.HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UserUrlRepoRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/*/", + limitDimension = LimitDimension.USER_URL_REPO.name, limit = 1, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + request.setAttribute("userId", "admin") + request.requestURI = "/blueking/generic-local/test.txt" + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + request.setAttribute(BEST_MATCHING_PATTERN_ATTRIBUTE, "/{projectId}/{repoName}/**") + val attributes = ServletRequestAttributes(request) + RequestContextHolder.setRequestAttributes(attributes) + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UserUrlRepoRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + rateLimiterProperties.specialUrls = listOf("*") + Assertions.assertEquals(false, (rateLimiterService as UserUrlRepoRateLimiterService).ignoreRequest(request)) + rateLimiterProperties.specialUrls = listOf("/{projectId}/{repoName}/**") + Assertions.assertEquals(false, (rateLimiterService as UserUrlRepoRateLimiterService).ignoreRequest(request)) + rateLimiterProperties.specialUrls = listOf() + Assertions.assertEquals(true, (rateLimiterService as UserUrlRepoRateLimiterService).ignoreRequest(request)) + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "admin:/blueking/generic-local/", + (rateLimiterService as UserUrlRepoRateLimiterService).buildResource(request) + ) + request.requestURI = "/api/node/batch/blueking/generic-local" + request.setAttribute("userId", "test") + Assertions.assertEquals( + "test:/blueking/generic-local/", + (rateLimiterService as UserUrlRepoRateLimiterService).buildResource(request) + ) + request.requestURI = "/blueking/generic-local/test.txt" + request.setAttribute("userId", "admin") + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("admin:/blueking/", "admin:"), + (rateLimiterService as UserUrlRepoRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertEquals( + 1, + (rateLimiterService as UserUrlRepoRateLimiterService).getApplyPermits(request, null) + ) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UserUrlRepoRateLimitRule::class.java, + (rateLimiterService as UserUrlRepoRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.USER_URL_REPO.name), + (rateLimiterService as UserUrlRepoRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UserUrlRepoRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserUrlRepoRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = + (rateLimiterService as UserUrlRepoRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUrlRepo:" + "admin:/blueking/", + (rateLimiterService as UserUrlRepoRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "admin:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + + resourceLimit = (rateLimiterService as UserUrlRepoRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUrlRepo:" + "admin:", + (rateLimiterService as UserUrlRepoRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + } + + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = (rateLimiterService as UserUrlRepoRateLimiterService).getRepoInfoFromAttribute( + request + ) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + } + + @Test + fun getRepoInfoFromBodyTest() { + request.requestURI = "/api/node/search" + request.contentType = "application/json" + val queryModelBuilder = NodeQueryBuilder() + .select(PROJECT_ID, REPO_NAME) + .sortByAsc("fullPath") + .page(1, 10) + .projectId("test-projectId") + .repoName("test-repoName") + + val queryModel = queryModelBuilder.build() + request.setContent(queryModel.toJsonString().toByteArray()) + val (projectId, repoName) = (rateLimiterService as UserUrlRepoRateLimiterService).getRepoInfoFromBody( + request + ) + Assertions.assertEquals("test-projectId", projectId) + Assertions.assertEquals("test-repoName", repoName) + + request.setContent( + UserRepoCreateRequest( + projectId = "test-projectId1", + name = "test-repoName1", + type = RepositoryType.GENERIC, + category = RepositoryCategory.COMPOSITE, + display = false + ).toJsonString().toByteArray() + ) + val (projectId1, repoName1) = (rateLimiterService as UserUrlRepoRateLimiterService).getRepoInfoFromBody( + request + ) + Assertions.assertEquals("test-projectId1", projectId1) + Assertions.assertEquals(null, repoName1) + + request.requestURI = "/blueking/generic-local/test.txt" + } + + @Test + fun generateKeyTestNull() { + l1.resource = "test:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + + val resource = (rateLimiterService as UserUrlRepoRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserUrlRepoRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = + (rateLimiterService as UserUrlRepoRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "test:/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserUrlRepoRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + rateLimiterProperties.specialUrls = listOf("*") + // 本地限流验证 + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + } + + l1.resource = "admin:/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + } + + l1.resource = "admin:" + l1.limit = 1 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + } + + l1.resource = "test:/blueking" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) + Assertions.assertDoesNotThrow { (rateLimiterService as UserUrlRepoRateLimiterService).limit(request) } + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUrlRepoRateLimiterService).refreshRateLimitRule() + } + + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterServiceTest.kt new file mode 100644 index 0000000000..16cdf93eb1 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/DownloadUsageRateLimiterServiceTest.kt @@ -0,0 +1,262 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.DownloadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.servlet.HandlerMapping +import java.time.Duration + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class DownloadUsageRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.DOWNLOAD_USAGE.name, limit = 10, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + request.method = "GET" + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = DownloadUsageRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals(false, (rateLimiterService as DownloadUsageRateLimiterService).ignoreRequest(request)) + request.method = "POST" + Assertions.assertEquals(true, (rateLimiterService as DownloadUsageRateLimiterService).ignoreRequest(request)) + request.method = "PATCH" + Assertions.assertEquals(true, (rateLimiterService as DownloadUsageRateLimiterService).ignoreRequest(request)) + request.method = "PUT" + Assertions.assertEquals(true, (rateLimiterService as DownloadUsageRateLimiterService).ignoreRequest(request)) + request.method = "HEAD" + Assertions.assertEquals(true, (rateLimiterService as DownloadUsageRateLimiterService).ignoreRequest(request)) + request.method = "GET" + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = + (rateLimiterService as DownloadUsageRateLimiterService).getRepoInfoFromAttribute(request) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "/blueking/generic-local/", + (rateLimiterService as DownloadUsageRateLimiterService).buildResource(request) + ) + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("/blueking/"), + (rateLimiterService as DownloadUsageRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertThrows(AcquireLockFailedException::class.java) { + (rateLimiterService as DownloadUsageRateLimiterService).getApplyPermits(request, null) + } + + Assertions.assertEquals( + 10, + (rateLimiterService as DownloadUsageRateLimiterService).getApplyPermits(request, 10) + ) + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + DownloadUsageRateLimitRule::class.java, + (rateLimiterService as DownloadUsageRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.DOWNLOAD_USAGE.name), + (rateLimiterService as DownloadUsageRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as DownloadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as DownloadUsageRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as DownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "DownloadUsage:" + "/blueking/", + (rateLimiterService as DownloadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as DownloadUsageRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "DownloadUsage:" + "/blueking/generic-local/", + (rateLimiterService as DownloadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTestNull() { + val resource = (rateLimiterService as DownloadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as DownloadUsageRateLimiterService).buildExtraResource(request) + ) + l1.resource = "/test/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + val resourceLimit = (rateLimiterService as DownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + // 本地限流验证 + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + } + + l1.resource = "/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + } + + l1.resource = "/blueking/" + l1.limit = 20 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as DownloadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as DownloadUsageRateLimiterService).limit(request, 10) + } + } + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterServiceTest.kt new file mode 100644 index 0000000000..96e2e9a3bb --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/UploadUsageRateLimiterServiceTest.kt @@ -0,0 +1,263 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.UploadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.servlet.HandlerMapping +import java.time.Duration + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UploadUsageRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + val l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "/*/", + limitDimension = LimitDimension.UPLOAD_USAGE.name, limit = 10, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + val content = byteArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) + request.setContent(content) + request.method = "PUT" + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UploadUsageRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals(false, (rateLimiterService as UploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "POST" + Assertions.assertEquals(false, (rateLimiterService as UploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "PATCH" + Assertions.assertEquals(false, (rateLimiterService as UploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "GET" + Assertions.assertEquals(true, (rateLimiterService as UploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "PUT" + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = + (rateLimiterService as UploadUsageRateLimiterService).getRepoInfoFromAttribute(request) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "/blueking/generic-local/", + (rateLimiterService as UploadUsageRateLimiterService).buildResource(request) + ) + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("/blueking/"), + (rateLimiterService as UploadUsageRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertEquals( + 10, + (rateLimiterService as UploadUsageRateLimiterService).getApplyPermits(request, null) + ) + request.method = "GET" + Assertions.assertEquals( + 0, + (rateLimiterService as UploadUsageRateLimiterService).getApplyPermits(request, null) + ) + request.method = "PUT" + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UploadUsageRateLimitRule::class.java, + (rateLimiterService as UploadUsageRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.UPLOAD_USAGE.name), + (rateLimiterService as UploadUsageRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UploadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UploadUsageRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as UploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UploadUsage:" + "/blueking/", + (rateLimiterService as UploadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UploadUsageRateLimiterService).rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UploadUsage:" + "/blueking/generic-local/", + (rateLimiterService as UploadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTestNull() { + val resource = (rateLimiterService as UploadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UploadUsageRateLimiterService).buildExtraResource(request) + ) + l1.resource = "/test/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + val resourceLimit = (rateLimiterService as UploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + // 本地限流验证 + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + } + + l1.resource = "/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + } + + l1.resource = "/blueking/" + l1.limit = 20 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UploadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UploadUsageRateLimiterService).limit(request) + } + } + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterServiceTest.kt new file mode 100644 index 0000000000..89829d5b98 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserDownloadUsageRateLimiterServiceTest.kt @@ -0,0 +1,309 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage.user + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.exception.AcquireLockFailedException +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.user.UserDownloadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import org.springframework.web.servlet.HandlerMapping +import java.time.Duration + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UserDownloadUsageRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + var l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/*/", + limitDimension = LimitDimension.USER_DOWNLOAD_USAGE.name, limit = 10, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + request.setAttribute("userId", "admin") + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + request.method = "GET" + val attributes = ServletRequestAttributes(request) + RequestContextHolder.setRequestAttributes(attributes) + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UserDownloadUsageRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals( + false, + (rateLimiterService as UserDownloadUsageRateLimiterService).ignoreRequest(request) + ) + request.method = "POST" + Assertions.assertEquals( + true, + (rateLimiterService as UserDownloadUsageRateLimiterService).ignoreRequest(request) + ) + request.method = "PATCH" + + Assertions.assertEquals( + true, + (rateLimiterService as UserDownloadUsageRateLimiterService).ignoreRequest(request) + ) + request.method = "PUT" + + Assertions.assertEquals( + true, + (rateLimiterService as UserDownloadUsageRateLimiterService).ignoreRequest(request) + ) + request.method = "GET" + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = + (rateLimiterService as UserDownloadUsageRateLimiterService).getRepoInfoFromAttribute(request) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "admin:/blueking/generic-local/", + (rateLimiterService as UserDownloadUsageRateLimiterService).buildResource(request) + ) + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("admin:/blueking/", "admin:"), + (rateLimiterService as UserDownloadUsageRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertThrows(AcquireLockFailedException::class.java) { + (rateLimiterService as UserDownloadUsageRateLimiterService).getApplyPermits(request, null) + } + + Assertions.assertEquals( + 10, + (rateLimiterService as UserDownloadUsageRateLimiterService).getApplyPermits(request, 10) + ) + + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UserDownloadUsageRateLimitRule::class.java, + (rateLimiterService as UserDownloadUsageRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.USER_DOWNLOAD_USAGE.name), + (rateLimiterService as UserDownloadUsageRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTestNull() { + val resource = (rateLimiterService as UserDownloadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserDownloadUsageRateLimiterService).buildExtraResource(request) + ) + + l1.resource = "test:/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + var resourceLimit = (rateLimiterService as UserDownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "test:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserDownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UserDownloadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserDownloadUsageRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as UserDownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserDownloadUsage:" + "admin:/blueking/", + (rateLimiterService as UserDownloadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "admin:/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserDownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserDownloadUsage:" + "admin:/blueking/generic-local/", + (rateLimiterService as UserDownloadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "admin:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserDownloadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserDownloadUsage:" + "admin:", + (rateLimiterService as UserDownloadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + // 本地限流验证 + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + } + + l1.resource = "admin:/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + } + + l1.resource = "admin:" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + } + + l1.resource = "test:" + l1.limit = 20 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserDownloadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) + Assertions.assertDoesNotThrow { (rateLimiterService as UserDownloadUsageRateLimiterService).limit(request, 10) } + } + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterServiceTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterServiceTest.kt new file mode 100644 index 0000000000..9b0cc43f92 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/service/usage/user/UserUploadUsageRateLimiterServiceTest.kt @@ -0,0 +1,298 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.service.usage.user + +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.constant.KEY_PREFIX +import com.tencent.bkrepo.common.ratelimiter.enums.Algorithms +import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension +import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo +import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit +import com.tencent.bkrepo.common.ratelimiter.rule.usage.user.UserUploadUsageRateLimitRule +import com.tencent.bkrepo.common.ratelimiter.service.AbstractRateLimiterServiceTest +import java.time.Duration +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler +import org.springframework.test.annotation.DirtiesContext +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import org.springframework.web.servlet.HandlerMapping + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +class UserUploadUsageRateLimiterServiceTest : AbstractRateLimiterServiceTest() { + + var l1 = ResourceLimit( + algo = Algorithms.FIXED_WINDOW.name, resource = "*:/*/", + limitDimension = LimitDimension.USER_UPLOAD_USAGE.name, limit = 10, + duration = Duration.ofSeconds(1), scope = WorkScope.LOCAL.name + ) + + @BeforeAll + fun before() { + init() + rateLimiterProperties.enabled = true + rateLimiterProperties.rules = listOf(l1) + request.requestURI = "/blueking/generic-local/test.txt" + request.setAttribute("userId", "admin") + val uriVariables: MutableMap = HashMap() + uriVariables["projectId"] = "blueking" + uriVariables["repoName"] = "generic-local" + request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables) + val content = byteArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) + request.setContent(content) + request.method = "PUT" + val attributes = ServletRequestAttributes(request) + RequestContextHolder.setRequestAttributes(attributes) + val scheduler = ThreadPoolTaskScheduler() + scheduler.initialize() + rateLimiterService = UserUploadUsageRateLimiterService( + taskScheduler = scheduler, + rateLimiterProperties = rateLimiterProperties, + redisTemplate = redisTemplate, + rateLimiterMetrics = rateLimiterMetrics, + rateLimiterConfigService = rateLimiterConfigService + ) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + override fun createAlgorithmOfRateLimiterTest() { + super.createAlgorithmOfRateLimiterTest() + } + + @Test + override fun refreshRateLimitRuleTest() { + super.refreshRateLimitRuleTest() + } + + @Test + override fun getAlgorithmOfRateLimiterTest() { + super.getAlgorithmOfRateLimiterTest() + } + + @Test + override fun getResLimitInfoTest() { + super.getResLimitInfoTest() + } + + @Test + override fun circuitBreakerCheckTest() { + super.circuitBreakerCheckTest() + } + + @Test + override fun rateLimitCatchTest() { + super.rateLimitCatchTest() + } + + @Test + fun ignoreRequestTest() { + Assertions.assertEquals(false, (rateLimiterService as UserUploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "POST" + Assertions.assertEquals(false, (rateLimiterService as UserUploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "PATCH" + Assertions.assertEquals(false, (rateLimiterService as UserUploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "GET" + Assertions.assertEquals(true, (rateLimiterService as UserUploadUsageRateLimiterService).ignoreRequest(request)) + request.method = "PUT" + } + + @Test + fun getRepoInfoTest() { + val (projectId, repoName) = (rateLimiterService as UserUploadUsageRateLimiterService).getRepoInfoFromAttribute( + request + ) + Assertions.assertEquals("blueking", projectId) + Assertions.assertEquals("generic-local", repoName) + + } + + @Test + fun buildResourceTest() { + Assertions.assertEquals( + "admin:/blueking/generic-local/", + (rateLimiterService as UserUploadUsageRateLimiterService).buildResource(request) + ) + } + + @Test + fun buildExtraResourceTest() { + Assertions.assertEquals( + listOf("admin:/blueking/", "admin:"), + (rateLimiterService as UserUploadUsageRateLimiterService).buildExtraResource(request) + ) + } + + @Test + fun getApplyPermitsTest() { + Assertions.assertEquals( + 10, + (rateLimiterService as UserUploadUsageRateLimiterService).getApplyPermits(request, null) + ) + request.method = "GET" + Assertions.assertEquals( + 0, + (rateLimiterService as UserUploadUsageRateLimiterService).getApplyPermits(request, null) + ) + request.method = "PUT" + } + + @Test + fun getRateLimitRuleClassTest() { + Assertions.assertEquals( + UserUploadUsageRateLimitRule::class.java, + (rateLimiterService as UserUploadUsageRateLimiterService).getRateLimitRuleClass() + ) + } + + @Test + fun getLimitDimensionsTest() { + Assertions.assertEquals( + listOf(LimitDimension.USER_UPLOAD_USAGE.name), + (rateLimiterService as UserUploadUsageRateLimiterService).getLimitDimensions() + ) + } + + @Test + fun generateKeyTestNull() { + val resource = (rateLimiterService as UserUploadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserUploadUsageRateLimiterService).buildExtraResource(request) + ) + + l1.resource = "test:/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + var resourceLimit = (rateLimiterService as UserUploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "test:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserUploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNull(resourceLimit) + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun generateKeyTest() { + val resource = (rateLimiterService as UserUploadUsageRateLimiterService).buildResource(request) + val resInfo = ResInfo( + resource = resource, + extraResource = (rateLimiterService as UserUploadUsageRateLimiterService).buildExtraResource(request) + ) + var resourceLimit = (rateLimiterService as UserUploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUploadUsage:" + "admin:/blueking/", + (rateLimiterService as UserUploadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "admin:/blueking/generic-local/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserUploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUploadUsage:" + "admin:/blueking/generic-local/", + (rateLimiterService as UserUploadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "admin:" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + resourceLimit = (rateLimiterService as UserUploadUsageRateLimiterService) + .rateLimitRule?.getRateLimitRule(resInfo) + Assertions.assertNotNull(resourceLimit) + Assertions.assertEquals( + KEY_PREFIX + "UserUploadUsage:" + "admin:", + (rateLimiterService as UserUploadUsageRateLimiterService) + .generateKey(resourceLimit!!.resource, resourceLimit.resourceLimit) + ) + + l1.resource = "*:/*/" + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + } + + @Test + fun limitTest() { + // 本地限流验证 + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + } + + // 分布式算法验证 + l1.scope = WorkScope.GLOBAL.name + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + } + + l1.resource = "admin:/blueking/" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + } + + l1.resource = "admin:" + l1.limit = 2 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + Assertions.assertThrows(OverloadException::class.java) { + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + } + + l1.resource = "test:" + l1.limit = 20 + rateLimiterProperties.rules = listOf(l1) + (rateLimiterService as UserUploadUsageRateLimiterService).refreshRateLimitRule() + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) + Assertions.assertDoesNotThrow { (rateLimiterService as UserUploadUsageRateLimiterService).limit(request) } + } + +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStreamTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStreamTest.kt new file mode 100644 index 0000000000..d554ac25a1 --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/stream/CommonRateLimitInputStreamTest.kt @@ -0,0 +1,160 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.stream + +import com.google.common.base.Stopwatch +import com.google.common.base.Ticker +import com.tencent.bkrepo.common.api.util.HumanReadable +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedFixedWindowRateLimiter +import com.tencent.bkrepo.common.ratelimiter.algorithm.DistributedTest +import com.tencent.bkrepo.common.ratelimiter.algorithm.FixedWindowRateLimiter +import com.tencent.bkrepo.common.api.exception.OverloadException +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.TestInstance +import org.mockito.Mockito +import org.springframework.test.annotation.DirtiesContext +import java.time.Duration +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.concurrent.thread +import kotlin.system.measureTimeMillis + +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +class CommonRateLimitInputStreamTest : DistributedTest() { + + lateinit var ticker: Ticker + private val content = "1234567891" + val keyStr = "CommonRateLimitInputStreamTest" + + @BeforeAll + fun before() { + ticker = Mockito.mock(Ticker::class.java) + } + + @Test + fun readTestOncePermitsGreaterThanLength() { + val (context, _) = createContext(1024 * 1024) + inputStreamReadTest(context) + } + + @Test + fun readTestOncePermitsLessThanLength() { + val (context, _) = createContext(5) + inputStreamReadTest(context) + } + + @Test + fun readTestOncePermitsEqualLength() { + val (context, _) = createContext(10) + inputStreamReadTest(context) + } + + @Test + fun readTestOncePermitsGreaterThanLimit() { + val (context, _) = createContext(10, 5) + CommonRateLimitInputStream( + delegate = content.byteInputStream(), + rateCheckContext = context + ).use { `is` -> + val buf = ByteArray(3) + `is`.read(buf) + Assertions.assertThrows(OverloadException::class.java) { `is`.read(buf) } + } + } + + + + @Test + fun readTestOnMultiThreads() { + val (context, key) = createContext(10, 100, true, keyStr) + var successNum = 0 + var failedNum = 0 + var errorNum = 0 + val readers = Runtime.getRuntime().availableProcessors() + val countDownLatch = CountDownLatch(readers) + val elapsedTime = measureTimeMillis { + repeat(readers) { + thread { + try { + inputStreamReadTest(context) + successNum++ + } catch (e: Exception) { + errorNum++ + } + countDownLatch.countDown() + } + } + } + countDownLatch.await() + println("elapse: ${HumanReadable.time(elapsedTime, TimeUnit.MILLISECONDS)}") + println("successNum $successNum, failedNum $failedNum. errorNum $errorNum") + key?.let { clean(key) } + } + + private fun inputStreamReadTest(context: RateCheckContext) { + CommonRateLimitInputStream( + delegate = content.byteInputStream(), + rateCheckContext = context + ).use { `is` -> + val buf = ByteArray(3) + assertEquals(`is`.read(buf, 0, 3), 3) + assertEquals(String(buf), "123") + assertEquals(`is`.read().toChar(), '4') + assertEquals(`is`.read(buf), 3) + assertEquals(String(buf), "567") + assertEquals(`is`.read().toChar(), '8') + assertEquals(`is`.read().toChar(), '9') + assertEquals(`is`.read().toChar(), '1') + assertEquals(`is`.read(), -1) + println("finished") + } + + } + + private fun createContext( + permitsOnce: Long, limit: Long = 1024 * 1024 * 100, + distributed: Boolean = false, keyStr: String? = null, + ): Pair { + val (rateLimiter, key) = if (distributed) { + Pair(DistributedFixedWindowRateLimiter(keyStr!!, limit, Duration.ofSeconds(1), redisTemplate), keyStr) + } else { + Pair(FixedWindowRateLimiter(limit, Duration.ofSeconds(1), Stopwatch.createStarted(ticker)), keyStr) + } + return Pair( + RateCheckContext( + rateLimiter = rateLimiter, latency = 10, + waitRound = 3, rangeLength = content.length.toLong(), + dryRun = false, permitsOnce = permitsOnce, limitPerSecond = limit + ), key + ) + } +} \ No newline at end of file diff --git a/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtilsTest.kt b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtilsTest.kt new file mode 100644 index 0000000000..893b43f6da --- /dev/null +++ b/src/backend/common/common-ratelimiter/src/test/kotlin/com/tencent/bkrepo/common/ratelimiter/utils/ResourcePathUtilsTest.kt @@ -0,0 +1,155 @@ +/* + * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. + * + * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * + * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. + * + * A copy of the MIT License is included in this file. + * + * + * Terms of the MIT License: + * --------------------------------------------------- + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of + * the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT + * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.bkrepo.common.ratelimiter.utils + +import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException +import org.hamcrest.CoreMatchers +import org.hamcrest.MatcherAssert +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertNotNull +import org.junit.jupiter.api.Assertions.assertNull +import org.junit.jupiter.api.Assertions.fail +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows + +class ResourcePathUtilsTest { + + @Test + fun testTokenizeUrlPath() { + val url = "/test1/test2" + try { + val actualSegments = ResourcePathUtils.tokenizeResourcePath(url) + assertEquals(actualSegments.size, 2) + MatcherAssert.assertThat(actualSegments, CoreMatchers.hasItems("test1", "test2")) + } catch (e: InvalidResourceException) { + fail("tokenizeUrlPath should not throw InvalidResourceException.") + } + } + + @Test + fun testTokenizeUrlPathWithUrlPatten() { + val url = "/test1/test2/{projectId}/{repoName}/{*:(.*)}" + try { + val actualSegments = ResourcePathUtils.tokenizeResourcePath(url) + assertEquals(actualSegments.size, 5) + MatcherAssert.assertThat( + actualSegments, + CoreMatchers.hasItems("test1", "test2", "{projectId}", "{repoName}", "{*:(.*)}") + ) + } catch (e: InvalidResourceException) { + fail("tokenizeUrlPath should not throw InvalidResourceException.") + } + } + + @Test + fun testTokenizeUrlPathWithEmptyUrl() { + try { + val actualSegments = ResourcePathUtils.tokenizeResourcePath("") + assertNotNull(actualSegments) + assertEquals(actualSegments.size, 0) + val actualSegments2 = ResourcePathUtils.tokenizeResourcePath("/") + assertNotNull(actualSegments2) + assertEquals(actualSegments2.size, 0) + } catch (e: InvalidResourceException) { + fail("tokenizeUrlPath should not throw InvalidResourceException.") + } + } + + @Test + fun testGetUrlPath() { + try { + var actualPath: String? = ResourcePathUtils.getPathOfUrl("http://www.bkrepo.com/") + assertEquals(actualPath, "/") + actualPath = ResourcePathUtils.getPathOfUrl("http://www.bkrepo.com") + assertEquals(actualPath, "/") + actualPath = ResourcePathUtils.getPathOfUrl("http://www.bkrepo.com/test1/test2") + assertEquals(actualPath, "/test1/test2") + actualPath = ResourcePathUtils.getPathOfUrl("http://www.bkrepo.com/test1/test2?user=xxx") + assertEquals(actualPath, "/test1/test2") + actualPath = ResourcePathUtils.getPathOfUrl("/test1/test2") + assertEquals(actualPath, "/test1/test2") + actualPath = ResourcePathUtils.getPathOfUrl("/test1/test2?user=xxx") + assertEquals(actualPath, "/test1/test2") + actualPath = ResourcePathUtils.getPathOfUrl("/test1/test2/") + assertEquals(actualPath, "/test1/test2/") + } catch (e: InvalidResourceException) { + fail("getPathOfUrl() should not throw exception here.") + } + } + + @Test + fun testGetUrlPathWithEmptyUrl() { + try { + val actualPath: String? = ResourcePathUtils.getPathOfUrl("") + assertNull(actualPath) + } catch (e: InvalidResourceException) { + fail("getPathOfUrl() should not throw exception here.") + } + } + + @Test + fun testGetUserAndPathWithEmptyUrl() { + try { + assertThrows { ResourcePathUtils.getUserAndPath("") } + } catch (e: InvalidResourceException) { + fail("getUserAndPath() should not throw exception here.") + } + } + + @Test + fun testGetUserAndPath() { + try { + assertThrows { ResourcePathUtils.getUserAndPath("a") } + var (userId, path) = ResourcePathUtils.getUserAndPath("a:") + assertEquals(userId, "a") + assertEquals(path, "") + val (userId1, path1) = ResourcePathUtils.getUserAndPath("a:1") + assertEquals(userId1, "a") + assertEquals(path1, "1") + val (userId2, path2) = ResourcePathUtils.getUserAndPath("a:1:12") + assertEquals(userId2, "a") + assertEquals(path2, "1:12") + } catch (e: InvalidResourceException) { + fail("getPathOfUrl() should not throw exception here.") + } + } + + @Test + fun testBuildUserPath() { + var actualPath: String? = ResourcePathUtils.buildUserPath("a", "b") + assertEquals(actualPath, "a:b") + actualPath = ResourcePathUtils.buildUserPath("1", "2") + assertEquals(actualPath, "1:2") + } + + @Test + fun testBuildUserPathWithEmptyUrl() { + var actualPath: String? = ResourcePathUtils.buildUserPath("a", "") + assertEquals(actualPath, "a:") + } +} \ No newline at end of file diff --git a/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/exception/GlobalExceptionHandler.kt b/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/exception/GlobalExceptionHandler.kt index 1df6f9540c..c80bd8746c 100644 --- a/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/exception/GlobalExceptionHandler.kt +++ b/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/exception/GlobalExceptionHandler.kt @@ -33,10 +33,15 @@ package com.tencent.bkrepo.common.service.exception import com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException import com.tencent.bkrepo.common.api.constant.HttpStatus +import com.tencent.bkrepo.common.api.constant.MediaTypes import com.tencent.bkrepo.common.api.exception.ErrorCodeException +import com.tencent.bkrepo.common.api.exception.OverloadException import com.tencent.bkrepo.common.api.exception.TooManyRequestsException import com.tencent.bkrepo.common.api.message.CommonMessageCode import com.tencent.bkrepo.common.api.pojo.Response +import com.tencent.bkrepo.common.service.log.LoggerHolder +import com.tencent.bkrepo.common.service.util.HttpContextHolder +import com.tencent.bkrepo.common.service.util.LocaleMessageUtils import org.springframework.core.Ordered import org.springframework.core.annotation.Order import org.springframework.http.converter.HttpMessageNotReadableException @@ -143,6 +148,21 @@ class GlobalExceptionHandler : AbstractExceptionHandler() { return response(exception) } + @ExceptionHandler(OverloadException::class) + fun handleException(exception: OverloadException): Response? { + if (HttpContextHolder.getResponse().isCommitted) { + // 当返回已写入部分数据后,无法正常返回429 + val errorMessage = LocaleMessageUtils.getLocalizedMessage(exception.messageCode, exception.params) + LoggerHolder.logErrorCodeException(exception, "[${exception.messageCode.getCode()}]$errorMessage") + HttpContextHolder.getResponse().outputStream.close() + return null + } else { + HttpContextHolder.getResponse().reset() + HttpContextHolder.getResponse().contentType = MediaTypes.APPLICATION_JSON_WITHOUT_CHARSET + return response(exception) + } + } + @ExceptionHandler(Exception::class) fun handleException(exception: Exception): Response { return response(exception) diff --git a/src/backend/common/common-storage/storage-api/src/main/kotlin/com/tencent/bkrepo/common/storage/config/ReceiveProperties.kt b/src/backend/common/common-storage/storage-api/src/main/kotlin/com/tencent/bkrepo/common/storage/config/ReceiveProperties.kt index 506efdbddb..67248ff1c3 100644 --- a/src/backend/common/common-storage/storage-api/src/main/kotlin/com/tencent/bkrepo/common/storage/config/ReceiveProperties.kt +++ b/src/backend/common/common-storage/storage-api/src/main/kotlin/com/tencent/bkrepo/common/storage/config/ReceiveProperties.kt @@ -72,5 +72,9 @@ data class ReceiveProperties( /** * 每秒接收数据量 */ - var rateLimit: DataSize = DataSize.ofBytes(-1) + var rateLimit: DataSize = DataSize.ofBytes(-1), + /** + * 限速熔断阈值,当仓库配置的rateLimit小于等于限速熔断阈值时则直接将请求断开 + */ + var circuitBreakerThreshold: DataSize = DataSize.ofKilobytes(1), ) diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt b/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt index 2dfd4427df..eeca8f4174 100644 --- a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt +++ b/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt @@ -44,6 +44,7 @@ import com.tencent.bkrepo.common.query.model.PageLimit import com.tencent.bkrepo.common.query.model.QueryModel import com.tencent.bkrepo.common.query.model.Rule import com.tencent.bkrepo.common.query.model.Sort +import com.tencent.bkrepo.common.api.exception.OverloadException import com.tencent.bkrepo.common.security.permission.Permission import com.tencent.bkrepo.common.security.util.SecurityUtils import com.tencent.bkrepo.common.service.util.HttpContextHolder @@ -226,6 +227,8 @@ class ChartRepositoryServiceImpl( context.putAttribute(FULL_PATH, HelmUtils.getIndexCacheYamlFullPath()) try { ArtifactContextHolder.getRepository().download(context) + } catch (e: OverloadException) { + throw e } catch (e: Exception) { logger.warn("Error occurred while downloading index.yaml, error: ${e.message}") throw HelmFileNotFoundException( @@ -333,6 +336,8 @@ class ChartRepositoryServiceImpl( context.putAttribute(FILE_TYPE, CHART) try { ArtifactContextHolder.getRepository().download(context) + } catch (e: OverloadException) { + throw e } catch (e: ArtifactDownloadForbiddenException) { throw e } catch (e: Exception) { @@ -350,6 +355,8 @@ class ChartRepositoryServiceImpl( context.putAttribute(FILE_TYPE, PROV) try { ArtifactContextHolder.getRepository().download(context) + } catch (e: OverloadException) { + throw e } catch (e: Exception) { logger.warn("Error occurred while installing prov, error: ${e.message}") throw HelmFileNotFoundException( diff --git a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt b/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt index 88aac6b016..104ef8da19 100644 --- a/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt +++ b/src/backend/oci/biz-oci/src/main/kotlin/com/tencent/bkrepo/oci/exception/OciExceptionHandler.kt @@ -49,6 +49,7 @@ import com.tencent.bkrepo.oci.constant.UNAUTHORIZED_DESCRIPTION import com.tencent.bkrepo.oci.constant.UNAUTHORIZED_MESSAGE import com.tencent.bkrepo.oci.pojo.response.OciErrorResponse import com.tencent.bkrepo.oci.pojo.response.OciResponse +import javax.servlet.http.HttpServletResponse import org.slf4j.LoggerFactory import org.springframework.core.Ordered import org.springframework.core.annotation.Order @@ -56,7 +57,6 @@ import org.springframework.http.HttpStatus import org.springframework.web.bind.annotation.ExceptionHandler import org.springframework.web.bind.annotation.ResponseStatus import org.springframework.web.bind.annotation.RestControllerAdvice -import javax.servlet.http.HttpServletResponse @Order(Ordered.HIGHEST_PRECEDENCE + 1) @RestControllerAdvice("com.tencent.bkrepo.oci") @@ -64,7 +64,7 @@ class OciExceptionHandler( private val ociProperties: OciProperties ) { -/** + /** * 单独处理认证失败异常,需要添加WWW_AUTHENTICATE响应头触发浏览器登录 */ @ExceptionHandler(AuthenticationException::class) @@ -122,12 +122,6 @@ class OciExceptionHandler( ociResponse(responseObject, exception) } - @ExceptionHandler(ErrorCodeException::class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - fun handleException(exception: ErrorCodeException) { - ociResponse(exception) - } - @ExceptionHandler(PermissionException::class) @ResponseStatus(HttpStatus.FORBIDDEN) fun handleException(exception: PermissionException) { @@ -162,7 +156,7 @@ class OciExceptionHandler( val uri = HttpContextHolder.getRequest().requestURI logger.warn( "User[$userId] access oci resource[$uri] failed[${exception.javaClass.simpleName}]:" + - " ${responseObject.message}" + " ${responseObject.message}" ) } diff --git a/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RateLimitController.kt b/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RateLimitController.kt new file mode 100644 index 0000000000..fe1468e306 --- /dev/null +++ b/src/backend/opdata/biz-opdata/src/main/kotlin/com/tencent/bkrepo/opdata/controller/RateLimitController.kt @@ -0,0 +1,118 @@ +package com.tencent.bkrepo.opdata.controller + +import com.tencent.bkrepo.common.api.exception.ErrorCodeException +import com.tencent.bkrepo.common.api.exception.NotFoundException +import com.tencent.bkrepo.common.api.message.CommonMessageCode +import com.tencent.bkrepo.common.api.pojo.Response +import com.tencent.bkrepo.common.api.util.toJsonString +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.model.RateLimitCreatOrUpdateRequest +import com.tencent.bkrepo.common.ratelimiter.model.TRateLimit +import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService +import com.tencent.bkrepo.common.security.permission.Principal +import com.tencent.bkrepo.common.security.permission.PrincipalType +import com.tencent.bkrepo.common.service.util.ResponseBuilder +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController +import org.springframework.web.bind.annotation.DeleteMapping +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestParam + +@RestController +@RequestMapping("/api/rateLimit") +@Principal(PrincipalType.ADMIN) +class RateLimitController( + private val rateLimiterConfigService: RateLimiterConfigService, + private val rateLimiterProperties: RateLimiterProperties +) { + + @GetMapping("/list") + fun list(): Response> { + return ResponseBuilder.success(rateLimiterConfigService.list()) + } + + @PostMapping("/update") + fun update(@RequestBody request: RateLimitCreatOrUpdateRequest): Response { + if (request.id.isNullOrBlank()) { + throw NotFoundException(CommonMessageCode.PARAMETER_EMPTY, "ID") + } + if (!rateLimiterConfigService.checkExist(request.id!!)) { + throw NotFoundException(CommonMessageCode.RESOURCE_NOT_FOUND, request.id!!) + } + val tRateLimit = rateLimiterConfigService.findByModuleNameAndLimitDimensionAndResource( + request.resource, + request.moduleName, + request.limitDimension + ) + if (tRateLimit == null || !tRateLimit.id.equals(request.id)) { + checkResource(request) + } + rateLimiterConfigService.update(request) + return ResponseBuilder.success() + } + + private fun checkResource(request: RateLimitCreatOrUpdateRequest) { + with(request) { + val tRateLimits = rateLimiterConfigService.findByResourceAndLimitDimension( + resource = resource, + limitDimension = limitDimension + ) + val modules = ArrayList() + tRateLimits.forEach { tRateLimit -> + if(id == null || !tRateLimit.id.equals(id)) { + modules.addAll(tRateLimit.moduleName) + } + } + if (modules.isNotEmpty()) { + modules.retainAll(moduleName) + if (modules.isNotEmpty()) { + throw ErrorCodeException( + CommonMessageCode.RESOURCE_EXISTED, + "resource:$resource,limitDimension:$limitDimension,module:${modules}" + ) + } + } + } + } + + // 新增 + @PostMapping("/create") + fun create(@RequestBody request:RateLimitCreatOrUpdateRequest): Response { + checkResource(request) + rateLimiterConfigService.create(request) + return ResponseBuilder.success() + } + + // 删除 + @DeleteMapping("/delete/{id}") + fun delete(@PathVariable id:String): Response { + if (!rateLimiterConfigService.checkExist(id)) { + throw NotFoundException(CommonMessageCode.RESOURCE_NOT_FOUND, id) + } + rateLimiterConfigService.delete(id) + return ResponseBuilder.success() + } + + // 获取配置中的属性 + @GetMapping("/config") + fun getConfig(): Response { + val config = rateLimiterProperties + return ResponseBuilder.success(config.rules.toJsonString()) + } + + // 获取数据库里面的模块名 + @PostMapping("/getExistModule") + fun getExistModule(@RequestParam resource:String,@RequestParam limitDimension:String): Response> { + val tRateLimits = rateLimiterConfigService.findByResourceAndLimitDimension( + resource = resource, + limitDimension = limitDimension + ) + val modules = ArrayList() + tRateLimits.forEach { tRateLimit -> modules.addAll(tRateLimit.moduleName) } + return ResponseBuilder.success(modules) + } + +} \ No newline at end of file diff --git a/src/backend/replication/biz-replication/src/test/kotlin/com/tencent/bkrepo/replication/fdtp/FdtpAFTTest.kt b/src/backend/replication/biz-replication/src/test/kotlin/com/tencent/bkrepo/replication/fdtp/FdtpAFTTest.kt index 8402ab5397..40ee61c8a4 100644 --- a/src/backend/replication/biz-replication/src/test/kotlin/com/tencent/bkrepo/replication/fdtp/FdtpAFTTest.kt +++ b/src/backend/replication/biz-replication/src/test/kotlin/com/tencent/bkrepo/replication/fdtp/FdtpAFTTest.kt @@ -36,6 +36,8 @@ import com.tencent.bkrepo.common.artifact.repository.context.ArtifactClient import com.tencent.bkrepo.common.artifact.repository.context.ArtifactContextHolder import com.tencent.bkrepo.common.artifact.repository.proxy.ProxyRepository import com.tencent.bkrepo.common.artifact.resolve.file.ArtifactFileFactory +import com.tencent.bkrepo.common.ratelimiter.config.RateLimiterProperties +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import com.tencent.bkrepo.common.security.http.core.HttpAuthSecurity import com.tencent.bkrepo.common.security.service.ServiceAuthManager import com.tencent.bkrepo.common.security.service.ServiceAuthProperties @@ -51,11 +53,7 @@ import io.micrometer.core.instrument.simple.SimpleMeterRegistry import io.mockk.every import io.mockk.mockk import io.mockk.mockkObject -import org.junit.jupiter.api.AfterAll -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.BeforeAll -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.TestInstance +import org.junit.jupiter.api.* import org.mockito.Mockito import org.springframework.cloud.loadbalancer.support.SimpleObjectProvider import org.springframework.cloud.sleuth.Tracer @@ -95,6 +93,7 @@ class FdtpAFTTest { val proxyRepository = Mockito.mock(ProxyRepository::class.java) val artifactClient = Mockito.mock(ArtifactClient::class.java) val httpAuthSecurity = SimpleObjectProvider(null) + val limitCheckService = RequestLimitCheckService(RateLimiterProperties()) ArtifactContextHolder( listOf(artifactConfigurer), compositeRepository, @@ -103,7 +102,7 @@ class FdtpAFTTest { httpAuthSecurity, ) val helper = StorageHealthMonitorHelper(ConcurrentHashMap()) - ArtifactFileFactory(StorageProperties(), helper) + ArtifactFileFactory(StorageProperties(), helper, limitCheckService) mockkObject(ArtifactMetrics) every { ArtifactMetrics.getUploadingCounters(any()) } returns emptyList() every { ArtifactMetrics.getUploadingTimer(any()) } returns Timer.builder(ARTIFACT_UPLOADING_TIME) diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt b/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt index 402419b406..5a964cc4c8 100644 --- a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt +++ b/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/configuration/ResourceWriterConfigurer.kt @@ -33,17 +33,23 @@ package com.tencent.bkrepo.s3.artifact.configuration import com.tencent.bkrepo.common.artifact.resolve.response.ArtifactResourceWriter import com.tencent.bkrepo.common.storage.config.StorageProperties +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import com.tencent.bkrepo.s3.artifact.response.S3ArtifactResourceWriter import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Primary @Configuration -class ResourceWriterConfigurer{ +class ResourceWriterConfigurer { @Primary @Bean - fun artifactResourceWriter(storageProperties: StorageProperties): ArtifactResourceWriter { - return S3ArtifactResourceWriter(storageProperties) + fun artifactResourceWriter( + storageProperties: StorageProperties, + requestLimitCheckService: RequestLimitCheckService + ): ArtifactResourceWriter { + return S3ArtifactResourceWriter( + storageProperties, requestLimitCheckService + ) } } diff --git a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt b/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt index 7c9eec2736..8fd9134352 100644 --- a/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt +++ b/src/backend/s3/biz-s3/src/main/kotlin/com/tencent/bkrepo/s3/artifact/response/S3ArtifactResourceWriter.kt @@ -38,6 +38,8 @@ import com.tencent.bkrepo.common.artifact.exception.ArtifactResponseException import com.tencent.bkrepo.common.artifact.resolve.response.AbstractArtifactResourceHandler import com.tencent.bkrepo.common.artifact.resolve.response.ArtifactResource import com.tencent.bkrepo.common.artifact.stream.Range +import com.tencent.bkrepo.common.api.exception.OverloadException +import com.tencent.bkrepo.common.ratelimiter.service.RequestLimitCheckService import com.tencent.bkrepo.common.service.util.HttpContextHolder import com.tencent.bkrepo.common.storage.config.StorageProperties import com.tencent.bkrepo.common.storage.monitor.Throughput @@ -51,13 +53,17 @@ import javax.servlet.http.HttpServletResponse /** * S3协议的响应输出 */ -class S3ArtifactResourceWriter ( - storageProperties: StorageProperties -) : AbstractArtifactResourceHandler(storageProperties) { +class S3ArtifactResourceWriter( + storageProperties: StorageProperties, + requestLimitCheckService: RequestLimitCheckService +) : AbstractArtifactResourceHandler( + storageProperties, requestLimitCheckService +) { - @Throws(ArtifactResponseException::class) + @Throws(ArtifactResponseException::class, OverloadException::class) override fun write(resource: ArtifactResource): Throughput { responseRateLimitCheck() + downloadRateLimitCheck(resource) return writeArtifact(resource) } diff --git a/src/backend/settings.gradle.kts b/src/backend/settings.gradle.kts index 8792746a34..23128e5dcc 100644 --- a/src/backend/settings.gradle.kts +++ b/src/backend/settings.gradle.kts @@ -62,6 +62,7 @@ includeAll(":common:common-storage") includeAll(":common:common-query") includeAll(":common:common-artifact") includeAll(":common:common-notify") +includeAll(":common:common-ratelimiter") includeAll(":composer") includeAll(":generic") includeAll(":helm") diff --git a/src/frontend/devops-op/src/api/rateLimit.js b/src/frontend/devops-op/src/api/rateLimit.js new file mode 100644 index 0000000000..95917ceab1 --- /dev/null +++ b/src/frontend/devops-op/src/api/rateLimit.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' + +const PREFIX_SERVICES = '/opdata/api/rateLimit' + +export function queryRateLimits() { + return request({ + url: `${PREFIX_SERVICES}/list/`, + method: 'get' + }) +} + +export function deleteRateLimit(id) { + return request({ + url: `${PREFIX_SERVICES}/delete/${id}`, + method: 'delete' + }) +} + +export function createRateLimit(data) { + return request({ + url: `${PREFIX_SERVICES}/create/`, + method: 'post', + data: data + }) +} + +export function updateRateLimit(data) { + return request({ + url: `${PREFIX_SERVICES}/update/`, + method: 'post', + data: data + }) +} + +export function getRateLimitConfig() { + return request({ + url: `${PREFIX_SERVICES}/config/`, + method: 'get' + }) +} + +export function getExistModule(resource, limitDimension) { + return request({ + url: `${PREFIX_SERVICES}/getExistModule`, + method: 'post', + params: { + resource: resource, + limitDimension: limitDimension + } + }) +} diff --git a/src/frontend/devops-op/src/router/index.js b/src/frontend/devops-op/src/router/index.js index 24eaa9159d..06600c068c 100644 --- a/src/frontend/devops-op/src/router/index.js +++ b/src/frontend/devops-op/src/router/index.js @@ -24,6 +24,7 @@ export const ROUTER_NAME_FILE_SYSTEM = 'FileSystem' export const ROUTER_NAME_FILE_CACHE = 'FileCache' export const ROUTER_NAME_FILE_SYSTEM_RECORD = 'FileSystemRecord' export const ROUTER_NAME_REPO_CONFIG = 'RepoConfig' +export const ROUTER_NAME_RATE_LIMITER_CONFIG = 'RateLimiterConfig' Vue.use(Router) @@ -313,6 +314,18 @@ export const asyncRoutes = [ } ] }, + { + path: '/rateLimiter', + component: Layout, + children: [ + { + path: '/', + name: ROUTER_NAME_RATE_LIMITER_CONFIG, + meta: { title: '限流管理', icon: 'permission' }, + component: () => import('@/views/rateLimitConfg/RateLimiter') + } + ] + }, // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/frontend/devops-op/src/views/rateLimitConfg/RateLimiter.vue b/src/frontend/devops-op/src/views/rateLimitConfg/RateLimiter.vue new file mode 100644 index 0000000000..6f5e419fce --- /dev/null +++ b/src/frontend/devops-op/src/views/rateLimitConfg/RateLimiter.vue @@ -0,0 +1,246 @@ + + + + + diff --git a/src/frontend/devops-op/src/views/rateLimitConfg/components/CreateOrUpdateRateLimitDialog.vue b/src/frontend/devops-op/src/views/rateLimitConfg/components/CreateOrUpdateRateLimitDialog.vue new file mode 100644 index 0000000000..6caec34c72 --- /dev/null +++ b/src/frontend/devops-op/src/views/rateLimitConfg/components/CreateOrUpdateRateLimitDialog.vue @@ -0,0 +1,577 @@ + + + + + + diff --git a/src/frontend/devops-repository/src/views/repoGeneric/index.vue b/src/frontend/devops-repository/src/views/repoGeneric/index.vue index 0e9ddc79f9..e0d64d7cef 100644 --- a/src/frontend/devops-repository/src/views/repoGeneric/index.vue +++ b/src/frontend/devops-repository/src/views/repoGeneric/index.vue @@ -1064,6 +1064,11 @@ }) } }) + } else if (e.status === 429) { + this.$bkMessage({ + theme: 'error', + message: e.message + }) } else { const message = this.$t('fileError') this.$bkMessage({ From 5f365c4ac9bc82e578265e29417b43add9c35192 Mon Sep 17 00:00:00 2001 From: lannoy0523 <46735290+lannoy0523@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:56:07 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=88=B6?= =?UTF-8?q?=E5=93=81=E9=A2=84=E5=8A=A0=E8=BD=BD=E5=8A=9F=E8=83=BD=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=20#2683?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 增加制品预加载功能管理页面 #2683 * feat: 修改文件名称 #2683 * feat: 修改文件名称 #2683 --- .../user/UserArtifactPreloadController.kt | 9 +- src/frontend/devops-op/package.json | 2 +- src/frontend/devops-op/src/api/preload.js | 66 ++++ .../src/icons/svg/service-config.svg | 1 + src/frontend/devops-op/src/router/index.js | 13 + .../components/EditPlanConfigDialog.vue | 165 +++++++++ .../components/EditStrategyConfigDialog.vue | 208 +++++++++++ .../devops-op/src/views/preload/index.vue | 345 ++++++++++++++++++ ...figDialog.vue => EditRepoConfigDialog.vue} | 0 .../devops-op/src/views/repoConfig/index.vue | 2 +- 10 files changed, 806 insertions(+), 5 deletions(-) create mode 100644 src/frontend/devops-op/src/api/preload.js create mode 100644 src/frontend/devops-op/src/icons/svg/service-config.svg create mode 100644 src/frontend/devops-op/src/views/preload/components/EditPlanConfigDialog.vue create mode 100644 src/frontend/devops-op/src/views/preload/components/EditStrategyConfigDialog.vue create mode 100644 src/frontend/devops-op/src/views/preload/index.vue rename src/frontend/devops-op/src/views/repoConfig/components/{editRepoConfigDialog.vue => EditRepoConfigDialog.vue} (100%) diff --git a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/controller/user/UserArtifactPreloadController.kt b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/controller/user/UserArtifactPreloadController.kt index 2b1edab60b..b4be322fa6 100644 --- a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/controller/user/UserArtifactPreloadController.kt +++ b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/controller/user/UserArtifactPreloadController.kt @@ -98,9 +98,10 @@ class UserArtifactPreloadController( @PathVariable projectId: String, @PathVariable repoName: String, @PathVariable id: String, - ) { + ): Response { checkPreloadEnabled(preloadPlanService, preloadStrategyService) preloadStrategyService.delete(projectId, repoName, id) + return ResponseBuilder.success() } @ApiOperation("获取所有预加载策略") @@ -143,9 +144,10 @@ class UserArtifactPreloadController( @PathVariable projectId: String, @PathVariable repoName: String, @PathVariable id: String, - ) { + ): Response { checkPreloadEnabled(preloadPlanService, preloadStrategyService) preloadPlanService.deletePlan(projectId, repoName, id) + return ResponseBuilder.success() } @ApiOperation("删除仓库的所有预加载计划") @@ -154,9 +156,10 @@ class UserArtifactPreloadController( fun deleteAllPlans( @PathVariable projectId: String, @PathVariable repoName: String, - ) { + ): Response { checkPreloadEnabled(preloadPlanService, preloadStrategyService) preloadPlanService.deletePlan(projectId, repoName) + return ResponseBuilder.success() } private fun checkPreloadEnabled( diff --git a/src/frontend/devops-op/package.json b/src/frontend/devops-op/package.json index 158d2b470d..cc31b012aa 100644 --- a/src/frontend/devops-op/package.json +++ b/src/frontend/devops-op/package.json @@ -33,7 +33,7 @@ "devDependencies": { "@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8", - "@vue/cli-service": "~5.0.1", + "@vue/cli-service": "~5.0.8", "autoprefixer": "9.5.1", "babel-plugin-dynamic-import-node": "2.3.3", "chalk": "2.4.2", diff --git a/src/frontend/devops-op/src/api/preload.js b/src/frontend/devops-op/src/api/preload.js new file mode 100644 index 0000000000..54f7969a0c --- /dev/null +++ b/src/frontend/devops-op/src/api/preload.js @@ -0,0 +1,66 @@ +import request from '@/utils/request' + +const PREFIX_SERVICES = '/repository/api/preload' + +export function queryStrategies(projectId, repoName) { + return request({ + url: `${PREFIX_SERVICES}/strategy/${projectId}/${repoName}`, + method: 'get' + }) +} + +export function deleteStrategy(projectId, repoName, id) { + return request({ + url: `${PREFIX_SERVICES}/strategy/${projectId}/${repoName}/${id}`, + method: 'delete' + }) +} + +export function createStrategy(data) { + return request({ + url: `${PREFIX_SERVICES}/strategy/`, + method: 'post', + data: data + }) +} + +export function updateStrategy(data) { + return request({ + url: `${PREFIX_SERVICES}/strategy/`, + method: 'put', + data: data + }) +} + +export function createPlan(data) { + return request({ + url: `${PREFIX_SERVICES}/plan/`, + method: 'post', + data: data + }) +} + +export function queryPlans(body) { + return request({ + url: `${PREFIX_SERVICES}/plan/${body.projectId}/${body.repoName}`, + method: 'get', + params: { + pageNumber: body.pageNumber, + pageSize: body.pageSize + } + }) +} + +export function deletePlan(projectId, repoName, id) { + return request({ + url: `${PREFIX_SERVICES}/plan/${projectId}/${repoName}/${id}`, + method: 'delete' + }) +} + +export function deletePlans(projectId, repoName) { + return request({ + url: `${PREFIX_SERVICES}/plan/${projectId}/${repoName}`, + method: 'delete' + }) +} diff --git a/src/frontend/devops-op/src/icons/svg/service-config.svg b/src/frontend/devops-op/src/icons/svg/service-config.svg new file mode 100644 index 0000000000..b154d98e0b --- /dev/null +++ b/src/frontend/devops-op/src/icons/svg/service-config.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/frontend/devops-op/src/router/index.js b/src/frontend/devops-op/src/router/index.js index 06600c068c..e5e859f09c 100644 --- a/src/frontend/devops-op/src/router/index.js +++ b/src/frontend/devops-op/src/router/index.js @@ -25,6 +25,7 @@ export const ROUTER_NAME_FILE_CACHE = 'FileCache' export const ROUTER_NAME_FILE_SYSTEM_RECORD = 'FileSystemRecord' export const ROUTER_NAME_REPO_CONFIG = 'RepoConfig' export const ROUTER_NAME_RATE_LIMITER_CONFIG = 'RateLimiterConfig' +export const ROUTER_NAME_PRELOAD_CONFIG = 'PreloadConfig' Vue.use(Router) @@ -326,6 +327,18 @@ export const asyncRoutes = [ } ] }, + { + path: '/preload-config', + component: Layout, + children: [ + { + path: '/', + name: ROUTER_NAME_PRELOAD_CONFIG, + meta: { title: '制品预加载配置', icon: 'service-config' }, + component: () => import('@/views/preload/index') + } + ] + }, // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/frontend/devops-op/src/views/preload/components/EditPlanConfigDialog.vue b/src/frontend/devops-op/src/views/preload/components/EditPlanConfigDialog.vue new file mode 100644 index 0000000000..32151f6a4d --- /dev/null +++ b/src/frontend/devops-op/src/views/preload/components/EditPlanConfigDialog.vue @@ -0,0 +1,165 @@ + + + + diff --git a/src/frontend/devops-op/src/views/preload/components/EditStrategyConfigDialog.vue b/src/frontend/devops-op/src/views/preload/components/EditStrategyConfigDialog.vue new file mode 100644 index 0000000000..94dff6c904 --- /dev/null +++ b/src/frontend/devops-op/src/views/preload/components/EditStrategyConfigDialog.vue @@ -0,0 +1,208 @@ + + + + diff --git a/src/frontend/devops-op/src/views/preload/index.vue b/src/frontend/devops-op/src/views/preload/index.vue new file mode 100644 index 0000000000..9e69e0b072 --- /dev/null +++ b/src/frontend/devops-op/src/views/preload/index.vue @@ -0,0 +1,345 @@ + + + + + + diff --git a/src/frontend/devops-op/src/views/repoConfig/components/editRepoConfigDialog.vue b/src/frontend/devops-op/src/views/repoConfig/components/EditRepoConfigDialog.vue similarity index 100% rename from src/frontend/devops-op/src/views/repoConfig/components/editRepoConfigDialog.vue rename to src/frontend/devops-op/src/views/repoConfig/components/EditRepoConfigDialog.vue diff --git a/src/frontend/devops-op/src/views/repoConfig/index.vue b/src/frontend/devops-op/src/views/repoConfig/index.vue index cf0622ec6d..a4ee1f6b6c 100644 --- a/src/frontend/devops-op/src/views/repoConfig/index.vue +++ b/src/frontend/devops-op/src/views/repoConfig/index.vue @@ -161,7 +161,7 @@ import { searchProjects } from '@/api/project' import { listRepositories, pageRepositories } from '@/api/repository' import { formatNormalDate } from '@/utils/date' import { convertFileSize } from '@/utils/file' -import EditRepoConfigDialog from '@/views/repoConfig/components/editRepoConfigDialog' +import EditRepoConfigDialog from '@/views/repoConfig/components/EditRepoConfigDialog' export default { name: 'RepoConfig', From bb4b1fd19cd2db0de15e4e07639f2e8d2aededf5 Mon Sep 17 00:00:00 2001 From: owenlxu Date: Wed, 6 Nov 2024 14:42:10 +0800 Subject: [PATCH 4/6] =?UTF-8?q?refactor:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BC=BA=E9=99=B7=20#2733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt | 2 -- .../bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt | 8 +++++--- .../com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt index 93c0d0c13b..937f7f528e 100644 --- a/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt +++ b/src/backend/core/ddc/biz-ddc/src/main/kotlin/com/tencent/bkrepo/ddc/utils/BlakeUtils.kt @@ -112,8 +112,6 @@ object BlakeUtils { return false } - override fun mark(readlimit: Int) {} - @Throws(IOException::class) override fun reset() { throw IOException("reset not supported") diff --git a/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt index baf634e60a..8b41044ba5 100644 --- a/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt +++ b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/task/archive/IdleNodeArchiveJob.kt @@ -80,7 +80,9 @@ class IdleNodeArchiveJob( collectionNames.add("$COLLECTION_NAME_PREFIX$index") } } else { - (0 until SHARDING_COUNT).forEach { collectionNames.add("$COLLECTION_NAME_PREFIX$it") } + for (it in 0 until SHARDING_COUNT) { + collectionNames.add("$COLLECTION_NAME_PREFIX$it") + } } return collectionNames } @@ -258,8 +260,8 @@ class IdleNodeArchiveJob( * 1. 其他项目存在相同sha256的节点。(跨项目的文件会无法归档) * 2. 当前项目存在更新(晚于归档截止时间)的节点。 * */ - (0 until SHARDING_COUNT).forEach { - val collectionName = COLLECTION_NAME_PREFIX.plus(it) + for (i in 0 until SHARDING_COUNT) { + val collectionName = COLLECTION_NAME_PREFIX.plus(i) val query = Query.query( Criteria.where("sha256").isEqualTo(sha256) .and("deleted").isEqualTo(null) diff --git a/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt index bc2af70139..ffa14da23d 100644 --- a/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt +++ b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt @@ -67,7 +67,8 @@ class NodeCommonUtils( fun findNodes(query: Query, storageCredentialsKey: String?): List { val nodes = mutableListOf() - (0 until SHARDING_COUNT).map { "$COLLECTION_NAME_PREFIX$it" }.forEach { collection -> + for (it in 0 until SHARDING_COUNT) { + val collection = "$COLLECTION_NAME_PREFIX$it" val find = mongoTemplate.find(query, Node::class.java, collection).filter { val repo = RepositoryCommonUtils.getRepositoryDetail(it.projectId, it.repoName) val key = if (migrateRepoStorageService.migrating(it.projectId, it.repoName)) { @@ -214,6 +215,9 @@ class NodeCommonUtils( collectionNames.add("${COLLECTION_NAME_PREFIX}$index") } } else { + for (i in 0 until SHARDING_COUNT) { + collectionNames.add("${COLLECTION_NAME_PREFIX}$i") + } (0 until SHARDING_COUNT).forEach { collectionNames.add("${COLLECTION_NAME_PREFIX}$it") } } return collectionNames From 70a456b4342a39478e09e055788a73008dab5c28 Mon Sep 17 00:00:00 2001 From: owenlxu Date: Wed, 6 Nov 2024 14:52:48 +0800 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BC=BA=E9=99=B7=20#2733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt index ffa14da23d..80b794d4e1 100644 --- a/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt +++ b/src/backend/core/job/biz-job/src/main/kotlin/com/tencent/bkrepo/job/batch/utils/NodeCommonUtils.kt @@ -67,8 +67,8 @@ class NodeCommonUtils( fun findNodes(query: Query, storageCredentialsKey: String?): List { val nodes = mutableListOf() - for (it in 0 until SHARDING_COUNT) { - val collection = "$COLLECTION_NAME_PREFIX$it" + for (i in 0 until SHARDING_COUNT) { + val collection = "$COLLECTION_NAME_PREFIX$i" val find = mongoTemplate.find(query, Node::class.java, collection).filter { val repo = RepositoryCommonUtils.getRepositoryDetail(it.projectId, it.repoName) val key = if (migrateRepoStorageService.migrating(it.projectId, it.repoName)) { @@ -218,7 +218,6 @@ class NodeCommonUtils( for (i in 0 until SHARDING_COUNT) { collectionNames.add("${COLLECTION_NAME_PREFIX}$i") } - (0 until SHARDING_COUNT).forEach { collectionNames.add("${COLLECTION_NAME_PREFIX}$it") } } return collectionNames } From e54ff49f4c21fd2e94f700c4a02f73e6e7a615a7 Mon Sep 17 00:00:00 2001 From: owenlxu Date: Wed, 6 Nov 2024 16:11:58 +0800 Subject: [PATCH 6/6] =?UTF-8?q?refactor:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BC=BA=E9=99=B7=20#2733?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bkrepo/rpm/util/GZipUtils.kt | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt index 91d956e128..998ed734df 100644 --- a/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt +++ b/src/backend/core/rpm/biz-rpm/src/main/kotlin/com/tencent/bkrepo/rpm/util/GZipUtils.kt @@ -79,20 +79,24 @@ object GZipUtils { fun InputStream.unGzipInputStream(): File { GZIPInputStream(this).use { gZIPInputStream -> val file = File.createTempFile("rpm_", ".xmlStream") - try { - BufferedOutputStream(FileOutputStream(file)).use { bufferedOutputStream -> - var len: Int - val buffer = ByteArray(1 * 1024 * 1024) - while (gZIPInputStream.read(buffer).also { len = it } > 0) { - bufferedOutputStream.write(buffer, 0, len) - } - bufferedOutputStream.flush() + return decompressGzip(gZIPInputStream, file) + } + } + + private fun decompressGzip(gZIPInputStream: GZIPInputStream, file: File): File { + try { + BufferedOutputStream(FileOutputStream(file)).use { bufferedOutputStream -> + var len: Int + val buffer = ByteArray(1 * 1024 * 1024) + while (gZIPInputStream.read(buffer).also { len = it } > 0) { + bufferedOutputStream.write(buffer, 0, len) } - return file - } catch (e: Exception) { - file.delete() - throw e + bufferedOutputStream.flush() } + return file + } catch (e: Exception) { + file.delete() + throw e } } }