* add the ip service

* update readme
This commit is contained in:
Asim Aslam
2021-06-02 16:13:11 +01:00
committed by GitHub
parent 7157db9aaa
commit 4b01ad59f2
15 changed files with 638 additions and 31 deletions

25
ip/proto/ip.proto Normal file
View File

@@ -0,0 +1,25 @@
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 {
string ip = 1;
}
message LookupResponse {
string ip = 1;
int64 asn = 2;
string city = 3;
string country = 4;
double latitude = 5;
double longitude = 6;
string timezone = 7;
}