...
1
2
3
4
5
6
7 package examplepb
8
9 import (
10 context "context"
11 grpc "google.golang.org/grpc"
12 codes "google.golang.org/grpc/codes"
13 status "google.golang.org/grpc/status"
14 )
15
16
17
18
19 const _ = grpc.SupportPackageIsVersion7
20
21
22
23
24 type Foo2ServiceClient interface {
25
26
27
28
29 Foo2(ctx context.Context, in *Foo2Request, opts ...grpc.CallOption) (*Foo2Reply, error)
30 }
31
32 type foo2ServiceClient struct {
33 cc grpc.ClientConnInterface
34 }
35
36 func NewFoo2ServiceClient(cc grpc.ClientConnInterface) Foo2ServiceClient {
37 return &foo2ServiceClient{cc}
38 }
39
40 func (c *foo2ServiceClient) Foo2(ctx context.Context, in *Foo2Request, opts ...grpc.CallOption) (*Foo2Reply, error) {
41 out := new(Foo2Reply)
42 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.Foo2Service/Foo2", in, out, opts...)
43 if err != nil {
44 return nil, err
45 }
46 return out, nil
47 }
48
49
50
51
52 type Foo2ServiceServer interface {
53
54
55
56
57 Foo2(context.Context, *Foo2Request) (*Foo2Reply, error)
58 }
59
60
61 type UnimplementedFoo2ServiceServer struct {
62 }
63
64 func (UnimplementedFoo2ServiceServer) Foo2(context.Context, *Foo2Request) (*Foo2Reply, error) {
65 return nil, status.Errorf(codes.Unimplemented, "method Foo2 not implemented")
66 }
67
68
69
70
71 type UnsafeFoo2ServiceServer interface {
72 mustEmbedUnimplementedFoo2ServiceServer()
73 }
74
75 func RegisterFoo2ServiceServer(s grpc.ServiceRegistrar, srv Foo2ServiceServer) {
76 s.RegisterService(&Foo2Service_ServiceDesc, srv)
77 }
78
79 func _Foo2Service_Foo2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
80 in := new(Foo2Request)
81 if err := dec(in); err != nil {
82 return nil, err
83 }
84 if interceptor == nil {
85 return srv.(Foo2ServiceServer).Foo2(ctx, in)
86 }
87 info := &grpc.UnaryServerInfo{
88 Server: srv,
89 FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.Foo2Service/Foo2",
90 }
91 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
92 return srv.(Foo2ServiceServer).Foo2(ctx, req.(*Foo2Request))
93 }
94 return interceptor(ctx, in, info, handler)
95 }
96
97
98
99
100 var Foo2Service_ServiceDesc = grpc.ServiceDesc{
101 ServiceName: "grpc.gateway.examples.internal.proto.examplepb.Foo2Service",
102 HandlerType: (*Foo2ServiceServer)(nil),
103 Methods: []grpc.MethodDesc{
104 {
105 MethodName: "Foo2",
106 Handler: _Foo2Service_Foo2_Handler,
107 },
108 },
109 Streams: []grpc.StreamDesc{},
110 Metadata: "examples/internal/proto/examplepb/remove_internal_comment.proto",
111 }
112
View as plain text