Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/supervisor-api/go/notification.pb.gw.go
2500 views
1
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
6
// source: notification.proto
7
8
/*
9
Package api is a reverse proxy.
10
11
It translates gRPC into RESTful JSON APIs.
12
*/
13
package api
14
15
import (
16
"context"
17
"io"
18
"net/http"
19
20
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
21
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
22
"google.golang.org/grpc"
23
"google.golang.org/grpc/codes"
24
"google.golang.org/grpc/grpclog"
25
"google.golang.org/grpc/metadata"
26
"google.golang.org/grpc/status"
27
"google.golang.org/protobuf/proto"
28
)
29
30
// Suppress "imported and not used" errors
31
var _ codes.Code
32
var _ io.Reader
33
var _ status.Status
34
var _ = runtime.String
35
var _ = utilities.NewDoubleArray
36
var _ = metadata.Join
37
38
var (
39
filter_NotificationService_Notify_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
40
)
41
42
func request_NotificationService_Notify_0(ctx context.Context, marshaler runtime.Marshaler, client NotificationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
43
var protoReq NotifyRequest
44
var metadata runtime.ServerMetadata
45
46
if err := req.ParseForm(); err != nil {
47
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
48
}
49
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_Notify_0); err != nil {
50
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
51
}
52
53
msg, err := client.Notify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
54
return msg, metadata, err
55
56
}
57
58
func local_request_NotificationService_Notify_0(ctx context.Context, marshaler runtime.Marshaler, server NotificationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
59
var protoReq NotifyRequest
60
var metadata runtime.ServerMetadata
61
62
if err := req.ParseForm(); err != nil {
63
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
64
}
65
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_Notify_0); err != nil {
66
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
67
}
68
69
msg, err := server.Notify(ctx, &protoReq)
70
return msg, metadata, err
71
72
}
73
74
func request_NotificationService_Subscribe_0(ctx context.Context, marshaler runtime.Marshaler, client NotificationServiceClient, req *http.Request, pathParams map[string]string) (NotificationService_SubscribeClient, runtime.ServerMetadata, error) {
75
var protoReq SubscribeRequest
76
var metadata runtime.ServerMetadata
77
78
stream, err := client.Subscribe(ctx, &protoReq)
79
if err != nil {
80
return nil, metadata, err
81
}
82
header, err := stream.Header()
83
if err != nil {
84
return nil, metadata, err
85
}
86
metadata.HeaderMD = header
87
return stream, metadata, nil
88
89
}
90
91
var (
92
filter_NotificationService_Respond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
93
)
94
95
func request_NotificationService_Respond_0(ctx context.Context, marshaler runtime.Marshaler, client NotificationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
96
var protoReq RespondRequest
97
var metadata runtime.ServerMetadata
98
99
if err := req.ParseForm(); err != nil {
100
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
101
}
102
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_Respond_0); err != nil {
103
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
104
}
105
106
msg, err := client.Respond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
107
return msg, metadata, err
108
109
}
110
111
func local_request_NotificationService_Respond_0(ctx context.Context, marshaler runtime.Marshaler, server NotificationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
112
var protoReq RespondRequest
113
var metadata runtime.ServerMetadata
114
115
if err := req.ParseForm(); err != nil {
116
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
117
}
118
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_Respond_0); err != nil {
119
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
120
}
121
122
msg, err := server.Respond(ctx, &protoReq)
123
return msg, metadata, err
124
125
}
126
127
func request_NotificationService_SubscribeActive_0(ctx context.Context, marshaler runtime.Marshaler, client NotificationServiceClient, req *http.Request, pathParams map[string]string) (NotificationService_SubscribeActiveClient, runtime.ServerMetadata, error) {
128
var protoReq SubscribeActiveRequest
129
var metadata runtime.ServerMetadata
130
131
stream, err := client.SubscribeActive(ctx, &protoReq)
132
if err != nil {
133
return nil, metadata, err
134
}
135
header, err := stream.Header()
136
if err != nil {
137
return nil, metadata, err
138
}
139
metadata.HeaderMD = header
140
return stream, metadata, nil
141
142
}
143
144
var (
145
filter_NotificationService_NotifyActive_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
146
)
147
148
func request_NotificationService_NotifyActive_0(ctx context.Context, marshaler runtime.Marshaler, client NotificationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
149
var protoReq NotifyActiveRequest
150
var metadata runtime.ServerMetadata
151
152
if err := req.ParseForm(); err != nil {
153
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
154
}
155
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_NotifyActive_0); err != nil {
156
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
157
}
158
159
msg, err := client.NotifyActive(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
160
return msg, metadata, err
161
162
}
163
164
func local_request_NotificationService_NotifyActive_0(ctx context.Context, marshaler runtime.Marshaler, server NotificationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
165
var protoReq NotifyActiveRequest
166
var metadata runtime.ServerMetadata
167
168
if err := req.ParseForm(); err != nil {
169
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
170
}
171
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_NotifyActive_0); err != nil {
172
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
173
}
174
175
msg, err := server.NotifyActive(ctx, &protoReq)
176
return msg, metadata, err
177
178
}
179
180
var (
181
filter_NotificationService_NotifyActiveRespond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
182
)
183
184
func request_NotificationService_NotifyActiveRespond_0(ctx context.Context, marshaler runtime.Marshaler, client NotificationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
185
var protoReq NotifyActiveRespondRequest
186
var metadata runtime.ServerMetadata
187
188
if err := req.ParseForm(); err != nil {
189
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
190
}
191
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_NotifyActiveRespond_0); err != nil {
192
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
193
}
194
195
msg, err := client.NotifyActiveRespond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
196
return msg, metadata, err
197
198
}
199
200
func local_request_NotificationService_NotifyActiveRespond_0(ctx context.Context, marshaler runtime.Marshaler, server NotificationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
201
var protoReq NotifyActiveRespondRequest
202
var metadata runtime.ServerMetadata
203
204
if err := req.ParseForm(); err != nil {
205
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
206
}
207
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NotificationService_NotifyActiveRespond_0); err != nil {
208
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
209
}
210
211
msg, err := server.NotifyActiveRespond(ctx, &protoReq)
212
return msg, metadata, err
213
214
}
215
216
// RegisterNotificationServiceHandlerServer registers the http handlers for service NotificationService to "mux".
217
// UnaryRPC :call NotificationServiceServer directly.
218
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
219
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNotificationServiceHandlerFromEndpoint instead.
220
func RegisterNotificationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NotificationServiceServer) error {
221
222
mux.Handle("POST", pattern_NotificationService_Notify_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
223
ctx, cancel := context.WithCancel(req.Context())
224
defer cancel()
225
var stream runtime.ServerTransportStream
226
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
227
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
228
var err error
229
var annotatedContext context.Context
230
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/supervisor.NotificationService/Notify", runtime.WithHTTPPathPattern("/v1/notification/notify"))
231
if err != nil {
232
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
233
return
234
}
235
resp, md, err := local_request_NotificationService_Notify_0(annotatedContext, inboundMarshaler, server, req, pathParams)
236
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
237
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
238
if err != nil {
239
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
240
return
241
}
242
243
forward_NotificationService_Notify_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
244
245
})
246
247
mux.Handle("GET", pattern_NotificationService_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
248
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
249
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
250
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
251
return
252
})
253
254
mux.Handle("POST", pattern_NotificationService_Respond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
255
ctx, cancel := context.WithCancel(req.Context())
256
defer cancel()
257
var stream runtime.ServerTransportStream
258
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
259
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
260
var err error
261
var annotatedContext context.Context
262
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/supervisor.NotificationService/Respond", runtime.WithHTTPPathPattern("/v1/notification/respond"))
263
if err != nil {
264
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
265
return
266
}
267
resp, md, err := local_request_NotificationService_Respond_0(annotatedContext, inboundMarshaler, server, req, pathParams)
268
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
269
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
270
if err != nil {
271
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
272
return
273
}
274
275
forward_NotificationService_Respond_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
276
277
})
278
279
mux.Handle("POST", pattern_NotificationService_SubscribeActive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
280
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
281
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
282
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
283
return
284
})
285
286
mux.Handle("POST", pattern_NotificationService_NotifyActive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
287
ctx, cancel := context.WithCancel(req.Context())
288
defer cancel()
289
var stream runtime.ServerTransportStream
290
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
291
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
292
var err error
293
var annotatedContext context.Context
294
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/supervisor.NotificationService/NotifyActive", runtime.WithHTTPPathPattern("/v1/notification/notify-action"))
295
if err != nil {
296
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
297
return
298
}
299
resp, md, err := local_request_NotificationService_NotifyActive_0(annotatedContext, inboundMarshaler, server, req, pathParams)
300
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
301
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
302
if err != nil {
303
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
304
return
305
}
306
307
forward_NotificationService_NotifyActive_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
308
309
})
310
311
mux.Handle("POST", pattern_NotificationService_NotifyActiveRespond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
312
ctx, cancel := context.WithCancel(req.Context())
313
defer cancel()
314
var stream runtime.ServerTransportStream
315
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
316
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
317
var err error
318
var annotatedContext context.Context
319
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/supervisor.NotificationService/NotifyActiveRespond", runtime.WithHTTPPathPattern("/v1/notification/notify-action-respond"))
320
if err != nil {
321
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
322
return
323
}
324
resp, md, err := local_request_NotificationService_NotifyActiveRespond_0(annotatedContext, inboundMarshaler, server, req, pathParams)
325
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
326
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
327
if err != nil {
328
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
329
return
330
}
331
332
forward_NotificationService_NotifyActiveRespond_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
333
334
})
335
336
return nil
337
}
338
339
// RegisterNotificationServiceHandlerFromEndpoint is same as RegisterNotificationServiceHandler but
340
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
341
func RegisterNotificationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
342
conn, err := grpc.Dial(endpoint, opts...)
343
if err != nil {
344
return err
345
}
346
defer func() {
347
if err != nil {
348
if cerr := conn.Close(); cerr != nil {
349
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
350
}
351
return
352
}
353
go func() {
354
<-ctx.Done()
355
if cerr := conn.Close(); cerr != nil {
356
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
357
}
358
}()
359
}()
360
361
return RegisterNotificationServiceHandler(ctx, mux, conn)
362
}
363
364
// RegisterNotificationServiceHandler registers the http handlers for service NotificationService to "mux".
365
// The handlers forward requests to the grpc endpoint over "conn".
366
func RegisterNotificationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
367
return RegisterNotificationServiceHandlerClient(ctx, mux, NewNotificationServiceClient(conn))
368
}
369
370
// RegisterNotificationServiceHandlerClient registers the http handlers for service NotificationService
371
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NotificationServiceClient".
372
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NotificationServiceClient"
373
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
374
// "NotificationServiceClient" to call the correct interceptors.
375
func RegisterNotificationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NotificationServiceClient) error {
376
377
mux.Handle("POST", pattern_NotificationService_Notify_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
378
ctx, cancel := context.WithCancel(req.Context())
379
defer cancel()
380
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
381
var err error
382
var annotatedContext context.Context
383
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.NotificationService/Notify", runtime.WithHTTPPathPattern("/v1/notification/notify"))
384
if err != nil {
385
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
386
return
387
}
388
resp, md, err := request_NotificationService_Notify_0(annotatedContext, inboundMarshaler, client, req, pathParams)
389
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
390
if err != nil {
391
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
392
return
393
}
394
395
forward_NotificationService_Notify_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
396
397
})
398
399
mux.Handle("GET", pattern_NotificationService_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
400
ctx, cancel := context.WithCancel(req.Context())
401
defer cancel()
402
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
403
var err error
404
var annotatedContext context.Context
405
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.NotificationService/Subscribe", runtime.WithHTTPPathPattern("/v1/notification/subscribe"))
406
if err != nil {
407
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
408
return
409
}
410
resp, md, err := request_NotificationService_Subscribe_0(annotatedContext, inboundMarshaler, client, req, pathParams)
411
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
412
if err != nil {
413
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
414
return
415
}
416
417
forward_NotificationService_Subscribe_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
418
419
})
420
421
mux.Handle("POST", pattern_NotificationService_Respond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
422
ctx, cancel := context.WithCancel(req.Context())
423
defer cancel()
424
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
425
var err error
426
var annotatedContext context.Context
427
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.NotificationService/Respond", runtime.WithHTTPPathPattern("/v1/notification/respond"))
428
if err != nil {
429
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
430
return
431
}
432
resp, md, err := request_NotificationService_Respond_0(annotatedContext, inboundMarshaler, client, req, pathParams)
433
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
434
if err != nil {
435
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
436
return
437
}
438
439
forward_NotificationService_Respond_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
440
441
})
442
443
mux.Handle("POST", pattern_NotificationService_SubscribeActive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
444
ctx, cancel := context.WithCancel(req.Context())
445
defer cancel()
446
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
447
var err error
448
var annotatedContext context.Context
449
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.NotificationService/SubscribeActive", runtime.WithHTTPPathPattern("/v1/notification/subscribe-active"))
450
if err != nil {
451
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
452
return
453
}
454
resp, md, err := request_NotificationService_SubscribeActive_0(annotatedContext, inboundMarshaler, client, req, pathParams)
455
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
456
if err != nil {
457
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
458
return
459
}
460
461
forward_NotificationService_SubscribeActive_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
462
463
})
464
465
mux.Handle("POST", pattern_NotificationService_NotifyActive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
466
ctx, cancel := context.WithCancel(req.Context())
467
defer cancel()
468
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
469
var err error
470
var annotatedContext context.Context
471
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.NotificationService/NotifyActive", runtime.WithHTTPPathPattern("/v1/notification/notify-action"))
472
if err != nil {
473
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
474
return
475
}
476
resp, md, err := request_NotificationService_NotifyActive_0(annotatedContext, inboundMarshaler, client, req, pathParams)
477
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
478
if err != nil {
479
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
480
return
481
}
482
483
forward_NotificationService_NotifyActive_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
484
485
})
486
487
mux.Handle("POST", pattern_NotificationService_NotifyActiveRespond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
488
ctx, cancel := context.WithCancel(req.Context())
489
defer cancel()
490
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
491
var err error
492
var annotatedContext context.Context
493
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.NotificationService/NotifyActiveRespond", runtime.WithHTTPPathPattern("/v1/notification/notify-action-respond"))
494
if err != nil {
495
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
496
return
497
}
498
resp, md, err := request_NotificationService_NotifyActiveRespond_0(annotatedContext, inboundMarshaler, client, req, pathParams)
499
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
500
if err != nil {
501
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
502
return
503
}
504
505
forward_NotificationService_NotifyActiveRespond_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
506
507
})
508
509
return nil
510
}
511
512
var (
513
pattern_NotificationService_Notify_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notification", "notify"}, ""))
514
515
pattern_NotificationService_Subscribe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notification", "subscribe"}, ""))
516
517
pattern_NotificationService_Respond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notification", "respond"}, ""))
518
519
pattern_NotificationService_SubscribeActive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notification", "subscribe-active"}, ""))
520
521
pattern_NotificationService_NotifyActive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notification", "notify-action"}, ""))
522
523
pattern_NotificationService_NotifyActiveRespond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notification", "notify-action-respond"}, ""))
524
)
525
526
var (
527
forward_NotificationService_Notify_0 = runtime.ForwardResponseMessage
528
529
forward_NotificationService_Subscribe_0 = runtime.ForwardResponseStream
530
531
forward_NotificationService_Respond_0 = runtime.ForwardResponseMessage
532
533
forward_NotificationService_SubscribeActive_0 = runtime.ForwardResponseStream
534
535
forward_NotificationService_NotifyActive_0 = runtime.ForwardResponseMessage
536
537
forward_NotificationService_NotifyActiveRespond_0 = runtime.ForwardResponseMessage
538
)
539
540