diff --git a/handler/services.go b/handler/services.go index 0d2e9d3..6ae0d67 100644 --- a/handler/services.go +++ b/handler/services.go @@ -2,8 +2,9 @@ package handler import ( "context" - "github.com/paulmach/orb/geojson" "solidarity-service/internal" + + "github.com/paulmach/orb/geojson" ) func (s *SolidarityServiceHandler) GetPassenger(ctx context.Context, id string) (passenger internal.Passenger, err error) { @@ -14,6 +15,14 @@ func (s *SolidarityServiceHandler) GetPassenger(ctx context.Context, id string) return passenger, nil } +func (s *SolidarityServiceHandler) GetAllPassengers(ctx context.Context) (passengers []internal.Passenger, err error) { + passengers, err = s.Storage.GetAllPassengers() + if err != nil { + return []internal.Passenger{}, err + } + return passengers, nil +} + func (s *SolidarityServiceHandler) GetDriver(ctx context.Context, id string) (driver internal.Driver, err error) { driver, err = s.Storage.GetDriver(id) if err != nil { diff --git a/servers/grpc/proto/solidarity-api-types.pb.go b/servers/grpc/proto/solidarity-api-types.pb.go index b73bad8..c4c8acb 100644 --- a/servers/grpc/proto/solidarity-api-types.pb.go +++ b/servers/grpc/proto/solidarity-api-types.pb.go @@ -950,6 +950,44 @@ func (x *BookingSolidarity) GetPickupDate() *timestamp.Timestamp { return nil } +type GetAllPassengers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetAllPassengers) Reset() { + *x = GetAllPassengers{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllPassengers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllPassengers) ProtoMessage() {} + +func (x *GetAllPassengers) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[9] + 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 GetAllPassengers.ProtoReflect.Descriptor instead. +func (*GetAllPassengers) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{9} +} + type Car struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -962,7 +1000,7 @@ type Car struct { func (x *Car) Reset() { *x = Car{} if protoimpl.UnsafeEnabled { - mi := &file_solidarity_api_types_proto_msgTypes[9] + mi := &file_solidarity_api_types_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -975,7 +1013,7 @@ func (x *Car) String() string { func (*Car) ProtoMessage() {} func (x *Car) ProtoReflect() protoreflect.Message { - mi := &file_solidarity_api_types_proto_msgTypes[9] + mi := &file_solidarity_api_types_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -988,7 +1026,7 @@ func (x *Car) ProtoReflect() protoreflect.Message { // Deprecated: Use Car.ProtoReflect.Descriptor instead. func (*Car) Descriptor() ([]byte, []int) { - return file_solidarity_api_types_proto_rawDescGZIP(), []int{9} + return file_solidarity_api_types_proto_rawDescGZIP(), []int{10} } func (x *Car) GetModel() string { @@ -1020,7 +1058,7 @@ type Preferences struct { func (x *Preferences) Reset() { *x = Preferences{} 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.StoreMessageInfo(mi) } @@ -1033,7 +1071,7 @@ func (x *Preferences) String() string { func (*Preferences) ProtoMessage() {} func (x *Preferences) ProtoReflect() protoreflect.Message { - mi := &file_solidarity_api_types_proto_msgTypes[10] + mi := &file_solidarity_api_types_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +1084,7 @@ func (x *Preferences) ProtoReflect() protoreflect.Message { // Deprecated: Use Preferences.ProtoReflect.Descriptor instead. func (*Preferences) Descriptor() ([]byte, []int) { - return file_solidarity_api_types_proto_rawDescGZIP(), []int{10} + return file_solidarity_api_types_proto_rawDescGZIP(), []int{11} } func (x *Preferences) GetSmoking() bool { @@ -1097,7 +1135,7 @@ type Price struct { func (x *Price) Reset() { *x = Price{} 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.StoreMessageInfo(mi) } @@ -1110,7 +1148,7 @@ func (x *Price) String() string { func (*Price) ProtoMessage() {} func (x *Price) ProtoReflect() protoreflect.Message { - mi := &file_solidarity_api_types_proto_msgTypes[11] + mi := &file_solidarity_api_types_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1123,7 +1161,7 @@ func (x *Price) ProtoReflect() protoreflect.Message { // Deprecated: Use Price.ProtoReflect.Descriptor instead. func (*Price) Descriptor() ([]byte, []int) { - return file_solidarity_api_types_proto_rawDescGZIP(), []int{11} + return file_solidarity_api_types_proto_rawDescGZIP(), []int{12} } func (x *Price) GetType() PriceType { @@ -1165,7 +1203,7 @@ type User struct { func (x *User) Reset() { *x = User{} 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.StoreMessageInfo(mi) } @@ -1178,7 +1216,7 @@ func (x *User) String() string { func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_solidarity_api_types_proto_msgTypes[12] + mi := &file_solidarity_api_types_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1191,7 +1229,7 @@ func (x *User) ProtoReflect() protoreflect.Message { // Deprecated: Use User.ProtoReflect.Descriptor instead. func (*User) Descriptor() ([]byte, []int) { - return file_solidarity_api_types_proto_rawDescGZIP(), []int{12} + return file_solidarity_api_types_proto_rawDescGZIP(), []int{13} } func (x *User) GetId() string { @@ -1390,66 +1428,67 @@ var file_solidarity_api_types_proto_rawDesc = []byte{ 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, 0x52, 0x0a, 0x70, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x61, 0x74, 0x65, - 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, 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, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x6d, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x1b, 0x0a, - 0x09, 0x69, 0x73, 0x5f, 0x74, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x08, 0x69, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x75, - 0x67, 0x67, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5b, 0x0a, - 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0xdd, 0x01, 0x0a, 0x04, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x72, - 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2a, 0x4a, 0x0a, 0x09, 0x44, 0x61, - 0x79, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x4f, 0x4e, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x54, 0x55, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x45, 0x44, - 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x48, 0x55, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x46, - 0x52, 0x49, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x41, 0x54, 0x10, 0x06, 0x12, 0x07, 0x0a, - 0x03, 0x53, 0x55, 0x4e, 0x10, 0x07, 0x2a, 0x2e, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x52, 0x45, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x2a, 0xbc, 0x01, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x6b, 0x69, - 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x52, 0x49, - 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x41, - 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, - 0x4d, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, - 0x45, 0x44, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, - 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, - 0x54, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x25, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x10, 0x01, 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, + 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, + 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, + 0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x6d, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, + 0x75, 0x73, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, + 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x74, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x22, 0x5b, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 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, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0xdd, + 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2a, 0x4a, + 0x0a, 0x09, 0x44, 0x61, 0x79, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b, 0x12, 0x07, 0x0a, 0x03, 0x4d, + 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x55, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, + 0x03, 0x57, 0x45, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x48, 0x55, 0x10, 0x04, 0x12, + 0x07, 0x0a, 0x03, 0x46, 0x52, 0x49, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x41, 0x54, 0x10, + 0x06, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x55, 0x4e, 0x10, 0x07, 0x2a, 0x2e, 0x0a, 0x09, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x52, 0x45, 0x45, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x2a, 0xbc, 0x01, 0x0a, 0x17, 0x42, + 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, + 0x5f, 0x44, 0x52, 0x49, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, + 0x47, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, + 0x49, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, + 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x25, 0x0a, 0x08, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x10, 0x01, + 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 ( @@ -1465,7 +1504,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_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_solidarity_api_types_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_solidarity_api_types_proto_goTypes = []interface{}{ (DayOfWeek)(0), // 0: DayOfWeek (PriceType)(0), // 1: PriceType @@ -1480,40 +1519,41 @@ var file_solidarity_api_types_proto_goTypes = []interface{}{ (*RegularAvailabilitySlot)(nil), // 10: RegularAvailabilitySlot (*BookingSolidarityRequest)(nil), // 11: BookingSolidarityRequest (*BookingSolidarity)(nil), // 12: BookingSolidarity - (*Car)(nil), // 13: Car - (*Preferences)(nil), // 14: Preferences - (*Price)(nil), // 15: Price - (*User)(nil), // 16: User - (*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*GetAllPassengers)(nil), // 13: GetAllPassengers + (*Car)(nil), // 14: Car + (*Preferences)(nil), // 15: Preferences + (*Price)(nil), // 16: Price + (*User)(nil), // 17: User + (*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp } var file_solidarity_api_types_proto_depIdxs = []int32{ - 16, // 0: DriverJourney.user:type_name -> User - 13, // 1: DriverJourney.car:type_name -> Car - 17, // 2: DriverJourney.driver_departure_Date:type_name -> google.protobuf.Timestamp - 15, // 3: DriverJourney.price:type_name -> Price + 17, // 0: DriverJourney.user:type_name -> User + 14, // 1: DriverJourney.car:type_name -> Car + 18, // 2: DriverJourney.driver_departure_Date:type_name -> google.protobuf.Timestamp + 16, // 3: DriverJourney.price:type_name -> Price 6, // 4: DriverJourney.repeated_punctual_availabilities:type_name -> RepeatedPunctualAvailabilitySlot 7, // 5: DriverJourney.repeated_regular_availabilities:type_name -> RepeatedRegularAvailabilitySlot 9, // 6: RepeatedPunctualAvailabilitySlot.punctual_availabilities:type_name -> PunctualAvailabilitySlot 10, // 7: RepeatedRegularAvailabilitySlot.regular_availabilities:type_name -> RegularAvailabilitySlot 4, // 8: DriverRequest.driver_address:type_name -> Feature - 16, // 9: DriverRequest.driver:type_name -> User - 14, // 10: DriverRequest.preferences:type_name -> Preferences - 13, // 11: DriverRequest.car:type_name -> Car - 17, // 12: PunctualAvailabilitySlot.date:type_name -> google.protobuf.Timestamp + 17, // 9: DriverRequest.driver:type_name -> User + 15, // 10: DriverRequest.preferences:type_name -> Preferences + 14, // 11: DriverRequest.car:type_name -> Car + 18, // 12: PunctualAvailabilitySlot.date:type_name -> google.protobuf.Timestamp 0, // 13: RegularAvailabilitySlot.dayOfWeek:type_name -> DayOfWeek 2, // 14: BookingSolidarityRequest.status:type_name -> BookingSolidarityStatus 4, // 15: BookingSolidarityRequest.departure_address:type_name -> Feature 4, // 16: BookingSolidarityRequest.destination_address:type_name -> Feature - 17, // 17: BookingSolidarityRequest.pickup_date:type_name -> google.protobuf.Timestamp - 16, // 18: BookingSolidarity.driver:type_name -> User - 16, // 19: BookingSolidarity.passenger:type_name -> User - 17, // 20: BookingSolidarity.passengerPickupDate:type_name -> google.protobuf.Timestamp + 18, // 17: BookingSolidarityRequest.pickup_date:type_name -> google.protobuf.Timestamp + 17, // 18: BookingSolidarity.driver:type_name -> User + 17, // 19: BookingSolidarity.passenger:type_name -> User + 18, // 20: BookingSolidarity.passengerPickupDate:type_name -> google.protobuf.Timestamp 4, // 21: BookingSolidarity.passenger_departure_route:type_name -> Feature 4, // 22: BookingSolidarity.passenger_destination_route:type_name -> Feature 2, // 23: BookingSolidarity.status:type_name -> BookingSolidarityStatus - 15, // 24: BookingSolidarity.price:type_name -> Price - 13, // 25: BookingSolidarity.car:type_name -> Car - 17, // 26: BookingSolidarity.pickup_date:type_name -> google.protobuf.Timestamp + 16, // 24: BookingSolidarity.price:type_name -> Price + 14, // 25: BookingSolidarity.car:type_name -> Car + 18, // 26: BookingSolidarity.pickup_date:type_name -> google.protobuf.Timestamp 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 input_type @@ -1637,7 +1677,7 @@ func file_solidarity_api_types_proto_init() { } } file_solidarity_api_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Car); i { + switch v := v.(*GetAllPassengers); i { case 0: return &v.state case 1: @@ -1649,7 +1689,7 @@ func file_solidarity_api_types_proto_init() { } } file_solidarity_api_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Preferences); i { + switch v := v.(*Car); i { case 0: return &v.state case 1: @@ -1661,7 +1701,7 @@ func file_solidarity_api_types_proto_init() { } } file_solidarity_api_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Price); i { + switch v := v.(*Preferences); i { case 0: return &v.state case 1: @@ -1673,6 +1713,18 @@ func file_solidarity_api_types_proto_init() { } } file_solidarity_api_types_proto_msgTypes[12].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[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*User); i { case 0: return &v.state @@ -1695,7 +1747,7 @@ func file_solidarity_api_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_solidarity_api_types_proto_rawDesc, NumEnums: 4, - NumMessages: 13, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/servers/grpc/proto/solidarity-api-types.proto b/servers/grpc/proto/solidarity-api-types.proto index 50234d9..e4aed8f 100644 --- a/servers/grpc/proto/solidarity-api-types.proto +++ b/servers/grpc/proto/solidarity-api-types.proto @@ -82,6 +82,10 @@ message BookingSolidarity { google.protobuf.Timestamp pickup_date = 12; } +message GetAllPassengers { + +} + message Car { string model = 1; string brand = 2; diff --git a/servers/grpc/proto/solidarity-api.pb.go b/servers/grpc/proto/solidarity-api.pb.go index f1c8263..f0659b4 100644 --- a/servers/grpc/proto/solidarity-api.pb.go +++ b/servers/grpc/proto/solidarity-api.pb.go @@ -7,6 +7,7 @@ package proto import ( + empty "github.com/golang/protobuf/ptypes/empty" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -767,6 +768,53 @@ func (x *DriverJourneysResponse) GetDriverJourneys() []*DriverJourney { return nil } +type GetAllPassengersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Passenger []*User `protobuf:"bytes,1,rep,name=passenger,proto3" json:"passenger,omitempty"` +} + +func (x *GetAllPassengersResponse) Reset() { + *x = GetAllPassengersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAllPassengersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAllPassengersResponse) ProtoMessage() {} + +func (x *GetAllPassengersResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[14] + 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 GetAllPassengersResponse.ProtoReflect.Descriptor instead. +func (*GetAllPassengersResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetAllPassengersResponse) GetPassenger() []*User { + if x != nil { + return x.Passenger + } + return nil +} + type GetBookingsByStatusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -778,7 +826,7 @@ type GetBookingsByStatusResponse struct { func (x *GetBookingsByStatusResponse) Reset() { *x = GetBookingsByStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_solidarity_api_proto_msgTypes[14] + mi := &file_solidarity_api_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -791,7 +839,7 @@ func (x *GetBookingsByStatusResponse) String() string { func (*GetBookingsByStatusResponse) ProtoMessage() {} func (x *GetBookingsByStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_solidarity_api_proto_msgTypes[14] + mi := &file_solidarity_api_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -804,7 +852,7 @@ func (x *GetBookingsByStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBookingsByStatusResponse.ProtoReflect.Descriptor instead. func (*GetBookingsByStatusResponse) Descriptor() ([]byte, []int) { - return file_solidarity_api_proto_rawDescGZIP(), []int{14} + return file_solidarity_api_proto_rawDescGZIP(), []int{15} } func (x *GetBookingsByStatusResponse) GetBooking() []*BookingSolidarity { @@ -820,157 +868,167 @@ var file_solidarity_api_proto_rawDesc = []byte{ 0x0a, 0x14, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, - 0x69, 0x74, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x14, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, - 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, - 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, - 0x12, 0x2e, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x22, 0xa3, 0x01, 0x0a, 0x1b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, - 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, - 0x52, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x1c, 0x44, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, - 0x0a, 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x4b, - 0x0a, 0x15, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x44, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x6b, 0x0a, 0x14, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, + 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x2e, 0x0a, + 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xa3, 0x01, + 0x0a, 0x1b, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, + 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x55, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, - 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, - 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x62, - 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x4f, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, - 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, - 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, - 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, - 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, - 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x55, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x69, 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x1c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, + 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x15, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x50, 0x75, 0x6e, + 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x15, 0x50, + 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x44, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3c, 0x0a, 0x1b, - 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x1c, 0x47, 0x65, - 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, - 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, - 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, - 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, - 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, - 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, - 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, - 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, - 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 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, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, - 0x72, 0x65, 0x44, 0x61, 0x74, 0x65, 0x22, 0x51, 0x0a, 0x16, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, - 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x37, 0x0a, 0x0f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, - 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, - 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x52, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, - 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x22, 0x4b, 0x0a, 0x1b, 0x47, 0x65, 0x74, - 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, - 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, - 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, 0x62, - 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x32, 0xcc, 0x05, 0x0a, 0x11, 0x53, 0x6f, 0x6c, 0x69, 0x64, - 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x1e, - 0x53, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1c, - 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, - 0x1f, 0x53, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, - 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, - 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, - 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5e, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, - 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, - 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, - 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, - 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, - 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, - 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x55, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, - 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, - 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x55, 0x0a, 0x1e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, + 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, + 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x22, 0x4f, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, 0x62, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, + 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x55, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6f, - 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, - 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, - 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, - 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 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, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3c, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, + 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x42, 0x6f, + 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, 0x62, 0x6f, + 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, + 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x82, + 0x01, 0x0a, 0x15, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x41, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, + 0x74, 0x65, 0x18, 0x02, 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, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, + 0x61, 0x74, 0x65, 0x22, 0x51, 0x0a, 0x16, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, + 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, + 0x0f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, + 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x52, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, + 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x22, 0x3f, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 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, + 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, + 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x07, 0x62, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x32, 0x95, 0x06, 0x0a, 0x11, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x1e, 0x53, 0x65, + 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x44, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, 0x44, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x1f, 0x53, + 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1d, + 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, + 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, + 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, + 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, + 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, + 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, + 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x53, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x44, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, + 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, + 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6c, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 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 ( @@ -985,7 +1043,7 @@ func file_solidarity_api_proto_rawDescGZIP() []byte { return file_solidarity_api_proto_rawDescData } -var file_solidarity_api_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_solidarity_api_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_solidarity_api_proto_goTypes = []interface{}{ (*PassengerTripRequest)(nil), // 0: PassengerTripRequest (*DriverRegularAvailabilities)(nil), // 1: DriverRegularAvailabilities @@ -1001,58 +1059,63 @@ var file_solidarity_api_proto_goTypes = []interface{}{ (*GetBookingsByStatusRequest)(nil), // 11: GetBookingsByStatusRequest (*DriverJourneysRequest)(nil), // 12: DriverJourneysRequest (*DriverJourneysResponse)(nil), // 13: DriverJourneysResponse - (*GetBookingsByStatusResponse)(nil), // 14: GetBookingsByStatusResponse - (*User)(nil), // 15: User - (*Preferences)(nil), // 16: Preferences - (*DriverRequest)(nil), // 17: DriverRequest - (*RegularAvailabilitySlot)(nil), // 18: RegularAvailabilitySlot - (*PunctualAvailabilitySlot)(nil), // 19: PunctualAvailabilitySlot - (*BookingSolidarityRequest)(nil), // 20: BookingSolidarityRequest - (*BookingSolidarity)(nil), // 21: BookingSolidarity - (BookingSolidarityStatus)(0), // 22: BookingSolidarityStatus - (UserType)(0), // 23: UserType - (*Feature)(nil), // 24: Feature - (*timestamp.Timestamp)(nil), // 25: google.protobuf.Timestamp - (*DriverJourney)(nil), // 26: DriverJourney + (*GetAllPassengersResponse)(nil), // 14: GetAllPassengersResponse + (*GetBookingsByStatusResponse)(nil), // 15: GetBookingsByStatusResponse + (*User)(nil), // 16: User + (*Preferences)(nil), // 17: Preferences + (*DriverRequest)(nil), // 18: DriverRequest + (*RegularAvailabilitySlot)(nil), // 19: RegularAvailabilitySlot + (*PunctualAvailabilitySlot)(nil), // 20: PunctualAvailabilitySlot + (*BookingSolidarityRequest)(nil), // 21: BookingSolidarityRequest + (*BookingSolidarity)(nil), // 22: BookingSolidarity + (BookingSolidarityStatus)(0), // 23: BookingSolidarityStatus + (UserType)(0), // 24: UserType + (*Feature)(nil), // 25: Feature + (*timestamp.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*DriverJourney)(nil), // 27: DriverJourney + (*empty.Empty)(nil), // 28: google.protobuf.Empty } var file_solidarity_api_proto_depIdxs = []int32{ - 15, // 0: PassengerTripRequest.passenger:type_name -> User - 16, // 1: PassengerTripRequest.preferences:type_name -> Preferences - 17, // 2: DriverRegularAvailabilities.driver_request:type_name -> DriverRequest - 18, // 3: DriverRegularAvailabilities.driver_availabilities:type_name -> RegularAvailabilitySlot - 17, // 4: DriverPunctualAvailabilities.driver_request:type_name -> DriverRequest - 19, // 5: DriverPunctualAvailabilities.driver_availabilities:type_name -> PunctualAvailabilitySlot - 20, // 6: CreateBookingSolidarityRequest.booking:type_name -> BookingSolidarityRequest - 21, // 7: CreateBookingSolidarityResponse.booking:type_name -> BookingSolidarity - 22, // 8: UpdateBookingSolidarityRequest.status:type_name -> BookingSolidarityStatus - 21, // 9: GetBookingSolidarityResponse.booking:type_name -> BookingSolidarity - 22, // 10: GetBookingsByStatusRequest.status:type_name -> BookingSolidarityStatus - 23, // 11: GetBookingsByStatusRequest.type:type_name -> UserType - 24, // 12: DriverJourneysRequest.departure:type_name -> Feature - 25, // 13: DriverJourneysRequest.departure_date:type_name -> google.protobuf.Timestamp - 26, // 14: DriverJourneysResponse.driver_journeys:type_name -> DriverJourney - 21, // 15: GetBookingsByStatusResponse.booking:type_name -> BookingSolidarity - 1, // 16: SolidarityService.SetDriverRegularAvailabilities:input_type -> DriverRegularAvailabilities - 2, // 17: SolidarityService.SetDriverPunctualAvailabilities:input_type -> DriverPunctualAvailabilities - 5, // 18: SolidarityService.CreateBookingSolidarity:input_type -> CreateBookingSolidarityRequest - 7, // 19: SolidarityService.UpdateBookingSolidarity:input_type -> UpdateBookingSolidarityRequest - 9, // 20: SolidarityService.GetBookingSolidarity:input_type -> GetBookingSolidarityRequest - 11, // 21: SolidarityService.GetBookingsByStatus:input_type -> GetBookingsByStatusRequest - 12, // 22: SolidarityService.DriverJourneys:input_type -> DriverJourneysRequest - 0, // 23: SolidarityService.SetPassengerTrip:input_type -> PassengerTripRequest - 4, // 24: SolidarityService.SetDriverRegularAvailabilities:output_type -> DriverAvailabilitiesResponse - 4, // 25: SolidarityService.SetDriverPunctualAvailabilities:output_type -> DriverAvailabilitiesResponse - 6, // 26: SolidarityService.CreateBookingSolidarity:output_type -> CreateBookingSolidarityResponse - 8, // 27: SolidarityService.UpdateBookingSolidarity:output_type -> UpdateBookingSolidarityResponse - 10, // 28: SolidarityService.GetBookingSolidarity:output_type -> GetBookingSolidarityResponse - 14, // 29: SolidarityService.GetBookingsByStatus:output_type -> GetBookingsByStatusResponse - 13, // 30: SolidarityService.DriverJourneys:output_type -> DriverJourneysResponse - 3, // 31: SolidarityService.SetPassengerTrip:output_type -> PassengerTripResponse - 24, // [24:32] is the sub-list for method output_type - 16, // [16:24] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 16, // 0: PassengerTripRequest.passenger:type_name -> User + 17, // 1: PassengerTripRequest.preferences:type_name -> Preferences + 18, // 2: DriverRegularAvailabilities.driver_request:type_name -> DriverRequest + 19, // 3: DriverRegularAvailabilities.driver_availabilities:type_name -> RegularAvailabilitySlot + 18, // 4: DriverPunctualAvailabilities.driver_request:type_name -> DriverRequest + 20, // 5: DriverPunctualAvailabilities.driver_availabilities:type_name -> PunctualAvailabilitySlot + 21, // 6: CreateBookingSolidarityRequest.booking:type_name -> BookingSolidarityRequest + 22, // 7: CreateBookingSolidarityResponse.booking:type_name -> BookingSolidarity + 23, // 8: UpdateBookingSolidarityRequest.status:type_name -> BookingSolidarityStatus + 22, // 9: GetBookingSolidarityResponse.booking:type_name -> BookingSolidarity + 23, // 10: GetBookingsByStatusRequest.status:type_name -> BookingSolidarityStatus + 24, // 11: GetBookingsByStatusRequest.type:type_name -> UserType + 25, // 12: DriverJourneysRequest.departure:type_name -> Feature + 26, // 13: DriverJourneysRequest.departure_date:type_name -> google.protobuf.Timestamp + 27, // 14: DriverJourneysResponse.driver_journeys:type_name -> DriverJourney + 16, // 15: GetAllPassengersResponse.passenger:type_name -> User + 22, // 16: GetBookingsByStatusResponse.booking:type_name -> BookingSolidarity + 1, // 17: SolidarityService.SetDriverRegularAvailabilities:input_type -> DriverRegularAvailabilities + 2, // 18: SolidarityService.SetDriverPunctualAvailabilities:input_type -> DriverPunctualAvailabilities + 5, // 19: SolidarityService.CreateBookingSolidarity:input_type -> CreateBookingSolidarityRequest + 7, // 20: SolidarityService.UpdateBookingSolidarity:input_type -> UpdateBookingSolidarityRequest + 9, // 21: SolidarityService.GetBookingSolidarity:input_type -> GetBookingSolidarityRequest + 11, // 22: SolidarityService.GetBookingsByStatus:input_type -> GetBookingsByStatusRequest + 12, // 23: SolidarityService.DriverJourneys:input_type -> DriverJourneysRequest + 28, // 24: SolidarityService.GetAllPassengers:input_type -> google.protobuf.Empty + 0, // 25: SolidarityService.SetPassengerTrip:input_type -> PassengerTripRequest + 4, // 26: SolidarityService.SetDriverRegularAvailabilities:output_type -> DriverAvailabilitiesResponse + 4, // 27: SolidarityService.SetDriverPunctualAvailabilities:output_type -> DriverAvailabilitiesResponse + 6, // 28: SolidarityService.CreateBookingSolidarity:output_type -> CreateBookingSolidarityResponse + 8, // 29: SolidarityService.UpdateBookingSolidarity:output_type -> UpdateBookingSolidarityResponse + 10, // 30: SolidarityService.GetBookingSolidarity:output_type -> GetBookingSolidarityResponse + 15, // 31: SolidarityService.GetBookingsByStatus:output_type -> GetBookingsByStatusResponse + 13, // 32: SolidarityService.DriverJourneys:output_type -> DriverJourneysResponse + 14, // 33: SolidarityService.GetAllPassengers:output_type -> GetAllPassengersResponse + 3, // 34: SolidarityService.SetPassengerTrip:output_type -> PassengerTripResponse + 26, // [26:35] is the sub-list for method output_type + 17, // [17:26] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_solidarity_api_proto_init() } @@ -1231,6 +1294,18 @@ func file_solidarity_api_proto_init() { } } file_solidarity_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAllPassengersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBookingsByStatusResponse); i { case 0: return &v.state @@ -1249,7 +1324,7 @@ func file_solidarity_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_solidarity_api_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/servers/grpc/proto/solidarity-api.proto b/servers/grpc/proto/solidarity-api.proto index efd40f1..75ec874 100644 --- a/servers/grpc/proto/solidarity-api.proto +++ b/servers/grpc/proto/solidarity-api.proto @@ -1,6 +1,7 @@ syntax = "proto3"; option go_package = "git.coopgo.io/coopgo-platform/solidarity-service/servers/grpc/proto"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/empty.proto"; import "solidarity-api-types.proto"; service SolidarityService { @@ -11,6 +12,7 @@ service SolidarityService { rpc GetBookingSolidarity(GetBookingSolidarityRequest) returns (GetBookingSolidarityResponse) {} rpc GetBookingsByStatus(GetBookingsByStatusRequest) returns (GetBookingsByStatusResponse) {} rpc DriverJourneys(DriverJourneysRequest) returns (DriverJourneysResponse) {} + rpc GetAllPassengers(google.protobuf.Empty) returns (GetAllPassengersResponse) {} rpc SetPassengerTrip(PassengerTripRequest) returns (PassengerTripResponse) {} } @@ -82,6 +84,10 @@ message DriverJourneysResponse { repeated DriverJourney driver_journeys = 1; } +message GetAllPassengersResponse { + repeated User passenger = 1; +} + message GetBookingsByStatusResponse{ repeated BookingSolidarity booking = 1; } \ No newline at end of file diff --git a/servers/grpc/proto/solidarity-api_grpc.pb.go b/servers/grpc/proto/solidarity-api_grpc.pb.go index 31c38e7..d7f4bbc 100644 --- a/servers/grpc/proto/solidarity-api_grpc.pb.go +++ b/servers/grpc/proto/solidarity-api_grpc.pb.go @@ -8,6 +8,7 @@ package proto import ( context "context" + empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -26,6 +27,7 @@ const ( SolidarityService_GetBookingSolidarity_FullMethodName = "/SolidarityService/GetBookingSolidarity" SolidarityService_GetBookingsByStatus_FullMethodName = "/SolidarityService/GetBookingsByStatus" SolidarityService_DriverJourneys_FullMethodName = "/SolidarityService/DriverJourneys" + SolidarityService_GetAllPassengers_FullMethodName = "/SolidarityService/GetAllPassengers" SolidarityService_SetPassengerTrip_FullMethodName = "/SolidarityService/SetPassengerTrip" ) @@ -40,6 +42,7 @@ type SolidarityServiceClient interface { GetBookingSolidarity(ctx context.Context, in *GetBookingSolidarityRequest, opts ...grpc.CallOption) (*GetBookingSolidarityResponse, error) GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error) DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error) + GetAllPassengers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetAllPassengersResponse, error) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) } @@ -121,6 +124,16 @@ func (c *solidarityServiceClient) DriverJourneys(ctx context.Context, in *Driver return out, nil } +func (c *solidarityServiceClient) GetAllPassengers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetAllPassengersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAllPassengersResponse) + err := c.cc.Invoke(ctx, SolidarityService_GetAllPassengers_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) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PassengerTripResponse) @@ -142,6 +155,7 @@ type SolidarityServiceServer interface { GetBookingSolidarity(context.Context, *GetBookingSolidarityRequest) (*GetBookingSolidarityResponse, error) GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error) DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error) + GetAllPassengers(context.Context, *empty.Empty) (*GetAllPassengersResponse, error) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) mustEmbedUnimplementedSolidarityServiceServer() } @@ -174,6 +188,9 @@ func (UnimplementedSolidarityServiceServer) GetBookingsByStatus(context.Context, func (UnimplementedSolidarityServiceServer) DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DriverJourneys not implemented") } +func (UnimplementedSolidarityServiceServer) GetAllPassengers(context.Context, *empty.Empty) (*GetAllPassengersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllPassengers not implemented") +} func (UnimplementedSolidarityServiceServer) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetPassengerTrip not implemented") } @@ -324,6 +341,24 @@ func _SolidarityService_DriverJourneys_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _SolidarityService_GetAllPassengers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).GetAllPassengers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_GetAllPassengers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).GetAllPassengers(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + func _SolidarityService_SetPassengerTrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PassengerTripRequest) if err := dec(in); err != nil { @@ -377,6 +412,10 @@ var SolidarityService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DriverJourneys", Handler: _SolidarityService_DriverJourneys_Handler, }, + { + MethodName: "GetAllPassengers", + Handler: _SolidarityService_GetAllPassengers_Handler, + }, { MethodName: "SetPassengerTrip", Handler: _SolidarityService_SetPassengerTrip_Handler, diff --git a/servers/grpc/server/services.go b/servers/grpc/server/services.go index ffc9ef0..dc8a9ce 100644 --- a/servers/grpc/server/services.go +++ b/servers/grpc/server/services.go @@ -3,15 +3,17 @@ package grpcserver import ( "context" "errors" - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/paulmach/orb" - "github.com/paulmach/orb/geojson" - "github.com/rs/zerolog/log" "solidarity-service/internal" "solidarity-service/servers/grpc/proto" "solidarity-service/utils" "strings" "sync" + + "github.com/golang/protobuf/ptypes/timestamp" + "github.com/paulmach/orb" + "github.com/paulmach/orb/geojson" + "github.com/rs/zerolog/log" + "google.golang.org/protobuf/types/known/emptypb" ) func (s *SolidarityServiceServerImpl) SetDriverRegularAvailabilities(ctx context.Context, req *proto.DriverRegularAvailabilities) (resp *proto.DriverAvailabilitiesResponse, err error) { @@ -20,6 +22,7 @@ func (s *SolidarityServiceServerImpl) SetDriverRegularAvailabilities(ctx context Success: false, }, errors.New("missing required fields") } + driver := internal.Driver{ Driver_departure_address: &geojson.Feature{ Type: "Feature", @@ -164,10 +167,54 @@ func (s *SolidarityServiceServerImpl) SetDriverPunctualAvailabilities(ctx contex }, nil } -func (s *SolidarityServiceServerImpl) CreateBooking(ctx context.Context, req *proto.CreateBookingSolidarityRequest) (resp *proto.CreateBookingSolidarityResponse, err error) { - if req.Booking.DriverId == "" || req.Booking.PassengerId == "" || req.Booking.Id == "" || req.Booking.Status.String() == "" || req.Booking.DepartureAddress == nil || req.Booking.DestinationAddress == nil || req.Booking.PickupDate.Seconds == 0 { - return nil, errors.New("missing required fields") +func (s *SolidarityServiceServerImpl) GetAllPassengers( ctx context.Context, _ *emptypb.Empty) (resp *proto.GetAllPassengersResponse, err error) { + passengers, err := s.Handler.GetAllPassengers(context.Background()) + resp = &proto.GetAllPassengersResponse{ + Passenger: []*proto.User{}, } + response := []*proto.User{} + for _, v := range passengers { + temp := &proto.User{ + Id: v.Passenger.ID, + Alias: v.Passenger.Alias, + FirstName: v.Passenger.FirstName, + LastName: v.Passenger.LastName, + Grade: v.Passenger.Grade, + Picture: v.Passenger.Picture, + Gender: v.Passenger.Gender, + VerifiedIdentity: v.Passenger.VerifiedIdentity, + } + response = append(response, temp) + } + resp.Passenger = response + return resp, nil +} + +func (s *SolidarityServiceServerImpl) CreateBookingSolidarity(ctx context.Context, req *proto.CreateBookingSolidarityRequest) (resp *proto.CreateBookingSolidarityResponse, err error) { + if req.Booking.DriverId == "" { + return nil, errors.New("missing required DriverId") + } + if req.Booking.DepartureAddress == nil { + return nil, errors.New("missing required DepartureAddress") + } + if req.Booking.DestinationAddress == nil { + return nil, errors.New("missing required DestinationAddress") + } + if req.Booking.PassengerId == "" { + return nil, errors.New("missing required PassengerId") + } + 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{ ID: req.Booking.Id, Passenger_id: req.Booking.PassengerId, @@ -254,7 +301,7 @@ func (s *SolidarityServiceServerImpl) CreateBooking(ctx context.Context, req *pr return resp, nil } -func (s *SolidarityServiceServerImpl) UpdateBooking(ctx context.Context, req *proto.UpdateBookingSolidarityRequest) (resp *proto.UpdateBookingSolidarityResponse, err error) { +func (s *SolidarityServiceServerImpl) UpdateBookingSolidarity(ctx context.Context, req *proto.UpdateBookingSolidarityRequest) (resp *proto.UpdateBookingSolidarityResponse, err error) { if req.BookingId == "" || req.Status.String() == "" { return &proto.UpdateBookingSolidarityResponse{ Success: false, @@ -275,7 +322,7 @@ func (s *SolidarityServiceServerImpl) UpdateBooking(ctx context.Context, req *pr }, nil } -func (s *SolidarityServiceServerImpl) GetBooking(ctx context.Context, req *proto.GetBookingSolidarityRequest) (resp *proto.GetBookingSolidarityResponse, err error) { +func (s *SolidarityServiceServerImpl) GetBookingSolidarity(ctx context.Context, req *proto.GetBookingSolidarityRequest) (resp *proto.GetBookingSolidarityResponse, err error) { if req.BookingId == "" { return nil, errors.New("empty booking ID") } diff --git a/solidarity-service b/solidarity-service new file mode 100755 index 0000000..14b20d0 Binary files /dev/null and b/solidarity-service differ diff --git a/storage/postgresql.go b/storage/postgresql.go index d2307fe..1807a04 100644 --- a/storage/postgresql.go +++ b/storage/postgresql.go @@ -179,6 +179,53 @@ func (s PostgresqlStorage) GetPassenger(passengerID string) (passenger internal. return passenger, nil } +func (s PostgresqlStorage) GetAllPassengers() (passengers []internal.Passenger, err error) { + var preferencesJSON []byte + rows, err := s.DbConnection.Query(fmt.Sprintf("SELECT alias, last_name, first_name, grade, picture, verified_identity, operator, preferences, passenger_id FROM %s ", s.Tables["passengers"])) + if err != nil { + return nil, err + } + defer rows.Close() + + for rows.Next() { + var passenger internal.Passenger + + if err := rows.Scan( + &passenger.Passenger.Alias, + &passenger.Passenger.LastName, + &passenger.Passenger.FirstName, + &passenger.Passenger.Grade, + &passenger.Passenger.Picture, + &passenger.Passenger.VerifiedIdentity, + &passenger.Passenger.Operator, + &preferencesJSON, + &passenger.Passenger.ID, + ); err != nil { + return nil, err + } + + passengers = append(passengers, passenger) + + } + + if err != nil { + errMsg := "Postgresql Storage GetPassenger Error querying data from the database" + log.Error().Err(err).Msg(errMsg) + return passengers, errors.New(errMsg + err.Error()) + } + + for i := range passengers { + err = json.Unmarshal(preferencesJSON, &passengers[i].Preferences) + if err != nil { + errMsg := "Postgresql Storage GetPassenger Error decoding Preferences from JSON" + log.Error().Err(err).Msg(errMsg) + return passengers, errors.New(errMsg + err.Error()) + } + } + + return passengers, nil +} + func (s PostgresqlStorage) CreateDriver(driver internal.Driver) (err error) { var availabilities []byte _, err = uuid.Parse(driver.Driver.ID) diff --git a/storage/postgresql/schema.hcl b/storage/postgresql/schema.hcl index f505702..d7069d8 100644 --- a/storage/postgresql/schema.hcl +++ b/storage/postgresql/schema.hcl @@ -161,7 +161,7 @@ table "bookings" { ref_columns = [table.passengers.column.passenger_id] } } -enum "booking_status" { +enum "bookingstatus" { schema = schema.solidarity_service values = ["INITIATED", "WAITING_PASSENGER_CONFIRMATION", "WAITING_DRIVER_CONFIRMATION", "CONFIRMED", "CANCELLED", "COMPLETED_PENDING_VALIDATION", "VALIDATED"] } diff --git a/storage/storage.go b/storage/storage.go index cbca33d..2efee73 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -10,6 +10,7 @@ import ( type Storage interface { CreatePassenger(passenger internal.Passenger) (err error) GetPassenger(passengerID string) (passenger internal.Passenger, err error) + GetAllPassengers() (passengers []internal.Passenger, err error) CreateDriver(driver internal.Driver) (err error) GetDriver(driverID string) (driver internal.Driver, err error) GetBooking(id string) (booking internal.Booking, err error)