micro-tests/client/http/proto/github_grpc.pb.go
Vasiliy Tolstov 48558b66ff update tests for http client
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-19 04:15:57 +03:00

91 lines
2.8 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// GithubClient is the client API for Github service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type GithubClient interface {
LookupUser(ctx context.Context, in *LookupUserReq, opts ...grpc.CallOption) (*LookupUserRsp, error)
}
type githubClient struct {
cc grpc.ClientConnInterface
}
func NewGithubClient(cc grpc.ClientConnInterface) GithubClient {
return &githubClient{cc}
}
func (c *githubClient) LookupUser(ctx context.Context, in *LookupUserReq, opts ...grpc.CallOption) (*LookupUserRsp, error) {
out := new(LookupUserRsp)
err := c.cc.Invoke(ctx, "/github.Github/LookupUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GithubServer is the server API for Github service.
// All implementations must embed UnimplementedGithubServer
// for forward compatibility
type GithubServer interface {
LookupUser(context.Context, *LookupUserReq) (*LookupUserRsp, error)
mustEmbedUnimplementedGithubServer()
}
// UnimplementedGithubServer must be embedded to have forward compatible implementations.
type UnimplementedGithubServer struct {
}
func (*UnimplementedGithubServer) LookupUser(context.Context, *LookupUserReq) (*LookupUserRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method LookupUser not implemented")
}
func (*UnimplementedGithubServer) mustEmbedUnimplementedGithubServer() {}
func RegisterGithubServer(s *grpc.Server, srv GithubServer) {
s.RegisterService(&_Github_serviceDesc, srv)
}
func _Github_LookupUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LookupUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GithubServer).LookupUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/github.Github/LookupUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GithubServer).LookupUser(ctx, req.(*LookupUserReq))
}
return interceptor(ctx, in, info, handler)
}
var _Github_serviceDesc = grpc.ServiceDesc{
ServiceName: "github.Github",
HandlerType: (*GithubServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LookupUser",
Handler: _Github_LookupUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.proto",
}