1
2
3
4 package examplepb
5
6 import (
7 context "context"
8 fmt "fmt"
9 proto "github.com/golang/protobuf/proto"
10 _ "google.golang.org/genproto/googleapis/api/annotations"
11 grpc "google.golang.org/grpc"
12 codes "google.golang.org/grpc/codes"
13 status "google.golang.org/grpc/status"
14 math "math"
15 )
16
17
18 var _ = proto.Marshal
19 var _ = fmt.Errorf
20 var _ = math.Inf
21
22
23
24
25
26 const _ = proto.ProtoPackageIsVersion3
27
28 type EmptyProto struct {
29 XXX_NoUnkeyedLiteral struct{} `json:"-"`
30 XXX_unrecognized []byte `json:"-"`
31 XXX_sizecache int32 `json:"-"`
32 }
33
34 func (m *EmptyProto) Reset() { *m = EmptyProto{} }
35 func (m *EmptyProto) String() string { return proto.CompactTextString(m) }
36 func (*EmptyProto) ProtoMessage() {}
37 func (*EmptyProto) Descriptor() ([]byte, []int) {
38 return fileDescriptor_005d0d82a8c98d3c, []int{0}
39 }
40
41 func (m *EmptyProto) XXX_Unmarshal(b []byte) error {
42 return xxx_messageInfo_EmptyProto.Unmarshal(m, b)
43 }
44 func (m *EmptyProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
45 return xxx_messageInfo_EmptyProto.Marshal(b, m, deterministic)
46 }
47 func (m *EmptyProto) XXX_Merge(src proto.Message) {
48 xxx_messageInfo_EmptyProto.Merge(m, src)
49 }
50 func (m *EmptyProto) XXX_Size() int {
51 return xxx_messageInfo_EmptyProto.Size(m)
52 }
53 func (m *EmptyProto) XXX_DiscardUnknown() {
54 xxx_messageInfo_EmptyProto.DiscardUnknown(m)
55 }
56
57 var xxx_messageInfo_EmptyProto proto.InternalMessageInfo
58
59 type NonEmptyProto struct {
60 A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
61 B string `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"`
62 C string `protobuf:"bytes,3,opt,name=c,proto3" json:"c,omitempty"`
63 XXX_NoUnkeyedLiteral struct{} `json:"-"`
64 XXX_unrecognized []byte `json:"-"`
65 XXX_sizecache int32 `json:"-"`
66 }
67
68 func (m *NonEmptyProto) Reset() { *m = NonEmptyProto{} }
69 func (m *NonEmptyProto) String() string { return proto.CompactTextString(m) }
70 func (*NonEmptyProto) ProtoMessage() {}
71 func (*NonEmptyProto) Descriptor() ([]byte, []int) {
72 return fileDescriptor_005d0d82a8c98d3c, []int{1}
73 }
74
75 func (m *NonEmptyProto) XXX_Unmarshal(b []byte) error {
76 return xxx_messageInfo_NonEmptyProto.Unmarshal(m, b)
77 }
78 func (m *NonEmptyProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
79 return xxx_messageInfo_NonEmptyProto.Marshal(b, m, deterministic)
80 }
81 func (m *NonEmptyProto) XXX_Merge(src proto.Message) {
82 xxx_messageInfo_NonEmptyProto.Merge(m, src)
83 }
84 func (m *NonEmptyProto) XXX_Size() int {
85 return xxx_messageInfo_NonEmptyProto.Size(m)
86 }
87 func (m *NonEmptyProto) XXX_DiscardUnknown() {
88 xxx_messageInfo_NonEmptyProto.DiscardUnknown(m)
89 }
90
91 var xxx_messageInfo_NonEmptyProto proto.InternalMessageInfo
92
93 func (m *NonEmptyProto) GetA() string {
94 if m != nil {
95 return m.A
96 }
97 return ""
98 }
99
100 func (m *NonEmptyProto) GetB() string {
101 if m != nil {
102 return m.B
103 }
104 return ""
105 }
106
107 func (m *NonEmptyProto) GetC() string {
108 if m != nil {
109 return m.C
110 }
111 return ""
112 }
113
114 type UnaryProto struct {
115 Str string `protobuf:"bytes,1,opt,name=str,proto3" json:"str,omitempty"`
116 XXX_NoUnkeyedLiteral struct{} `json:"-"`
117 XXX_unrecognized []byte `json:"-"`
118 XXX_sizecache int32 `json:"-"`
119 }
120
121 func (m *UnaryProto) Reset() { *m = UnaryProto{} }
122 func (m *UnaryProto) String() string { return proto.CompactTextString(m) }
123 func (*UnaryProto) ProtoMessage() {}
124 func (*UnaryProto) Descriptor() ([]byte, []int) {
125 return fileDescriptor_005d0d82a8c98d3c, []int{2}
126 }
127
128 func (m *UnaryProto) XXX_Unmarshal(b []byte) error {
129 return xxx_messageInfo_UnaryProto.Unmarshal(m, b)
130 }
131 func (m *UnaryProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
132 return xxx_messageInfo_UnaryProto.Marshal(b, m, deterministic)
133 }
134 func (m *UnaryProto) XXX_Merge(src proto.Message) {
135 xxx_messageInfo_UnaryProto.Merge(m, src)
136 }
137 func (m *UnaryProto) XXX_Size() int {
138 return xxx_messageInfo_UnaryProto.Size(m)
139 }
140 func (m *UnaryProto) XXX_DiscardUnknown() {
141 xxx_messageInfo_UnaryProto.DiscardUnknown(m)
142 }
143
144 var xxx_messageInfo_UnaryProto proto.InternalMessageInfo
145
146 func (m *UnaryProto) GetStr() string {
147 if m != nil {
148 return m.Str
149 }
150 return ""
151 }
152
153 type NestedProto struct {
154 A *UnaryProto `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
155 B string `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"`
156 C string `protobuf:"bytes,3,opt,name=c,proto3" json:"c,omitempty"`
157 XXX_NoUnkeyedLiteral struct{} `json:"-"`
158 XXX_unrecognized []byte `json:"-"`
159 XXX_sizecache int32 `json:"-"`
160 }
161
162 func (m *NestedProto) Reset() { *m = NestedProto{} }
163 func (m *NestedProto) String() string { return proto.CompactTextString(m) }
164 func (*NestedProto) ProtoMessage() {}
165 func (*NestedProto) Descriptor() ([]byte, []int) {
166 return fileDescriptor_005d0d82a8c98d3c, []int{3}
167 }
168
169 func (m *NestedProto) XXX_Unmarshal(b []byte) error {
170 return xxx_messageInfo_NestedProto.Unmarshal(m, b)
171 }
172 func (m *NestedProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
173 return xxx_messageInfo_NestedProto.Marshal(b, m, deterministic)
174 }
175 func (m *NestedProto) XXX_Merge(src proto.Message) {
176 xxx_messageInfo_NestedProto.Merge(m, src)
177 }
178 func (m *NestedProto) XXX_Size() int {
179 return xxx_messageInfo_NestedProto.Size(m)
180 }
181 func (m *NestedProto) XXX_DiscardUnknown() {
182 xxx_messageInfo_NestedProto.DiscardUnknown(m)
183 }
184
185 var xxx_messageInfo_NestedProto proto.InternalMessageInfo
186
187 func (m *NestedProto) GetA() *UnaryProto {
188 if m != nil {
189 return m.A
190 }
191 return nil
192 }
193
194 func (m *NestedProto) GetB() string {
195 if m != nil {
196 return m.B
197 }
198 return ""
199 }
200
201 func (m *NestedProto) GetC() string {
202 if m != nil {
203 return m.C
204 }
205 return ""
206 }
207
208 type SingleNestedProto struct {
209 A *UnaryProto `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
210 XXX_NoUnkeyedLiteral struct{} `json:"-"`
211 XXX_unrecognized []byte `json:"-"`
212 XXX_sizecache int32 `json:"-"`
213 }
214
215 func (m *SingleNestedProto) Reset() { *m = SingleNestedProto{} }
216 func (m *SingleNestedProto) String() string { return proto.CompactTextString(m) }
217 func (*SingleNestedProto) ProtoMessage() {}
218 func (*SingleNestedProto) Descriptor() ([]byte, []int) {
219 return fileDescriptor_005d0d82a8c98d3c, []int{4}
220 }
221
222 func (m *SingleNestedProto) XXX_Unmarshal(b []byte) error {
223 return xxx_messageInfo_SingleNestedProto.Unmarshal(m, b)
224 }
225 func (m *SingleNestedProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
226 return xxx_messageInfo_SingleNestedProto.Marshal(b, m, deterministic)
227 }
228 func (m *SingleNestedProto) XXX_Merge(src proto.Message) {
229 xxx_messageInfo_SingleNestedProto.Merge(m, src)
230 }
231 func (m *SingleNestedProto) XXX_Size() int {
232 return xxx_messageInfo_SingleNestedProto.Size(m)
233 }
234 func (m *SingleNestedProto) XXX_DiscardUnknown() {
235 xxx_messageInfo_SingleNestedProto.DiscardUnknown(m)
236 }
237
238 var xxx_messageInfo_SingleNestedProto proto.InternalMessageInfo
239
240 func (m *SingleNestedProto) GetA() *UnaryProto {
241 if m != nil {
242 return m.A
243 }
244 return nil
245 }
246
247 func init() {
248 proto.RegisterType((*EmptyProto)(nil), "grpc.gateway.examples.internal.examplepb.EmptyProto")
249 proto.RegisterType((*NonEmptyProto)(nil), "grpc.gateway.examples.internal.examplepb.NonEmptyProto")
250 proto.RegisterType((*UnaryProto)(nil), "grpc.gateway.examples.internal.examplepb.UnaryProto")
251 proto.RegisterType((*NestedProto)(nil), "grpc.gateway.examples.internal.examplepb.NestedProto")
252 proto.RegisterType((*SingleNestedProto)(nil), "grpc.gateway.examples.internal.examplepb.SingleNestedProto")
253 }
254
255 func init() {
256 proto.RegisterFile("examples/internal/proto/examplepb/flow_combination.proto", fileDescriptor_005d0d82a8c98d3c)
257 }
258
259 var fileDescriptor_005d0d82a8c98d3c = []byte{
260
261 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x96, 0x4f, 0x8b, 0x13, 0x3f,
262 0x18, 0xc7, 0x49, 0x17, 0x7e, 0xb0, 0xe9, 0xee, 0xfe, 0xda, 0xa9, 0xd4, 0xb6, 0x5b, 0xf7, 0x4f,
263 0x5c, 0xb0, 0x08, 0x4e, 0xca, 0xaa, 0xa8, 0xf5, 0x56, 0xd1, 0xe3, 0xb2, 0x74, 0x11, 0x61, 0x2e,
264 0x92, 0x49, 0xc7, 0xb6, 0x30, 0x9d, 0x64, 0x67, 0x22, 0x75, 0x29, 0x3d, 0xe8, 0x3b, 0x10, 0x4f,
265 0x1e, 0x7d, 0x09, 0x1e, 0xf5, 0x22, 0xbe, 0x02, 0x0f, 0x82, 0xe0, 0xdd, 0xbb, 0xaf, 0x40, 0x90,
266 0xc9, 0x64, 0x26, 0x1d, 0x6d, 0x6d, 0xb7, 0x4a, 0x7b, 0x6b, 0x92, 0xe7, 0x79, 0xe6, 0x93, 0xef,
267 0xf3, 0x7d, 0x42, 0xe1, 0x6d, 0xe7, 0x19, 0xe9, 0x73, 0xd7, 0x09, 0x70, 0xcf, 0x13, 0x8e, 0xef,
268 0x11, 0x17, 0x73, 0x9f, 0x09, 0x86, 0xd5, 0x3e, 0xb7, 0xf1, 0x13, 0x97, 0x0d, 0x1e, 0x53, 0xd6,
269 0xb7, 0x7b, 0x1e, 0x11, 0x3d, 0xe6, 0x99, 0x32, 0xc0, 0xa8, 0x75, 0x7c, 0x4e, 0xcd, 0x0e, 0x11,
270 0xce, 0x80, 0x9c, 0x99, 0x71, 0x19, 0x33, 0x2e, 0x63, 0x26, 0x05, 0x2a, 0xd5, 0x0e, 0x63, 0x1d,
271 0xd7, 0xc1, 0x84, 0xf7, 0x30, 0xf1, 0x3c, 0x26, 0x64, 0x99, 0x20, 0xaa, 0x83, 0x36, 0x20, 0xbc,
272 0xdf, 0xe7, 0xe2, 0xec, 0x58, 0xae, 0xee, 0xc0, 0xcd, 0x23, 0xe6, 0xe9, 0x0d, 0x63, 0x03, 0x02,
273 0x52, 0x02, 0x7b, 0xa0, 0xb6, 0xde, 0x02, 0x24, 0x5c, 0xd9, 0xa5, 0x4c, 0xb4, 0xb2, 0xc3, 0x15,
274 0x2d, 0xad, 0x45, 0x2b, 0x8a, 0x76, 0x20, 0x7c, 0xe8, 0x11, 0x5f, 0xe5, 0xe5, 0xe0, 0x5a, 0x20,
275 0x7c, 0x95, 0x19, 0xfe, 0x44, 0x7d, 0x98, 0x3d, 0x72, 0x02, 0xe1, 0xb4, 0xa3, 0x80, 0x66, 0x5c,
276 0x38, 0x7b, 0x78, 0xc3, 0x9c, 0xf7, 0x2e, 0xa6, 0xfe, 0xc2, 0x2c, 0x9c, 0x47, 0x30, 0x7f, 0xd2,
277 0xf3, 0x3a, 0xae, 0xf3, 0x8f, 0x3f, 0x7a, 0xf8, 0x3c, 0x0f, 0xff, 0x7f, 0xe0, 0xb2, 0xc1, 0x3d,
278 0xdd, 0x12, 0xe3, 0x25, 0x80, 0xd9, 0x16, 0xa7, 0x52, 0xb7, 0x16, 0xa7, 0xc6, 0x39, 0x8a, 0x6b,
279 0xad, 0x2b, 0x0b, 0x65, 0xa1, 0xe2, 0x8b, 0xcf, 0xdf, 0x5e, 0x65, 0x72, 0x68, 0x0b, 0xfb, 0x9c,
280 0x62, 0x27, 0x3c, 0x08, 0x7f, 0x19, 0xaf, 0x01, 0xdc, 0x8a, 0x99, 0x4e, 0x84, 0xef, 0x90, 0xfe,
281 0x52, 0xb1, 0xca, 0x12, 0xab, 0x80, 0xf2, 0x63, 0x58, 0x81, 0xc4, 0xa8, 0x03, 0xc9, 0x16, 0x31,
282 0xad, 0x44, 0x32, 0xcd, 0x16, 0x11, 0x69, 0xd5, 0x6a, 0xc0, 0x78, 0x03, 0x60, 0x7e, 0x8c, 0x6d,
283 0x05, 0xd2, 0x55, 0x25, 0x5e, 0x11, 0x5d, 0x48, 0xe3, 0x45, 0x8b, 0x1a, 0xa8, 0x03, 0xe3, 0x43,
284 0x06, 0xc2, 0x16, 0xa7, 0x4d, 0xd6, 0x96, 0xda, 0xdd, 0x9a, 0xff, 0x33, 0xa9, 0xe9, 0x5e, 0x90,
285 0xef, 0x23, 0x90, 0x80, 0xef, 0x01, 0xda, 0x94, 0xcd, 0xb5, 0x59, 0x5b, 0x8a, 0xd7, 0x00, 0x57,
286 0xad, 0x6d, 0x54, 0x96, 0x7b, 0x9c, 0x88, 0x2e, 0x1e, 0x92, 0x11, 0x1e, 0xda, 0x23, 0x3c, 0xa4,
287 0xa3, 0x70, 0xd3, 0x8a, 0x4d, 0x7a, 0xfa, 0xd4, 0xf1, 0x65, 0x86, 0xb5, 0x8b, 0x2a, 0xba, 0x44,
288 0x2a, 0x47, 0xd6, 0xa3, 0x56, 0x09, 0x15, 0x74, 0x40, 0x92, 0x17, 0x9e, 0xec, 0xa3, 0xea, 0x84,
289 0xd4, 0x54, 0x48, 0x19, 0x5d, 0x4c, 0xc3, 0x24, 0xa7, 0xc6, 0x5b, 0x00, 0x8b, 0x2d, 0x4e, 0x8f,
290 0x89, 0xe8, 0x8e, 0x3f, 0x13, 0xa1, 0x9a, 0x77, 0xe7, 0x17, 0xe5, 0xb7, 0x17, 0x66, 0x41, 0x45,
291 0x0f, 0xa4, 0xa0, 0x3b, 0xea, 0x46, 0x21, 0xee, 0x35, 0x4f, 0x16, 0xc5, 0x43, 0x62, 0x06, 0xc2,
292 0x97, 0x72, 0x18, 0xdf, 0x01, 0xcc, 0x29, 0x66, 0x4d, 0x7b, 0xf3, 0x1c, 0xbd, 0xff, 0x6b, 0x4e,
293 0x4f, 0x72, 0x76, 0xd1, 0xde, 0x54, 0xce, 0xb1, 0xd6, 0xcd, 0xb8, 0x4e, 0xd2, 0xc0, 0x29, 0xe7,
294 0x0d, 0x40, 0x8d, 0xaf, 0x19, 0xb8, 0xa9, 0x7c, 0xae, 0xe6, 0x70, 0xc9, 0x56, 0xff, 0x12, 0x59,
295 0xfd, 0x13, 0x40, 0x39, 0x6d, 0xb6, 0x68, 0x10, 0x43, 0xb7, 0x8f, 0x5f, 0x31, 0xe5, 0xf6, 0x28,
296 0xc4, 0x8a, 0x9f, 0xbf, 0xc8, 0x77, 0x6a, 0x13, 0xa1, 0x4b, 0x53, 0x3c, 0x1f, 0x17, 0xa6, 0xd6,
297 0x36, 0x2a, 0xfe, 0x6a, 0x7b, 0x7d, 0x78, 0x80, 0x76, 0xa7, 0x3a, 0x5f, 0x47, 0x55, 0xd5, 0x68,
298 0x4d, 0x0c, 0xa8, 0x03, 0xe3, 0x1d, 0x80, 0xe5, 0x09, 0x13, 0xa0, 0x74, 0x5e, 0xc1, 0x10, 0x5c,
299 0x91, 0x52, 0xef, 0xab, 0xcb, 0x4d, 0x72, 0x45, 0xc2, 0xfe, 0x03, 0xc0, 0x42, 0x6a, 0x12, 0x14,
300 0xf5, 0x52, 0x87, 0x61, 0x20, 0x79, 0x4f, 0xd1, 0xe5, 0x3f, 0x0e, 0x83, 0x6e, 0xc8, 0xec, 0x9b,
301 0x25, 0x9d, 0x9d, 0x1e, 0xd2, 0x00, 0xb4, 0x0e, 0x9a, 0x59, 0x6b, 0x3d, 0x41, 0xb2, 0xff, 0x93,
302 0x7f, 0xe4, 0xae, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x96, 0x5c, 0xd1, 0x4c, 0x0a, 0x00,
303 0x00,
304 }
305
306
307 var _ context.Context
308 var _ grpc.ClientConnInterface
309
310
311
312 const _ = grpc.SupportPackageIsVersion6
313
314
315
316
317 type FlowCombinationClient interface {
318 RpcEmptyRpc(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (*EmptyProto, error)
319 RpcEmptyStream(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcEmptyStreamClient, error)
320 StreamEmptyRpc(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyRpcClient, error)
321 StreamEmptyStream(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyStreamClient, error)
322 RpcBodyRpc(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (*EmptyProto, error)
323 RpcPathSingleNestedRpc(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (*EmptyProto, error)
324 RpcPathNestedRpc(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (*EmptyProto, error)
325 RpcBodyStream(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcBodyStreamClient, error)
326 RpcPathSingleNestedStream(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathSingleNestedStreamClient, error)
327 RpcPathNestedStream(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathNestedStreamClient, error)
328 }
329
330 type flowCombinationClient struct {
331 cc grpc.ClientConnInterface
332 }
333
334 func NewFlowCombinationClient(cc grpc.ClientConnInterface) FlowCombinationClient {
335 return &flowCombinationClient{cc}
336 }
337
338 func (c *flowCombinationClient) RpcEmptyRpc(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (*EmptyProto, error) {
339 out := new(EmptyProto)
340 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcEmptyRpc", in, out, opts...)
341 if err != nil {
342 return nil, err
343 }
344 return out, nil
345 }
346
347 func (c *flowCombinationClient) RpcEmptyStream(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcEmptyStreamClient, error) {
348 stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[0], "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcEmptyStream", opts...)
349 if err != nil {
350 return nil, err
351 }
352 x := &flowCombinationRpcEmptyStreamClient{stream}
353 if err := x.ClientStream.SendMsg(in); err != nil {
354 return nil, err
355 }
356 if err := x.ClientStream.CloseSend(); err != nil {
357 return nil, err
358 }
359 return x, nil
360 }
361
362 type FlowCombination_RpcEmptyStreamClient interface {
363 Recv() (*EmptyProto, error)
364 grpc.ClientStream
365 }
366
367 type flowCombinationRpcEmptyStreamClient struct {
368 grpc.ClientStream
369 }
370
371 func (x *flowCombinationRpcEmptyStreamClient) Recv() (*EmptyProto, error) {
372 m := new(EmptyProto)
373 if err := x.ClientStream.RecvMsg(m); err != nil {
374 return nil, err
375 }
376 return m, nil
377 }
378
379 func (c *flowCombinationClient) StreamEmptyRpc(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyRpcClient, error) {
380 stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[1], "/grpc.gateway.examples.internal.examplepb.FlowCombination/StreamEmptyRpc", opts...)
381 if err != nil {
382 return nil, err
383 }
384 x := &flowCombinationStreamEmptyRpcClient{stream}
385 return x, nil
386 }
387
388 type FlowCombination_StreamEmptyRpcClient interface {
389 Send(*EmptyProto) error
390 CloseAndRecv() (*EmptyProto, error)
391 grpc.ClientStream
392 }
393
394 type flowCombinationStreamEmptyRpcClient struct {
395 grpc.ClientStream
396 }
397
398 func (x *flowCombinationStreamEmptyRpcClient) Send(m *EmptyProto) error {
399 return x.ClientStream.SendMsg(m)
400 }
401
402 func (x *flowCombinationStreamEmptyRpcClient) CloseAndRecv() (*EmptyProto, error) {
403 if err := x.ClientStream.CloseSend(); err != nil {
404 return nil, err
405 }
406 m := new(EmptyProto)
407 if err := x.ClientStream.RecvMsg(m); err != nil {
408 return nil, err
409 }
410 return m, nil
411 }
412
413 func (c *flowCombinationClient) StreamEmptyStream(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyStreamClient, error) {
414 stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[2], "/grpc.gateway.examples.internal.examplepb.FlowCombination/StreamEmptyStream", opts...)
415 if err != nil {
416 return nil, err
417 }
418 x := &flowCombinationStreamEmptyStreamClient{stream}
419 return x, nil
420 }
421
422 type FlowCombination_StreamEmptyStreamClient interface {
423 Send(*EmptyProto) error
424 Recv() (*EmptyProto, error)
425 grpc.ClientStream
426 }
427
428 type flowCombinationStreamEmptyStreamClient struct {
429 grpc.ClientStream
430 }
431
432 func (x *flowCombinationStreamEmptyStreamClient) Send(m *EmptyProto) error {
433 return x.ClientStream.SendMsg(m)
434 }
435
436 func (x *flowCombinationStreamEmptyStreamClient) Recv() (*EmptyProto, error) {
437 m := new(EmptyProto)
438 if err := x.ClientStream.RecvMsg(m); err != nil {
439 return nil, err
440 }
441 return m, nil
442 }
443
444 func (c *flowCombinationClient) RpcBodyRpc(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (*EmptyProto, error) {
445 out := new(EmptyProto)
446 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcBodyRpc", in, out, opts...)
447 if err != nil {
448 return nil, err
449 }
450 return out, nil
451 }
452
453 func (c *flowCombinationClient) RpcPathSingleNestedRpc(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (*EmptyProto, error) {
454 out := new(EmptyProto)
455 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcPathSingleNestedRpc", in, out, opts...)
456 if err != nil {
457 return nil, err
458 }
459 return out, nil
460 }
461
462 func (c *flowCombinationClient) RpcPathNestedRpc(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (*EmptyProto, error) {
463 out := new(EmptyProto)
464 err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcPathNestedRpc", in, out, opts...)
465 if err != nil {
466 return nil, err
467 }
468 return out, nil
469 }
470
471 func (c *flowCombinationClient) RpcBodyStream(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcBodyStreamClient, error) {
472 stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[3], "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcBodyStream", opts...)
473 if err != nil {
474 return nil, err
475 }
476 x := &flowCombinationRpcBodyStreamClient{stream}
477 if err := x.ClientStream.SendMsg(in); err != nil {
478 return nil, err
479 }
480 if err := x.ClientStream.CloseSend(); err != nil {
481 return nil, err
482 }
483 return x, nil
484 }
485
486 type FlowCombination_RpcBodyStreamClient interface {
487 Recv() (*EmptyProto, error)
488 grpc.ClientStream
489 }
490
491 type flowCombinationRpcBodyStreamClient struct {
492 grpc.ClientStream
493 }
494
495 func (x *flowCombinationRpcBodyStreamClient) Recv() (*EmptyProto, error) {
496 m := new(EmptyProto)
497 if err := x.ClientStream.RecvMsg(m); err != nil {
498 return nil, err
499 }
500 return m, nil
501 }
502
503 func (c *flowCombinationClient) RpcPathSingleNestedStream(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathSingleNestedStreamClient, error) {
504 stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[4], "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcPathSingleNestedStream", opts...)
505 if err != nil {
506 return nil, err
507 }
508 x := &flowCombinationRpcPathSingleNestedStreamClient{stream}
509 if err := x.ClientStream.SendMsg(in); err != nil {
510 return nil, err
511 }
512 if err := x.ClientStream.CloseSend(); err != nil {
513 return nil, err
514 }
515 return x, nil
516 }
517
518 type FlowCombination_RpcPathSingleNestedStreamClient interface {
519 Recv() (*EmptyProto, error)
520 grpc.ClientStream
521 }
522
523 type flowCombinationRpcPathSingleNestedStreamClient struct {
524 grpc.ClientStream
525 }
526
527 func (x *flowCombinationRpcPathSingleNestedStreamClient) Recv() (*EmptyProto, error) {
528 m := new(EmptyProto)
529 if err := x.ClientStream.RecvMsg(m); err != nil {
530 return nil, err
531 }
532 return m, nil
533 }
534
535 func (c *flowCombinationClient) RpcPathNestedStream(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathNestedStreamClient, error) {
536 stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[5], "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcPathNestedStream", opts...)
537 if err != nil {
538 return nil, err
539 }
540 x := &flowCombinationRpcPathNestedStreamClient{stream}
541 if err := x.ClientStream.SendMsg(in); err != nil {
542 return nil, err
543 }
544 if err := x.ClientStream.CloseSend(); err != nil {
545 return nil, err
546 }
547 return x, nil
548 }
549
550 type FlowCombination_RpcPathNestedStreamClient interface {
551 Recv() (*EmptyProto, error)
552 grpc.ClientStream
553 }
554
555 type flowCombinationRpcPathNestedStreamClient struct {
556 grpc.ClientStream
557 }
558
559 func (x *flowCombinationRpcPathNestedStreamClient) Recv() (*EmptyProto, error) {
560 m := new(EmptyProto)
561 if err := x.ClientStream.RecvMsg(m); err != nil {
562 return nil, err
563 }
564 return m, nil
565 }
566
567
568 type FlowCombinationServer interface {
569 RpcEmptyRpc(context.Context, *EmptyProto) (*EmptyProto, error)
570 RpcEmptyStream(*EmptyProto, FlowCombination_RpcEmptyStreamServer) error
571 StreamEmptyRpc(FlowCombination_StreamEmptyRpcServer) error
572 StreamEmptyStream(FlowCombination_StreamEmptyStreamServer) error
573 RpcBodyRpc(context.Context, *NonEmptyProto) (*EmptyProto, error)
574 RpcPathSingleNestedRpc(context.Context, *SingleNestedProto) (*EmptyProto, error)
575 RpcPathNestedRpc(context.Context, *NestedProto) (*EmptyProto, error)
576 RpcBodyStream(*NonEmptyProto, FlowCombination_RpcBodyStreamServer) error
577 RpcPathSingleNestedStream(*SingleNestedProto, FlowCombination_RpcPathSingleNestedStreamServer) error
578 RpcPathNestedStream(*NestedProto, FlowCombination_RpcPathNestedStreamServer) error
579 }
580
581
582 type UnimplementedFlowCombinationServer struct {
583 }
584
585 func (*UnimplementedFlowCombinationServer) RpcEmptyRpc(ctx context.Context, req *EmptyProto) (*EmptyProto, error) {
586 return nil, status.Errorf(codes.Unimplemented, "method RpcEmptyRpc not implemented")
587 }
588 func (*UnimplementedFlowCombinationServer) RpcEmptyStream(req *EmptyProto, srv FlowCombination_RpcEmptyStreamServer) error {
589 return status.Errorf(codes.Unimplemented, "method RpcEmptyStream not implemented")
590 }
591 func (*UnimplementedFlowCombinationServer) StreamEmptyRpc(srv FlowCombination_StreamEmptyRpcServer) error {
592 return status.Errorf(codes.Unimplemented, "method StreamEmptyRpc not implemented")
593 }
594 func (*UnimplementedFlowCombinationServer) StreamEmptyStream(srv FlowCombination_StreamEmptyStreamServer) error {
595 return status.Errorf(codes.Unimplemented, "method StreamEmptyStream not implemented")
596 }
597 func (*UnimplementedFlowCombinationServer) RpcBodyRpc(ctx context.Context, req *NonEmptyProto) (*EmptyProto, error) {
598 return nil, status.Errorf(codes.Unimplemented, "method RpcBodyRpc not implemented")
599 }
600 func (*UnimplementedFlowCombinationServer) RpcPathSingleNestedRpc(ctx context.Context, req *SingleNestedProto) (*EmptyProto, error) {
601 return nil, status.Errorf(codes.Unimplemented, "method RpcPathSingleNestedRpc not implemented")
602 }
603 func (*UnimplementedFlowCombinationServer) RpcPathNestedRpc(ctx context.Context, req *NestedProto) (*EmptyProto, error) {
604 return nil, status.Errorf(codes.Unimplemented, "method RpcPathNestedRpc not implemented")
605 }
606 func (*UnimplementedFlowCombinationServer) RpcBodyStream(req *NonEmptyProto, srv FlowCombination_RpcBodyStreamServer) error {
607 return status.Errorf(codes.Unimplemented, "method RpcBodyStream not implemented")
608 }
609 func (*UnimplementedFlowCombinationServer) RpcPathSingleNestedStream(req *SingleNestedProto, srv FlowCombination_RpcPathSingleNestedStreamServer) error {
610 return status.Errorf(codes.Unimplemented, "method RpcPathSingleNestedStream not implemented")
611 }
612 func (*UnimplementedFlowCombinationServer) RpcPathNestedStream(req *NestedProto, srv FlowCombination_RpcPathNestedStreamServer) error {
613 return status.Errorf(codes.Unimplemented, "method RpcPathNestedStream not implemented")
614 }
615
616 func RegisterFlowCombinationServer(s *grpc.Server, srv FlowCombinationServer) {
617 s.RegisterService(&_FlowCombination_serviceDesc, srv)
618 }
619
620 func _FlowCombination_RpcEmptyRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
621 in := new(EmptyProto)
622 if err := dec(in); err != nil {
623 return nil, err
624 }
625 if interceptor == nil {
626 return srv.(FlowCombinationServer).RpcEmptyRpc(ctx, in)
627 }
628 info := &grpc.UnaryServerInfo{
629 Server: srv,
630 FullMethod: "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcEmptyRpc",
631 }
632 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
633 return srv.(FlowCombinationServer).RpcEmptyRpc(ctx, req.(*EmptyProto))
634 }
635 return interceptor(ctx, in, info, handler)
636 }
637
638 func _FlowCombination_RpcEmptyStream_Handler(srv interface{}, stream grpc.ServerStream) error {
639 m := new(EmptyProto)
640 if err := stream.RecvMsg(m); err != nil {
641 return err
642 }
643 return srv.(FlowCombinationServer).RpcEmptyStream(m, &flowCombinationRpcEmptyStreamServer{stream})
644 }
645
646 type FlowCombination_RpcEmptyStreamServer interface {
647 Send(*EmptyProto) error
648 grpc.ServerStream
649 }
650
651 type flowCombinationRpcEmptyStreamServer struct {
652 grpc.ServerStream
653 }
654
655 func (x *flowCombinationRpcEmptyStreamServer) Send(m *EmptyProto) error {
656 return x.ServerStream.SendMsg(m)
657 }
658
659 func _FlowCombination_StreamEmptyRpc_Handler(srv interface{}, stream grpc.ServerStream) error {
660 return srv.(FlowCombinationServer).StreamEmptyRpc(&flowCombinationStreamEmptyRpcServer{stream})
661 }
662
663 type FlowCombination_StreamEmptyRpcServer interface {
664 SendAndClose(*EmptyProto) error
665 Recv() (*EmptyProto, error)
666 grpc.ServerStream
667 }
668
669 type flowCombinationStreamEmptyRpcServer struct {
670 grpc.ServerStream
671 }
672
673 func (x *flowCombinationStreamEmptyRpcServer) SendAndClose(m *EmptyProto) error {
674 return x.ServerStream.SendMsg(m)
675 }
676
677 func (x *flowCombinationStreamEmptyRpcServer) Recv() (*EmptyProto, error) {
678 m := new(EmptyProto)
679 if err := x.ServerStream.RecvMsg(m); err != nil {
680 return nil, err
681 }
682 return m, nil
683 }
684
685 func _FlowCombination_StreamEmptyStream_Handler(srv interface{}, stream grpc.ServerStream) error {
686 return srv.(FlowCombinationServer).StreamEmptyStream(&flowCombinationStreamEmptyStreamServer{stream})
687 }
688
689 type FlowCombination_StreamEmptyStreamServer interface {
690 Send(*EmptyProto) error
691 Recv() (*EmptyProto, error)
692 grpc.ServerStream
693 }
694
695 type flowCombinationStreamEmptyStreamServer struct {
696 grpc.ServerStream
697 }
698
699 func (x *flowCombinationStreamEmptyStreamServer) Send(m *EmptyProto) error {
700 return x.ServerStream.SendMsg(m)
701 }
702
703 func (x *flowCombinationStreamEmptyStreamServer) Recv() (*EmptyProto, error) {
704 m := new(EmptyProto)
705 if err := x.ServerStream.RecvMsg(m); err != nil {
706 return nil, err
707 }
708 return m, nil
709 }
710
711 func _FlowCombination_RpcBodyRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
712 in := new(NonEmptyProto)
713 if err := dec(in); err != nil {
714 return nil, err
715 }
716 if interceptor == nil {
717 return srv.(FlowCombinationServer).RpcBodyRpc(ctx, in)
718 }
719 info := &grpc.UnaryServerInfo{
720 Server: srv,
721 FullMethod: "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcBodyRpc",
722 }
723 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
724 return srv.(FlowCombinationServer).RpcBodyRpc(ctx, req.(*NonEmptyProto))
725 }
726 return interceptor(ctx, in, info, handler)
727 }
728
729 func _FlowCombination_RpcPathSingleNestedRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
730 in := new(SingleNestedProto)
731 if err := dec(in); err != nil {
732 return nil, err
733 }
734 if interceptor == nil {
735 return srv.(FlowCombinationServer).RpcPathSingleNestedRpc(ctx, in)
736 }
737 info := &grpc.UnaryServerInfo{
738 Server: srv,
739 FullMethod: "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcPathSingleNestedRpc",
740 }
741 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
742 return srv.(FlowCombinationServer).RpcPathSingleNestedRpc(ctx, req.(*SingleNestedProto))
743 }
744 return interceptor(ctx, in, info, handler)
745 }
746
747 func _FlowCombination_RpcPathNestedRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
748 in := new(NestedProto)
749 if err := dec(in); err != nil {
750 return nil, err
751 }
752 if interceptor == nil {
753 return srv.(FlowCombinationServer).RpcPathNestedRpc(ctx, in)
754 }
755 info := &grpc.UnaryServerInfo{
756 Server: srv,
757 FullMethod: "/grpc.gateway.examples.internal.examplepb.FlowCombination/RpcPathNestedRpc",
758 }
759 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
760 return srv.(FlowCombinationServer).RpcPathNestedRpc(ctx, req.(*NestedProto))
761 }
762 return interceptor(ctx, in, info, handler)
763 }
764
765 func _FlowCombination_RpcBodyStream_Handler(srv interface{}, stream grpc.ServerStream) error {
766 m := new(NonEmptyProto)
767 if err := stream.RecvMsg(m); err != nil {
768 return err
769 }
770 return srv.(FlowCombinationServer).RpcBodyStream(m, &flowCombinationRpcBodyStreamServer{stream})
771 }
772
773 type FlowCombination_RpcBodyStreamServer interface {
774 Send(*EmptyProto) error
775 grpc.ServerStream
776 }
777
778 type flowCombinationRpcBodyStreamServer struct {
779 grpc.ServerStream
780 }
781
782 func (x *flowCombinationRpcBodyStreamServer) Send(m *EmptyProto) error {
783 return x.ServerStream.SendMsg(m)
784 }
785
786 func _FlowCombination_RpcPathSingleNestedStream_Handler(srv interface{}, stream grpc.ServerStream) error {
787 m := new(SingleNestedProto)
788 if err := stream.RecvMsg(m); err != nil {
789 return err
790 }
791 return srv.(FlowCombinationServer).RpcPathSingleNestedStream(m, &flowCombinationRpcPathSingleNestedStreamServer{stream})
792 }
793
794 type FlowCombination_RpcPathSingleNestedStreamServer interface {
795 Send(*EmptyProto) error
796 grpc.ServerStream
797 }
798
799 type flowCombinationRpcPathSingleNestedStreamServer struct {
800 grpc.ServerStream
801 }
802
803 func (x *flowCombinationRpcPathSingleNestedStreamServer) Send(m *EmptyProto) error {
804 return x.ServerStream.SendMsg(m)
805 }
806
807 func _FlowCombination_RpcPathNestedStream_Handler(srv interface{}, stream grpc.ServerStream) error {
808 m := new(NestedProto)
809 if err := stream.RecvMsg(m); err != nil {
810 return err
811 }
812 return srv.(FlowCombinationServer).RpcPathNestedStream(m, &flowCombinationRpcPathNestedStreamServer{stream})
813 }
814
815 type FlowCombination_RpcPathNestedStreamServer interface {
816 Send(*EmptyProto) error
817 grpc.ServerStream
818 }
819
820 type flowCombinationRpcPathNestedStreamServer struct {
821 grpc.ServerStream
822 }
823
824 func (x *flowCombinationRpcPathNestedStreamServer) Send(m *EmptyProto) error {
825 return x.ServerStream.SendMsg(m)
826 }
827
828 var _FlowCombination_serviceDesc = grpc.ServiceDesc{
829 ServiceName: "grpc.gateway.examples.internal.examplepb.FlowCombination",
830 HandlerType: (*FlowCombinationServer)(nil),
831 Methods: []grpc.MethodDesc{
832 {
833 MethodName: "RpcEmptyRpc",
834 Handler: _FlowCombination_RpcEmptyRpc_Handler,
835 },
836 {
837 MethodName: "RpcBodyRpc",
838 Handler: _FlowCombination_RpcBodyRpc_Handler,
839 },
840 {
841 MethodName: "RpcPathSingleNestedRpc",
842 Handler: _FlowCombination_RpcPathSingleNestedRpc_Handler,
843 },
844 {
845 MethodName: "RpcPathNestedRpc",
846 Handler: _FlowCombination_RpcPathNestedRpc_Handler,
847 },
848 },
849 Streams: []grpc.StreamDesc{
850 {
851 StreamName: "RpcEmptyStream",
852 Handler: _FlowCombination_RpcEmptyStream_Handler,
853 ServerStreams: true,
854 },
855 {
856 StreamName: "StreamEmptyRpc",
857 Handler: _FlowCombination_StreamEmptyRpc_Handler,
858 ClientStreams: true,
859 },
860 {
861 StreamName: "StreamEmptyStream",
862 Handler: _FlowCombination_StreamEmptyStream_Handler,
863 ServerStreams: true,
864 ClientStreams: true,
865 },
866 {
867 StreamName: "RpcBodyStream",
868 Handler: _FlowCombination_RpcBodyStream_Handler,
869 ServerStreams: true,
870 },
871 {
872 StreamName: "RpcPathSingleNestedStream",
873 Handler: _FlowCombination_RpcPathSingleNestedStream_Handler,
874 ServerStreams: true,
875 },
876 {
877 StreamName: "RpcPathNestedStream",
878 Handler: _FlowCombination_RpcPathNestedStream_Handler,
879 ServerStreams: true,
880 },
881 },
882 Metadata: "examples/internal/proto/examplepb/flow_combination.proto",
883 }
884
View as plain text