Files
services/ip/proto/ip.proto
2021-06-02 16:31:08 +01:00

34 lines
639 B
Protocol Buffer

syntax = "proto3";
package ip;
option go_package = "./proto;ip";
service Ip {
rpc Lookup(LookupRequest) returns (LookupResponse) {}
}
// Lookup the geolocation information for an IP address
message LookupRequest {
// IP to lookup. If not specified we assume the caller.
string ip = 1;
}
message LookupResponse {
// IP of the query
string ip = 1;
// Autonomous system number
int64 asn = 2;
// Name of the city
string city = 3;
// Name of the country
string country = 4;
// Latitude e.g 52.523219
double latitude = 5;
// Longitude e.g 13.428555
double longitude = 6;
// Timezone e.g Europe/Rome
string timezone = 7;
}