lot of new functionalities

This commit is contained in:
Arnaud Delcasse
2025-10-14 18:11:13 +02:00
parent a6f70a6e85
commit d992a7984f
164 changed files with 15113 additions and 9442 deletions

View File

@@ -3,7 +3,6 @@ package services
import (
agenda "git.coopgo.io/coopgo-platform/agenda/grpcapi"
carpoolservice "git.coopgo.io/coopgo-platform/carpool-service/servers/grpc/proto"
diags "git.coopgo.io/coopgo-platform/diags/grpcapi"
fleets "git.coopgo.io/coopgo-platform/fleets/grpcapi"
"git.coopgo.io/coopgo-platform/geography/handlers/admin"
groupsmanagement "git.coopgo.io/coopgo-platform/groups-management/grpcapi"
@@ -12,6 +11,7 @@ import (
"git.coopgo.io/coopgo-platform/multimodal-routing/libs/transit/transitous"
"git.coopgo.io/coopgo-platform/payments/pricing"
"git.coopgo.io/coopgo-platform/routing-service"
savedsearch "git.coopgo.io/coopgo-platform/saved-search/servers/grpc/proto/gen"
"git.coopgo.io/coopgo-platform/sms"
solidaritytransport "git.coopgo.io/coopgo-platform/solidarity-transport/servers/grpc/proto/gen"
"github.com/rs/zerolog/log"
@@ -35,7 +35,7 @@ type GRPCServices struct {
Agenda agenda.AgendaClient
SolidarityTransport solidaritytransport.SolidarityTransportClient
CarpoolService carpoolservice.CarpoolServiceClient
Diags diags.DiagsClient
SavedSearch savedsearch.SavedSearchServiceClient
}
func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) {
@@ -46,10 +46,10 @@ func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) {
agendaDial = cfg.GetString("services.grpc.agenda.dial")
solidarityTransportDial = cfg.GetString("services.grpc.solidaritytransport.dial")
carpoolServiceDial = cfg.GetString("services.grpc.carpoolservice.dial")
savedSearchDial = cfg.GetString("services.grpc.savedsearch.dial")
routing_service_type = cfg.GetString("routing.type")
valhalla_base_url = cfg.GetString("routing.valhalla.base_url")
// diagsDial = cfg.GetString("services.grpc.diags.dial")
)
mobilityAccounts, err := NewMobilityAccountService(mobilityAccountsDial)
if err != nil {
@@ -86,11 +86,12 @@ func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) {
return nil, err
}
//diagsSvc, err := NewDiagsService(diagsDial)
// log.Error().Err(err).Msg("Mobility Accounts service issue")
//if err != nil {
// return nil, err
//}
savedSearchSvc, err := NewSavedSearchService(savedSearchDial)
if err != nil {
log.Error().Err(err).Msg("Saved Search service issue")
return nil, err
}
routing, err := routing.NewRoutingService(routing_service_type, valhalla_base_url)
if err != nil {
log.Fatal().Err(err).Msg("Could not initiate the routing service")
@@ -135,7 +136,7 @@ func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) {
Agenda: agendaSvc,
SolidarityTransport: solidarityTransportSvc,
CarpoolService: carpoolSvc,
// Diags: diagsSvc,
SavedSearch: savedSearchSvc,
},
Routing: routing,
InteropCarpool: carpoolRouting,