igsr5-portfolio-proto 0.0.16 → 0.0.17

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: 1df1e9558cffb0c5ad3a65dd37d6a8ae6325e067efcba6e8a6f1036f2f97ac75
4
- data.tar.gz: 8f9c4c897597117c8003fc691af799f45071214ea740db3218cc1ae8f619b918
3
+ metadata.gz: 8f1596477bf6de123593407a084e913d93acc0dfc62724dcd6e35713b78aee7e
4
+ data.tar.gz: cea3a86138ed7efec18063a07be7828a65076185f8738d326731b681141d7d4c
5
5
  SHA512:
6
- metadata.gz: 3c9ae21afabd5e7d794894406b355bec1519d24749a60eefc4880900058d2aaa61d602bcb0f3bdbc30debb4fc3dc04d106896c4cb4579e3f40bcc60e7b624b84
7
- data.tar.gz: 943cb0a8c0a459804c9fb68fbac16990dc7f3f9c7bf238d69a8c60b3edeb661e83efcf1dee04d7611bdd721f1df37add4f3d7d101bbf5f4d3411c3d68d5ff09b
6
+ metadata.gz: b164b42ea318722154dba2e46a7b3f77d05d3a6d3a6078a980e36f44a0e3f372c45b7b37eed31a7472c054190d086764e93450a6db88a67f1967a4cd6aa47994
7
+ data.tar.gz: 8bcc5cac175a356ce646889d405db82a9159b2c18bcc245042bfbf60b0646a627aa6113341933716577e9f3ed85a04ed9e689850fa2b0c2538675aeee7e5d501
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Portfolio
4
- VERSION = "0.0.16"
4
+ VERSION = "0.0.17"
5
5
  end
@@ -9,6 +9,7 @@ It translates gRPC into RESTful JSON APIs.
9
9
  package api_pb
10
10
 
11
11
  import (
12
+ "/blogs"
12
13
  "/blogs/rss_feed"
13
14
  "context"
14
15
  "io"
@@ -139,8 +140,8 @@ func local_request_PortfolioBackendApi_GetRSSFeed_0(ctx context.Context, marshal
139
140
 
140
141
  }
141
142
 
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
143
+ 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) {
144
+ var protoReq rss_feeds_pb.DeleteRSSFeedRequest
144
145
  var metadata runtime.ServerMetadata
145
146
 
146
147
  var (
@@ -160,13 +161,13 @@ func request_PortfolioBackendApi_UpdateRSSFeed_0(ctx context.Context, marshaler
160
161
  return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
161
162
  }
162
163
 
163
- msg, err := client.UpdateRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
164
+ msg, err := client.DeleteRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
164
165
  return msg, metadata, err
165
166
 
166
167
  }
167
168
 
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
169
+ 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) {
170
+ var protoReq rss_feeds_pb.DeleteRSSFeedRequest
170
171
  var metadata runtime.ServerMetadata
171
172
 
172
173
  var (
@@ -186,13 +187,67 @@ func local_request_PortfolioBackendApi_UpdateRSSFeed_0(ctx context.Context, mars
186
187
  return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
187
188
  }
188
189
 
189
- msg, err := server.UpdateRSSFeed(ctx, &protoReq)
190
+ msg, err := server.DeleteRSSFeed(ctx, &protoReq)
190
191
  return msg, metadata, err
191
192
 
192
193
  }
193
194
 
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
195
+ var (
196
+ filter_PortfolioBackendApi_CreateBlog_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
197
+ )
198
+
199
+ func request_PortfolioBackendApi_CreateBlog_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
200
+ var protoReq blogs_pb.CreateBlogRequest
201
+ var metadata runtime.ServerMetadata
202
+
203
+ if err := req.ParseForm(); err != nil {
204
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
205
+ }
206
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateBlog_0); err != nil {
207
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
208
+ }
209
+
210
+ msg, err := client.CreateBlog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
211
+ return msg, metadata, err
212
+
213
+ }
214
+
215
+ func local_request_PortfolioBackendApi_CreateBlog_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
216
+ var protoReq blogs_pb.CreateBlogRequest
217
+ var metadata runtime.ServerMetadata
218
+
219
+ if err := req.ParseForm(); err != nil {
220
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
221
+ }
222
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateBlog_0); err != nil {
223
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
224
+ }
225
+
226
+ msg, err := server.CreateBlog(ctx, &protoReq)
227
+ return msg, metadata, err
228
+
229
+ }
230
+
231
+ func request_PortfolioBackendApi_BatchGetBlogs_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
232
+ var protoReq emptypb.Empty
233
+ var metadata runtime.ServerMetadata
234
+
235
+ msg, err := client.BatchGetBlogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
236
+ return msg, metadata, err
237
+
238
+ }
239
+
240
+ func local_request_PortfolioBackendApi_BatchGetBlogs_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
241
+ var protoReq emptypb.Empty
242
+ var metadata runtime.ServerMetadata
243
+
244
+ msg, err := server.BatchGetBlogs(ctx, &protoReq)
245
+ return msg, metadata, err
246
+
247
+ }
248
+
249
+ func request_PortfolioBackendApi_GetBlog_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
250
+ var protoReq blogs_pb.GetBlogRequest
196
251
  var metadata runtime.ServerMetadata
197
252
 
198
253
  var (
@@ -212,13 +267,13 @@ func request_PortfolioBackendApi_DeleteRSSFeed_0(ctx context.Context, marshaler
212
267
  return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
213
268
  }
214
269
 
215
- msg, err := client.DeleteRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
270
+ msg, err := client.GetBlog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
216
271
  return msg, metadata, err
217
272
 
218
273
  }
219
274
 
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
275
+ func local_request_PortfolioBackendApi_GetBlog_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
276
+ var protoReq blogs_pb.GetBlogRequest
222
277
  var metadata runtime.ServerMetadata
223
278
 
224
279
  var (
@@ -238,7 +293,59 @@ func local_request_PortfolioBackendApi_DeleteRSSFeed_0(ctx context.Context, mars
238
293
  return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
239
294
  }
240
295
 
241
- msg, err := server.DeleteRSSFeed(ctx, &protoReq)
296
+ msg, err := server.GetBlog(ctx, &protoReq)
297
+ return msg, metadata, err
298
+
299
+ }
300
+
301
+ func request_PortfolioBackendApi_DeleteBlog_0(ctx context.Context, marshaler runtime.Marshaler, client PortfolioBackendApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
302
+ var protoReq blogs_pb.DeleteBlogRequest
303
+ var metadata runtime.ServerMetadata
304
+
305
+ var (
306
+ val string
307
+ ok bool
308
+ err error
309
+ _ = err
310
+ )
311
+
312
+ val, ok = pathParams["id"]
313
+ if !ok {
314
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
315
+ }
316
+
317
+ protoReq.Id, err = runtime.String(val)
318
+ if err != nil {
319
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
320
+ }
321
+
322
+ msg, err := client.DeleteBlog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
323
+ return msg, metadata, err
324
+
325
+ }
326
+
327
+ func local_request_PortfolioBackendApi_DeleteBlog_0(ctx context.Context, marshaler runtime.Marshaler, server PortfolioBackendApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
328
+ var protoReq blogs_pb.DeleteBlogRequest
329
+ var metadata runtime.ServerMetadata
330
+
331
+ var (
332
+ val string
333
+ ok bool
334
+ err error
335
+ _ = err
336
+ )
337
+
338
+ val, ok = pathParams["id"]
339
+ if !ok {
340
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
341
+ }
342
+
343
+ protoReq.Id, err = runtime.String(val)
344
+ if err != nil {
345
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
346
+ }
347
+
348
+ msg, err := server.DeleteBlog(ctx, &protoReq)
242
349
  return msg, metadata, err
243
350
 
244
351
  }
@@ -321,19 +428,19 @@ func RegisterPortfolioBackendApiHandlerServer(ctx context.Context, mux *runtime.
321
428
 
322
429
  })
323
430
 
324
- mux.Handle("PUT", pattern_PortfolioBackendApi_UpdateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
431
+ mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
325
432
  ctx, cancel := context.WithCancel(req.Context())
326
433
  defer cancel()
327
434
  var stream runtime.ServerTransportStream
328
435
  ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
329
436
  inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
330
437
  var err error
331
- ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/UpdateRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
438
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
332
439
  if err != nil {
333
440
  runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
334
441
  return
335
442
  }
336
- resp, md, err := local_request_PortfolioBackendApi_UpdateRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
443
+ resp, md, err := local_request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
337
444
  md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
338
445
  ctx = runtime.NewServerMetadataContext(ctx, md)
339
446
  if err != nil {
@@ -341,23 +448,23 @@ func RegisterPortfolioBackendApiHandlerServer(ctx context.Context, mux *runtime.
341
448
  return
342
449
  }
343
450
 
344
- forward_PortfolioBackendApi_UpdateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
451
+ forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
345
452
 
346
453
  })
347
454
 
348
- mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
455
+ mux.Handle("POST", pattern_PortfolioBackendApi_CreateBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
349
456
  ctx, cancel := context.WithCancel(req.Context())
350
457
  defer cancel()
351
458
  var stream runtime.ServerTransportStream
352
459
  ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
353
460
  inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
354
461
  var err error
355
- ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
462
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateBlog", runtime.WithHTTPPathPattern("/blogs"))
356
463
  if err != nil {
357
464
  runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
358
465
  return
359
466
  }
360
- resp, md, err := local_request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
467
+ resp, md, err := local_request_PortfolioBackendApi_CreateBlog_0(ctx, inboundMarshaler, server, req, pathParams)
361
468
  md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
362
469
  ctx = runtime.NewServerMetadataContext(ctx, md)
363
470
  if err != nil {
@@ -365,7 +472,79 @@ func RegisterPortfolioBackendApiHandlerServer(ctx context.Context, mux *runtime.
365
472
  return
366
473
  }
367
474
 
368
- forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
475
+ forward_PortfolioBackendApi_CreateBlog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
476
+
477
+ })
478
+
479
+ mux.Handle("GET", pattern_PortfolioBackendApi_BatchGetBlogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
480
+ ctx, cancel := context.WithCancel(req.Context())
481
+ defer cancel()
482
+ var stream runtime.ServerTransportStream
483
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
484
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
485
+ var err error
486
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/BatchGetBlogs", runtime.WithHTTPPathPattern("/blogs"))
487
+ if err != nil {
488
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
489
+ return
490
+ }
491
+ resp, md, err := local_request_PortfolioBackendApi_BatchGetBlogs_0(ctx, inboundMarshaler, server, req, pathParams)
492
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
493
+ ctx = runtime.NewServerMetadataContext(ctx, md)
494
+ if err != nil {
495
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
496
+ return
497
+ }
498
+
499
+ forward_PortfolioBackendApi_BatchGetBlogs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
500
+
501
+ })
502
+
503
+ mux.Handle("GET", pattern_PortfolioBackendApi_GetBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
504
+ ctx, cancel := context.WithCancel(req.Context())
505
+ defer cancel()
506
+ var stream runtime.ServerTransportStream
507
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
508
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
509
+ var err error
510
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/GetBlog", runtime.WithHTTPPathPattern("/blogs/{id}"))
511
+ if err != nil {
512
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
513
+ return
514
+ }
515
+ resp, md, err := local_request_PortfolioBackendApi_GetBlog_0(ctx, inboundMarshaler, server, req, pathParams)
516
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
517
+ ctx = runtime.NewServerMetadataContext(ctx, md)
518
+ if err != nil {
519
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
520
+ return
521
+ }
522
+
523
+ forward_PortfolioBackendApi_GetBlog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
524
+
525
+ })
526
+
527
+ mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
528
+ ctx, cancel := context.WithCancel(req.Context())
529
+ defer cancel()
530
+ var stream runtime.ServerTransportStream
531
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
532
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
533
+ var err error
534
+ ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteBlog", runtime.WithHTTPPathPattern("/blogs/{id}"))
535
+ if err != nil {
536
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
537
+ return
538
+ }
539
+ resp, md, err := local_request_PortfolioBackendApi_DeleteBlog_0(ctx, inboundMarshaler, server, req, pathParams)
540
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
541
+ ctx = runtime.NewServerMetadataContext(ctx, md)
542
+ if err != nil {
543
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
544
+ return
545
+ }
546
+
547
+ forward_PortfolioBackendApi_DeleteBlog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
369
548
 
370
549
  })
371
550
 
@@ -473,45 +652,108 @@ func RegisterPortfolioBackendApiHandlerClient(ctx context.Context, mux *runtime.
473
652
 
474
653
  })
475
654
 
476
- mux.Handle("PUT", pattern_PortfolioBackendApi_UpdateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
655
+ mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
477
656
  ctx, cancel := context.WithCancel(req.Context())
478
657
  defer cancel()
479
658
  inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
480
659
  var err error
481
- ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/UpdateRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
660
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
482
661
  if err != nil {
483
662
  runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
484
663
  return
485
664
  }
486
- resp, md, err := request_PortfolioBackendApi_UpdateRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
665
+ resp, md, err := request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
487
666
  ctx = runtime.NewServerMetadataContext(ctx, md)
488
667
  if err != nil {
489
668
  runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
490
669
  return
491
670
  }
492
671
 
493
- forward_PortfolioBackendApi_UpdateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
672
+ forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
494
673
 
495
674
  })
496
675
 
497
- mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
676
+ mux.Handle("POST", pattern_PortfolioBackendApi_CreateBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
498
677
  ctx, cancel := context.WithCancel(req.Context())
499
678
  defer cancel()
500
679
  inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
501
680
  var err error
502
- ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
681
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateBlog", runtime.WithHTTPPathPattern("/blogs"))
503
682
  if err != nil {
504
683
  runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
505
684
  return
506
685
  }
507
- resp, md, err := request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
686
+ resp, md, err := request_PortfolioBackendApi_CreateBlog_0(ctx, inboundMarshaler, client, req, pathParams)
508
687
  ctx = runtime.NewServerMetadataContext(ctx, md)
509
688
  if err != nil {
510
689
  runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
511
690
  return
512
691
  }
513
692
 
514
- forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
693
+ forward_PortfolioBackendApi_CreateBlog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
694
+
695
+ })
696
+
697
+ mux.Handle("GET", pattern_PortfolioBackendApi_BatchGetBlogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
698
+ ctx, cancel := context.WithCancel(req.Context())
699
+ defer cancel()
700
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
701
+ var err error
702
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/BatchGetBlogs", runtime.WithHTTPPathPattern("/blogs"))
703
+ if err != nil {
704
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
705
+ return
706
+ }
707
+ resp, md, err := request_PortfolioBackendApi_BatchGetBlogs_0(ctx, inboundMarshaler, client, req, pathParams)
708
+ ctx = runtime.NewServerMetadataContext(ctx, md)
709
+ if err != nil {
710
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
711
+ return
712
+ }
713
+
714
+ forward_PortfolioBackendApi_BatchGetBlogs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
715
+
716
+ })
717
+
718
+ mux.Handle("GET", pattern_PortfolioBackendApi_GetBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
719
+ ctx, cancel := context.WithCancel(req.Context())
720
+ defer cancel()
721
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
722
+ var err error
723
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/GetBlog", runtime.WithHTTPPathPattern("/blogs/{id}"))
724
+ if err != nil {
725
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
726
+ return
727
+ }
728
+ resp, md, err := request_PortfolioBackendApi_GetBlog_0(ctx, inboundMarshaler, client, req, pathParams)
729
+ ctx = runtime.NewServerMetadataContext(ctx, md)
730
+ if err != nil {
731
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
732
+ return
733
+ }
734
+
735
+ forward_PortfolioBackendApi_GetBlog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
736
+
737
+ })
738
+
739
+ mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
740
+ ctx, cancel := context.WithCancel(req.Context())
741
+ defer cancel()
742
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
743
+ var err error
744
+ ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteBlog", runtime.WithHTTPPathPattern("/blogs/{id}"))
745
+ if err != nil {
746
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
747
+ return
748
+ }
749
+ resp, md, err := request_PortfolioBackendApi_DeleteBlog_0(ctx, inboundMarshaler, client, req, pathParams)
750
+ ctx = runtime.NewServerMetadataContext(ctx, md)
751
+ if err != nil {
752
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
753
+ return
754
+ }
755
+
756
+ forward_PortfolioBackendApi_DeleteBlog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
515
757
 
516
758
  })
517
759
 
@@ -525,9 +767,15 @@ var (
525
767
 
526
768
  pattern_PortfolioBackendApi_GetRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rss_feed", "id"}, ""))
527
769
 
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
770
  pattern_PortfolioBackendApi_DeleteRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rss_feed", "id"}, ""))
771
+
772
+ pattern_PortfolioBackendApi_CreateBlog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"blogs"}, ""))
773
+
774
+ pattern_PortfolioBackendApi_BatchGetBlogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"blogs"}, ""))
775
+
776
+ pattern_PortfolioBackendApi_GetBlog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"blogs", "id"}, ""))
777
+
778
+ pattern_PortfolioBackendApi_DeleteBlog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"blogs", "id"}, ""))
531
779
  )
532
780
 
533
781
  var (
@@ -537,7 +785,13 @@ var (
537
785
 
538
786
  forward_PortfolioBackendApi_GetRSSFeed_0 = runtime.ForwardResponseMessage
539
787
 
540
- forward_PortfolioBackendApi_UpdateRSSFeed_0 = runtime.ForwardResponseMessage
541
-
542
788
  forward_PortfolioBackendApi_DeleteRSSFeed_0 = runtime.ForwardResponseMessage
789
+
790
+ forward_PortfolioBackendApi_CreateBlog_0 = runtime.ForwardResponseMessage
791
+
792
+ forward_PortfolioBackendApi_BatchGetBlogs_0 = runtime.ForwardResponseMessage
793
+
794
+ forward_PortfolioBackendApi_GetBlog_0 = runtime.ForwardResponseMessage
795
+
796
+ forward_PortfolioBackendApi_DeleteBlog_0 = runtime.ForwardResponseMessage
543
797
  )
data/lib/proto/api_pb.rb CHANGED
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/annotations_pb'
7
7
  require 'google/protobuf/empty_pb'
8
8
  require 'proto/blogs/rss_feed_pb'
9
+ require 'proto/blogs/blog_pb'
9
10
 
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  add_file("proto/api.proto", :syntax => :proto3) do
@@ -14,11 +14,16 @@ module ApiPb
14
14
  self.unmarshal_class_method = :decode
15
15
  self.service_name = 'portfolio.PortfolioBackendApi'
16
16
 
17
+ # For RSS Feed ========================
17
18
  rpc :CreateRSSFeed, ::RSSFeedsPb::CreateRSSFeedRequest, ::Google::Protobuf::Empty
18
19
  rpc :BatchGetRSSFeeds, ::Google::Protobuf::Empty, ::RSSFeedsPb::BatchGetRSSFeedsResponse
19
20
  rpc :GetRSSFeed, ::RSSFeedsPb::GetRSSFeedRequest, ::RSSFeedsPb::GetRSSFeedResponse
20
- rpc :UpdateRSSFeed, ::RSSFeedsPb::UpdateRSSFeedRequest, ::Google::Protobuf::Empty
21
21
  rpc :DeleteRSSFeed, ::RSSFeedsPb::DeleteRSSFeedRequest, ::Google::Protobuf::Empty
22
+ # For Blog ============================
23
+ rpc :CreateBlog, ::BlogsPb::CreateBlogRequest, ::Google::Protobuf::Empty
24
+ rpc :BatchGetBlogs, ::Google::Protobuf::Empty, ::BlogsPb::BatchGetBlogsResponse
25
+ rpc :GetBlog, ::BlogsPb::GetBlogRequest, ::BlogsPb::GetBlogResponse
26
+ rpc :DeleteBlog, ::BlogsPb::DeleteBlogRequest, ::Google::Protobuf::Empty
22
27
  end
23
28
 
24
29
  Stub = Service.rpc_stub_class
@@ -31,6 +31,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
31
  optional :thumbnail_url, :string, 5
32
32
  optional :service_name, :string, 6
33
33
  end
34
+ add_message "portfolio.blogs.CreateBlogRequest" do
35
+ optional :title, :string, 2
36
+ optional :posted_at, :message, 3, "google.protobuf.Timestamp"
37
+ optional :site_url, :string, 4
38
+ optional :thumbnail_url, :string, 5
39
+ optional :service_name, :string, 6
40
+ end
41
+ add_message "portfolio.blogs.BatchGetBlogsResponse" do
42
+ repeated :blogs, :message, 1, "portfolio.blogs.Blog"
43
+ end
44
+ add_message "portfolio.blogs.GetBlogRequest" do
45
+ optional :id, :string, 1
46
+ end
47
+ add_message "portfolio.blogs.GetBlogResponse" do
48
+ optional :blogs, :message, 1, "portfolio.blogs.Blog"
49
+ end
50
+ add_message "portfolio.blogs.DeleteBlogRequest" do
51
+ optional :id, :string, 1
52
+ end
34
53
  end
35
54
  end
36
55
 
@@ -38,4 +57,9 @@ module BlogsPb
38
57
  Blog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.Blog").msgclass
39
58
  BlogFromRSSItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.BlogFromRSSItem").msgclass
40
59
  BlogFromManualItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.BlogFromManualItem").msgclass
60
+ CreateBlogRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.CreateBlogRequest").msgclass
61
+ BatchGetBlogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.BatchGetBlogsResponse").msgclass
62
+ GetBlogRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.GetBlogRequest").msgclass
63
+ GetBlogResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.GetBlogResponse").msgclass
64
+ DeleteBlogRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("portfolio.blogs.DeleteBlogRequest").msgclass
41
65
  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.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - igsr5
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-17 00:00:00.000000000 Z
11
+ date: 2022-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf