github.com/lastbackend/toolkit@v0.0.0-20241020043710-cafa37b95aad/examples/gateway/gen/server/client/server.pb.toolkit.rpc.go (about) 1 // Code generated by protoc-gen-toolkit. DO NOT EDIT. 2 // source: github.com/lastbackend/toolkit/examples/gateway/apis/server.proto 3 4 package serverpb 5 6 import ( 7 context "context" 8 9 "github.com/lastbackend/toolkit/examples/helloworld/gen" 10 client "github.com/lastbackend/toolkit/pkg/client" 11 emptypb "google.golang.org/protobuf/types/known/emptypb" 12 ) 13 14 // Suppress "imported and not used" errors 15 var _ context.Context 16 var _ emptypb.Empty 17 18 // Client gRPC API for ProxyGateway service 19 func NewProxyGatewayRPCClient(service string, c client.GRPCClient) ProxyGatewayRPCClient { 20 return &proxygatewayGrpcRPCClient{service, c} 21 } 22 23 // Client gRPC API for ProxyGateway service 24 type ProxyGatewayRPCClient interface { 25 HelloWorld(ctx context.Context, req *servicepb.HelloRequest, opts ...client.GRPCCallOption) (*servicepb.HelloReply, error) 26 } 27 28 type proxygatewayGrpcRPCClient struct { 29 service string 30 cli client.GRPCClient 31 } 32 33 func (c *proxygatewayGrpcRPCClient) HelloWorld(ctx context.Context, req *servicepb.HelloRequest, opts ...client.GRPCCallOption) (*servicepb.HelloReply, error) { 34 resp := new(servicepb.HelloReply) 35 if err := c.cli.Call(ctx, c.service, ProxyGateway_HelloWorldMethod, req, resp, opts...); err != nil { 36 return nil, err 37 } 38 return resp, nil 39 } 40 41 func (proxygatewayGrpcRPCClient) mustEmbedUnimplementedProxyGatewayClient() {} 42 43 // Client methods for ProxyGateway service 44 const ( 45 ProxyGateway_HelloWorldMethod = "/gateway.ProxyGateway/HelloWorld" 46 )