initial commit
This commit is contained in:
110
servers/grpc/proto/solidarity-transport.proto
Normal file
110
servers/grpc/proto/solidarity-transport.proto
Normal file
@@ -0,0 +1,110 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "git.coopgo.io/coopgo-platform/solidarity-transport/servers/grpc/proto/gen";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "solidarity-transport-types.proto";
|
||||
|
||||
service SolidarityTransport {
|
||||
//Availabilities management
|
||||
rpc AddDriverRegularAvailability(AddDriverRegularAvailabilityRequest) returns (AddDriverRegularAvailabilityResponse) {}
|
||||
rpc AddDriverRegularAvailabilities(AddDriverRegularAvailabilitiesRequest) returns (AddDriverRegularAvailabilitiesResponse) {}
|
||||
rpc GetDriverRegularAvailabilities(GetDriverRegularAvailabilitiesRequest) returns (GetDriverRegularAvailabilitiesResponse) {}
|
||||
rpc DeleteDriverRegularAvailability(DeleteDriverRegularAvailabilityRequest) returns (DeleteDriverRegularAvailabilityResponse) {}
|
||||
|
||||
// Search / Journeys
|
||||
rpc GetDriverJourneys(GetDriverJourneysRequest) returns (GetDriverJourneysResponse) {}
|
||||
rpc GetDriverJourney(GetDriverJourneyRequest) returns (GetDriverJourneyResponse) {}
|
||||
|
||||
// Booking flows
|
||||
rpc BookDriverJourney(BookDriverJourneyRequest) returns (BookDriverJourneyResponse) {}
|
||||
rpc GetSolidarityTransportBookings(GetSolidarityTransportBookingsRequest) returns (GetSolidarityTransportBookingsResponse) {}
|
||||
rpc GetSolidarityTransportBooking(GetSolidarityTransportBookingRequest) returns (GetSolidarityTransportBookingResponse) {}
|
||||
rpc UpdateSolidarityTransportBookingStatus(UpdateSolidarityTransportBookingStatusRequest) returns (UpdateSolidarityTransportBookingStatusResponse) {}
|
||||
}
|
||||
|
||||
message AddDriverRegularAvailabilityRequest{
|
||||
string driver_id = 1;
|
||||
int32 day = 2;
|
||||
string start_time = 3;
|
||||
string end_time = 4;
|
||||
GeoJsonFeature address = 5;
|
||||
}
|
||||
|
||||
message AddDriverRegularAvailabilityResponse{}
|
||||
|
||||
message AddDriverRegularAvailabilitiesRequest{
|
||||
repeated DriverRegularAvailability availabilities = 1;
|
||||
}
|
||||
|
||||
message AddDriverRegularAvailabilitiesResponse{}
|
||||
|
||||
message GetDriverRegularAvailabilitiesRequest {
|
||||
string driver_id = 1;
|
||||
}
|
||||
|
||||
message GetDriverRegularAvailabilitiesResponse {
|
||||
repeated DriverRegularAvailability results = 1;
|
||||
}
|
||||
|
||||
message DeleteDriverRegularAvailabilityRequest {
|
||||
string driver_id = 1;
|
||||
string availability_id = 2;
|
||||
}
|
||||
|
||||
message DeleteDriverRegularAvailabilityResponse {}
|
||||
|
||||
// Search / Journeys
|
||||
|
||||
message GetDriverJourneysRequest {
|
||||
GeoJsonFeature departure = 1;
|
||||
GeoJsonFeature arrival = 3;
|
||||
google.protobuf.Timestamp departure_date = 5;
|
||||
optional int64 time_delta = 6;
|
||||
}
|
||||
|
||||
message GetDriverJourneysResponse {
|
||||
repeated SolidarityTransportDriverJourney driver_journeys = 1;
|
||||
}
|
||||
|
||||
message GetDriverJourneyRequest {
|
||||
string driver_id = 1;
|
||||
string journey_id = 2;
|
||||
}
|
||||
|
||||
message GetDriverJourneyResponse {
|
||||
SolidarityTransportDriverJourney driver_journey = 1;
|
||||
}
|
||||
|
||||
message BookDriverJourneyRequest {
|
||||
string passenger_id = 1;
|
||||
string driver_id = 2;
|
||||
string driver_journey_id = 3;
|
||||
}
|
||||
|
||||
message BookDriverJourneyResponse {
|
||||
}
|
||||
|
||||
message GetSolidarityTransportBookingsRequest {
|
||||
google.protobuf.Timestamp start_date = 1;
|
||||
google.protobuf.Timestamp end_date = 2;
|
||||
}
|
||||
|
||||
message GetSolidarityTransportBookingsResponse {
|
||||
repeated SolidarityTransportBooking bookings = 1;
|
||||
}
|
||||
|
||||
message GetSolidarityTransportBookingRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetSolidarityTransportBookingResponse {
|
||||
SolidarityTransportBooking booking = 1;
|
||||
}
|
||||
|
||||
message UpdateSolidarityTransportBookingStatusRequest {
|
||||
string booking_id = 1;
|
||||
string new_status = 2;
|
||||
}
|
||||
|
||||
message UpdateSolidarityTransportBookingStatusResponse {}
|
||||
Reference in New Issue
Block a user