igsr5-portfolio-proto 0.0.12 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f3fa2a47d41366f70758825dfbe66918b28601d2265b1a98c8e2962a9dc370f
4
- data.tar.gz: 39d1dff77a0f1003dd87a33dee32a7f6335e882ba43036db6e9c950084b726d1
3
+ metadata.gz: 1df1e9558cffb0c5ad3a65dd37d6a8ae6325e067efcba6e8a6f1036f2f97ac75
4
+ data.tar.gz: 8f9c4c897597117c8003fc691af799f45071214ea740db3218cc1ae8f619b918
5
5
  SHA512:
6
- metadata.gz: 03ec16091fe60278d36769ae7ab230efa2cfb0710f991c907eb3fceec7eba8ffa27c482647a47e532427a4e5094c29e3e56d3451381d5c3a6155d403aded470a
7
- data.tar.gz: 20575dbd4575192d29b3dd834a62adee823cb61e8ced7e8f5dafc178ce9c2fd9e23d8a3adbd18a4ecdde70d21168a9c0a222c495756364c47defd09a4659ffbb
6
+ metadata.gz: 3c9ae21afabd5e7d794894406b355bec1519d24749a60eefc4880900058d2aaa61d602bcb0f3bdbc30debb4fc3dc04d106896c4cb4579e3f40bcc60e7b624b84
7
+ data.tar.gz: 943cb0a8c0a459804c9fb68fbac16990dc7f3f9c7bf238d69a8c60b3edeb661e83efcf1dee04d7611bdd721f1df37add4f3d7d101bbf5f4d3411c3d68d5ff09b
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Portfolio
4
- VERSION = "0.0.12"
4
+ VERSION = "0.0.16"
5
5
  end
@@ -0,0 +1,543 @@
1
+ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
2
+ // source: proto/api.proto
3
+
4
+ /*
5
+ Package api_pb is a reverse proxy.
6
+
7
+ It translates gRPC into RESTful JSON APIs.
8
+ */
9
+ package api_pb
10
+
11
+ import (
12
+ "/blogs/rss_feed"
13
+ "context"
14
+ "io"
15
+ "net/http"
16
+
17
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
18
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
19
+ "google.golang.org/grpc"
20
+ "google.golang.org/grpc/codes"
21
+ "google.golang.org/grpc/grpclog"
22
+ "google.golang.org/grpc/metadata"
23
+ "google.golang.org/grpc/status"
24
+ "google.golang.org/protobuf/proto"
25
+ "google.golang.org/protobuf/types/known/emptypb"
26
+ )
27
+
28
+ // Suppress "imported and not used" errors
29
+ var _ codes.Code
30
+ var _ io.Reader
31
+ var _ status.Status
32
+ var _ = runtime.String
33
+ var _ = utilities.NewDoubleArray
34
+ var _ = metadata.Join
35
+
36
+ var (
37
+ filter_PortfolioBackendApi_CreateRSSFeed_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
38
+ )
39
+
40
+ func request_PortfolioBackendApi_CreateRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
41
+ var protoReq rss_feeds_pb.CreateRSSFeedRequest
42
+ var metadata runtime.ServerMetadata
43
+
44
+ if err := req.ParseForm(); err != nil {
45
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
46
+ }
47
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateRSSFeed_0); err != nil {
48
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
49
+ }
50
+
51
+ msg, err := client.CreateRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
52
+ return msg, metadata, err
53
+
54
+ }
55
+
56
+ func local_request_PortfolioBackendApi_CreateRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
57
+ var protoReq rss_feeds_pb.CreateRSSFeedRequest
58
+ var metadata runtime.ServerMetadata
59
+
60
+ if err := req.ParseForm(); err != nil {
61
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
62
+ }
63
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateRSSFeed_0); err != nil {
64
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
65
+ }
66
+
67
+ msg, err := server.CreateRSSFeed(ctx, &protoReq)
68
+ return msg, metadata, err
69
+
70
+ }
71
+
72
+ func request_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
73
+ var protoReq emptypb.Empty
74
+ var metadata runtime.ServerMetadata
75
+
76
+ msg, err := client.BatchGetRSSFeeds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
77
+ return msg, metadata, err
78
+
79
+ }
80
+
81
+ func local_request_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
82
+ var protoReq emptypb.Empty
83
+ var metadata runtime.ServerMetadata
84
+
85
+ msg, err := server.BatchGetRSSFeeds(ctx, &protoReq)
86
+ return msg, metadata, err
87
+
88
+ }
89
+
90
+ func request_PortfolioBackendApi_GetRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
91
+ var protoReq rss_feeds_pb.GetRSSFeedRequest
92
+ var metadata runtime.ServerMetadata
93
+
94
+ var (
95
+ val string
96
+ ok bool
97
+ err error
98
+ _ = err
99
+ )
100
+
101
+ val, ok = pathParams["id"]
102
+ if !ok {
103
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
104
+ }
105
+
106
+ protoReq.Id, err = runtime.String(val)
107
+ if err != nil {
108
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
109
+ }
110
+
111
+ msg, err := client.GetRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
112
+ return msg, metadata, err
113
+
114
+ }
115
+
116
+ func local_request_PortfolioBackendApi_GetRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
117
+ var protoReq rss_feeds_pb.GetRSSFeedRequest
118
+ var metadata runtime.ServerMetadata
119
+
120
+ var (
121
+ val string
122
+ ok bool
123
+ err error
124
+ _ = err
125
+ )
126
+
127
+ val, ok = pathParams["id"]
128
+ if !ok {
129
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
130
+ }
131
+
132
+ protoReq.Id, err = runtime.String(val)
133
+ if err != nil {
134
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
135
+ }
136
+
137
+ msg, err := server.GetRSSFeed(ctx, &protoReq)
138
+ return msg, metadata, err
139
+
140
+ }
141
+
142
+ func request_PortfolioBackendApi_UpdateRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
143
+ var protoReq rss_feeds_pb.UpdateRSSFeedRequest
144
+ var metadata runtime.ServerMetadata
145
+
146
+ var (
147
+ val string
148
+ ok bool
149
+ err error
150
+ _ = err
151
+ )
152
+
153
+ val, ok = pathParams["id"]
154
+ if !ok {
155
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
156
+ }
157
+
158
+ protoReq.Id, err = runtime.String(val)
159
+ if err != nil {
160
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
161
+ }
162
+
163
+ msg, err := client.UpdateRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
164
+ return msg, metadata, err
165
+
166
+ }
167
+
168
+ func local_request_PortfolioBackendApi_UpdateRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
169
+ var protoReq rss_feeds_pb.UpdateRSSFeedRequest
170
+ var metadata runtime.ServerMetadata
171
+
172
+ var (
173
+ val string
174
+ ok bool
175
+ err error
176
+ _ = err
177
+ )
178
+
179
+ val, ok = pathParams["id"]
180
+ if !ok {
181
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
182
+ }
183
+
184
+ protoReq.Id, err = runtime.String(val)
185
+ if err != nil {
186
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
187
+ }
188
+
189
+ msg, err := server.UpdateRSSFeed(ctx, &protoReq)
190
+ return msg, metadata, err
191
+
192
+ }
193
+
194
+ func request_PortfolioBackendApi_DeleteRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
195
+ var protoReq rss_feeds_pb.DeleteRSSFeedRequest
196
+ var metadata runtime.ServerMetadata
197
+
198
+ var (
199
+ val string
200
+ ok bool
201
+ err error
202
+ _ = err
203
+ )
204
+
205
+ val, ok = pathParams["id"]
206
+ if !ok {
207
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
208
+ }
209
+
210
+ protoReq.Id, err = runtime.String(val)
211
+ if err != nil {
212
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
213
+ }
214
+
215
+ msg, err := client.DeleteRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
216
+ return msg, metadata, err
217
+
218
+ }
219
+
220
+ func local_request_PortfolioBackendApi_DeleteRSSFeed_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
221
+ var protoReq rss_feeds_pb.DeleteRSSFeedRequest
222
+ var metadata runtime.ServerMetadata
223
+
224
+ var (
225
+ val string
226
+ ok bool
227
+ err error
228
+ _ = err
229
+ )
230
+
231
+ val, ok = pathParams["id"]
232
+ if !ok {
233
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
234
+ }
235
+
236
+ protoReq.Id, err = runtime.String(val)
237
+ if err != nil {
238
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
239
+ }
240
+
241
+ msg, err := server.DeleteRSSFeed(ctx, &protoReq)
242
+ return msg, metadata, err
243
+
244
+ }
245
+
246
+ // RegisterPortfolioBackendApiHandlerServer registers the http handlers for service PortfolioBackendApi to "mux".
247
+ // UnaryRPC :call PortfolioBackendApiServer directly.
248
+ // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
249
+ // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPortfolioBackendApiHandlerFromEndpoint instead.
250
+ func RegisterPortfolioBackendApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PortfolioBackendApiServer) error {
251
+
252
+ mux.Handle("POST", pattern_PortfolioBackendApi_CreateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
253
+ ctx, cancel := context.WithCancel(req.Context())
254
+ defer cancel()
255
+ var stream runtime.ServerTransportStream
256
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
257
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
258
+ var err error
259
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateRSSFeed", runtime.WithHTTPPathPattern("/rss_feeds"))
260
+ if err != nil {
261
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
262
+ return
263
+ }
264
+ resp, md, err := local_request_PortfolioBackendApi_CreateRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
265
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
266
+ ctx = runtime.NewServerMetadataContext(ctx, md)
267
+ if err != nil {
268
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
269
+ return
270
+ }
271
+
272
+ forward_PortfolioBackendApi_CreateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
273
+
274
+ })
275
+
276
+ mux.Handle("GET", pattern_PortfolioBackendApi_BatchGetRSSFeeds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
277
+ ctx, cancel := context.WithCancel(req.Context())
278
+ defer cancel()
279
+ var stream runtime.ServerTransportStream
280
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
281
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
282
+ var err error
283
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/BatchGetRSSFeeds", runtime.WithHTTPPathPattern("/rss_feeds"))
284
+ if err != nil {
285
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
286
+ return
287
+ }
288
+ resp, md, err := local_request_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, inboundMarshaler, server, req, pathParams)
289
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
290
+ ctx = runtime.NewServerMetadataContext(ctx, md)
291
+ if err != nil {
292
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
293
+ return
294
+ }
295
+
296
+ forward_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
297
+
298
+ })
299
+
300
+ mux.Handle("GET", pattern_PortfolioBackendApi_GetRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
301
+ ctx, cancel := context.WithCancel(req.Context())
302
+ defer cancel()
303
+ var stream runtime.ServerTransportStream
304
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
305
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
306
+ var err error
307
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/GetRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
308
+ if err != nil {
309
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
310
+ return
311
+ }
312
+ resp, md, err := local_request_PortfolioBackendApi_GetRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
313
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
314
+ ctx = runtime.NewServerMetadataContext(ctx, md)
315
+ if err != nil {
316
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
317
+ return
318
+ }
319
+
320
+ forward_PortfolioBackendApi_GetRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
321
+
322
+ })
323
+
324
+ mux.Handle("PUT", pattern_PortfolioBackendApi_UpdateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
325
+ ctx, cancel := context.WithCancel(req.Context())
326
+ defer cancel()
327
+ var stream runtime.ServerTransportStream
328
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
329
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
330
+ var err error
331
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/UpdateRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
332
+ if err != nil {
333
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
334
+ return
335
+ }
336
+ resp, md, err := local_request_PortfolioBackendApi_UpdateRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
337
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
338
+ ctx = runtime.NewServerMetadataContext(ctx, md)
339
+ if err != nil {
340
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
341
+ return
342
+ }
343
+
344
+ forward_PortfolioBackendApi_UpdateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
345
+
346
+ })
347
+
348
+ mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
349
+ ctx, cancel := context.WithCancel(req.Context())
350
+ defer cancel()
351
+ var stream runtime.ServerTransportStream
352
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
353
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
354
+ var err error
355
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
356
+ if err != nil {
357
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
358
+ return
359
+ }
360
+ resp, md, err := local_request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
361
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
362
+ ctx = runtime.NewServerMetadataContext(ctx, md)
363
+ if err != nil {
364
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
365
+ return
366
+ }
367
+
368
+ forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
369
+
370
+ })
371
+
372
+ return nil
373
+ }
374
+
375
+ // RegisterPortfolioBackendApiHandlerFromEndpoint is same as RegisterPortfolioBackendApiHandler but
376
+ // automatically dials to "endpoint" and closes the connection when "ctx" gets done.
377
+ func RegisterPortfolioBackendApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
378
+ conn, err := grpc.Dial(endpoint, opts...)
379
+ if err != nil {
380
+ return err
381
+ }
382
+ defer func() {
383
+ if err != nil {
384
+ if cerr := conn.Close(); cerr != nil {
385
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
386
+ }
387
+ return
388
+ }
389
+ go func() {
390
+ <-ctx.Done()
391
+ if cerr := conn.Close(); cerr != nil {
392
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
393
+ }
394
+ }()
395
+ }()
396
+
397
+ return RegisterPortfolioBackendApiHandler(ctx, mux, conn)
398
+ }
399
+
400
+ // RegisterPortfolioBackendApiHandler registers the http handlers for service PortfolioBackendApi to "mux".
401
+ // The handlers forward requests to the grpc endpoint over "conn".
402
+ func RegisterPortfolioBackendApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
403
+ return RegisterPortfolioBackendApiHandlerClient(ctx, mux, NewPortfolioBackendApiClient(conn))
404
+ }
405
+
406
+ // RegisterPortfolioBackendApiHandlerClient registers the http handlers for service PortfolioBackendApi
407
+ // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PortfolioBackendApiClient".
408
+ // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PortfolioBackendApiClient"
409
+ // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
410
+ // "PortfolioBackendApiClient" to call the correct interceptors.
411
+ func RegisterPortfolioBackendApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PortfolioBackendApiClient) error {
412
+
413
+ mux.Handle("POST", pattern_PortfolioBackendApi_CreateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
414
+ ctx, cancel := context.WithCancel(req.Context())
415
+ defer cancel()
416
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
417
+ var err error
418
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateRSSFeed", runtime.WithHTTPPathPattern("/rss_feeds"))
419
+ if err != nil {
420
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
421
+ return
422
+ }
423
+ resp, md, err := request_PortfolioBackendApi_CreateRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
424
+ ctx = runtime.NewServerMetadataContext(ctx, md)
425
+ if err != nil {
426
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
427
+ return
428
+ }
429
+
430
+ forward_PortfolioBackendApi_CreateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
431
+
432
+ })
433
+
434
+ mux.Handle("GET", pattern_PortfolioBackendApi_BatchGetRSSFeeds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
435
+ ctx, cancel := context.WithCancel(req.Context())
436
+ defer cancel()
437
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
438
+ var err error
439
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/BatchGetRSSFeeds", runtime.WithHTTPPathPattern("/rss_feeds"))
440
+ if err != nil {
441
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
442
+ return
443
+ }
444
+ resp, md, err := request_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, inboundMarshaler, client, req, pathParams)
445
+ ctx = runtime.NewServerMetadataContext(ctx, md)
446
+ if err != nil {
447
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
448
+ return
449
+ }
450
+
451
+ forward_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
452
+
453
+ })
454
+
455
+ mux.Handle("GET", pattern_PortfolioBackendApi_GetRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
456
+ ctx, cancel := context.WithCancel(req.Context())
457
+ defer cancel()
458
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
459
+ var err error
460
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/GetRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
461
+ if err != nil {
462
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
463
+ return
464
+ }
465
+ resp, md, err := request_PortfolioBackendApi_GetRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
466
+ ctx = runtime.NewServerMetadataContext(ctx, md)
467
+ if err != nil {
468
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
469
+ return
470
+ }
471
+
472
+ forward_PortfolioBackendApi_GetRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
473
+
474
+ })
475
+
476
+ mux.Handle("PUT", pattern_PortfolioBackendApi_UpdateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
477
+ ctx, cancel := context.WithCancel(req.Context())
478
+ defer cancel()
479
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
480
+ var err error
481
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/UpdateRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
482
+ if err != nil {
483
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
484
+ return
485
+ }
486
+ resp, md, err := request_PortfolioBackendApi_UpdateRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
487
+ ctx = runtime.NewServerMetadataContext(ctx, md)
488
+ if err != nil {
489
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
490
+ return
491
+ }
492
+
493
+ forward_PortfolioBackendApi_UpdateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
494
+
495
+ })
496
+
497
+ mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
498
+ ctx, cancel := context.WithCancel(req.Context())
499
+ defer cancel()
500
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
501
+ var err error
502
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
503
+ if err != nil {
504
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
505
+ return
506
+ }
507
+ resp, md, err := request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
508
+ ctx = runtime.NewServerMetadataContext(ctx, md)
509
+ if err != nil {
510
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
511
+ return
512
+ }
513
+
514
+ forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
515
+
516
+ })
517
+
518
+ return nil
519
+ }
520
+
521
+ var (
522
+ pattern_PortfolioBackendApi_CreateRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"rss_feeds"}, ""))
523
+
524
+ pattern_PortfolioBackendApi_BatchGetRSSFeeds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"rss_feeds"}, ""))
525
+
526
+ pattern_PortfolioBackendApi_GetRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rss_feed", "id"}, ""))
527
+
528
+ pattern_PortfolioBackendApi_UpdateRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rss_feed", "id"}, ""))
529
+
530
+ pattern_PortfolioBackendApi_DeleteRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rss_feed", "id"}, ""))
531
+ )
532
+
533
+ var (
534
+ forward_PortfolioBackendApi_CreateRSSFeed_0 = runtime.ForwardResponseMessage
535
+
536
+ forward_PortfolioBackendApi_BatchGetRSSFeeds_0 = runtime.ForwardResponseMessage
537
+
538
+ forward_PortfolioBackendApi_GetRSSFeed_0 = runtime.ForwardResponseMessage
539
+
540
+ forward_PortfolioBackendApi_UpdateRSSFeed_0 = runtime.ForwardResponseMessage
541
+
542
+ forward_PortfolioBackendApi_DeleteRSSFeed_0 = runtime.ForwardResponseMessage
543
+ )
@@ -15,6 +15,10 @@ module ApiPb
15
15
  self.service_name = 'portfolio.PortfolioBackendApi'
16
16
 
17
17
  rpc :CreateRSSFeed, ::RSSFeedsPb::CreateRSSFeedRequest, ::Google::Protobuf::Empty
18
+ rpc :BatchGetRSSFeeds, ::Google::Protobuf::Empty, ::RSSFeedsPb::BatchGetRSSFeedsResponse
19
+ rpc :GetRSSFeed, ::RSSFeedsPb::GetRSSFeedRequest, ::RSSFeedsPb::GetRSSFeedResponse
20
+ rpc :UpdateRSSFeed, ::RSSFeedsPb::UpdateRSSFeedRequest, ::Google::Protobuf::Empty
21
+ rpc :DeleteRSSFeed, ::RSSFeedsPb::DeleteRSSFeedRequest, ::Google::Protobuf::Empty
18
22
  end
19
23
 
20
24
  Stub = Service.rpc_stub_class
@@ -12,10 +12,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_message "portfolio.blogs.CreateRSSFeedRequest" do
13
13
  optional :url, :string, 2
14
14
  end
15
+ add_message "portfolio.blogs.BatchGetRSSFeedsResponse" do
16
+ repeated :rss_feeds, :message, 1, "portfolio.blogs.RSSFeed"
17
+ end
18
+ add_message "portfolio.blogs.GetRSSFeedRequest" do
19
+ optional :id, :string, 1
20
+ end
21
+ add_message "portfolio.blogs.GetRSSFeedResponse" do
22
+ optional :rss_feed, :message, 1, "portfolio.blogs.RSSFeed"
23
+ end
24
+ add_message "portfolio.blogs.UpdateRSSFeedRequest" do
25
+ optional :id, :string, 1
26
+ end
27
+ add_message "portfolio.blogs.DeleteRSSFeedRequest" do
28
+ optional :id, :string, 1
29
+ end
15
30
  end
16
31
  end
17
32
 
18
33
  module RSSFeedsPb
19
34
  RSSFeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.RSSFeed").msgclass
20
35
  CreateRSSFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.CreateRSSFeedRequest").msgclass
36
+ BatchGetRSSFeedsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.BatchGetRSSFeedsResponse").msgclass
37
+ GetRSSFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.GetRSSFeedRequest").msgclass
38
+ GetRSSFeedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.GetRSSFeedResponse").msgclass
39
+ UpdateRSSFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.UpdateRSSFeedRequest").msgclass
40
+ DeleteRSSFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.DeleteRSSFeedRequest").msgclass
21
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: igsr5-portfolio-proto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - igsr5
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-28 00:00:00.000000000 Z
11
+ date: 2022-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -54,6 +54,7 @@ files:
54
54
  - bin/setup
55
55
  - lib/portfolio.rb
56
56
  - lib/portfolio/version.rb
57
+ - lib/proto/api/api.pb.gw.go
57
58
  - lib/proto/api_pb.rb
58
59
  - lib/proto/api_services_pb.rb
59
60
  - lib/proto/blogs/blog_pb.rb