mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
38 lines
740 B
Protocol Buffer
38 lines
740 B
Protocol Buffer
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;
|
|
}
|
|
|