mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 15:05:01 +00:00
add timezone api
This commit is contained in:
37
timezone/proto/timezone.proto
Normal file
37
timezone/proto/timezone.proto
Normal 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user