Add status filter for booking retrieval
Build and Push Docker Image / build_and_push (push) Failing after 5m24s Details

This commit is contained in:
Arnaud Delcasse 2025-09-10 16:10:21 +02:00
parent d71da5accd
commit fc5b33e88c
6 changed files with 443 additions and 1085 deletions

View File

@ -44,11 +44,11 @@ func (h Handler) BookDriverJourney(passengerid string, driverid string, journeyi
return &booking, nil return &booking, nil
} }
func (h Handler) GetBookings(startdate time.Time, enddate time.Time, passengerid string, driverid string) ([]*types.Booking, error) { func (h Handler) GetBookings(startdate time.Time, enddate time.Time, passengerid string, driverid string, status string) ([]*types.Booking, error) {
if enddate.Before(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)) { if enddate.Before(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)) {
enddate = time.Date(9999, 12, 31, 0, 0, 0, 0, time.UTC) enddate = time.Date(9999, 12, 31, 0, 0, 0, 0, time.UTC)
} }
log.Debug().Time("startdate", startdate).Time("enddate", enddate).Str("passengerid", passengerid).Str("driverid", driverid).Msg("GetBookings") log.Debug().Time("startdate", startdate).Time("enddate", enddate).Str("passengerid", passengerid).Str("driverid", driverid).Str("status", status).Msg("GetBookings")
res := []*types.Booking{} res := []*types.Booking{}
bookings, err := h.Storage.GetAllBookings() bookings, err := h.Storage.GetAllBookings()
@ -59,7 +59,7 @@ func (h Handler) GetBookings(startdate time.Time, enddate time.Time, passengerid
for _, b := range bookings { for _, b := range bookings {
if b.Journey.DriverDepartureDate.After(startdate) && b.Journey.DriverDepartureDate.Before(enddate) { if b.Journey.DriverDepartureDate.After(startdate) && b.Journey.DriverDepartureDate.Before(enddate) {
if (passengerid == "" || b.PassengerId == passengerid) && (driverid == "" || b.DriverId == driverid) { if (passengerid == "" || b.PassengerId == passengerid) && (driverid == "" || b.DriverId == driverid) && (status == "" || status == b.Status) {
res = append(res, b) res = append(res, b)
} }
} }

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.34.1 // protoc-gen-go v1.36.7
// protoc v4.24.4 // protoc v6.31.1
// source: solidarity-transport-types.proto // source: solidarity-transport-types.proto
package gen package gen
@ -13,6 +13,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb" timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
unsafe "unsafe"
) )
const ( const (
@ -23,21 +24,18 @@ const (
) )
type GeoJsonFeature struct { type GeoJsonFeature struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Serialized string `protobuf:"bytes,1,opt,name=serialized,proto3" json:"serialized,omitempty"` Serialized string `protobuf:"bytes,1,opt,name=serialized,proto3" json:"serialized,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *GeoJsonFeature) Reset() { func (x *GeoJsonFeature) Reset() {
*x = GeoJsonFeature{} *x = GeoJsonFeature{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_transport_types_proto_msgTypes[0] mi := &file_solidarity_transport_types_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *GeoJsonFeature) String() string { func (x *GeoJsonFeature) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -47,7 +45,7 @@ func (*GeoJsonFeature) ProtoMessage() {}
func (x *GeoJsonFeature) ProtoReflect() protoreflect.Message { func (x *GeoJsonFeature) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_transport_types_proto_msgTypes[0] mi := &file_solidarity_transport_types_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -70,21 +68,18 @@ func (x *GeoJsonFeature) GetSerialized() string {
} }
type GeoJsonFeatureCollection struct { type GeoJsonFeatureCollection struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Serialized string `protobuf:"bytes,1,opt,name=serialized,proto3" json:"serialized,omitempty"` Serialized string `protobuf:"bytes,1,opt,name=serialized,proto3" json:"serialized,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *GeoJsonFeatureCollection) Reset() { func (x *GeoJsonFeatureCollection) Reset() {
*x = GeoJsonFeatureCollection{} *x = GeoJsonFeatureCollection{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_transport_types_proto_msgTypes[1] mi := &file_solidarity_transport_types_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *GeoJsonFeatureCollection) String() string { func (x *GeoJsonFeatureCollection) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -94,7 +89,7 @@ func (*GeoJsonFeatureCollection) ProtoMessage() {}
func (x *GeoJsonFeatureCollection) ProtoReflect() protoreflect.Message { func (x *GeoJsonFeatureCollection) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_transport_types_proto_msgTypes[1] mi := &file_solidarity_transport_types_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -117,26 +112,23 @@ func (x *GeoJsonFeatureCollection) GetSerialized() string {
} }
type DriverRegularAvailability struct { type DriverRegularAvailability struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
DriverId string `protobuf:"bytes,2,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"` DriverId string `protobuf:"bytes,2,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"`
Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"` Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
StartTime string `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` StartTime string `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
EndTime string `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` EndTime string `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
Address *GeoJsonFeature `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` Address *GeoJsonFeature `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *DriverRegularAvailability) Reset() { func (x *DriverRegularAvailability) Reset() {
*x = DriverRegularAvailability{} *x = DriverRegularAvailability{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_transport_types_proto_msgTypes[2] mi := &file_solidarity_transport_types_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *DriverRegularAvailability) String() string { func (x *DriverRegularAvailability) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -146,7 +138,7 @@ func (*DriverRegularAvailability) ProtoMessage() {}
func (x *DriverRegularAvailability) ProtoReflect() protoreflect.Message { func (x *DriverRegularAvailability) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_transport_types_proto_msgTypes[2] mi := &file_solidarity_transport_types_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -204,10 +196,7 @@ func (x *DriverRegularAvailability) GetAddress() *GeoJsonFeature {
} }
type SolidarityTransportDriverJourney struct { type SolidarityTransportDriverJourney struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
DriverId string `protobuf:"bytes,2,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"` DriverId string `protobuf:"bytes,2,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"`
PassengerPickup *GeoJsonFeature `protobuf:"bytes,3,opt,name=passenger_pickup,json=passengerPickup,proto3" json:"passenger_pickup,omitempty"` PassengerPickup *GeoJsonFeature `protobuf:"bytes,3,opt,name=passenger_pickup,json=passengerPickup,proto3" json:"passenger_pickup,omitempty"`
@ -222,16 +211,16 @@ type SolidarityTransportDriverJourney struct {
DriverDepartureDate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=driver_departure_date,json=driverDepartureDate,proto3,oneof" json:"driver_departure_date,omitempty"` DriverDepartureDate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=driver_departure_date,json=driverDepartureDate,proto3,oneof" json:"driver_departure_date,omitempty"`
Price *SolidarityTransportPrice `protobuf:"bytes,13,opt,name=price,proto3,oneof" json:"price,omitempty"` Price *SolidarityTransportPrice `protobuf:"bytes,13,opt,name=price,proto3,oneof" json:"price,omitempty"`
Noreturn bool `protobuf:"varint,14,opt,name=noreturn,proto3" json:"noreturn,omitempty"` Noreturn bool `protobuf:"varint,14,opt,name=noreturn,proto3" json:"noreturn,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *SolidarityTransportDriverJourney) Reset() { func (x *SolidarityTransportDriverJourney) Reset() {
*x = SolidarityTransportDriverJourney{} *x = SolidarityTransportDriverJourney{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_transport_types_proto_msgTypes[3] mi := &file_solidarity_transport_types_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *SolidarityTransportDriverJourney) String() string { func (x *SolidarityTransportDriverJourney) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -241,7 +230,7 @@ func (*SolidarityTransportDriverJourney) ProtoMessage() {}
func (x *SolidarityTransportDriverJourney) ProtoReflect() protoreflect.Message { func (x *SolidarityTransportDriverJourney) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_transport_types_proto_msgTypes[3] mi := &file_solidarity_transport_types_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -355,22 +344,19 @@ func (x *SolidarityTransportDriverJourney) GetNoreturn() bool {
} }
type SolidarityTransportPrice struct { type SolidarityTransportPrice struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *SolidarityTransportPrice) Reset() { func (x *SolidarityTransportPrice) Reset() {
*x = SolidarityTransportPrice{} *x = SolidarityTransportPrice{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_transport_types_proto_msgTypes[4] mi := &file_solidarity_transport_types_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *SolidarityTransportPrice) String() string { func (x *SolidarityTransportPrice) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -380,7 +366,7 @@ func (*SolidarityTransportPrice) ProtoMessage() {}
func (x *SolidarityTransportPrice) ProtoReflect() protoreflect.Message { func (x *SolidarityTransportPrice) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_transport_types_proto_msgTypes[4] mi := &file_solidarity_transport_types_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -410,10 +396,7 @@ func (x *SolidarityTransportPrice) GetCurrency() string {
} }
type SolidarityTransportBooking struct { type SolidarityTransportBooking struct {
state protoimpl.MessageState state protoimpl.MessageState `protogen:"open.v1"`
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
DriverId string `protobuf:"bytes,3,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"` DriverId string `protobuf:"bytes,3,opt,name=driver_id,json=driverId,proto3" json:"driver_id,omitempty"`
@ -422,16 +405,16 @@ type SolidarityTransportBooking struct {
ReturnWaitingDuration int64 `protobuf:"varint,6,opt,name=return_waiting_duration,json=returnWaitingDuration,proto3" json:"return_waiting_duration,omitempty"` ReturnWaitingDuration int64 `protobuf:"varint,6,opt,name=return_waiting_duration,json=returnWaitingDuration,proto3" json:"return_waiting_duration,omitempty"`
Data *structpb.Struct `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` Data *structpb.Struct `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
Journey *SolidarityTransportDriverJourney `protobuf:"bytes,10,opt,name=journey,proto3" json:"journey,omitempty"` Journey *SolidarityTransportDriverJourney `protobuf:"bytes,10,opt,name=journey,proto3" json:"journey,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
} }
func (x *SolidarityTransportBooking) Reset() { func (x *SolidarityTransportBooking) Reset() {
*x = SolidarityTransportBooking{} *x = SolidarityTransportBooking{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_transport_types_proto_msgTypes[5] mi := &file_solidarity_transport_types_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
}
func (x *SolidarityTransportBooking) String() string { func (x *SolidarityTransportBooking) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
@ -441,7 +424,7 @@ func (*SolidarityTransportBooking) ProtoMessage() {}
func (x *SolidarityTransportBooking) ProtoReflect() protoreflect.Message { func (x *SolidarityTransportBooking) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_transport_types_proto_msgTypes[5] mi := &file_solidarity_transport_types_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
@ -514,128 +497,72 @@ func (x *SolidarityTransportBooking) GetJourney() *SolidarityTransportDriverJour
var File_solidarity_transport_types_proto protoreflect.FileDescriptor var File_solidarity_transport_types_proto protoreflect.FileDescriptor
var file_solidarity_transport_types_proto_rawDesc = []byte{ const file_solidarity_transport_types_proto_rawDesc = "" +
0x0a, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x74, 0x72, 0x61, "\n" +
0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, " solidarity-transport-types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"0\n" +
0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, "\x0eGeoJsonFeature\x12\x1e\n" +
0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, "\n" +
0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, "serialized\x18\x01 \x01(\tR\n" +
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, "serialized\":\n" +
0x6f, 0x22, 0x30, 0x0a, 0x0e, 0x47, 0x65, 0x6f, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, "\x18GeoJsonFeatureCollection\x12\x1e\n" +
0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, "\n" +
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, "serialized\x18\x01 \x01(\tR\n" +
0x7a, 0x65, 0x64, 0x22, 0x3a, 0x0a, 0x18, 0x47, 0x65, 0x6f, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x65, "serialized\"\xbf\x01\n" +
0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, "\x19DriverRegularAvailability\x12\x0e\n" +
0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, "\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, "\tdriver_id\x18\x02 \x01(\tR\bdriverId\x12\x10\n" +
0xbf, 0x01, 0x0a, 0x19, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, "\x03day\x18\x03 \x01(\x05R\x03day\x12\x1d\n" +
0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, "\n" +
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, "start_time\x18\x04 \x01(\tR\tstartTime\x12\x19\n" +
0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, "\bend_time\x18\x05 \x01(\tR\aendTime\x12)\n" +
0x52, 0x08, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, "\aaddress\x18\x06 \x01(\v2\x0f.GeoJsonFeatureR\aaddress\"\x8b\x06\n" +
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x1d, 0x0a, 0x0a, " SolidarityTransportDriverJourney\x12\x0e\n" +
0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, "\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, "\tdriver_id\x18\x02 \x01(\tR\bdriverId\x12:\n" +
0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, "\x10passenger_pickup\x18\x03 \x01(\v2\x0f.GeoJsonFeatureR\x0fpassengerPickup\x126\n" +
0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, "\x0epassenger_drop\x18\x04 \x01(\v2\x0f.GeoJsonFeatureR\rpassengerDrop\x12-\n" +
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x47, 0x65, 0x6f, 0x4a, 0x73, 0x6f, "\x12passenger_distance\x18\x05 \x01(\x03R\x11passengerDistance\x12:\n" +
0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, "\x10driver_departure\x18\x06 \x01(\v2\x0f.GeoJsonFeatureR\x0fdriverDeparture\x126\n" +
0x73, 0x22, 0x8b, 0x06, 0x0a, 0x20, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, "\x0edriver_arrival\x18\a \x01(\v2\x0f.GeoJsonFeatureR\rdriverArrival\x12'\n" +
0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, "\x0fdriver_distance\x18\b \x01(\x03R\x0edriverDistance\x12\x1a\n" +
0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, "\bduration\x18\t \x01(\x03R\bduration\x12.\n" +
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, "\x10journey_polyline\x18\n" +
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x72, 0x69, 0x76, 0x65, " \x01(\tH\x00R\x0fjourneyPolyline\x88\x01\x01\x12N\n" +
0x72, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x10, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, "\x15passenger_pickup_date\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\x13passengerPickupDate\x12S\n" +
0x5f, 0x70, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, "\x15driver_departure_date\x18\f \x01(\v2\x1a.google.protobuf.TimestampH\x01R\x13driverDepartureDate\x88\x01\x01\x124\n" +
0x47, 0x65, 0x6f, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0f, "\x05price\x18\r \x01(\v2\x19.SolidarityTransportPriceH\x02R\x05price\x88\x01\x01\x12\x1a\n" +
0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x12, "\bnoreturn\x18\x0e \x01(\bR\bnoreturnB\x13\n" +
0x36, 0x0a, 0x0e, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x64, 0x72, 0x6f, "\x11_journey_polylineB\x18\n" +
0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x47, 0x65, 0x6f, 0x4a, 0x73, 0x6f, "\x16_driver_departure_dateB\b\n" +
0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0d, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, "\x06_price\"N\n" +
0x67, 0x65, 0x72, 0x44, 0x72, 0x6f, 0x70, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x61, 0x73, 0x73, 0x65, "\x18SolidarityTransportPrice\x12\x16\n" +
0x6e, 0x67, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, "\x06amount\x18\x01 \x01(\x01R\x06amount\x12\x1a\n" +
0x01, 0x28, 0x03, 0x52, 0x11, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x44, 0x69, "\bcurrency\x18\x02 \x01(\tR\bcurrency\"\xc1\x02\n" +
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x10, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, "\x1aSolidarityTransportBooking\x12\x0e\n" +
0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, "\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n" +
0x32, 0x0f, 0x2e, 0x47, 0x65, 0x6f, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, "\bgroup_id\x18\x02 \x01(\tR\agroupId\x12\x1b\n" +
0x65, 0x52, 0x0f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, "\tdriver_id\x18\x03 \x01(\tR\bdriverId\x12!\n" +
0x72, 0x65, 0x12, 0x36, 0x0a, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x72, 0x72, "\fpassenger_id\x18\x04 \x01(\tR\vpassengerId\x12\x16\n" +
0x69, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x47, 0x65, 0x6f, "\x06status\x18\x05 \x01(\tR\x06status\x126\n" +
0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0d, 0x64, 0x72, 0x69, "\x17return_waiting_duration\x18\x06 \x01(\x03R\x15returnWaitingDuration\x12+\n" +
0x76, 0x65, 0x72, 0x41, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x72, "\x04data\x18\a \x01(\v2\x17.google.protobuf.StructR\x04data\x12;\n" +
0x69, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, "\ajourney\x18\n" +
0x01, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x69, 0x73, 0x74, 0x61, " \x01(\v2!.SolidarityTransportDriverJourneyR\ajourneyBKZIgit.coopgo.io/coopgo-platform/solidarity-transport/servers/grpc/proto/genb\x06proto3"
0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x2e, 0x0a, 0x10, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x6c,
0x69, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x6a, 0x6f, 0x75,
0x72, 0x6e, 0x65, 0x79, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12,
0x4e, 0x0a, 0x15, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x69, 0x63,
0x6b, 0x75, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x70, 0x61, 0x73, 0x73,
0x65, 0x6e, 0x67, 0x65, 0x72, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x61, 0x74, 0x65, 0x12,
0x53, 0x0a, 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74,
0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x13, 0x64, 0x72,
0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74,
0x65, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79,
0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, 0x02,
0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f,
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f,
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e,
0x65, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f,
0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65,
0x5f, 0x64, 0x61, 0x74, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22,
0x4e, 0x0a, 0x18, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61,
0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22,
0xc1, 0x02, 0x0a, 0x1a, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x54, 0x72,
0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19,
0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x72, 0x69,
0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x72,
0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e,
0x67, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61,
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x77, 0x61, 0x69, 0x74,
0x69, 0x6e, 0x67, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01,
0x28, 0x03, 0x52, 0x15, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e,
0x67, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x07, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65,
0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61,
0x72, 0x69, 0x74, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x72, 0x69,
0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x52, 0x07, 0x6a, 0x6f, 0x75, 0x72,
0x6e, 0x65, 0x79, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67,
0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d,
0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var ( var (
file_solidarity_transport_types_proto_rawDescOnce sync.Once file_solidarity_transport_types_proto_rawDescOnce sync.Once
file_solidarity_transport_types_proto_rawDescData = file_solidarity_transport_types_proto_rawDesc file_solidarity_transport_types_proto_rawDescData []byte
) )
func file_solidarity_transport_types_proto_rawDescGZIP() []byte { func file_solidarity_transport_types_proto_rawDescGZIP() []byte {
file_solidarity_transport_types_proto_rawDescOnce.Do(func() { file_solidarity_transport_types_proto_rawDescOnce.Do(func() {
file_solidarity_transport_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_solidarity_transport_types_proto_rawDescData) file_solidarity_transport_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_solidarity_transport_types_proto_rawDesc), len(file_solidarity_transport_types_proto_rawDesc)))
}) })
return file_solidarity_transport_types_proto_rawDescData return file_solidarity_transport_types_proto_rawDescData
} }
var file_solidarity_transport_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_solidarity_transport_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_solidarity_transport_types_proto_goTypes = []interface{}{ var file_solidarity_transport_types_proto_goTypes = []any{
(*GeoJsonFeature)(nil), // 0: GeoJsonFeature (*GeoJsonFeature)(nil), // 0: GeoJsonFeature
(*GeoJsonFeatureCollection)(nil), // 1: GeoJsonFeatureCollection (*GeoJsonFeatureCollection)(nil), // 1: GeoJsonFeatureCollection
(*DriverRegularAvailability)(nil), // 2: DriverRegularAvailability (*DriverRegularAvailability)(nil), // 2: DriverRegularAvailability
@ -668,86 +595,12 @@ func file_solidarity_transport_types_proto_init() {
if File_solidarity_transport_types_proto != nil { if File_solidarity_transport_types_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled { file_solidarity_transport_types_proto_msgTypes[3].OneofWrappers = []any{}
file_solidarity_transport_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GeoJsonFeature); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_transport_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GeoJsonFeatureCollection); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_transport_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DriverRegularAvailability); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_transport_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SolidarityTransportDriverJourney); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_transport_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SolidarityTransportPrice); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_transport_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SolidarityTransportBooking); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_solidarity_transport_types_proto_msgTypes[3].OneofWrappers = []interface{}{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_solidarity_transport_types_proto_rawDesc, RawDescriptor: unsafe.Slice(unsafe.StringData(file_solidarity_transport_types_proto_rawDesc), len(file_solidarity_transport_types_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 6, NumMessages: 6,
NumExtensions: 0, NumExtensions: 0,
@ -758,7 +611,6 @@ func file_solidarity_transport_types_proto_init() {
MessageInfos: file_solidarity_transport_types_proto_msgTypes, MessageInfos: file_solidarity_transport_types_proto_msgTypes,
}.Build() }.Build()
File_solidarity_transport_types_proto = out.File File_solidarity_transport_types_proto = out.File
file_solidarity_transport_types_proto_rawDesc = nil
file_solidarity_transport_types_proto_goTypes = nil file_solidarity_transport_types_proto_goTypes = nil
file_solidarity_transport_types_proto_depIdxs = nil file_solidarity_transport_types_proto_depIdxs = nil
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc v4.24.4 // - protoc v6.31.1
// source: solidarity-transport.proto // source: solidarity-transport.proto
package gen package gen
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
SolidarityTransport_AddDriverRegularAvailability_FullMethodName = "/SolidarityTransport/AddDriverRegularAvailability" SolidarityTransport_AddDriverRegularAvailability_FullMethodName = "/SolidarityTransport/AddDriverRegularAvailability"
@ -63,8 +63,9 @@ func NewSolidarityTransportClient(cc grpc.ClientConnInterface) SolidarityTranspo
} }
func (c *solidarityTransportClient) AddDriverRegularAvailability(ctx context.Context, in *AddDriverRegularAvailabilityRequest, opts ...grpc.CallOption) (*AddDriverRegularAvailabilityResponse, error) { func (c *solidarityTransportClient) AddDriverRegularAvailability(ctx context.Context, in *AddDriverRegularAvailabilityRequest, opts ...grpc.CallOption) (*AddDriverRegularAvailabilityResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddDriverRegularAvailabilityResponse) out := new(AddDriverRegularAvailabilityResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_AddDriverRegularAvailability_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_AddDriverRegularAvailability_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -72,8 +73,9 @@ func (c *solidarityTransportClient) AddDriverRegularAvailability(ctx context.Con
} }
func (c *solidarityTransportClient) AddDriverRegularAvailabilities(ctx context.Context, in *AddDriverRegularAvailabilitiesRequest, opts ...grpc.CallOption) (*AddDriverRegularAvailabilitiesResponse, error) { func (c *solidarityTransportClient) AddDriverRegularAvailabilities(ctx context.Context, in *AddDriverRegularAvailabilitiesRequest, opts ...grpc.CallOption) (*AddDriverRegularAvailabilitiesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddDriverRegularAvailabilitiesResponse) out := new(AddDriverRegularAvailabilitiesResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_AddDriverRegularAvailabilities_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_AddDriverRegularAvailabilities_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -81,8 +83,9 @@ func (c *solidarityTransportClient) AddDriverRegularAvailabilities(ctx context.C
} }
func (c *solidarityTransportClient) GetDriverRegularAvailabilities(ctx context.Context, in *GetDriverRegularAvailabilitiesRequest, opts ...grpc.CallOption) (*GetDriverRegularAvailabilitiesResponse, error) { func (c *solidarityTransportClient) GetDriverRegularAvailabilities(ctx context.Context, in *GetDriverRegularAvailabilitiesRequest, opts ...grpc.CallOption) (*GetDriverRegularAvailabilitiesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetDriverRegularAvailabilitiesResponse) out := new(GetDriverRegularAvailabilitiesResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_GetDriverRegularAvailabilities_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_GetDriverRegularAvailabilities_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -90,8 +93,9 @@ func (c *solidarityTransportClient) GetDriverRegularAvailabilities(ctx context.C
} }
func (c *solidarityTransportClient) DeleteDriverRegularAvailability(ctx context.Context, in *DeleteDriverRegularAvailabilityRequest, opts ...grpc.CallOption) (*DeleteDriverRegularAvailabilityResponse, error) { func (c *solidarityTransportClient) DeleteDriverRegularAvailability(ctx context.Context, in *DeleteDriverRegularAvailabilityRequest, opts ...grpc.CallOption) (*DeleteDriverRegularAvailabilityResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteDriverRegularAvailabilityResponse) out := new(DeleteDriverRegularAvailabilityResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_DeleteDriverRegularAvailability_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_DeleteDriverRegularAvailability_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -99,8 +103,9 @@ func (c *solidarityTransportClient) DeleteDriverRegularAvailability(ctx context.
} }
func (c *solidarityTransportClient) GetDriverJourneys(ctx context.Context, in *GetDriverJourneysRequest, opts ...grpc.CallOption) (*GetDriverJourneysResponse, error) { func (c *solidarityTransportClient) GetDriverJourneys(ctx context.Context, in *GetDriverJourneysRequest, opts ...grpc.CallOption) (*GetDriverJourneysResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetDriverJourneysResponse) out := new(GetDriverJourneysResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_GetDriverJourneys_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_GetDriverJourneys_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -108,8 +113,9 @@ func (c *solidarityTransportClient) GetDriverJourneys(ctx context.Context, in *G
} }
func (c *solidarityTransportClient) GetDriverJourney(ctx context.Context, in *GetDriverJourneyRequest, opts ...grpc.CallOption) (*GetDriverJourneyResponse, error) { func (c *solidarityTransportClient) GetDriverJourney(ctx context.Context, in *GetDriverJourneyRequest, opts ...grpc.CallOption) (*GetDriverJourneyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetDriverJourneyResponse) out := new(GetDriverJourneyResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_GetDriverJourney_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_GetDriverJourney_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -117,8 +123,9 @@ func (c *solidarityTransportClient) GetDriverJourney(ctx context.Context, in *Ge
} }
func (c *solidarityTransportClient) BookDriverJourney(ctx context.Context, in *BookDriverJourneyRequest, opts ...grpc.CallOption) (*BookDriverJourneyResponse, error) { func (c *solidarityTransportClient) BookDriverJourney(ctx context.Context, in *BookDriverJourneyRequest, opts ...grpc.CallOption) (*BookDriverJourneyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BookDriverJourneyResponse) out := new(BookDriverJourneyResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_BookDriverJourney_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_BookDriverJourney_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -126,8 +133,9 @@ func (c *solidarityTransportClient) BookDriverJourney(ctx context.Context, in *B
} }
func (c *solidarityTransportClient) GetSolidarityTransportBookings(ctx context.Context, in *GetSolidarityTransportBookingsRequest, opts ...grpc.CallOption) (*GetSolidarityTransportBookingsResponse, error) { func (c *solidarityTransportClient) GetSolidarityTransportBookings(ctx context.Context, in *GetSolidarityTransportBookingsRequest, opts ...grpc.CallOption) (*GetSolidarityTransportBookingsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSolidarityTransportBookingsResponse) out := new(GetSolidarityTransportBookingsResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_GetSolidarityTransportBookings_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_GetSolidarityTransportBookings_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -135,8 +143,9 @@ func (c *solidarityTransportClient) GetSolidarityTransportBookings(ctx context.C
} }
func (c *solidarityTransportClient) GetSolidarityTransportBooking(ctx context.Context, in *GetSolidarityTransportBookingRequest, opts ...grpc.CallOption) (*GetSolidarityTransportBookingResponse, error) { func (c *solidarityTransportClient) GetSolidarityTransportBooking(ctx context.Context, in *GetSolidarityTransportBookingRequest, opts ...grpc.CallOption) (*GetSolidarityTransportBookingResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetSolidarityTransportBookingResponse) out := new(GetSolidarityTransportBookingResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_GetSolidarityTransportBooking_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_GetSolidarityTransportBooking_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -144,8 +153,9 @@ func (c *solidarityTransportClient) GetSolidarityTransportBooking(ctx context.Co
} }
func (c *solidarityTransportClient) UpdateSolidarityTransportBooking(ctx context.Context, in *UpdateSolidarityTransportBookingRequest, opts ...grpc.CallOption) (*UpdateSolidarityTransportBookingResponse, error) { func (c *solidarityTransportClient) UpdateSolidarityTransportBooking(ctx context.Context, in *UpdateSolidarityTransportBookingRequest, opts ...grpc.CallOption) (*UpdateSolidarityTransportBookingResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateSolidarityTransportBookingResponse) out := new(UpdateSolidarityTransportBookingResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_UpdateSolidarityTransportBooking_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_UpdateSolidarityTransportBooking_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -153,8 +163,9 @@ func (c *solidarityTransportClient) UpdateSolidarityTransportBooking(ctx context
} }
func (c *solidarityTransportClient) UpdateSolidarityTransportBookingStatus(ctx context.Context, in *UpdateSolidarityTransportBookingStatusRequest, opts ...grpc.CallOption) (*UpdateSolidarityTransportBookingStatusResponse, error) { func (c *solidarityTransportClient) UpdateSolidarityTransportBookingStatus(ctx context.Context, in *UpdateSolidarityTransportBookingStatusRequest, opts ...grpc.CallOption) (*UpdateSolidarityTransportBookingStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateSolidarityTransportBookingStatusResponse) out := new(UpdateSolidarityTransportBookingStatusResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_UpdateSolidarityTransportBookingStatus_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_UpdateSolidarityTransportBookingStatus_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -162,8 +173,9 @@ func (c *solidarityTransportClient) UpdateSolidarityTransportBookingStatus(ctx c
} }
func (c *solidarityTransportClient) ToggleSolidarityTransportNoreturn(ctx context.Context, in *ToggleSolidarityTransportNoreturnRequest, opts ...grpc.CallOption) (*ToggleSolidarityTransportNoreturnResponse, error) { func (c *solidarityTransportClient) ToggleSolidarityTransportNoreturn(ctx context.Context, in *ToggleSolidarityTransportNoreturnRequest, opts ...grpc.CallOption) (*ToggleSolidarityTransportNoreturnResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ToggleSolidarityTransportNoreturnResponse) out := new(ToggleSolidarityTransportNoreturnResponse)
err := c.cc.Invoke(ctx, SolidarityTransport_ToggleSolidarityTransportNoreturn_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, SolidarityTransport_ToggleSolidarityTransportNoreturn_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -172,7 +184,7 @@ func (c *solidarityTransportClient) ToggleSolidarityTransportNoreturn(ctx contex
// SolidarityTransportServer is the server API for SolidarityTransport service. // SolidarityTransportServer is the server API for SolidarityTransport service.
// All implementations must embed UnimplementedSolidarityTransportServer // All implementations must embed UnimplementedSolidarityTransportServer
// for forward compatibility // for forward compatibility.
type SolidarityTransportServer interface { type SolidarityTransportServer interface {
// Availabilities management // Availabilities management
AddDriverRegularAvailability(context.Context, *AddDriverRegularAvailabilityRequest) (*AddDriverRegularAvailabilityResponse, error) AddDriverRegularAvailability(context.Context, *AddDriverRegularAvailabilityRequest) (*AddDriverRegularAvailabilityResponse, error)
@ -192,9 +204,12 @@ type SolidarityTransportServer interface {
mustEmbedUnimplementedSolidarityTransportServer() mustEmbedUnimplementedSolidarityTransportServer()
} }
// UnimplementedSolidarityTransportServer must be embedded to have forward compatible implementations. // UnimplementedSolidarityTransportServer must be embedded to have
type UnimplementedSolidarityTransportServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSolidarityTransportServer struct{}
func (UnimplementedSolidarityTransportServer) AddDriverRegularAvailability(context.Context, *AddDriverRegularAvailabilityRequest) (*AddDriverRegularAvailabilityResponse, error) { func (UnimplementedSolidarityTransportServer) AddDriverRegularAvailability(context.Context, *AddDriverRegularAvailabilityRequest) (*AddDriverRegularAvailabilityResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddDriverRegularAvailability not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddDriverRegularAvailability not implemented")
@ -233,6 +248,7 @@ func (UnimplementedSolidarityTransportServer) ToggleSolidarityTransportNoreturn(
return nil, status.Errorf(codes.Unimplemented, "method ToggleSolidarityTransportNoreturn not implemented") return nil, status.Errorf(codes.Unimplemented, "method ToggleSolidarityTransportNoreturn not implemented")
} }
func (UnimplementedSolidarityTransportServer) mustEmbedUnimplementedSolidarityTransportServer() {} func (UnimplementedSolidarityTransportServer) mustEmbedUnimplementedSolidarityTransportServer() {}
func (UnimplementedSolidarityTransportServer) testEmbeddedByValue() {}
// UnsafeSolidarityTransportServer may be embedded to opt out of forward compatibility for this service. // UnsafeSolidarityTransportServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SolidarityTransportServer will // Use of this interface is not recommended, as added methods to SolidarityTransportServer will
@ -242,6 +258,13 @@ type UnsafeSolidarityTransportServer interface {
} }
func RegisterSolidarityTransportServer(s grpc.ServiceRegistrar, srv SolidarityTransportServer) { func RegisterSolidarityTransportServer(s grpc.ServiceRegistrar, srv SolidarityTransportServer) {
// If the following call pancis, it indicates UnimplementedSolidarityTransportServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&SolidarityTransport_ServiceDesc, srv) s.RegisterService(&SolidarityTransport_ServiceDesc, srv)
} }

View File

@ -99,6 +99,7 @@ message GetSolidarityTransportBookingsRequest {
google.protobuf.Timestamp end_date = 2; google.protobuf.Timestamp end_date = 2;
string passengerid = 3; string passengerid = 3;
string driverid = 4; string driverid = 4;
string status = 5;
} }
message GetSolidarityTransportBookingsResponse { message GetSolidarityTransportBookingsResponse {

View File

@ -39,7 +39,8 @@ func (s SolidarityTransportServerImpl) GetSolidarityTransportBookings(ctx contex
enddate := req.EndDate.AsTime() enddate := req.EndDate.AsTime()
passengerid := req.Passengerid passengerid := req.Passengerid
driverid := req.Driverid driverid := req.Driverid
bookings, err := s.Handler.GetBookings(startdate, enddate, passengerid, driverid) bookingstatus := req.Status
bookings, err := s.Handler.GetBookings(startdate, enddate, passengerid, driverid, bookingstatus)
if err != nil { if err != nil {
log.Error().Err(err).Msg("issue in GetBookings handler") log.Error().Err(err).Msg("issue in GetBookings handler")
return nil, status.Errorf(codes.NotFound, "could not get bookings : %v", err) return nil, status.Errorf(codes.NotFound, "could not get bookings : %v", err)