mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
29 lines
666 B
Protocol Buffer
29 lines
666 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package geocoding;
|
|
option go_package = "./proto;geocoding";
|
|
|
|
import "google/protobuf/wrappers.proto";
|
|
|
|
service Geocoding {
|
|
// Geocode an address, the result will be the normalized address which contains coordinates
|
|
rpc Geocode(Address) returns (Address) {};
|
|
// Reverse geocode coordinates to an address
|
|
rpc Reverse(Coordinates) returns (Address) {};
|
|
}
|
|
|
|
message Address {
|
|
string line_one = 1;
|
|
string line_two = 2;
|
|
string city = 3;
|
|
string country = 4;
|
|
string postcode = 5;
|
|
double latitude = 6;
|
|
double longitude = 7;
|
|
}
|
|
|
|
message Coordinates {
|
|
google.protobuf.DoubleValue latitude = 1;
|
|
google.protobuf.DoubleValue longitude = 2;
|
|
}
|