igsr5-portfolio-proto 0.0.12 → 0.0.13

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: d3491edb1b19ecdf94f0c175c61e0b5759fc5c3ecb4ca3c29b36eb8b289552d6
4
+ data.tar.gz: b870f6ab973761fc97f6bd00e70485aedb80d3f3911bb92cf26251aa9f68b1a4
5
5
  SHA512:
6
- metadata.gz: 03ec16091fe60278d36769ae7ab230efa2cfb0710f991c907eb3fceec7eba8ffa27c482647a47e532427a4e5094c29e3e56d3451381d5c3a6155d403aded470a
7
- data.tar.gz: 20575dbd4575192d29b3dd834a62adee823cb61e8ced7e8f5dafc178ce9c2fd9e23d8a3adbd18a4ecdde70d21168a9c0a222c495756364c47defd09a4659ffbb
6
+ metadata.gz: ae61a3a99f5a189ac01fff867f6edf928e07315e91861b7e1cdb05a77243b14f6a6c41a2cfb669143a5d2645ecf3f3981d3b79c5ceadd57427029e0cfea51944
7
+ data.tar.gz: 5263fffb5aed9084a69f2a84d7c3cd0d072abe4cff45b4795432c43b8b80e15e1b3c091374955d3d7b09cdc339adb2f75591dca168a03d01ab1e7b0f8d226a7b
@@ -0,0 +1,172 @@
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
+ )
@@ -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.13"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - igsr5
@@ -52,6 +52,7 @@ files:
52
52
  - Rakefile
53
53
  - bin/console
54
54
  - bin/setup
55
+ - lib/api/api.pb.gw.go
55
56
  - lib/portfolio.rb
56
57
  - lib/portfolio/version.rb
57
58
  - lib/proto/api_pb.rb