Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codealong-dev/ride-sharing
/ functions
Functions
317 in github.com/codealong-dev/ride-sharing
⨍
Functions
317
◇
Types & classes
114
↓ 20 callers
Function
GetString
(key, fallback string)
shared/env/env.go:11
↓ 17 callers
Method
String
()
shared/proto/trip/trip.pb.go:491
↓ 15 callers
Function
cn
(...inputs: ClassValue[])
web/src/lib/utils.ts:4
↓ 10 callers
Method
Close
()
services/api-gateway/grpc_clients/trip_client.go:41
↓ 10 callers
Function
file_trip_proto_rawDescGZIP
()
shared/proto/trip/trip.pb.go:686
↓ 9 callers
Method
PublishMessage
(ctx context.Context, routingKey string, message contracts.AmqpMessage)
shared/messaging/rabbitmq.go:123
↓ 8 callers
Method
declareAndBindQueue
(queueName string, messageTypes []string, exchange string)
shared/messaging/rabbitmq.go:281
↓ 7 callers
Method
Start
()
shared/messaging/queue_consumer.go:24
↓ 6 callers
Method
Close
()
shared/messaging/rabbitmq.go:314
↓ 5 callers
Method
Get
(key string)
shared/tracing/rabbitmq.go:19
↓ 5 callers
Method
Set
(key string, value string)
shared/tracing/rabbitmq.go:28
↓ 5 callers
Function
WrapHandlerFunc
(handler http.HandlerFunc, operation string)
shared/tracing/http.go:9
↓ 4 callers
Method
ConsumeMessages
(queueName string, handler MessageHandler)
shared/messaging/rabbitmq.go:53
↓ 4 callers
Method
GetTripByID
(ctx context.Context, id string)
services/trip-service/internal/domain/trip.go:52
↓ 4 callers
Function
InitTracer
(cfg Config)
shared/tracing/tracing.go:22
↓ 4 callers
Function
NewRabbitMQ
(uri string)
shared/messaging/rabbitmq.go:25
↓ 4 callers
Method
RegisterDriver
(ctx context.Context, in *RegisterDriverRequest, opts ...grpc.CallOption)
shared/proto/driver/driver_grpc.pb.go:30
↓ 4 callers
Method
UnregisterDriver
(ctx context.Context, in *RegisterDriverRequest, opts ...grpc.CallOption)
shared/proto/driver/driver_grpc.pb.go:31
↓ 4 callers
Function
file_driver_proto_rawDescGZIP
()
shared/proto/driver/driver.pb.go:294
↓ 3 callers
Method
CreateTrip
(ctx context.Context, fare *RideFareModel)
services/trip-service/internal/domain/trip.go:42
↓ 3 callers
Method
GetDriverID
()
shared/proto/driver/driver.pb.go:62
↓ 3 callers
Method
Listen
()
services/trip-service/internal/infrastructure/events/driver_consumer.go:28
↓ 3 callers
Method
PreviewTrip
(ctx context.Context, in *PreviewTripRequest, opts ...grpc.CallOption)
shared/proto/trip/trip_grpc.pb.go:30
↓ 3 callers
Method
ToProto
()
services/trip-service/internal/domain/trip.go:22
↓ 3 callers
Method
UpdateTrip
(ctx context.Context, tripID string, status string, driver *pbd.Driver)
services/trip-service/internal/domain/trip.go:53
↓ 2 callers
Method
Add
(id string, conn *websocket.Conn)
shared/messaging/connection_manager.go:51
↓ 2 callers
Method
CreatePaymentSession
(ctx context.Context, tripID, userID, driverID string, amount int64, currency string)
services/payment-service/internal/domain/domain.go:10
↓ 2 callers
Method
CreateTrip
(ctx context.Context, in *CreateTripRequest, opts ...grpc.CallOption)
shared/proto/trip/trip_grpc.pb.go:31
↓ 2 callers
Function
DialOptionsWithTracing
()
shared/tracing/grpc.go:16
↓ 2 callers
Method
GetRoute
(ctx context.Context, pickup, destination *types.Coordinate, useOsrmApi bool)
services/trip-service/internal/domain/trip.go:43
↓ 2 callers
Method
GetUserID
()
shared/proto/trip/trip.pb.go:542
↓ 2 callers
Method
Listen
()
services/payment-service/internal/events/trip_consumer.go:27
↓ 2 callers
Function
NewMongoDefaultConfig
NewMongoConfig creates a new MongoDB configuration from environment variables
shared/db/mongodb.go:27
↓ 2 callers
Function
NewQueueConsumer
(rb *RabbitMQ, connMgr *ConnectionManager, queueName string)
shared/messaging/queue_consumer.go:16
↓ 2 callers
Function
NewTripServiceClient
()
services/api-gateway/grpc_clients/trip_client.go:17
↓ 2 callers
Method
Remove
(id string)
shared/messaging/connection_manager.go:62
↓ 2 callers
Method
SendMessage
(id string, message contracts.WSMessage)
shared/messaging/connection_manager.go:78
↓ 2 callers
Method
Upgrade
(w http.ResponseWriter, r *http.Request)
shared/messaging/connection_manager.go:43
↓ 2 callers
Function
WithTracingInterceptors
()
shared/tracing/grpc.go:10
↓ 2 callers
Function
convertMetersToKilometers
(meters: number)
web/src/utils/math.ts:6
↓ 2 callers
Function
convertSecondsToMinutes
(seconds: number)
web/src/utils/math.ts:2
↓ 2 callers
Function
enableCORS
(handler http.HandlerFunc)
services/api-gateway/middleware.go:5
↓ 2 callers
Function
handleClick
(userType: "driver" | "rider")
web/src/app/page.tsx:39
↓ 2 callers
Function
isValidTripEvent
(event: string)
web/src/contracts.ts:103
↓ 2 callers
Function
isValidWsMessage
(message: ServerWsMessage)
web/src/contracts.ts:107
↓ 2 callers
Function
resetTripStatus
()
web/src/hooks/useRiderStreamConnection.ts:78
↓ 2 callers
Function
sendMessage
(message: ClientWsMessage)
web/src/hooks/useDriverStreamConnection.ts:91
↓ 2 callers
Function
writeJSON
(w http.ResponseWriter, status int, data any)
services/api-gateway/json.go:8
↓ 1 callers
Function
DefaultConfig
DefaultConfig returns a Config with sensible default values
shared/retry/retry.go:20
↓ 1 callers
Method
EstimatePackagesPriceWithRoute
(route *tripTypes.OsrmApiResponse)
services/trip-service/internal/domain/trip.go:44
↓ 1 callers
Method
FindAvailableDrivers
(packageType string)
services/driver-service/service.go:29
↓ 1 callers
Function
GenerateRandomPlate
()
services/driver-service/utils.go:49
↓ 1 callers
Method
GenerateTripFares
( ctx context.Context, fares []*RideFareModel, userID string, Route *tripTypes.OsrmApiResponse, )
services/trip-service/internal/domain/trip.go:45
↓ 1 callers
Method
GetAndValidateFare
(ctx context.Context, fareID, userID string)
services/trip-service/internal/domain/trip.go:51
↓ 1 callers
Function
GetDatabase
GetDatabase returns a database instance
shared/db/mongodb.go:60
↓ 1 callers
Method
GetEndLocation
()
shared/proto/trip/trip.pb.go:77
↓ 1 callers
Method
GetPackageSlug
()
shared/proto/trip/trip.pb.go:354
↓ 1 callers
Function
GetRandomAvatar
GetRandomAvatar returns a random avatar URL from the randomuser.me API
shared/util/util.go:6
↓ 1 callers
Method
GetRideFareByID
(ctx context.Context, id string)
services/trip-service/internal/domain/trip.go:36
↓ 1 callers
Method
GetRideFareID
()
shared/proto/trip/trip.pb.go:406
↓ 1 callers
Method
GetStartLocation
()
shared/proto/trip/trip.pb.go:70
↓ 1 callers
Function
GetTracer
(name string)
shared/tracing/tracing.go:43
↓ 1 callers
Method
Listen
()
services/driver-service/trip_consumer.go:26
↓ 1 callers
Function
NewConnectionManager
Note that on multiple instances of the API gateway, the connection manager needs to store the connections on a separate shared storage.
shared/messaging/connection_manager.go:37
↓ 1 callers
Function
NewDriverConsumer
(rabbitmq *messaging.RabbitMQ, service domain.TripService)
services/trip-service/internal/infrastructure/events/driver_consumer.go:21
↓ 1 callers
Function
NewDriverServiceClient
()
services/api-gateway/grpc_clients/driver_client.go:17
↓ 1 callers
Function
NewGrpcHandler
(s *grpc.Server, service *Service)
services/driver-service/gprc_handler.go:18
↓ 1 callers
Function
NewMongoClient
NewMongoClient creates a new MongoDB client
shared/db/mongodb.go:35
↓ 1 callers
Function
NewMongoRepository
(db *mongo.Database)
services/trip-service/internal/infrastructure/repository/mongodb.go:20
↓ 1 callers
Function
NewPaymentConsumer
(rabbitmq *messaging.RabbitMQ, service domain.TripService)
services/trip-service/internal/infrastructure/events/payment_consumer.go:20
↓ 1 callers
Function
NewPaymentService
NewPaymentService creates a new instance of the payment service
services/payment-service/internal/service/service.go:19
↓ 1 callers
Function
NewService
(repo domain.TripRepository)
services/trip-service/internal/service/service.go:24
↓ 1 callers
Function
NewService
()
services/driver-service/service.go:23
↓ 1 callers
Function
NewStripeClient
(config *types.PaymentConfig)
services/payment-service/internal/infrastructure/stripe/stripe.go:17
↓ 1 callers
Function
NewTripConsumer
(rabbitmq *messaging.RabbitMQ, service domain.Service)
services/payment-service/internal/events/trip_consumer.go:20
↓ 1 callers
Function
NewTripConsumer
(rabbitmq *messaging.RabbitMQ, service *Service)
services/driver-service/trip_consumer.go:19
↓ 1 callers
Function
NewTripEventPublisher
(rabbitmq *messaging.RabbitMQ)
services/trip-service/internal/infrastructure/events/trip_publisher.go:15
↓ 1 callers
Method
PublishTripCreated
(ctx context.Context, trip *domain.TripModel)
services/trip-service/internal/infrastructure/events/trip_publisher.go:21
↓ 1 callers
Method
SaveRideFare
(ctx context.Context, f *RideFareModel)
services/trip-service/internal/domain/trip.go:35
↓ 1 callers
Method
ToProto
()
services/trip-service/internal/domain/ride_fare.go:18
↓ 1 callers
Function
ToRideFaresProto
(fares []*RideFareModel)
services/trip-service/internal/domain/ride_fare.go:27
↓ 1 callers
Function
TracedConsumer
TracedConsumer wraps the RabbitMQ message handler with tracing
shared/tracing/rabbitmq.go:77
↓ 1 callers
Function
TracedPublisher
TracedPublisher wraps the RabbitMQ publish function with tracing
shared/tracing/rabbitmq.go:41
↓ 1 callers
Function
WithBackoff
WithBackoff executes the given operation with exponential backoff retry logic
shared/retry/retry.go:29
↓ 1 callers
Function
decodeGeoHash
(geohash: string)
web/src/utils/geohash.ts:3
↓ 1 callers
Function
estimateFareRoute
(f *domain.RideFareModel, route *tripTypes.OsrmApiResponse)
services/trip-service/internal/service/service.go:155
↓ 1 callers
Function
file_driver_proto_init
()
shared/proto/driver/driver.pb.go:323
↓ 1 callers
Function
file_trip_proto_init
()
shared/proto/trip/trip.pb.go:729
↓ 1 callers
Function
getBaseFares
()
services/trip-service/internal/service/service.go:172
↓ 1 callers
Function
getGeohashBounds
(geohash: string)
web/src/utils/geohash.ts:12
↓ 1 callers
Function
handleDriversWebSocket
(w http.ResponseWriter, r *http.Request, rb *messaging.RabbitMQ)
services/api-gateway/ws.go:62
↓ 1 callers
Method
handleFindAndNotifyDrivers
(ctx context.Context, payload messaging.TripEventData)
services/driver-service/trip_consumer.go:53
↓ 1 callers
Function
handleRidersWebSocket
(w http.ResponseWriter, r *http.Request, rb *messaging.RabbitMQ)
services/api-gateway/ws.go:17
↓ 1 callers
Function
handleStripeWebhook
(w http.ResponseWriter, r *http.Request, rb *messaging.RabbitMQ)
services/api-gateway/http.go:96
↓ 1 callers
Method
handleTripAccepted
(ctx context.Context, tripID string, driver *pbd.Driver)
services/trip-service/internal/infrastructure/events/driver_consumer.go:92
↓ 1 callers
Method
handleTripAccepted
(ctx context.Context, payload messaging.PaymentTripResponseData)
services/payment-service/internal/events/trip_consumer.go:53
↓ 1 callers
Method
handleTripDeclined
(ctx context.Context, tripID, riderID string)
services/trip-service/internal/infrastructure/events/driver_consumer.go:63
↓ 1 callers
Function
newClientHandler
()
shared/tracing/grpc.go:22
↓ 1 callers
Function
newExporter
(endpoint string)
shared/tracing/tracing.go:47
↓ 1 callers
Function
newPropagator
()
shared/tracing/tracing.go:51
next →
1–100 of 317, ranked by callers