mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-20 12:03:10 -05:00
Update module name
This commit is contained in:
parent
daff7e7cef
commit
f304672317
12 changed files with 15 additions and 15 deletions
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module codeberg.org/andcscott/OpenWeatherMap-gRPC-API
|
||||
module codeberg.org/andcscott/OpenWeather-gRPC-API
|
||||
|
||||
go 1.19
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package weather;
|
||||
|
||||
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
||||
option go_package = "codeberg.org/andcscott/OpenWeather-gRPC-API/proto";
|
||||
|
||||
// Sub-message for Coordinates
|
||||
message Coordinates {
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package weather;
|
||||
|
||||
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
||||
option go_package = "codeberg.org/andcscott/OpenWeather-gRPC-API/proto";
|
||||
|
||||
import "weather.proto";
|
||||
import "location.proto";
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package weather;
|
||||
|
||||
option go_package = "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto";
|
||||
option go_package = "codeberg.org/andcscott/OpenWeather-gRPC-API/proto";
|
||||
|
||||
import "location.proto";
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
)
|
||||
|
||||
// Receives a gRPC request for the current forecast
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"os"
|
||||
"strconv"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
"github.com/joho/godotenv"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
|
|
@ -4,17 +4,17 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
)
|
||||
|
||||
func doCurrent(c pb.WeatherServiceClient) {
|
||||
|
||||
res, err := c.Current(context.Background(), &pb.RequestCurrent{
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_ZIP_CODE,
|
||||
LocationType: pb.LocationType_LOCATION_TYPE_CITY,
|
||||
Units: pb.Units_UNITS_METRIC,
|
||||
Location: &pb.OneOfLocation{
|
||||
LocationId: &pb.OneOfLocation_ZipCode{
|
||||
ZipCode: "97330",
|
||||
LocationId: &pb.OneOfLocation_City{
|
||||
City: "Corvallis",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
)
|
||||
|
||||
func doFiveDay(c pb.WeatherServiceClient) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"log"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
)
|
||||
|
||||
func doLocation(c pb.WeatherServiceClient) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"log"
|
||||
|
||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||||
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue