Initial commit
This commit is contained in:
111
grpcapi/fleets.proto
Normal file
111
grpcapi/fleets.proto
Normal file
@@ -0,0 +1,111 @@
|
||||
//COOPGO Groups Management gRPC service definition
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "git.coopgo.io/coopgo-platform/fleets/grpcapi";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "vehicles.proto";
|
||||
|
||||
|
||||
service Fleets {
|
||||
// Vehicles management
|
||||
rpc AddVehicle(AddVehicleRequest) returns (AddVehicleResponse) {}
|
||||
rpc GetVehicle(GetVehicleRequest) returns (GetVehicleResponse) {}
|
||||
rpc GetVehicles(GetVehiclesRequest) returns (GetVehiclesResponse) {}
|
||||
rpc UpdateVehicle(UpdateVehicleRequest) returns (UpdateVehicleResponse) {}
|
||||
|
||||
//Bookings
|
||||
rpc CreateBooking(CreateBookingRequest) returns (CreateBookingResponse) {}
|
||||
rpc GetBooking(GetBookingRequest) returns (GetBookingResponse) {}
|
||||
rpc UpdateBooking(UpdateBookingRequest) returns (UpdateBookingResponse) {}
|
||||
rpc DeleteBooking(DeleteBookingRequest) returns (DeleteBookingResponse) {}
|
||||
|
||||
|
||||
//Search / Availabilities
|
||||
rpc FindVehicle(FindVehicleRequest) returns (FindVehicleResponse) {}
|
||||
}
|
||||
|
||||
message AddVehicleRequest {
|
||||
Vehicle vehicle = 1;
|
||||
}
|
||||
|
||||
message AddVehicleResponse {
|
||||
Vehicle vehicle = 2;
|
||||
}
|
||||
|
||||
message GetVehicleRequest {
|
||||
string vehicleid = 3;
|
||||
}
|
||||
|
||||
message GetVehicleResponse {
|
||||
Vehicle vehicle = 4;
|
||||
}
|
||||
|
||||
message GetVehiclesRequest {
|
||||
repeated string namespaces = 5;
|
||||
}
|
||||
|
||||
message GetVehiclesResponse {
|
||||
repeated Vehicle vehicles = 6;
|
||||
}
|
||||
|
||||
message GetVehiclesBatchRequest {
|
||||
repeated string vehiclesids = 7;
|
||||
}
|
||||
|
||||
message GetVehiclesBatchResponse {
|
||||
repeated Vehicle vehicles = 8;
|
||||
}
|
||||
|
||||
message UpdateVehicleRequest {
|
||||
Vehicle vehicle = 9;
|
||||
}
|
||||
|
||||
message UpdateVehicleResponse {
|
||||
Vehicle vehicle = 10;
|
||||
}
|
||||
|
||||
message CreateBookingRequest {
|
||||
Booking booking = 11;
|
||||
}
|
||||
|
||||
message CreateBookingResponse {
|
||||
Booking booking = 12;
|
||||
}
|
||||
|
||||
message UpdateBookingRequest {
|
||||
Booking booking = 13;
|
||||
}
|
||||
|
||||
message UpdateBookingResponse {
|
||||
Booking booking = 14;
|
||||
}
|
||||
|
||||
message DeleteBookingRequest {
|
||||
string id = 15;
|
||||
}
|
||||
|
||||
message DeleteBookingResponse {
|
||||
bool ok = 16;
|
||||
}
|
||||
|
||||
message FindVehicleRequest {
|
||||
string namespace = 17;
|
||||
google.protobuf.Timestamp startdate = 18;
|
||||
google.protobuf.Timestamp enddate = 19;
|
||||
double lat = 20;
|
||||
double lon = 21;
|
||||
}
|
||||
|
||||
message FindVehicleResponse {
|
||||
repeated Vehicle vehicles = 22;
|
||||
}
|
||||
|
||||
message GetBookingRequest {
|
||||
string bookingid = 23;
|
||||
}
|
||||
|
||||
message GetBookingResponse {
|
||||
Booking booking = 24;
|
||||
}
|
||||
Reference in New Issue
Block a user