mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-12-21 12:13:09 -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
|
go 1.19
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
||||||
|
|
||||||
package weather;
|
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
|
// Sub-message for Coordinates
|
||||||
message Coordinates {
|
message Coordinates {
|
||||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
||||||
|
|
||||||
package weather;
|
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 "weather.proto";
|
||||||
import "location.proto";
|
import "location.proto";
|
||||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
||||||
|
|
||||||
package weather;
|
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";
|
import "location.proto";
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"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
|
// Receives a gRPC request for the current forecast
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"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/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"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/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,17 +4,17 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func doCurrent(c pb.WeatherServiceClient) {
|
func doCurrent(c pb.WeatherServiceClient) {
|
||||||
|
|
||||||
res, err := c.Current(context.Background(), &pb.RequestCurrent{
|
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,
|
Units: pb.Units_UNITS_METRIC,
|
||||||
Location: &pb.OneOfLocation{
|
Location: &pb.OneOfLocation{
|
||||||
LocationId: &pb.OneOfLocation_ZipCode{
|
LocationId: &pb.OneOfLocation_City{
|
||||||
ZipCode: "97330",
|
City: "Corvallis",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func doFiveDay(c pb.WeatherServiceClient) {
|
func doFiveDay(c pb.WeatherServiceClient) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func doLocation(c pb.WeatherServiceClient) {
|
func doLocation(c pb.WeatherServiceClient) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"log"
|
"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"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue