From 4296dbc43cc46cc8cb11186c0d87ce054d976b16 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Tue, 26 Jul 2022 15:05:21 -0400 Subject: [PATCH] Update proto files --- proto/location.proto | 22 ++++++++++++++++++++++ proto/{weather.proto => service.proto} | 6 ++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 proto/location.proto rename proto/{weather.proto => service.proto} (50%) diff --git a/proto/location.proto b/proto/location.proto new file mode 100644 index 0000000..fa2cd8b --- /dev/null +++ b/proto/location.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package weather; + +option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"; + +//import "location_types.proto"; +//import "units.proto" + +message RequestLocation { + //LocationType location_type = 1; NOT IMPLEMENTED YET + //Units units = 2; NOT IMPLEMENTED YET + string city = 1; + // optional string zip_code = 2; NOT IMPLEMENTED YET + // optional string state = 2; // US Only / NOT IMPLEMENTED YET + // optional string country = 3; // Must be an ISO 3166 code / NOT IMPLEMENTED YET +} + +message SendLocation { + float latitude = 1; + float longitude = 2; +} diff --git a/proto/weather.proto b/proto/service.proto similarity index 50% rename from proto/weather.proto rename to proto/service.proto index 22cd648..8cef041 100644 --- a/proto/weather.proto +++ b/proto/service.proto @@ -6,8 +6,10 @@ option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"; import "current.proto"; import "extended.proto"; +import "location.proto"; service WeatherService { - rpc Current(RequestCurrent) returns (SendCurrent); - rpc Extended(RequestExtended) returns (SendExtended); + rpc Current(RequestCurrent) returns (SendCurrent); + rpc Extended(RequestExtended) returns (SendExtended); + rpc Location(RequestLocation) returns (SendLocation); }