@agoric/cosmos 0.34.2-dev-29ef60f.0 → 0.34.2-dev-f84ea2e.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,6 +87,78 @@ func local_request_Query_Data_0(ctx context.Context, marshaler runtime.Marshaler
87
87
 
88
88
  }
89
89
 
90
+ var (
91
+ filter_Query_CapData_0 = &utilities.DoubleArray{Encoding: map[string]int{"path": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
92
+ )
93
+
94
+ func request_Query_CapData_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
95
+ var protoReq QueryCapDataRequest
96
+ var metadata runtime.ServerMetadata
97
+
98
+ var (
99
+ val string
100
+ ok bool
101
+ err error
102
+ _ = err
103
+ )
104
+
105
+ val, ok = pathParams["path"]
106
+ if !ok {
107
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path")
108
+ }
109
+
110
+ protoReq.Path, err = runtime.String(val)
111
+
112
+ if err != nil {
113
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err)
114
+ }
115
+
116
+ if err := req.ParseForm(); err != nil {
117
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
118
+ }
119
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CapData_0); err != nil {
120
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
121
+ }
122
+
123
+ msg, err := client.CapData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
124
+ return msg, metadata, err
125
+
126
+ }
127
+
128
+ func local_request_Query_CapData_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
129
+ var protoReq QueryCapDataRequest
130
+ var metadata runtime.ServerMetadata
131
+
132
+ var (
133
+ val string
134
+ ok bool
135
+ err error
136
+ _ = err
137
+ )
138
+
139
+ val, ok = pathParams["path"]
140
+ if !ok {
141
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path")
142
+ }
143
+
144
+ protoReq.Path, err = runtime.String(val)
145
+
146
+ if err != nil {
147
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err)
148
+ }
149
+
150
+ if err := req.ParseForm(); err != nil {
151
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
152
+ }
153
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CapData_0); err != nil {
154
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
155
+ }
156
+
157
+ msg, err := server.CapData(ctx, &protoReq)
158
+ return msg, metadata, err
159
+
160
+ }
161
+
90
162
  var (
91
163
  filter_Query_Children_0 = &utilities.DoubleArray{Encoding: map[string]int{"path": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
92
164
  )
@@ -188,6 +260,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
188
260
 
189
261
  })
190
262
 
263
+ mux.Handle("GET", pattern_Query_CapData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
264
+ ctx, cancel := context.WithCancel(req.Context())
265
+ defer cancel()
266
+ var stream runtime.ServerTransportStream
267
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
268
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
269
+ rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
270
+ if err != nil {
271
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
272
+ return
273
+ }
274
+ resp, md, err := local_request_Query_CapData_0(rctx, inboundMarshaler, server, req, pathParams)
275
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
276
+ ctx = runtime.NewServerMetadataContext(ctx, md)
277
+ if err != nil {
278
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
279
+ return
280
+ }
281
+
282
+ forward_Query_CapData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
283
+
284
+ })
285
+
191
286
  mux.Handle("GET", pattern_Query_Children_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
192
287
  ctx, cancel := context.WithCancel(req.Context())
193
288
  defer cancel()
@@ -272,6 +367,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
272
367
 
273
368
  })
274
369
 
370
+ mux.Handle("GET", pattern_Query_CapData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
371
+ ctx, cancel := context.WithCancel(req.Context())
372
+ defer cancel()
373
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
374
+ rctx, err := runtime.AnnotateContext(ctx, mux, req)
375
+ if err != nil {
376
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
377
+ return
378
+ }
379
+ resp, md, err := request_Query_CapData_0(rctx, inboundMarshaler, client, req, pathParams)
380
+ ctx = runtime.NewServerMetadataContext(ctx, md)
381
+ if err != nil {
382
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
383
+ return
384
+ }
385
+
386
+ forward_Query_CapData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
387
+
388
+ })
389
+
275
390
  mux.Handle("GET", pattern_Query_Children_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
276
391
  ctx, cancel := context.WithCancel(req.Context())
277
392
  defer cancel()
@@ -298,11 +413,15 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
298
413
  var (
299
414
  pattern_Query_Data_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"agoric", "vstorage", "data", "path"}, "", runtime.AssumeColonVerbOpt(false)))
300
415
 
416
+ pattern_Query_CapData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"agoric", "vstorage", "capdata", "path"}, "", runtime.AssumeColonVerbOpt(false)))
417
+
301
418
  pattern_Query_Children_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"agoric", "vstorage", "children", "path"}, "", runtime.AssumeColonVerbOpt(false)))
302
419
  )
303
420
 
304
421
  var (
305
422
  forward_Query_Data_0 = runtime.ForwardResponseMessage
306
423
 
424
+ forward_Query_CapData_0 = runtime.ForwardResponseMessage
425
+
307
426
  forward_Query_Children_0 = runtime.ForwardResponseMessage
308
427
  )