mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-11 06:25:13 +00:00
refactor: Rename service package to services and move repository implementations to repository package
- Rename internal/service to internal/services in carrier-connector - Update service imports in selection_integration.go and smdp_integration.go - Move currency repository files from internal/currency to internal/repository - Move rate plan repository files from internal/rateplan to internal/repository - Update package declarations and imports for currency domain types - Add currency package imports
This commit is contained in:
@@ -8,15 +8,15 @@ import (
|
||||
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/handlers"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/repository"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/service"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/services"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/smdp"
|
||||
)
|
||||
|
||||
type SelectionIntegration struct {
|
||||
manager *smdp.SMDPManager
|
||||
selectionService *service.SelectionService
|
||||
selectionService *services.SelectionService
|
||||
selectionHandler *handlers.SelectionHandler
|
||||
smdpService *service.SMDPService
|
||||
smdpService *services.SMDPService
|
||||
server *http.Server
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ func NewSelectionIntegration(repo *repository.PostgresProfileStore) *SelectionIn
|
||||
manager := smdp.NewSMDPManager(repo, config)
|
||||
|
||||
// Create selection service
|
||||
selectionService := service.NewSelectionService(manager)
|
||||
selectionService := services.NewSelectionService(manager)
|
||||
|
||||
// Create SMDP service
|
||||
smdpService := service.NewSMDPService(repo)
|
||||
smdpService := services.NewSMDPService(repo)
|
||||
|
||||
return &SelectionIntegration{
|
||||
manager: manager,
|
||||
@@ -85,7 +85,7 @@ func (si *SelectionIntegration) GetManager() *smdp.SMDPManager {
|
||||
}
|
||||
|
||||
// GetSelectionService returns the selection service for testing
|
||||
func (si *SelectionIntegration) GetSelectionService() *service.SelectionService {
|
||||
func (si *SelectionIntegration) GetSelectionService() *services.SelectionService {
|
||||
return si.selectionService
|
||||
}
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/handlers"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/repository"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/service"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/services"
|
||||
"github.com/nutcas3/telecom-platform/apps/carrier-connector/internal/smdp"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// SMDPIntegration integrates the multi-carrier SM-DP+ system with the existing carrier connector
|
||||
type SMDPIntegration struct {
|
||||
service *service.SMDPService
|
||||
service *services.SMDPService
|
||||
handler *handlers.SMDPHandler
|
||||
repository *repository.PostgresProfileStore
|
||||
logger *logrus.Logger
|
||||
@@ -24,7 +24,7 @@ func NewSMDPIntegration(repo *repository.PostgresProfileStore) *SMDPIntegration
|
||||
logger := logrus.New()
|
||||
logger.SetLevel(logrus.InfoLevel)
|
||||
|
||||
svc := service.NewSMDPService(repo)
|
||||
svc := services.NewSMDPService(repo)
|
||||
manager := svc.GetManager()
|
||||
hnd := handlers.NewSMDPHandler(manager)
|
||||
|
||||
@@ -148,7 +148,7 @@ func (i *SMDPIntegration) metricsHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
// GetService returns the SM-DP+ service for direct access
|
||||
func (i *SMDPIntegration) GetService() *service.SMDPService {
|
||||
func (i *SMDPIntegration) GetService() *services.SMDPService {
|
||||
return i.service
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user