2022-07-26 01:07:26 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
2024-06-19 12:51:47 -04:00
|
|
|
pb "codeberg.org/andyscott/OpenWeather-gRPC-API/proto"
|
2022-07-26 01:07:26 -04:00
|
|
|
"google.golang.org/grpc"
|
|
|
|
"google.golang.org/grpc/credentials/insecure"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
conn, err := grpc.Dial("localhost:5000", grpc.WithTransportCredentials(insecure.NewCredentials()))
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalln(err)
|
|
|
|
}
|
|
|
|
defer conn.Close()
|
|
|
|
|
|
|
|
c := pb.NewWeatherServiceClient(conn)
|
|
|
|
|
2022-09-02 22:52:40 -04:00
|
|
|
doCurrent(c)
|
2022-09-01 22:51:36 -04:00
|
|
|
//doFiveDay(c)
|
2022-09-02 22:52:40 -04:00
|
|
|
//doLocation(c)
|
2022-07-26 01:07:26 -04:00
|
|
|
}
|