igsr5-portfolio-proto 0.0.13 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/portfolio/version.rb +1 -1
- data/lib/proto/api/api.pb.gw.go +797 -0
- data/lib/proto/api_pb.rb +1 -0
- data/lib/proto/api_services_pb.rb +9 -0
- data/lib/proto/blogs/blog_pb.rb +24 -0
- data/lib/proto/blogs/rss_feed_pb.rb +20 -0
- metadata +3 -3
- data/lib/api/api.pb.gw.go +0 -172
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f1596477bf6de123593407a084e913d93acc0dfc62724dcd6e35713b78aee7e
|
4
|
+
data.tar.gz: cea3a86138ed7efec18063a07be7828a65076185f8738d326731b681141d7d4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b164b42ea318722154dba2e46a7b3f77d05d3a6d3a6078a980e36f44a0e3f372c45b7b37eed31a7472c054190d086764e93450a6db88a67f1967a4cd6aa47994
|
7
|
+
data.tar.gz: 8bcc5cac175a356ce646889d405db82a9159b2c18bcc245042bfbf60b0646a627aa6113341933716577e9f3ed85a04ed9e689850fa2b0c2538675aeee7e5d501
|
data/lib/portfolio/version.rb
CHANGED
@@ -0,0 +1,797 @@
|
|
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"
|
13
|
+
"/blogs/rss_feed"
|
14
|
+
"context"
|
15
|
+
"io"
|
16
|
+
"net/http"
|
17
|
+
|
18
|
+
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
19
|
+
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
20
|
+
"google.golang.org/grpc"
|
21
|
+
"google.golang.org/grpc/codes"
|
22
|
+
"google.golang.org/grpc/grpclog"
|
23
|
+
"google.golang.org/grpc/metadata"
|
24
|
+
"google.golang.org/grpc/status"
|
25
|
+
"google.golang.org/protobuf/proto"
|
26
|
+
"google.golang.org/protobuf/types/known/emptypb"
|
27
|
+
)
|
28
|
+
|
29
|
+
// Suppress "imported and not used" errors
|
30
|
+
var _ codes.Code
|
31
|
+
var _ io.Reader
|
32
|
+
var _ status.Status
|
33
|
+
var _ = runtime.String
|
34
|
+
var _ = utilities.NewDoubleArray
|
35
|
+
var _ = metadata.Join
|
36
|
+
|
37
|
+
var (
|
38
|
+
filter_PortfolioBackendApi_CreateRSSFeed_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
39
|
+
)
|
40
|
+
|
41
|
+
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) {
|
42
|
+
var protoReq rss_feeds_pb.CreateRSSFeedRequest
|
43
|
+
var metadata runtime.ServerMetadata
|
44
|
+
|
45
|
+
if err := req.ParseForm(); err != nil {
|
46
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
47
|
+
}
|
48
|
+
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateRSSFeed_0); err != nil {
|
49
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
50
|
+
}
|
51
|
+
|
52
|
+
msg, err := client.CreateRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
53
|
+
return msg, metadata, err
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
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) {
|
58
|
+
var protoReq rss_feeds_pb.CreateRSSFeedRequest
|
59
|
+
var metadata runtime.ServerMetadata
|
60
|
+
|
61
|
+
if err := req.ParseForm(); err != nil {
|
62
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
63
|
+
}
|
64
|
+
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateRSSFeed_0); err != nil {
|
65
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
66
|
+
}
|
67
|
+
|
68
|
+
msg, err := server.CreateRSSFeed(ctx, &protoReq)
|
69
|
+
return msg, metadata, err
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
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) {
|
74
|
+
var protoReq emptypb.Empty
|
75
|
+
var metadata runtime.ServerMetadata
|
76
|
+
|
77
|
+
msg, err := client.BatchGetRSSFeeds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
78
|
+
return msg, metadata, err
|
79
|
+
|
80
|
+
}
|
81
|
+
|
82
|
+
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) {
|
83
|
+
var protoReq emptypb.Empty
|
84
|
+
var metadata runtime.ServerMetadata
|
85
|
+
|
86
|
+
msg, err := server.BatchGetRSSFeeds(ctx, &protoReq)
|
87
|
+
return msg, metadata, err
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
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) {
|
92
|
+
var protoReq rss_feeds_pb.GetRSSFeedRequest
|
93
|
+
var metadata runtime.ServerMetadata
|
94
|
+
|
95
|
+
var (
|
96
|
+
val string
|
97
|
+
ok bool
|
98
|
+
err error
|
99
|
+
_ = err
|
100
|
+
)
|
101
|
+
|
102
|
+
val, ok = pathParams["id"]
|
103
|
+
if !ok {
|
104
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
105
|
+
}
|
106
|
+
|
107
|
+
protoReq.Id, err = runtime.String(val)
|
108
|
+
if err != nil {
|
109
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
110
|
+
}
|
111
|
+
|
112
|
+
msg, err := client.GetRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
113
|
+
return msg, metadata, err
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
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) {
|
118
|
+
var protoReq rss_feeds_pb.GetRSSFeedRequest
|
119
|
+
var metadata runtime.ServerMetadata
|
120
|
+
|
121
|
+
var (
|
122
|
+
val string
|
123
|
+
ok bool
|
124
|
+
err error
|
125
|
+
_ = err
|
126
|
+
)
|
127
|
+
|
128
|
+
val, ok = pathParams["id"]
|
129
|
+
if !ok {
|
130
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
131
|
+
}
|
132
|
+
|
133
|
+
protoReq.Id, err = runtime.String(val)
|
134
|
+
if err != nil {
|
135
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
136
|
+
}
|
137
|
+
|
138
|
+
msg, err := server.GetRSSFeed(ctx, &protoReq)
|
139
|
+
return msg, metadata, err
|
140
|
+
|
141
|
+
}
|
142
|
+
|
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
|
145
|
+
var metadata runtime.ServerMetadata
|
146
|
+
|
147
|
+
var (
|
148
|
+
val string
|
149
|
+
ok bool
|
150
|
+
err error
|
151
|
+
_ = err
|
152
|
+
)
|
153
|
+
|
154
|
+
val, ok = pathParams["id"]
|
155
|
+
if !ok {
|
156
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
157
|
+
}
|
158
|
+
|
159
|
+
protoReq.Id, err = runtime.String(val)
|
160
|
+
if err != nil {
|
161
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
162
|
+
}
|
163
|
+
|
164
|
+
msg, err := client.DeleteRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
165
|
+
return msg, metadata, err
|
166
|
+
|
167
|
+
}
|
168
|
+
|
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
|
171
|
+
var metadata runtime.ServerMetadata
|
172
|
+
|
173
|
+
var (
|
174
|
+
val string
|
175
|
+
ok bool
|
176
|
+
err error
|
177
|
+
_ = err
|
178
|
+
)
|
179
|
+
|
180
|
+
val, ok = pathParams["id"]
|
181
|
+
if !ok {
|
182
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
183
|
+
}
|
184
|
+
|
185
|
+
protoReq.Id, err = runtime.String(val)
|
186
|
+
if err != nil {
|
187
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
188
|
+
}
|
189
|
+
|
190
|
+
msg, err := server.DeleteRSSFeed(ctx, &protoReq)
|
191
|
+
return msg, metadata, err
|
192
|
+
|
193
|
+
}
|
194
|
+
|
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
|
251
|
+
var metadata runtime.ServerMetadata
|
252
|
+
|
253
|
+
var (
|
254
|
+
val string
|
255
|
+
ok bool
|
256
|
+
err error
|
257
|
+
_ = err
|
258
|
+
)
|
259
|
+
|
260
|
+
val, ok = pathParams["id"]
|
261
|
+
if !ok {
|
262
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
263
|
+
}
|
264
|
+
|
265
|
+
protoReq.Id, err = runtime.String(val)
|
266
|
+
if err != nil {
|
267
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
268
|
+
}
|
269
|
+
|
270
|
+
msg, err := client.GetBlog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
271
|
+
return msg, metadata, err
|
272
|
+
|
273
|
+
}
|
274
|
+
|
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
|
277
|
+
var metadata runtime.ServerMetadata
|
278
|
+
|
279
|
+
var (
|
280
|
+
val string
|
281
|
+
ok bool
|
282
|
+
err error
|
283
|
+
_ = err
|
284
|
+
)
|
285
|
+
|
286
|
+
val, ok = pathParams["id"]
|
287
|
+
if !ok {
|
288
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
289
|
+
}
|
290
|
+
|
291
|
+
protoReq.Id, err = runtime.String(val)
|
292
|
+
if err != nil {
|
293
|
+
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
294
|
+
}
|
295
|
+
|
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)
|
349
|
+
return msg, metadata, err
|
350
|
+
|
351
|
+
}
|
352
|
+
|
353
|
+
// RegisterPortfolioBackendApiHandlerServer registers the http handlers for service PortfolioBackendApi to "mux".
|
354
|
+
// UnaryRPC :call PortfolioBackendApiServer directly.
|
355
|
+
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
356
|
+
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPortfolioBackendApiHandlerFromEndpoint instead.
|
357
|
+
func RegisterPortfolioBackendApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PortfolioBackendApiServer) error {
|
358
|
+
|
359
|
+
mux.Handle("POST", pattern_PortfolioBackendApi_CreateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
360
|
+
ctx, cancel := context.WithCancel(req.Context())
|
361
|
+
defer cancel()
|
362
|
+
var stream runtime.ServerTransportStream
|
363
|
+
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
364
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
365
|
+
var err error
|
366
|
+
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateRSSFeed", runtime.WithHTTPPathPattern("/rss_feeds"))
|
367
|
+
if err != nil {
|
368
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
369
|
+
return
|
370
|
+
}
|
371
|
+
resp, md, err := local_request_PortfolioBackendApi_CreateRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
|
372
|
+
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
373
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
374
|
+
if err != nil {
|
375
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
376
|
+
return
|
377
|
+
}
|
378
|
+
|
379
|
+
forward_PortfolioBackendApi_CreateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
380
|
+
|
381
|
+
})
|
382
|
+
|
383
|
+
mux.Handle("GET", pattern_PortfolioBackendApi_BatchGetRSSFeeds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
384
|
+
ctx, cancel := context.WithCancel(req.Context())
|
385
|
+
defer cancel()
|
386
|
+
var stream runtime.ServerTransportStream
|
387
|
+
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
388
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
389
|
+
var err error
|
390
|
+
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/BatchGetRSSFeeds", runtime.WithHTTPPathPattern("/rss_feeds"))
|
391
|
+
if err != nil {
|
392
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
393
|
+
return
|
394
|
+
}
|
395
|
+
resp, md, err := local_request_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, inboundMarshaler, server, req, pathParams)
|
396
|
+
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
397
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
398
|
+
if err != nil {
|
399
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
400
|
+
return
|
401
|
+
}
|
402
|
+
|
403
|
+
forward_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
404
|
+
|
405
|
+
})
|
406
|
+
|
407
|
+
mux.Handle("GET", pattern_PortfolioBackendApi_GetRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
408
|
+
ctx, cancel := context.WithCancel(req.Context())
|
409
|
+
defer cancel()
|
410
|
+
var stream runtime.ServerTransportStream
|
411
|
+
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
412
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
413
|
+
var err error
|
414
|
+
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/GetRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
|
415
|
+
if err != nil {
|
416
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
417
|
+
return
|
418
|
+
}
|
419
|
+
resp, md, err := local_request_PortfolioBackendApi_GetRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
|
420
|
+
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
421
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
422
|
+
if err != nil {
|
423
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
424
|
+
return
|
425
|
+
}
|
426
|
+
|
427
|
+
forward_PortfolioBackendApi_GetRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
428
|
+
|
429
|
+
})
|
430
|
+
|
431
|
+
mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
432
|
+
ctx, cancel := context.WithCancel(req.Context())
|
433
|
+
defer cancel()
|
434
|
+
var stream runtime.ServerTransportStream
|
435
|
+
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
436
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
437
|
+
var err error
|
438
|
+
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
|
439
|
+
if err != nil {
|
440
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
441
|
+
return
|
442
|
+
}
|
443
|
+
resp, md, err := local_request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
|
444
|
+
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
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_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
452
|
+
|
453
|
+
})
|
454
|
+
|
455
|
+
mux.Handle("POST", pattern_PortfolioBackendApi_CreateBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
456
|
+
ctx, cancel := context.WithCancel(req.Context())
|
457
|
+
defer cancel()
|
458
|
+
var stream runtime.ServerTransportStream
|
459
|
+
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
460
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
461
|
+
var err error
|
462
|
+
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateBlog", runtime.WithHTTPPathPattern("/blogs"))
|
463
|
+
if err != nil {
|
464
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
465
|
+
return
|
466
|
+
}
|
467
|
+
resp, md, err := local_request_PortfolioBackendApi_CreateBlog_0(ctx, inboundMarshaler, server, req, pathParams)
|
468
|
+
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
469
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
470
|
+
if err != nil {
|
471
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
472
|
+
return
|
473
|
+
}
|
474
|
+
|
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()...)
|
548
|
+
|
549
|
+
})
|
550
|
+
|
551
|
+
return nil
|
552
|
+
}
|
553
|
+
|
554
|
+
// RegisterPortfolioBackendApiHandlerFromEndpoint is same as RegisterPortfolioBackendApiHandler but
|
555
|
+
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
556
|
+
func RegisterPortfolioBackendApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
557
|
+
conn, err := grpc.Dial(endpoint, opts...)
|
558
|
+
if err != nil {
|
559
|
+
return err
|
560
|
+
}
|
561
|
+
defer func() {
|
562
|
+
if err != nil {
|
563
|
+
if cerr := conn.Close(); cerr != nil {
|
564
|
+
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
565
|
+
}
|
566
|
+
return
|
567
|
+
}
|
568
|
+
go func() {
|
569
|
+
<-ctx.Done()
|
570
|
+
if cerr := conn.Close(); cerr != nil {
|
571
|
+
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
572
|
+
}
|
573
|
+
}()
|
574
|
+
}()
|
575
|
+
|
576
|
+
return RegisterPortfolioBackendApiHandler(ctx, mux, conn)
|
577
|
+
}
|
578
|
+
|
579
|
+
// RegisterPortfolioBackendApiHandler registers the http handlers for service PortfolioBackendApi to "mux".
|
580
|
+
// The handlers forward requests to the grpc endpoint over "conn".
|
581
|
+
func RegisterPortfolioBackendApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
582
|
+
return RegisterPortfolioBackendApiHandlerClient(ctx, mux, NewPortfolioBackendApiClient(conn))
|
583
|
+
}
|
584
|
+
|
585
|
+
// RegisterPortfolioBackendApiHandlerClient registers the http handlers for service PortfolioBackendApi
|
586
|
+
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PortfolioBackendApiClient".
|
587
|
+
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PortfolioBackendApiClient"
|
588
|
+
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
589
|
+
// "PortfolioBackendApiClient" to call the correct interceptors.
|
590
|
+
func RegisterPortfolioBackendApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PortfolioBackendApiClient) error {
|
591
|
+
|
592
|
+
mux.Handle("POST", pattern_PortfolioBackendApi_CreateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
593
|
+
ctx, cancel := context.WithCancel(req.Context())
|
594
|
+
defer cancel()
|
595
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
596
|
+
var err error
|
597
|
+
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateRSSFeed", runtime.WithHTTPPathPattern("/rss_feeds"))
|
598
|
+
if err != nil {
|
599
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
600
|
+
return
|
601
|
+
}
|
602
|
+
resp, md, err := request_PortfolioBackendApi_CreateRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
|
603
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
604
|
+
if err != nil {
|
605
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
606
|
+
return
|
607
|
+
}
|
608
|
+
|
609
|
+
forward_PortfolioBackendApi_CreateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
610
|
+
|
611
|
+
})
|
612
|
+
|
613
|
+
mux.Handle("GET", pattern_PortfolioBackendApi_BatchGetRSSFeeds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
614
|
+
ctx, cancel := context.WithCancel(req.Context())
|
615
|
+
defer cancel()
|
616
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
617
|
+
var err error
|
618
|
+
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/BatchGetRSSFeeds", runtime.WithHTTPPathPattern("/rss_feeds"))
|
619
|
+
if err != nil {
|
620
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
621
|
+
return
|
622
|
+
}
|
623
|
+
resp, md, err := request_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, inboundMarshaler, client, req, pathParams)
|
624
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
625
|
+
if err != nil {
|
626
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
627
|
+
return
|
628
|
+
}
|
629
|
+
|
630
|
+
forward_PortfolioBackendApi_BatchGetRSSFeeds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
631
|
+
|
632
|
+
})
|
633
|
+
|
634
|
+
mux.Handle("GET", pattern_PortfolioBackendApi_GetRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
635
|
+
ctx, cancel := context.WithCancel(req.Context())
|
636
|
+
defer cancel()
|
637
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
638
|
+
var err error
|
639
|
+
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/GetRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
|
640
|
+
if err != nil {
|
641
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
642
|
+
return
|
643
|
+
}
|
644
|
+
resp, md, err := request_PortfolioBackendApi_GetRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
|
645
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
646
|
+
if err != nil {
|
647
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
648
|
+
return
|
649
|
+
}
|
650
|
+
|
651
|
+
forward_PortfolioBackendApi_GetRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
652
|
+
|
653
|
+
})
|
654
|
+
|
655
|
+
mux.Handle("DELETE", pattern_PortfolioBackendApi_DeleteRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
656
|
+
ctx, cancel := context.WithCancel(req.Context())
|
657
|
+
defer cancel()
|
658
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
659
|
+
var err error
|
660
|
+
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/DeleteRSSFeed", runtime.WithHTTPPathPattern("/rss_feed/{id}"))
|
661
|
+
if err != nil {
|
662
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
663
|
+
return
|
664
|
+
}
|
665
|
+
resp, md, err := request_PortfolioBackendApi_DeleteRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
|
666
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
667
|
+
if err != nil {
|
668
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
669
|
+
return
|
670
|
+
}
|
671
|
+
|
672
|
+
forward_PortfolioBackendApi_DeleteRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
673
|
+
|
674
|
+
})
|
675
|
+
|
676
|
+
mux.Handle("POST", pattern_PortfolioBackendApi_CreateBlog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
677
|
+
ctx, cancel := context.WithCancel(req.Context())
|
678
|
+
defer cancel()
|
679
|
+
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
680
|
+
var err error
|
681
|
+
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateBlog", runtime.WithHTTPPathPattern("/blogs"))
|
682
|
+
if err != nil {
|
683
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
684
|
+
return
|
685
|
+
}
|
686
|
+
resp, md, err := request_PortfolioBackendApi_CreateBlog_0(ctx, inboundMarshaler, client, req, pathParams)
|
687
|
+
ctx = runtime.NewServerMetadataContext(ctx, md)
|
688
|
+
if err != nil {
|
689
|
+
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
690
|
+
return
|
691
|
+
}
|
692
|
+
|
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()...)
|
757
|
+
|
758
|
+
})
|
759
|
+
|
760
|
+
return nil
|
761
|
+
}
|
762
|
+
|
763
|
+
var (
|
764
|
+
pattern_PortfolioBackendApi_CreateRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"rss_feeds"}, ""))
|
765
|
+
|
766
|
+
pattern_PortfolioBackendApi_BatchGetRSSFeeds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"rss_feeds"}, ""))
|
767
|
+
|
768
|
+
pattern_PortfolioBackendApi_GetRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"rss_feed", "id"}, ""))
|
769
|
+
|
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"}, ""))
|
779
|
+
)
|
780
|
+
|
781
|
+
var (
|
782
|
+
forward_PortfolioBackendApi_CreateRSSFeed_0 = runtime.ForwardResponseMessage
|
783
|
+
|
784
|
+
forward_PortfolioBackendApi_BatchGetRSSFeeds_0 = runtime.ForwardResponseMessage
|
785
|
+
|
786
|
+
forward_PortfolioBackendApi_GetRSSFeed_0 = runtime.ForwardResponseMessage
|
787
|
+
|
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
|
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,7 +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
|
19
|
+
rpc :BatchGetRSSFeeds, ::Google::Protobuf::Empty, ::RSSFeedsPb::BatchGetRSSFeedsResponse
|
20
|
+
rpc :GetRSSFeed, ::RSSFeedsPb::GetRSSFeedRequest, ::RSSFeedsPb::GetRSSFeedResponse
|
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
|
18
27
|
end
|
19
28
|
|
20
29
|
Stub = Service.rpc_stub_class
|
data/lib/proto/blogs/blog_pb.rb
CHANGED
@@ -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
|
@@ -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.
|
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-
|
11
|
+
date: 2022-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -52,9 +52,9 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- bin/console
|
54
54
|
- bin/setup
|
55
|
-
- lib/api/api.pb.gw.go
|
56
55
|
- lib/portfolio.rb
|
57
56
|
- lib/portfolio/version.rb
|
57
|
+
- lib/proto/api/api.pb.gw.go
|
58
58
|
- lib/proto/api_pb.rb
|
59
59
|
- lib/proto/api_services_pb.rb
|
60
60
|
- lib/proto/blogs/blog_pb.rb
|
data/lib/api/api.pb.gw.go
DELETED
@@ -1,172 +0,0 @@
|
|
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
|
-
)
|
26
|
-
|
27
|
-
// Suppress "imported and not used" errors
|
28
|
-
var _ codes.Code
|
29
|
-
var _ io.Reader
|
30
|
-
var _ status.Status
|
31
|
-
var _ = runtime.String
|
32
|
-
var _ = utilities.NewDoubleArray
|
33
|
-
var _ = metadata.Join
|
34
|
-
|
35
|
-
var (
|
36
|
-
filter_PortfolioBackendApi_CreateRSSFeed_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
37
|
-
)
|
38
|
-
|
39
|
-
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) {
|
40
|
-
var protoReq rss_feeds_pb.CreateRSSFeedRequest
|
41
|
-
var metadata runtime.ServerMetadata
|
42
|
-
|
43
|
-
if err := req.ParseForm(); err != nil {
|
44
|
-
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
45
|
-
}
|
46
|
-
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateRSSFeed_0); err != nil {
|
47
|
-
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
48
|
-
}
|
49
|
-
|
50
|
-
msg, err := client.CreateRSSFeed(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
51
|
-
return msg, metadata, err
|
52
|
-
|
53
|
-
}
|
54
|
-
|
55
|
-
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) {
|
56
|
-
var protoReq rss_feeds_pb.CreateRSSFeedRequest
|
57
|
-
var metadata runtime.ServerMetadata
|
58
|
-
|
59
|
-
if err := req.ParseForm(); err != nil {
|
60
|
-
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
61
|
-
}
|
62
|
-
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PortfolioBackendApi_CreateRSSFeed_0); err != nil {
|
63
|
-
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
64
|
-
}
|
65
|
-
|
66
|
-
msg, err := server.CreateRSSFeed(ctx, &protoReq)
|
67
|
-
return msg, metadata, err
|
68
|
-
|
69
|
-
}
|
70
|
-
|
71
|
-
// RegisterPortfolioBackendApiHandlerServer registers the http handlers for service PortfolioBackendApi to "mux".
|
72
|
-
// UnaryRPC :call PortfolioBackendApiServer directly.
|
73
|
-
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
74
|
-
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPortfolioBackendApiHandlerFromEndpoint instead.
|
75
|
-
func RegisterPortfolioBackendApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PortfolioBackendApiServer) error {
|
76
|
-
|
77
|
-
mux.Handle("POST", pattern_PortfolioBackendApi_CreateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
78
|
-
ctx, cancel := context.WithCancel(req.Context())
|
79
|
-
defer cancel()
|
80
|
-
var stream runtime.ServerTransportStream
|
81
|
-
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
82
|
-
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
83
|
-
var err error
|
84
|
-
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateRSSFeed", runtime.WithHTTPPathPattern("/rss_feeds"))
|
85
|
-
if err != nil {
|
86
|
-
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
87
|
-
return
|
88
|
-
}
|
89
|
-
resp, md, err := local_request_PortfolioBackendApi_CreateRSSFeed_0(ctx, inboundMarshaler, server, req, pathParams)
|
90
|
-
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
91
|
-
ctx = runtime.NewServerMetadataContext(ctx, md)
|
92
|
-
if err != nil {
|
93
|
-
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
94
|
-
return
|
95
|
-
}
|
96
|
-
|
97
|
-
forward_PortfolioBackendApi_CreateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
98
|
-
|
99
|
-
})
|
100
|
-
|
101
|
-
return nil
|
102
|
-
}
|
103
|
-
|
104
|
-
// RegisterPortfolioBackendApiHandlerFromEndpoint is same as RegisterPortfolioBackendApiHandler but
|
105
|
-
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
106
|
-
func RegisterPortfolioBackendApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
107
|
-
conn, err := grpc.Dial(endpoint, opts...)
|
108
|
-
if err != nil {
|
109
|
-
return err
|
110
|
-
}
|
111
|
-
defer func() {
|
112
|
-
if err != nil {
|
113
|
-
if cerr := conn.Close(); cerr != nil {
|
114
|
-
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
115
|
-
}
|
116
|
-
return
|
117
|
-
}
|
118
|
-
go func() {
|
119
|
-
<-ctx.Done()
|
120
|
-
if cerr := conn.Close(); cerr != nil {
|
121
|
-
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
122
|
-
}
|
123
|
-
}()
|
124
|
-
}()
|
125
|
-
|
126
|
-
return RegisterPortfolioBackendApiHandler(ctx, mux, conn)
|
127
|
-
}
|
128
|
-
|
129
|
-
// RegisterPortfolioBackendApiHandler registers the http handlers for service PortfolioBackendApi to "mux".
|
130
|
-
// The handlers forward requests to the grpc endpoint over "conn".
|
131
|
-
func RegisterPortfolioBackendApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
132
|
-
return RegisterPortfolioBackendApiHandlerClient(ctx, mux, NewPortfolioBackendApiClient(conn))
|
133
|
-
}
|
134
|
-
|
135
|
-
// RegisterPortfolioBackendApiHandlerClient registers the http handlers for service PortfolioBackendApi
|
136
|
-
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PortfolioBackendApiClient".
|
137
|
-
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PortfolioBackendApiClient"
|
138
|
-
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
139
|
-
// "PortfolioBackendApiClient" to call the correct interceptors.
|
140
|
-
func RegisterPortfolioBackendApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PortfolioBackendApiClient) error {
|
141
|
-
|
142
|
-
mux.Handle("POST", pattern_PortfolioBackendApi_CreateRSSFeed_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
143
|
-
ctx, cancel := context.WithCancel(req.Context())
|
144
|
-
defer cancel()
|
145
|
-
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
146
|
-
var err error
|
147
|
-
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/portfolio.PortfolioBackendApi/CreateRSSFeed", runtime.WithHTTPPathPattern("/rss_feeds"))
|
148
|
-
if err != nil {
|
149
|
-
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
150
|
-
return
|
151
|
-
}
|
152
|
-
resp, md, err := request_PortfolioBackendApi_CreateRSSFeed_0(ctx, inboundMarshaler, client, req, pathParams)
|
153
|
-
ctx = runtime.NewServerMetadataContext(ctx, md)
|
154
|
-
if err != nil {
|
155
|
-
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
156
|
-
return
|
157
|
-
}
|
158
|
-
|
159
|
-
forward_PortfolioBackendApi_CreateRSSFeed_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
160
|
-
|
161
|
-
})
|
162
|
-
|
163
|
-
return nil
|
164
|
-
}
|
165
|
-
|
166
|
-
var (
|
167
|
-
pattern_PortfolioBackendApi_CreateRSSFeed_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"rss_feeds"}, ""))
|
168
|
-
)
|
169
|
-
|
170
|
-
var (
|
171
|
-
forward_PortfolioBackendApi_CreateRSSFeed_0 = runtime.ForwardResponseMessage
|
172
|
-
)
|