mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
49 lines
755 B
Protocol Buffer
49 lines
755 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package location;
|
|
|
|
service Location {
|
|
rpc Read(ReadRequest) returns (ReadResponse) {}
|
|
rpc Save(SaveRequest) returns (SaveResponse) {}
|
|
rpc Search(SearchRequest) returns (SearchResponse) {}
|
|
}
|
|
|
|
|
|
message Point {
|
|
double latitude = 1;
|
|
double longitude = 2;
|
|
int64 timestamp = 3;
|
|
}
|
|
|
|
message Entity {
|
|
string id = 1;
|
|
string type = 2;
|
|
Point location = 3;
|
|
}
|
|
|
|
message ReadRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message ReadResponse {
|
|
Entity entity = 1;
|
|
}
|
|
|
|
message SaveRequest {
|
|
Entity entity = 1;
|
|
}
|
|
|
|
message SaveResponse {
|
|
}
|
|
|
|
message SearchRequest {
|
|
Point center = 1;
|
|
double radius = 2; // in meters
|
|
string type = 3;
|
|
int64 numEntities = 4;
|
|
}
|
|
|
|
message SearchResponse {
|
|
repeated Entity entities = 1;
|
|
}
|