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 UnannotatedEchoServiceClient interface {
25
26
27
28
29 Echo(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error)
30
31 EchoBody(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error)
32
33 EchoDelete(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error)
34 }
35
36 type unannotatedEchoServiceClient struct {
37 cc grpc.ClientConnInterface
38 }
39
40 func NewUnannotatedEchoServiceClient(cc grpc.ClientConnInterface) UnannotatedEchoServiceClient {
41 return &unannotatedEchoServiceClient{cc}
42 }
43
44 func (c *unannotatedEchoServiceClient) Echo(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error) {
45 out := new(UnannotatedSimpleMessage)
46 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", in, out, opts...)
47 if err != nil {
48 return nil, err
49 }
50 return out, nil
51 }
52
53 func (c *unannotatedEchoServiceClient) EchoBody(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error) {
54 out := new(UnannotatedSimpleMessage)
55 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", in, out, opts...)
56 if err != nil {
57 return nil, err
58 }
59 return out, nil
60 }
61
62 func (c *unannotatedEchoServiceClient) EchoDelete(ctx context.Context, in *UnannotatedSimpleMessage, opts ...grpc.CallOption) (*UnannotatedSimpleMessage, error) {
63 out := new(UnannotatedSimpleMessage)
64 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", in, out, opts...)
65 if err != nil {
66 return nil, err
67 }
68 return out, nil
69 }
70
71
72
73
74 type UnannotatedEchoServiceServer interface {
75
76
77
78
79 Echo(context.Context, *UnannotatedSimpleMessage) (*UnannotatedSimpleMessage, error)
80
81 EchoBody(context.Context, *UnannotatedSimpleMessage) (*UnannotatedSimpleMessage, error)
82
83 EchoDelete(context.Context, *UnannotatedSimpleMessage) (*UnannotatedSimpleMessage, error)
84 }
85
86
87 type UnimplementedUnannotatedEchoServiceServer struct {
88 }
89
90 func (UnimplementedUnannotatedEchoServiceServer) Echo(context.Context, *UnannotatedSimpleMessage) (*UnannotatedSimpleMessage, error) {
91 return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
92 }
93 func (UnimplementedUnannotatedEchoServiceServer) EchoBody(context.Context, *UnannotatedSimpleMessage) (*UnannotatedSimpleMessage, error) {
94 return nil, status.Errorf(codes.Unimplemented, "method EchoBody not implemented")
95 }
96 func (UnimplementedUnannotatedEchoServiceServer) EchoDelete(context.Context, *UnannotatedSimpleMessage) (*UnannotatedSimpleMessage, error) {
97 return nil, status.Errorf(codes.Unimplemented, "method EchoDelete not implemented")
98 }
99
100
101
102
103 type UnsafeUnannotatedEchoServiceServer interface {
104 mustEmbedUnimplementedUnannotatedEchoServiceServer()
105 }
106
107 func RegisterUnannotatedEchoServiceServer(s grpc.ServiceRegistrar, srv UnannotatedEchoServiceServer) {
108 s.RegisterService(&UnannotatedEchoService_ServiceDesc, srv)
109 }
110
111 func _UnannotatedEchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
112 in := new(UnannotatedSimpleMessage)
113 if err := dec(in); err != nil {
114 return nil, err
115 }
116 if interceptor == nil {
117 return srv.(UnannotatedEchoServiceServer).Echo(ctx, in)
118 }
119 info := &grpc.UnaryServerInfo{
120 Server: srv,
121 FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo",
122 }
123 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
124 return srv.(UnannotatedEchoServiceServer).Echo(ctx, req.(*UnannotatedSimpleMessage))
125 }
126 return interceptor(ctx, in, info, handler)
127 }
128
129 func _UnannotatedEchoService_EchoBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
130 in := new(UnannotatedSimpleMessage)
131 if err := dec(in); err != nil {
132 return nil, err
133 }
134 if interceptor == nil {
135 return srv.(UnannotatedEchoServiceServer).EchoBody(ctx, in)
136 }
137 info := &grpc.UnaryServerInfo{
138 Server: srv,
139 FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody",
140 }
141 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
142 return srv.(UnannotatedEchoServiceServer).EchoBody(ctx, req.(*UnannotatedSimpleMessage))
143 }
144 return interceptor(ctx, in, info, handler)
145 }
146
147 func _UnannotatedEchoService_EchoDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
148 in := new(UnannotatedSimpleMessage)
149 if err := dec(in); err != nil {
150 return nil, err
151 }
152 if interceptor == nil {
153 return srv.(UnannotatedEchoServiceServer).EchoDelete(ctx, in)
154 }
155 info := &grpc.UnaryServerInfo{
156 Server: srv,
157 FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete",
158 }
159 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
160 return srv.(UnannotatedEchoServiceServer).EchoDelete(ctx, req.(*UnannotatedSimpleMessage))
161 }
162 return interceptor(ctx, in, info, handler)
163 }
164
165
166
167
168 var UnannotatedEchoService_ServiceDesc = grpc.ServiceDesc{
169 ServiceName: "grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService",
170 HandlerType: (*UnannotatedEchoServiceServer)(nil),
171 Methods: []grpc.MethodDesc{
172 {
173 MethodName: "Echo",
174 Handler: _UnannotatedEchoService_Echo_Handler,
175 },
176 {
177 MethodName: "EchoBody",
178 Handler: _UnannotatedEchoService_EchoBody_Handler,
179 },
180 {
181 MethodName: "EchoDelete",
182 Handler: _UnannotatedEchoService_EchoDelete_Handler,
183 },
184 },
185 Streams: []grpc.StreamDesc{},
186 Metadata: "examples/internal/proto/examplepb/unannotated_echo_service.proto",
187 }
188
View as plain text