Updated proto files

This commit is contained in:
Andrew Scott 2022-07-26 01:06:17 -04:00
parent 1987c1725d
commit 7e8c8ec655
Signed by: a
GPG key ID: 3EB62D0BBB8DB381
3 changed files with 32 additions and 15 deletions

View file

@ -4,14 +4,13 @@ package weather;
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
import "location_types.proto";
message RequestCurrent {
oneof location {
string city = 1;
string zip_code = 2;
string coords = 3; // Comma separated coordinates, e.g. "44.5,-123.3"
}
optional string state = 4; // US Only
optional string country = 5; // Must be ISO 3166 country code
//LocationType location_type = 1; NOT IMPLEMENTED YET
string city = 1;
optional string state = 2; // US Only
optional string country = 3; // Must be ISO 3166 country code
}
message SendCurrent {

View file

@ -4,15 +4,14 @@ package weather;
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
import "location_types.proto";
message RequestExtended {
oneof location {
string city = 1;
string zip_code = 2;
string coords = 3; // Comma separated coordinates, e.g. "44.5,-123.3"
}
optional string state = 4; // US Only
optional string country = 5; // Must be ISO 3166 country code
uint32 days = 6;
LocationType location_type = 1;
string location = 2; // zip/postal code, city name, or comma separated coords "-81.2,40.5"
optional string state = 3; // US Only
optional string country = 4; // Must be ISO 3166 country code
uint32 days = 5;
}
message SendExtended {

View file

@ -0,0 +1,19 @@
syntax = "proto3";
package weather;
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
enum LocationType {
LOCATION_TYPE_UNSPECIFIED = 0;
LOCATION_CITY = 1;
LOCATION_ZIP = 2;
LOCATION_COORDS = 3;
/*
* NOT YET IMPLEMENTED
*
LOCATION_CITY_STATE = 4;
LOCATION_CITY_COUNTRY = 5;
LOCATION_ZIP_COUNTRY = 6;
*/
}