This commit is contained in:
Maxime 2024-09-30 10:16:13 +02:00
parent 1d01133e1a
commit 2dee240595
6 changed files with 425 additions and 176 deletions

View File

@ -988,6 +988,44 @@ func (*GetAllPassengers) Descriptor() ([]byte, []int) {
return file_solidarity_api_types_proto_rawDescGZIP(), []int{9} return file_solidarity_api_types_proto_rawDescGZIP(), []int{9}
} }
type GetPassenger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetPassenger) Reset() {
*x = GetPassenger{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_types_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPassenger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPassenger) ProtoMessage() {}
func (x *GetPassenger) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_types_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPassenger.ProtoReflect.Descriptor instead.
func (*GetPassenger) Descriptor() ([]byte, []int) {
return file_solidarity_api_types_proto_rawDescGZIP(), []int{10}
}
type Car struct { type Car struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -1000,7 +1038,7 @@ type Car struct {
func (x *Car) Reset() { func (x *Car) Reset() {
*x = Car{} *x = Car{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_types_proto_msgTypes[10] mi := &file_solidarity_api_types_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1013,7 +1051,7 @@ func (x *Car) String() string {
func (*Car) ProtoMessage() {} func (*Car) ProtoMessage() {}
func (x *Car) ProtoReflect() protoreflect.Message { func (x *Car) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_types_proto_msgTypes[10] mi := &file_solidarity_api_types_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1026,7 +1064,7 @@ func (x *Car) ProtoReflect() protoreflect.Message {
// Deprecated: Use Car.ProtoReflect.Descriptor instead. // Deprecated: Use Car.ProtoReflect.Descriptor instead.
func (*Car) Descriptor() ([]byte, []int) { func (*Car) Descriptor() ([]byte, []int) {
return file_solidarity_api_types_proto_rawDescGZIP(), []int{10} return file_solidarity_api_types_proto_rawDescGZIP(), []int{11}
} }
func (x *Car) GetModel() string { func (x *Car) GetModel() string {
@ -1058,7 +1096,7 @@ type Preferences struct {
func (x *Preferences) Reset() { func (x *Preferences) Reset() {
*x = Preferences{} *x = Preferences{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_types_proto_msgTypes[11] mi := &file_solidarity_api_types_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1071,7 +1109,7 @@ func (x *Preferences) String() string {
func (*Preferences) ProtoMessage() {} func (*Preferences) ProtoMessage() {}
func (x *Preferences) ProtoReflect() protoreflect.Message { func (x *Preferences) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_types_proto_msgTypes[11] mi := &file_solidarity_api_types_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1084,7 +1122,7 @@ func (x *Preferences) ProtoReflect() protoreflect.Message {
// Deprecated: Use Preferences.ProtoReflect.Descriptor instead. // Deprecated: Use Preferences.ProtoReflect.Descriptor instead.
func (*Preferences) Descriptor() ([]byte, []int) { func (*Preferences) Descriptor() ([]byte, []int) {
return file_solidarity_api_types_proto_rawDescGZIP(), []int{11} return file_solidarity_api_types_proto_rawDescGZIP(), []int{12}
} }
func (x *Preferences) GetSmoking() bool { func (x *Preferences) GetSmoking() bool {
@ -1135,7 +1173,7 @@ type Price struct {
func (x *Price) Reset() { func (x *Price) Reset() {
*x = Price{} *x = Price{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_types_proto_msgTypes[12] mi := &file_solidarity_api_types_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1148,7 +1186,7 @@ func (x *Price) String() string {
func (*Price) ProtoMessage() {} func (*Price) ProtoMessage() {}
func (x *Price) ProtoReflect() protoreflect.Message { func (x *Price) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_types_proto_msgTypes[12] mi := &file_solidarity_api_types_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1161,7 +1199,7 @@ func (x *Price) ProtoReflect() protoreflect.Message {
// Deprecated: Use Price.ProtoReflect.Descriptor instead. // Deprecated: Use Price.ProtoReflect.Descriptor instead.
func (*Price) Descriptor() ([]byte, []int) { func (*Price) Descriptor() ([]byte, []int) {
return file_solidarity_api_types_proto_rawDescGZIP(), []int{12} return file_solidarity_api_types_proto_rawDescGZIP(), []int{13}
} }
func (x *Price) GetType() PriceType { func (x *Price) GetType() PriceType {
@ -1203,7 +1241,7 @@ type User struct {
func (x *User) Reset() { func (x *User) Reset() {
*x = User{} *x = User{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_types_proto_msgTypes[13] mi := &file_solidarity_api_types_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -1216,7 +1254,7 @@ func (x *User) String() string {
func (*User) ProtoMessage() {} func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message { func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_types_proto_msgTypes[13] mi := &file_solidarity_api_types_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -1229,7 +1267,7 @@ func (x *User) ProtoReflect() protoreflect.Message {
// Deprecated: Use User.ProtoReflect.Descriptor instead. // Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) { func (*User) Descriptor() ([]byte, []int) {
return file_solidarity_api_types_proto_rawDescGZIP(), []int{13} return file_solidarity_api_types_proto_rawDescGZIP(), []int{14}
} }
func (x *User) GetId() string { func (x *User) GetId() string {
@ -1429,7 +1467,8 @@ var file_solidarity_api_types_proto_rawDesc = []byte{
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x70, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x61, 0x74, 0x65, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x70, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x61, 0x74, 0x65,
0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e,
0x67, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x03, 0x43, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x67, 0x65, 0x72, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x65,
0x6e, 0x67, 0x65, 0x72, 0x22, 0x31, 0x0a, 0x03, 0x43, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65,
0x6c, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x66, 0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x66,
@ -1504,7 +1543,7 @@ func file_solidarity_api_types_proto_rawDescGZIP() []byte {
} }
var file_solidarity_api_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_solidarity_api_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_solidarity_api_types_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_solidarity_api_types_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_solidarity_api_types_proto_goTypes = []interface{}{ var file_solidarity_api_types_proto_goTypes = []interface{}{
(DayOfWeek)(0), // 0: DayOfWeek (DayOfWeek)(0), // 0: DayOfWeek
(PriceType)(0), // 1: PriceType (PriceType)(0), // 1: PriceType
@ -1520,40 +1559,41 @@ var file_solidarity_api_types_proto_goTypes = []interface{}{
(*BookingSolidarityRequest)(nil), // 11: BookingSolidarityRequest (*BookingSolidarityRequest)(nil), // 11: BookingSolidarityRequest
(*BookingSolidarity)(nil), // 12: BookingSolidarity (*BookingSolidarity)(nil), // 12: BookingSolidarity
(*GetAllPassengers)(nil), // 13: GetAllPassengers (*GetAllPassengers)(nil), // 13: GetAllPassengers
(*Car)(nil), // 14: Car (*GetPassenger)(nil), // 14: GetPassenger
(*Preferences)(nil), // 15: Preferences (*Car)(nil), // 15: Car
(*Price)(nil), // 16: Price (*Preferences)(nil), // 16: Preferences
(*User)(nil), // 17: User (*Price)(nil), // 17: Price
(*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp (*User)(nil), // 18: User
(*timestamp.Timestamp)(nil), // 19: google.protobuf.Timestamp
} }
var file_solidarity_api_types_proto_depIdxs = []int32{ var file_solidarity_api_types_proto_depIdxs = []int32{
17, // 0: DriverJourney.user:type_name -> User 18, // 0: DriverJourney.user:type_name -> User
14, // 1: DriverJourney.car:type_name -> Car 15, // 1: DriverJourney.car:type_name -> Car
18, // 2: DriverJourney.driver_departure_Date:type_name -> google.protobuf.Timestamp 19, // 2: DriverJourney.driver_departure_Date:type_name -> google.protobuf.Timestamp
16, // 3: DriverJourney.price:type_name -> Price 17, // 3: DriverJourney.price:type_name -> Price
6, // 4: DriverJourney.repeated_punctual_availabilities:type_name -> RepeatedPunctualAvailabilitySlot 6, // 4: DriverJourney.repeated_punctual_availabilities:type_name -> RepeatedPunctualAvailabilitySlot
7, // 5: DriverJourney.repeated_regular_availabilities:type_name -> RepeatedRegularAvailabilitySlot 7, // 5: DriverJourney.repeated_regular_availabilities:type_name -> RepeatedRegularAvailabilitySlot
9, // 6: RepeatedPunctualAvailabilitySlot.punctual_availabilities:type_name -> PunctualAvailabilitySlot 9, // 6: RepeatedPunctualAvailabilitySlot.punctual_availabilities:type_name -> PunctualAvailabilitySlot
10, // 7: RepeatedRegularAvailabilitySlot.regular_availabilities:type_name -> RegularAvailabilitySlot 10, // 7: RepeatedRegularAvailabilitySlot.regular_availabilities:type_name -> RegularAvailabilitySlot
4, // 8: DriverRequest.driver_address:type_name -> Feature 4, // 8: DriverRequest.driver_address:type_name -> Feature
17, // 9: DriverRequest.driver:type_name -> User 18, // 9: DriverRequest.driver:type_name -> User
15, // 10: DriverRequest.preferences:type_name -> Preferences 16, // 10: DriverRequest.preferences:type_name -> Preferences
14, // 11: DriverRequest.car:type_name -> Car 15, // 11: DriverRequest.car:type_name -> Car
18, // 12: PunctualAvailabilitySlot.date:type_name -> google.protobuf.Timestamp 19, // 12: PunctualAvailabilitySlot.date:type_name -> google.protobuf.Timestamp
0, // 13: RegularAvailabilitySlot.dayOfWeek:type_name -> DayOfWeek 0, // 13: RegularAvailabilitySlot.dayOfWeek:type_name -> DayOfWeek
2, // 14: BookingSolidarityRequest.status:type_name -> BookingSolidarityStatus 2, // 14: BookingSolidarityRequest.status:type_name -> BookingSolidarityStatus
4, // 15: BookingSolidarityRequest.departure_address:type_name -> Feature 4, // 15: BookingSolidarityRequest.departure_address:type_name -> Feature
4, // 16: BookingSolidarityRequest.destination_address:type_name -> Feature 4, // 16: BookingSolidarityRequest.destination_address:type_name -> Feature
18, // 17: BookingSolidarityRequest.pickup_date:type_name -> google.protobuf.Timestamp 19, // 17: BookingSolidarityRequest.pickup_date:type_name -> google.protobuf.Timestamp
17, // 18: BookingSolidarity.driver:type_name -> User 18, // 18: BookingSolidarity.driver:type_name -> User
17, // 19: BookingSolidarity.passenger:type_name -> User 18, // 19: BookingSolidarity.passenger:type_name -> User
18, // 20: BookingSolidarity.passengerPickupDate:type_name -> google.protobuf.Timestamp 19, // 20: BookingSolidarity.passengerPickupDate:type_name -> google.protobuf.Timestamp
4, // 21: BookingSolidarity.passenger_departure_route:type_name -> Feature 4, // 21: BookingSolidarity.passenger_departure_route:type_name -> Feature
4, // 22: BookingSolidarity.passenger_destination_route:type_name -> Feature 4, // 22: BookingSolidarity.passenger_destination_route:type_name -> Feature
2, // 23: BookingSolidarity.status:type_name -> BookingSolidarityStatus 2, // 23: BookingSolidarity.status:type_name -> BookingSolidarityStatus
16, // 24: BookingSolidarity.price:type_name -> Price 17, // 24: BookingSolidarity.price:type_name -> Price
14, // 25: BookingSolidarity.car:type_name -> Car 15, // 25: BookingSolidarity.car:type_name -> Car
18, // 26: BookingSolidarity.pickup_date:type_name -> google.protobuf.Timestamp 19, // 26: BookingSolidarity.pickup_date:type_name -> google.protobuf.Timestamp
1, // 27: Price.type:type_name -> PriceType 1, // 27: Price.type:type_name -> PriceType
28, // [28:28] is the sub-list for method output_type 28, // [28:28] is the sub-list for method output_type
28, // [28:28] is the sub-list for method input_type 28, // [28:28] is the sub-list for method input_type
@ -1689,7 +1729,7 @@ func file_solidarity_api_types_proto_init() {
} }
} }
file_solidarity_api_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_solidarity_api_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Car); i { switch v := v.(*GetPassenger); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1701,7 +1741,7 @@ func file_solidarity_api_types_proto_init() {
} }
} }
file_solidarity_api_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_solidarity_api_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Preferences); i { switch v := v.(*Car); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1713,7 +1753,7 @@ func file_solidarity_api_types_proto_init() {
} }
} }
file_solidarity_api_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_solidarity_api_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Price); i { switch v := v.(*Preferences); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1725,6 +1765,18 @@ func file_solidarity_api_types_proto_init() {
} }
} }
file_solidarity_api_types_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { file_solidarity_api_types_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Price); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_api_types_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i { switch v := v.(*User); i {
case 0: case 0:
return &v.state return &v.state
@ -1747,7 +1799,7 @@ func file_solidarity_api_types_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_solidarity_api_types_proto_rawDesc, RawDescriptor: file_solidarity_api_types_proto_rawDesc,
NumEnums: 4, NumEnums: 4,
NumMessages: 14, NumMessages: 15,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -86,6 +86,11 @@ message GetAllPassengers {
} }
message GetPassenger {
}
message Car { message Car {
string model = 1; string model = 1;
string brand = 2; string brand = 2;

View File

@ -815,6 +815,100 @@ func (x *GetAllPassengersResponse) GetPassenger() []*User {
return nil return nil
} }
type GetPassengerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Passenger *User `protobuf:"bytes,1,opt,name=passenger,proto3" json:"passenger,omitempty"`
}
func (x *GetPassengerRequest) Reset() {
*x = GetPassengerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPassengerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPassengerRequest) ProtoMessage() {}
func (x *GetPassengerRequest) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPassengerRequest.ProtoReflect.Descriptor instead.
func (*GetPassengerRequest) Descriptor() ([]byte, []int) {
return file_solidarity_api_proto_rawDescGZIP(), []int{15}
}
func (x *GetPassengerRequest) GetPassenger() *User {
if x != nil {
return x.Passenger
}
return nil
}
type GetPassengerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Passenger *User `protobuf:"bytes,1,opt,name=passenger,proto3" json:"passenger,omitempty"`
}
func (x *GetPassengerResponse) Reset() {
*x = GetPassengerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPassengerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPassengerResponse) ProtoMessage() {}
func (x *GetPassengerResponse) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPassengerResponse.ProtoReflect.Descriptor instead.
func (*GetPassengerResponse) Descriptor() ([]byte, []int) {
return file_solidarity_api_proto_rawDescGZIP(), []int{16}
}
func (x *GetPassengerResponse) GetPassenger() *User {
if x != nil {
return x.Passenger
}
return nil
}
type GetBookingsByStatusResponse struct { type GetBookingsByStatusResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -826,7 +920,7 @@ type GetBookingsByStatusResponse struct {
func (x *GetBookingsByStatusResponse) Reset() { func (x *GetBookingsByStatusResponse) Reset() {
*x = GetBookingsByStatusResponse{} *x = GetBookingsByStatusResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_solidarity_api_proto_msgTypes[15] mi := &file_solidarity_api_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -839,7 +933,7 @@ func (x *GetBookingsByStatusResponse) String() string {
func (*GetBookingsByStatusResponse) ProtoMessage() {} func (*GetBookingsByStatusResponse) ProtoMessage() {}
func (x *GetBookingsByStatusResponse) ProtoReflect() protoreflect.Message { func (x *GetBookingsByStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_solidarity_api_proto_msgTypes[15] mi := &file_solidarity_api_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -852,7 +946,7 @@ func (x *GetBookingsByStatusResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetBookingsByStatusResponse.ProtoReflect.Descriptor instead. // Deprecated: Use GetBookingsByStatusResponse.ProtoReflect.Descriptor instead.
func (*GetBookingsByStatusResponse) Descriptor() ([]byte, []int) { func (*GetBookingsByStatusResponse) Descriptor() ([]byte, []int) {
return file_solidarity_api_proto_rawDescGZIP(), []int{15} return file_solidarity_api_proto_rawDescGZIP(), []int{17}
} }
func (x *GetBookingsByStatusResponse) GetBooking() []*BookingSolidarity { func (x *GetBookingsByStatusResponse) GetBooking() []*BookingSolidarity {
@ -969,66 +1063,78 @@ var file_solidarity_api_proto_rawDesc = []byte{
0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61,
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x61,
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e,
0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x67, 0x65, 0x72, 0x22, 0x3b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e,
0x6b, 0x69, 0x6e, 0x67, 0x32, 0x95, 0x06, 0x0a, 0x11, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x09, 0x70,
0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x1e, 0x53, 0x65, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05,
0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72,
0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x44, 0x22, 0x4b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42,
0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x1f, 0x53, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x32, 0xd4, 0x06,
0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x0a, 0x11, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76,
0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72,
0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c,
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65,
0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69,
0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65,
0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x43, 0x72, 0x65, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72,
0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69,
0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41,
0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73,
0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74,
0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69,
0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, 0x70, 0x64, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75,
0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73,
0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74,
0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x47, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73,
0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6f,
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12,
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, 0x72, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e,
0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x44, 0x72, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61,
0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52,
0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53,
0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x50, 0x61, 0x6e, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75,
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x12, 0x15, 0x2e, 0x50, 0x61, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44,
0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x6c,
0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x5a, 0x43, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f,
0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x73, 0x6f, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73,
0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x12, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73,
0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x43, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54,
0x72, 0x69, 0x70, 0x12, 0x15, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54,
0x72, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x61, 0x73,
0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x5a, 0x43, 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, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
var ( var (
@ -1043,7 +1149,7 @@ func file_solidarity_api_proto_rawDescGZIP() []byte {
return file_solidarity_api_proto_rawDescData return file_solidarity_api_proto_rawDescData
} }
var file_solidarity_api_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_solidarity_api_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_solidarity_api_proto_goTypes = []interface{}{ var file_solidarity_api_proto_goTypes = []interface{}{
(*PassengerTripRequest)(nil), // 0: PassengerTripRequest (*PassengerTripRequest)(nil), // 0: PassengerTripRequest
(*DriverRegularAvailabilities)(nil), // 1: DriverRegularAvailabilities (*DriverRegularAvailabilities)(nil), // 1: DriverRegularAvailabilities
@ -1060,62 +1166,68 @@ var file_solidarity_api_proto_goTypes = []interface{}{
(*DriverJourneysRequest)(nil), // 12: DriverJourneysRequest (*DriverJourneysRequest)(nil), // 12: DriverJourneysRequest
(*DriverJourneysResponse)(nil), // 13: DriverJourneysResponse (*DriverJourneysResponse)(nil), // 13: DriverJourneysResponse
(*GetAllPassengersResponse)(nil), // 14: GetAllPassengersResponse (*GetAllPassengersResponse)(nil), // 14: GetAllPassengersResponse
(*GetBookingsByStatusResponse)(nil), // 15: GetBookingsByStatusResponse (*GetPassengerRequest)(nil), // 15: GetPassengerRequest
(*User)(nil), // 16: User (*GetPassengerResponse)(nil), // 16: GetPassengerResponse
(*Preferences)(nil), // 17: Preferences (*GetBookingsByStatusResponse)(nil), // 17: GetBookingsByStatusResponse
(*DriverRequest)(nil), // 18: DriverRequest (*User)(nil), // 18: User
(*RegularAvailabilitySlot)(nil), // 19: RegularAvailabilitySlot (*Preferences)(nil), // 19: Preferences
(*PunctualAvailabilitySlot)(nil), // 20: PunctualAvailabilitySlot (*DriverRequest)(nil), // 20: DriverRequest
(*BookingSolidarityRequest)(nil), // 21: BookingSolidarityRequest (*RegularAvailabilitySlot)(nil), // 21: RegularAvailabilitySlot
(*BookingSolidarity)(nil), // 22: BookingSolidarity (*PunctualAvailabilitySlot)(nil), // 22: PunctualAvailabilitySlot
(BookingSolidarityStatus)(0), // 23: BookingSolidarityStatus (*BookingSolidarityRequest)(nil), // 23: BookingSolidarityRequest
(UserType)(0), // 24: UserType (*BookingSolidarity)(nil), // 24: BookingSolidarity
(*Feature)(nil), // 25: Feature (BookingSolidarityStatus)(0), // 25: BookingSolidarityStatus
(*timestamp.Timestamp)(nil), // 26: google.protobuf.Timestamp (UserType)(0), // 26: UserType
(*DriverJourney)(nil), // 27: DriverJourney (*Feature)(nil), // 27: Feature
(*empty.Empty)(nil), // 28: google.protobuf.Empty (*timestamp.Timestamp)(nil), // 28: google.protobuf.Timestamp
(*DriverJourney)(nil), // 29: DriverJourney
(*empty.Empty)(nil), // 30: google.protobuf.Empty
} }
var file_solidarity_api_proto_depIdxs = []int32{ var file_solidarity_api_proto_depIdxs = []int32{
16, // 0: PassengerTripRequest.passenger:type_name -> User 18, // 0: PassengerTripRequest.passenger:type_name -> User
17, // 1: PassengerTripRequest.preferences:type_name -> Preferences 19, // 1: PassengerTripRequest.preferences:type_name -> Preferences
18, // 2: DriverRegularAvailabilities.driver_request:type_name -> DriverRequest 20, // 2: DriverRegularAvailabilities.driver_request:type_name -> DriverRequest
19, // 3: DriverRegularAvailabilities.driver_availabilities:type_name -> RegularAvailabilitySlot 21, // 3: DriverRegularAvailabilities.driver_availabilities:type_name -> RegularAvailabilitySlot
18, // 4: DriverPunctualAvailabilities.driver_request:type_name -> DriverRequest 20, // 4: DriverPunctualAvailabilities.driver_request:type_name -> DriverRequest
20, // 5: DriverPunctualAvailabilities.driver_availabilities:type_name -> PunctualAvailabilitySlot 22, // 5: DriverPunctualAvailabilities.driver_availabilities:type_name -> PunctualAvailabilitySlot
21, // 6: CreateBookingSolidarityRequest.booking:type_name -> BookingSolidarityRequest 23, // 6: CreateBookingSolidarityRequest.booking:type_name -> BookingSolidarityRequest
22, // 7: CreateBookingSolidarityResponse.booking:type_name -> BookingSolidarity 24, // 7: CreateBookingSolidarityResponse.booking:type_name -> BookingSolidarity
23, // 8: UpdateBookingSolidarityRequest.status:type_name -> BookingSolidarityStatus 25, // 8: UpdateBookingSolidarityRequest.status:type_name -> BookingSolidarityStatus
22, // 9: GetBookingSolidarityResponse.booking:type_name -> BookingSolidarity 24, // 9: GetBookingSolidarityResponse.booking:type_name -> BookingSolidarity
23, // 10: GetBookingsByStatusRequest.status:type_name -> BookingSolidarityStatus 25, // 10: GetBookingsByStatusRequest.status:type_name -> BookingSolidarityStatus
24, // 11: GetBookingsByStatusRequest.type:type_name -> UserType 26, // 11: GetBookingsByStatusRequest.type:type_name -> UserType
25, // 12: DriverJourneysRequest.departure:type_name -> Feature 27, // 12: DriverJourneysRequest.departure:type_name -> Feature
26, // 13: DriverJourneysRequest.departure_date:type_name -> google.protobuf.Timestamp 28, // 13: DriverJourneysRequest.departure_date:type_name -> google.protobuf.Timestamp
27, // 14: DriverJourneysResponse.driver_journeys:type_name -> DriverJourney 29, // 14: DriverJourneysResponse.driver_journeys:type_name -> DriverJourney
16, // 15: GetAllPassengersResponse.passenger:type_name -> User 18, // 15: GetAllPassengersResponse.passenger:type_name -> User
22, // 16: GetBookingsByStatusResponse.booking:type_name -> BookingSolidarity 18, // 16: GetPassengerRequest.passenger:type_name -> User
1, // 17: SolidarityService.SetDriverRegularAvailabilities:input_type -> DriverRegularAvailabilities 18, // 17: GetPassengerResponse.passenger:type_name -> User
2, // 18: SolidarityService.SetDriverPunctualAvailabilities:input_type -> DriverPunctualAvailabilities 24, // 18: GetBookingsByStatusResponse.booking:type_name -> BookingSolidarity
5, // 19: SolidarityService.CreateBookingSolidarity:input_type -> CreateBookingSolidarityRequest 1, // 19: SolidarityService.SetDriverRegularAvailabilities:input_type -> DriverRegularAvailabilities
7, // 20: SolidarityService.UpdateBookingSolidarity:input_type -> UpdateBookingSolidarityRequest 2, // 20: SolidarityService.SetDriverPunctualAvailabilities:input_type -> DriverPunctualAvailabilities
9, // 21: SolidarityService.GetBookingSolidarity:input_type -> GetBookingSolidarityRequest 5, // 21: SolidarityService.CreateBookingSolidarity:input_type -> CreateBookingSolidarityRequest
11, // 22: SolidarityService.GetBookingsByStatus:input_type -> GetBookingsByStatusRequest 7, // 22: SolidarityService.UpdateBookingSolidarity:input_type -> UpdateBookingSolidarityRequest
12, // 23: SolidarityService.DriverJourneys:input_type -> DriverJourneysRequest 9, // 23: SolidarityService.GetBookingSolidarity:input_type -> GetBookingSolidarityRequest
28, // 24: SolidarityService.GetAllPassengers:input_type -> google.protobuf.Empty 11, // 24: SolidarityService.GetBookingsByStatus:input_type -> GetBookingsByStatusRequest
0, // 25: SolidarityService.SetPassengerTrip:input_type -> PassengerTripRequest 12, // 25: SolidarityService.DriverJourneys:input_type -> DriverJourneysRequest
4, // 26: SolidarityService.SetDriverRegularAvailabilities:output_type -> DriverAvailabilitiesResponse 30, // 26: SolidarityService.GetAllPassengers:input_type -> google.protobuf.Empty
4, // 27: SolidarityService.SetDriverPunctualAvailabilities:output_type -> DriverAvailabilitiesResponse 15, // 27: SolidarityService.GetPassenger:input_type -> GetPassengerRequest
6, // 28: SolidarityService.CreateBookingSolidarity:output_type -> CreateBookingSolidarityResponse 0, // 28: SolidarityService.SetPassengerTrip:input_type -> PassengerTripRequest
8, // 29: SolidarityService.UpdateBookingSolidarity:output_type -> UpdateBookingSolidarityResponse 4, // 29: SolidarityService.SetDriverRegularAvailabilities:output_type -> DriverAvailabilitiesResponse
10, // 30: SolidarityService.GetBookingSolidarity:output_type -> GetBookingSolidarityResponse 4, // 30: SolidarityService.SetDriverPunctualAvailabilities:output_type -> DriverAvailabilitiesResponse
15, // 31: SolidarityService.GetBookingsByStatus:output_type -> GetBookingsByStatusResponse 6, // 31: SolidarityService.CreateBookingSolidarity:output_type -> CreateBookingSolidarityResponse
13, // 32: SolidarityService.DriverJourneys:output_type -> DriverJourneysResponse 8, // 32: SolidarityService.UpdateBookingSolidarity:output_type -> UpdateBookingSolidarityResponse
14, // 33: SolidarityService.GetAllPassengers:output_type -> GetAllPassengersResponse 10, // 33: SolidarityService.GetBookingSolidarity:output_type -> GetBookingSolidarityResponse
3, // 34: SolidarityService.SetPassengerTrip:output_type -> PassengerTripResponse 17, // 34: SolidarityService.GetBookingsByStatus:output_type -> GetBookingsByStatusResponse
26, // [26:35] is the sub-list for method output_type 13, // 35: SolidarityService.DriverJourneys:output_type -> DriverJourneysResponse
17, // [17:26] is the sub-list for method input_type 14, // 36: SolidarityService.GetAllPassengers:output_type -> GetAllPassengersResponse
17, // [17:17] is the sub-list for extension type_name 16, // 37: SolidarityService.GetPassenger:output_type -> GetPassengerResponse
17, // [17:17] is the sub-list for extension extendee 3, // 38: SolidarityService.SetPassengerTrip:output_type -> PassengerTripResponse
0, // [0:17] is the sub-list for field type_name 29, // [29:39] is the sub-list for method output_type
19, // [19:29] is the sub-list for method input_type
19, // [19:19] is the sub-list for extension type_name
19, // [19:19] is the sub-list for extension extendee
0, // [0:19] is the sub-list for field type_name
} }
func init() { file_solidarity_api_proto_init() } func init() { file_solidarity_api_proto_init() }
@ -1306,6 +1418,30 @@ func file_solidarity_api_proto_init() {
} }
} }
file_solidarity_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { file_solidarity_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPassengerRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPassengerResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_solidarity_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetBookingsByStatusResponse); i { switch v := v.(*GetBookingsByStatusResponse); i {
case 0: case 0:
return &v.state return &v.state
@ -1324,7 +1460,7 @@ func file_solidarity_api_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_solidarity_api_proto_rawDesc, RawDescriptor: file_solidarity_api_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 16, NumMessages: 18,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@ -13,6 +13,7 @@ service SolidarityService {
rpc GetBookingsByStatus(GetBookingsByStatusRequest) returns (GetBookingsByStatusResponse) {} rpc GetBookingsByStatus(GetBookingsByStatusRequest) returns (GetBookingsByStatusResponse) {}
rpc DriverJourneys(DriverJourneysRequest) returns (DriverJourneysResponse) {} rpc DriverJourneys(DriverJourneysRequest) returns (DriverJourneysResponse) {}
rpc GetAllPassengers(google.protobuf.Empty) returns (GetAllPassengersResponse) {} rpc GetAllPassengers(google.protobuf.Empty) returns (GetAllPassengersResponse) {}
rpc GetPassenger(GetPassengerRequest) returns (GetPassengerResponse) {}
rpc SetPassengerTrip(PassengerTripRequest) returns (PassengerTripResponse) {} rpc SetPassengerTrip(PassengerTripRequest) returns (PassengerTripResponse) {}
} }
@ -88,6 +89,14 @@ message GetAllPassengersResponse {
repeated User passenger = 1; repeated User passenger = 1;
} }
message GetPassengerRequest {
User passenger = 1;
}
message GetPassengerResponse {
User passenger = 1;
}
message GetBookingsByStatusResponse{ message GetBookingsByStatusResponse{
repeated BookingSolidarity booking = 1; repeated BookingSolidarity booking = 1;
} }

View File

@ -28,6 +28,7 @@ const (
SolidarityService_GetBookingsByStatus_FullMethodName = "/SolidarityService/GetBookingsByStatus" SolidarityService_GetBookingsByStatus_FullMethodName = "/SolidarityService/GetBookingsByStatus"
SolidarityService_DriverJourneys_FullMethodName = "/SolidarityService/DriverJourneys" SolidarityService_DriverJourneys_FullMethodName = "/SolidarityService/DriverJourneys"
SolidarityService_GetAllPassengers_FullMethodName = "/SolidarityService/GetAllPassengers" SolidarityService_GetAllPassengers_FullMethodName = "/SolidarityService/GetAllPassengers"
SolidarityService_GetPassenger_FullMethodName = "/SolidarityService/GetPassenger"
SolidarityService_SetPassengerTrip_FullMethodName = "/SolidarityService/SetPassengerTrip" SolidarityService_SetPassengerTrip_FullMethodName = "/SolidarityService/SetPassengerTrip"
) )
@ -43,6 +44,7 @@ type SolidarityServiceClient interface {
GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error) GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error)
DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error) DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error)
GetAllPassengers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetAllPassengersResponse, error) GetAllPassengers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetAllPassengersResponse, error)
GetPassenger(ctx context.Context, in *GetPassengerRequest, opts ...grpc.CallOption) (*GetPassengerResponse, error)
SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error)
} }
@ -134,6 +136,16 @@ func (c *solidarityServiceClient) GetAllPassengers(ctx context.Context, in *empt
return out, nil return out, nil
} }
func (c *solidarityServiceClient) GetPassenger(ctx context.Context, in *GetPassengerRequest, opts ...grpc.CallOption) (*GetPassengerResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPassengerResponse)
err := c.cc.Invoke(ctx, SolidarityService_GetPassenger_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *solidarityServiceClient) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) { func (c *solidarityServiceClient) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PassengerTripResponse) out := new(PassengerTripResponse)
@ -156,6 +168,7 @@ type SolidarityServiceServer interface {
GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error) GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error)
DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error) DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error)
GetAllPassengers(context.Context, *empty.Empty) (*GetAllPassengersResponse, error) GetAllPassengers(context.Context, *empty.Empty) (*GetAllPassengersResponse, error)
GetPassenger(context.Context, *GetPassengerRequest) (*GetPassengerResponse, error)
SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error)
mustEmbedUnimplementedSolidarityServiceServer() mustEmbedUnimplementedSolidarityServiceServer()
} }
@ -191,6 +204,9 @@ func (UnimplementedSolidarityServiceServer) DriverJourneys(context.Context, *Dri
func (UnimplementedSolidarityServiceServer) GetAllPassengers(context.Context, *empty.Empty) (*GetAllPassengersResponse, error) { func (UnimplementedSolidarityServiceServer) GetAllPassengers(context.Context, *empty.Empty) (*GetAllPassengersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAllPassengers not implemented") return nil, status.Errorf(codes.Unimplemented, "method GetAllPassengers not implemented")
} }
func (UnimplementedSolidarityServiceServer) GetPassenger(context.Context, *GetPassengerRequest) (*GetPassengerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPassenger not implemented")
}
func (UnimplementedSolidarityServiceServer) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) { func (UnimplementedSolidarityServiceServer) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetPassengerTrip not implemented") return nil, status.Errorf(codes.Unimplemented, "method SetPassengerTrip not implemented")
} }
@ -359,6 +375,24 @@ func _SolidarityService_GetAllPassengers_Handler(srv interface{}, ctx context.Co
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _SolidarityService_GetPassenger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPassengerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SolidarityServiceServer).GetPassenger(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SolidarityService_GetPassenger_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SolidarityServiceServer).GetPassenger(ctx, req.(*GetPassengerRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SolidarityService_SetPassengerTrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _SolidarityService_SetPassengerTrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PassengerTripRequest) in := new(PassengerTripRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -416,6 +450,10 @@ var SolidarityService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetAllPassengers", MethodName: "GetAllPassengers",
Handler: _SolidarityService_GetAllPassengers_Handler, Handler: _SolidarityService_GetAllPassengers_Handler,
}, },
{
MethodName: "GetPassenger",
Handler: _SolidarityService_GetPassenger_Handler,
},
{ {
MethodName: "SetPassengerTrip", MethodName: "SetPassengerTrip",
Handler: _SolidarityService_SetPassengerTrip_Handler, Handler: _SolidarityService_SetPassengerTrip_Handler,

View File

@ -3,6 +3,7 @@ package grpcserver
import ( import (
"context" "context"
"errors" "errors"
"fmt"
"solidarity-service/internal" "solidarity-service/internal"
"solidarity-service/servers/grpc/proto" "solidarity-service/servers/grpc/proto"
"solidarity-service/utils" "solidarity-service/utils"
@ -190,30 +191,38 @@ func (s *SolidarityServiceServerImpl) GetAllPassengers( ctx context.Context, _ *
return resp, nil return resp, nil
} }
func (s *SolidarityServiceServerImpl) CreateBookingSolidarity(ctx context.Context, req *proto.CreateBookingSolidarityRequest) (resp *proto.CreateBookingSolidarityResponse, err error) { func (s *SolidarityServiceServerImpl) GetPassenger(ctx context.Context, req *proto.GetPassengerRequest) (resp *proto.GetPassengerResponse, er error){
if req.Booking.DriverId == "" { if req.Passenger.Id == "" {
return nil, errors.New("missing required DriverId") return nil, errors.New("missing required DriverId")
} }
if req.Booking.DepartureAddress == nil { p, err := s.Handler.GetPassenger(context.Background(), req.Passenger.Id)
return nil, errors.New("missing required DepartureAddress")
resp = &proto.GetPassengerResponse{
Passenger: &proto.User{
Id: p.Passenger.ID,
Alias: p.Passenger.Alias,
FirstName: p.Passenger.FirstName,
LastName: p.Passenger.LastName,
Grade: p.Passenger.Grade,
Picture: p.Passenger.Picture,
Gender: p.Passenger.Gender,
VerifiedIdentity: p.Passenger.VerifiedIdentity,
},
} }
if req.Booking.DestinationAddress == nil {
return nil, errors.New("missing required DestinationAddress") if err != nil {
fmt.Println("err getpassenger : ", err)
}else{
return resp, nil
} }
if req.Booking.PassengerId == "" {
return nil, errors.New("missing required PassengerId") return
}
func (s *SolidarityServiceServerImpl) CreateBookingSolidarity(ctx context.Context, req *proto.CreateBookingSolidarityRequest) (resp *proto.CreateBookingSolidarityResponse, err error) {
if req.Booking.DriverId == "" || req.Booking.DepartureAddress == nil || req.Booking.DestinationAddress == nil || req.Booking.PassengerId == "" || req.Booking.Id == "" || req.Booking.Status.String() == "" ||req.Booking.PickupDate.Seconds == 0 {
return nil, errors.New("missing required elements")
} }
if req.Booking.Id == "" {
return nil, errors.New("missing required Id")
}
if req.Booking.Status.String() == "" {
return nil, errors.New("missing required Status")
}
if req.Booking.PickupDate.Seconds == 0 {
return nil, errors.New("missing required Seconds")
}
bookingRequest := internal.BookingRequest{ bookingRequest := internal.BookingRequest{
ID: req.Booking.Id, ID: req.Booking.Id,