You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
685 B
Protocol Buffer
30 lines
685 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package geoippb;
|
|
|
|
option go_package = "jochum.dev/jo-micro/geoip/proto/geoippb;geoippb";
|
|
|
|
service GeoIPService {
|
|
rpc Country(IpRequest) returns (CountryResponse) {}
|
|
rpc City(IpRequest) returns (CityResponse) {}
|
|
}
|
|
|
|
message IpRequest {
|
|
string ip = 1;
|
|
repeated string languages = 2; // Optional
|
|
string commaLanguages = 3; // Optional for url requests
|
|
}
|
|
|
|
message CountryResponse {
|
|
string isoCode = 1;
|
|
map<string,string> countryName = 2;
|
|
}
|
|
|
|
message CityResponse {
|
|
string isoCode = 1;
|
|
string timeZone = 2;
|
|
map<string,string> cityName = 3;
|
|
map<string,string> countryName = 4;
|
|
double latitude = 5;
|
|
double longitude = 6;
|
|
} |