Checking in cmd files | first attempt at linking up item service

This commit is contained in:
Brandon Watson
2023-08-13 19:26:45 -05:00
parent fd45b9e0f2
commit 98796d96fd
26 changed files with 1448 additions and 66 deletions

View File

@ -0,0 +1,27 @@
package main
import (
cli "crossnokaye-interview-assignment/services/item/gen/grpc/cli/item"
"fmt"
"os"
goa "goa.design/goa/v3/pkg"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
func doGRPC(scheme, host string, timeout int, debug bool) (goa.Endpoint, any, error) {
conn, err := grpc.Dial(host, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
fmt.Fprintf(os.Stderr, "could not connect to gRPC server at %s: %v\n", host, err)
}
return cli.ParseEndpoint(conn)
}
func grpcUsageCommands() string {
return cli.UsageCommands()
}
func grpcUsageExamples() string {
return cli.UsageExamples()
}