add timezone api

This commit is contained in:
Asim Aslam
2021-06-21 16:02:16 +01:00
parent ff57a74669
commit 3929d8e5d1
14 changed files with 608 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
syntax = "proto3";
package timezone;
option go_package = "./proto;timezone";
service Timezone {
rpc Info(InfoRequest) returns (InfoResponse) {}
}
// Get the timezone info for a specific location
message InfoRequest {
// location to lookup e.g postcode, city, ip address
string location = 1;
}
message InfoResponse {
// location requested
string location = 1;
// region of timezone
string region = 2;
// country of the timezone
string country = 3;
// e.g 51.42
double latitude = 4;
// e.g -0.37
double longitude = 5;
// the timezone e.g Europe/London
string timezone = 6;
// the abbreviated code
string abbreviation = 7;
// the local time
string local_time = 8;
// is daylight savings
bool daylight_savings = 9;
}