• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 13481890706

23 Feb 2025 09:53AM UTC coverage: 46.221% (-12.6%) from 58.825%
13481890706

Pull #9521

github

web-flow
Merge 9fb980a6f into 5fe900d18
Pull Request #9521: unit: remove GOACC, use Go 1.20 native coverage functionality

105094 of 227374 relevant lines covered (46.22%)

19705.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lnrpc/invoicesrpc/invoices.pb.gw.go
1
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
2
// source: invoicesrpc/invoices.proto
3

4
/*
5
Package invoicesrpc is a reverse proxy.
6

7
It translates gRPC into RESTful JSON APIs.
8
*/
9
package invoicesrpc
10

11
import (
12
        "context"
13
        "io"
14
        "net/http"
15

16
        "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
17
        "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
18
        "google.golang.org/grpc"
19
        "google.golang.org/grpc/codes"
20
        "google.golang.org/grpc/grpclog"
21
        "google.golang.org/grpc/metadata"
22
        "google.golang.org/grpc/status"
23
        "google.golang.org/protobuf/proto"
24
)
25

26
// Suppress "imported and not used" errors
27
var _ codes.Code
28
var _ io.Reader
29
var _ status.Status
30
var _ = runtime.String
31
var _ = utilities.NewDoubleArray
32
var _ = metadata.Join
33

34
func request_Invoices_SubscribeSingleInvoice_0(ctx context.Context, marshaler runtime.Marshaler, client InvoicesClient, req *http.Request, pathParams map[string]string) (Invoices_SubscribeSingleInvoiceClient, runtime.ServerMetadata, error) {
×
35
        var protoReq SubscribeSingleInvoiceRequest
×
36
        var metadata runtime.ServerMetadata
×
37

×
38
        var (
×
39
                val string
×
40
                ok  bool
×
41
                err error
×
42
                _   = err
×
43
        )
×
44

×
45
        val, ok = pathParams["r_hash"]
×
46
        if !ok {
×
47
                return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "r_hash")
×
48
        }
×
49

50
        protoReq.RHash, err = runtime.Bytes(val)
×
51
        if err != nil {
×
52
                return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "r_hash", err)
×
53
        }
×
54

55
        stream, err := client.SubscribeSingleInvoice(ctx, &protoReq)
×
56
        if err != nil {
×
57
                return nil, metadata, err
×
58
        }
×
59
        header, err := stream.Header()
×
60
        if err != nil {
×
61
                return nil, metadata, err
×
62
        }
×
63
        metadata.HeaderMD = header
×
64
        return stream, metadata, nil
×
65

66
}
67

68
func request_Invoices_CancelInvoice_0(ctx context.Context, marshaler runtime.Marshaler, client InvoicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
69
        var protoReq CancelInvoiceMsg
×
70
        var metadata runtime.ServerMetadata
×
71

×
72
        newReader, berr := utilities.IOReaderFactory(req.Body)
×
73
        if berr != nil {
×
74
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
×
75
        }
×
76
        if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
×
77
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
78
        }
×
79

80
        msg, err := client.CancelInvoice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
×
81
        return msg, metadata, err
×
82

83
}
84

85
func local_request_Invoices_CancelInvoice_0(ctx context.Context, marshaler runtime.Marshaler, server InvoicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
86
        var protoReq CancelInvoiceMsg
×
87
        var metadata runtime.ServerMetadata
×
88

×
89
        newReader, berr := utilities.IOReaderFactory(req.Body)
×
90
        if berr != nil {
×
91
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
×
92
        }
×
93
        if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
×
94
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
95
        }
×
96

97
        msg, err := server.CancelInvoice(ctx, &protoReq)
×
98
        return msg, metadata, err
×
99

100
}
101

102
func request_Invoices_AddHoldInvoice_0(ctx context.Context, marshaler runtime.Marshaler, client InvoicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
103
        var protoReq AddHoldInvoiceRequest
×
104
        var metadata runtime.ServerMetadata
×
105

×
106
        newReader, berr := utilities.IOReaderFactory(req.Body)
×
107
        if berr != nil {
×
108
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
×
109
        }
×
110
        if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
×
111
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
112
        }
×
113

114
        msg, err := client.AddHoldInvoice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
×
115
        return msg, metadata, err
×
116

117
}
118

119
func local_request_Invoices_AddHoldInvoice_0(ctx context.Context, marshaler runtime.Marshaler, server InvoicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
120
        var protoReq AddHoldInvoiceRequest
×
121
        var metadata runtime.ServerMetadata
×
122

×
123
        newReader, berr := utilities.IOReaderFactory(req.Body)
×
124
        if berr != nil {
×
125
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
×
126
        }
×
127
        if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
×
128
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
129
        }
×
130

131
        msg, err := server.AddHoldInvoice(ctx, &protoReq)
×
132
        return msg, metadata, err
×
133

134
}
135

136
func request_Invoices_SettleInvoice_0(ctx context.Context, marshaler runtime.Marshaler, client InvoicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
137
        var protoReq SettleInvoiceMsg
×
138
        var metadata runtime.ServerMetadata
×
139

×
140
        newReader, berr := utilities.IOReaderFactory(req.Body)
×
141
        if berr != nil {
×
142
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
×
143
        }
×
144
        if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
×
145
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
146
        }
×
147

148
        msg, err := client.SettleInvoice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
×
149
        return msg, metadata, err
×
150

151
}
152

153
func local_request_Invoices_SettleInvoice_0(ctx context.Context, marshaler runtime.Marshaler, server InvoicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
154
        var protoReq SettleInvoiceMsg
×
155
        var metadata runtime.ServerMetadata
×
156

×
157
        newReader, berr := utilities.IOReaderFactory(req.Body)
×
158
        if berr != nil {
×
159
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
×
160
        }
×
161
        if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
×
162
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
163
        }
×
164

165
        msg, err := server.SettleInvoice(ctx, &protoReq)
×
166
        return msg, metadata, err
×
167

168
}
169

170
var (
171
        filter_Invoices_LookupInvoiceV2_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
172
)
173

174
func request_Invoices_LookupInvoiceV2_0(ctx context.Context, marshaler runtime.Marshaler, client InvoicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
175
        var protoReq LookupInvoiceMsg
×
176
        var metadata runtime.ServerMetadata
×
177

×
178
        if err := req.ParseForm(); err != nil {
×
179
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
180
        }
×
181
        if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Invoices_LookupInvoiceV2_0); err != nil {
×
182
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
183
        }
×
184

185
        msg, err := client.LookupInvoiceV2(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
×
186
        return msg, metadata, err
×
187

188
}
189

190
func local_request_Invoices_LookupInvoiceV2_0(ctx context.Context, marshaler runtime.Marshaler, server InvoicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
×
191
        var protoReq LookupInvoiceMsg
×
192
        var metadata runtime.ServerMetadata
×
193

×
194
        if err := req.ParseForm(); err != nil {
×
195
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
196
        }
×
197
        if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Invoices_LookupInvoiceV2_0); err != nil {
×
198
                return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
×
199
        }
×
200

201
        msg, err := server.LookupInvoiceV2(ctx, &protoReq)
×
202
        return msg, metadata, err
×
203

204
}
205

206
func request_Invoices_HtlcModifier_0(ctx context.Context, marshaler runtime.Marshaler, client InvoicesClient, req *http.Request, pathParams map[string]string) (Invoices_HtlcModifierClient, runtime.ServerMetadata, error) {
×
207
        var metadata runtime.ServerMetadata
×
208
        stream, err := client.HtlcModifier(ctx)
×
209
        if err != nil {
×
210
                grpclog.Infof("Failed to start streaming: %v", err)
×
211
                return nil, metadata, err
×
212
        }
×
213
        dec := marshaler.NewDecoder(req.Body)
×
214
        handleSend := func() error {
×
215
                var protoReq HtlcModifyResponse
×
216
                err := dec.Decode(&protoReq)
×
217
                if err == io.EOF {
×
218
                        return err
×
219
                }
×
220
                if err != nil {
×
221
                        grpclog.Infof("Failed to decode request: %v", err)
×
222
                        return err
×
223
                }
×
224
                if err := stream.Send(&protoReq); err != nil {
×
225
                        grpclog.Infof("Failed to send request: %v", err)
×
226
                        return err
×
227
                }
×
228
                return nil
×
229
        }
230
        if err := handleSend(); err != nil {
×
231
                if cerr := stream.CloseSend(); cerr != nil {
×
232
                        grpclog.Infof("Failed to terminate client stream: %v", cerr)
×
233
                }
×
234
                if err == io.EOF {
×
235
                        return stream, metadata, nil
×
236
                }
×
237
                return nil, metadata, err
×
238
        }
239
        go func() {
×
240
                for {
×
241
                        if err := handleSend(); err != nil {
×
242
                                break
×
243
                        }
244
                }
245
                if err := stream.CloseSend(); err != nil {
×
246
                        grpclog.Infof("Failed to terminate client stream: %v", err)
×
247
                }
×
248
        }()
249
        header, err := stream.Header()
×
250
        if err != nil {
×
251
                grpclog.Infof("Failed to get header from client: %v", err)
×
252
                return nil, metadata, err
×
253
        }
×
254
        metadata.HeaderMD = header
×
255
        return stream, metadata, nil
×
256
}
257

258
// RegisterInvoicesHandlerServer registers the http handlers for service Invoices to "mux".
259
// UnaryRPC     :call InvoicesServer directly.
260
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
261
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInvoicesHandlerFromEndpoint instead.
262
func RegisterInvoicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InvoicesServer) error {
×
263

×
264
        mux.Handle("GET", pattern_Invoices_SubscribeSingleInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
265
                err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
×
266
                _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
267
                runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
268
                return
×
269
        })
×
270

271
        mux.Handle("POST", pattern_Invoices_CancelInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
272
                ctx, cancel := context.WithCancel(req.Context())
×
273
                defer cancel()
×
274
                var stream runtime.ServerTransportStream
×
275
                ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
×
276
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
277
                rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/invoicesrpc.Invoices/CancelInvoice", runtime.WithHTTPPathPattern("/v2/invoices/cancel"))
×
278
                if err != nil {
×
279
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
280
                        return
×
281
                }
×
282
                resp, md, err := local_request_Invoices_CancelInvoice_0(rctx, inboundMarshaler, server, req, pathParams)
×
283
                md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
×
284
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
285
                if err != nil {
×
286
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
287
                        return
×
288
                }
×
289

290
                forward_Invoices_CancelInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
291

292
        })
293

294
        mux.Handle("POST", pattern_Invoices_AddHoldInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
295
                ctx, cancel := context.WithCancel(req.Context())
×
296
                defer cancel()
×
297
                var stream runtime.ServerTransportStream
×
298
                ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
×
299
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
300
                rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/invoicesrpc.Invoices/AddHoldInvoice", runtime.WithHTTPPathPattern("/v2/invoices/hodl"))
×
301
                if err != nil {
×
302
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
303
                        return
×
304
                }
×
305
                resp, md, err := local_request_Invoices_AddHoldInvoice_0(rctx, inboundMarshaler, server, req, pathParams)
×
306
                md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
×
307
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
308
                if err != nil {
×
309
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
310
                        return
×
311
                }
×
312

313
                forward_Invoices_AddHoldInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
314

315
        })
316

317
        mux.Handle("POST", pattern_Invoices_SettleInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
318
                ctx, cancel := context.WithCancel(req.Context())
×
319
                defer cancel()
×
320
                var stream runtime.ServerTransportStream
×
321
                ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
×
322
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
323
                rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/invoicesrpc.Invoices/SettleInvoice", runtime.WithHTTPPathPattern("/v2/invoices/settle"))
×
324
                if err != nil {
×
325
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
326
                        return
×
327
                }
×
328
                resp, md, err := local_request_Invoices_SettleInvoice_0(rctx, inboundMarshaler, server, req, pathParams)
×
329
                md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
×
330
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
331
                if err != nil {
×
332
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
333
                        return
×
334
                }
×
335

336
                forward_Invoices_SettleInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
337

338
        })
339

340
        mux.Handle("GET", pattern_Invoices_LookupInvoiceV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
341
                ctx, cancel := context.WithCancel(req.Context())
×
342
                defer cancel()
×
343
                var stream runtime.ServerTransportStream
×
344
                ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
×
345
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
346
                rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/invoicesrpc.Invoices/LookupInvoiceV2", runtime.WithHTTPPathPattern("/v2/invoices/lookup"))
×
347
                if err != nil {
×
348
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
349
                        return
×
350
                }
×
351
                resp, md, err := local_request_Invoices_LookupInvoiceV2_0(rctx, inboundMarshaler, server, req, pathParams)
×
352
                md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
×
353
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
354
                if err != nil {
×
355
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
356
                        return
×
357
                }
×
358

359
                forward_Invoices_LookupInvoiceV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
360

361
        })
362

363
        mux.Handle("POST", pattern_Invoices_HtlcModifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
364
                err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
×
365
                _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
366
                runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
367
                return
×
368
        })
×
369

370
        return nil
×
371
}
372

373
// RegisterInvoicesHandlerFromEndpoint is same as RegisterInvoicesHandler but
374
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
375
func RegisterInvoicesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
×
376
        conn, err := grpc.Dial(endpoint, opts...)
×
377
        if err != nil {
×
378
                return err
×
379
        }
×
380
        defer func() {
×
381
                if err != nil {
×
382
                        if cerr := conn.Close(); cerr != nil {
×
383
                                grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
×
384
                        }
×
385
                        return
×
386
                }
387
                go func() {
×
388
                        <-ctx.Done()
×
389
                        if cerr := conn.Close(); cerr != nil {
×
390
                                grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
×
391
                        }
×
392
                }()
393
        }()
394

395
        return RegisterInvoicesHandler(ctx, mux, conn)
×
396
}
397

398
// RegisterInvoicesHandler registers the http handlers for service Invoices to "mux".
399
// The handlers forward requests to the grpc endpoint over "conn".
400
func RegisterInvoicesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
×
401
        return RegisterInvoicesHandlerClient(ctx, mux, NewInvoicesClient(conn))
×
402
}
×
403

404
// RegisterInvoicesHandlerClient registers the http handlers for service Invoices
405
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InvoicesClient".
406
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InvoicesClient"
407
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
408
// "InvoicesClient" to call the correct interceptors.
409
func RegisterInvoicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InvoicesClient) error {
×
410

×
411
        mux.Handle("GET", pattern_Invoices_SubscribeSingleInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
412
                ctx, cancel := context.WithCancel(req.Context())
×
413
                defer cancel()
×
414
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
415
                rctx, err := runtime.AnnotateContext(ctx, mux, req, "/invoicesrpc.Invoices/SubscribeSingleInvoice", runtime.WithHTTPPathPattern("/v2/invoices/subscribe/{r_hash}"))
×
416
                if err != nil {
×
417
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
418
                        return
×
419
                }
×
420
                resp, md, err := request_Invoices_SubscribeSingleInvoice_0(rctx, inboundMarshaler, client, req, pathParams)
×
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_Invoices_SubscribeSingleInvoice_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
×
428

429
        })
430

431
        mux.Handle("POST", pattern_Invoices_CancelInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
432
                ctx, cancel := context.WithCancel(req.Context())
×
433
                defer cancel()
×
434
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
435
                rctx, err := runtime.AnnotateContext(ctx, mux, req, "/invoicesrpc.Invoices/CancelInvoice", runtime.WithHTTPPathPattern("/v2/invoices/cancel"))
×
436
                if err != nil {
×
437
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
438
                        return
×
439
                }
×
440
                resp, md, err := request_Invoices_CancelInvoice_0(rctx, inboundMarshaler, client, req, pathParams)
×
441
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
442
                if err != nil {
×
443
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
444
                        return
×
445
                }
×
446

447
                forward_Invoices_CancelInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
448

449
        })
450

451
        mux.Handle("POST", pattern_Invoices_AddHoldInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
452
                ctx, cancel := context.WithCancel(req.Context())
×
453
                defer cancel()
×
454
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
455
                rctx, err := runtime.AnnotateContext(ctx, mux, req, "/invoicesrpc.Invoices/AddHoldInvoice", runtime.WithHTTPPathPattern("/v2/invoices/hodl"))
×
456
                if err != nil {
×
457
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
458
                        return
×
459
                }
×
460
                resp, md, err := request_Invoices_AddHoldInvoice_0(rctx, inboundMarshaler, client, req, pathParams)
×
461
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
462
                if err != nil {
×
463
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
464
                        return
×
465
                }
×
466

467
                forward_Invoices_AddHoldInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
468

469
        })
470

471
        mux.Handle("POST", pattern_Invoices_SettleInvoice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
472
                ctx, cancel := context.WithCancel(req.Context())
×
473
                defer cancel()
×
474
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
475
                rctx, err := runtime.AnnotateContext(ctx, mux, req, "/invoicesrpc.Invoices/SettleInvoice", runtime.WithHTTPPathPattern("/v2/invoices/settle"))
×
476
                if err != nil {
×
477
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
478
                        return
×
479
                }
×
480
                resp, md, err := request_Invoices_SettleInvoice_0(rctx, inboundMarshaler, client, req, pathParams)
×
481
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
482
                if err != nil {
×
483
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
484
                        return
×
485
                }
×
486

487
                forward_Invoices_SettleInvoice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
488

489
        })
490

491
        mux.Handle("GET", pattern_Invoices_LookupInvoiceV2_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
492
                ctx, cancel := context.WithCancel(req.Context())
×
493
                defer cancel()
×
494
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
495
                rctx, err := runtime.AnnotateContext(ctx, mux, req, "/invoicesrpc.Invoices/LookupInvoiceV2", runtime.WithHTTPPathPattern("/v2/invoices/lookup"))
×
496
                if err != nil {
×
497
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
498
                        return
×
499
                }
×
500
                resp, md, err := request_Invoices_LookupInvoiceV2_0(rctx, inboundMarshaler, client, req, pathParams)
×
501
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
502
                if err != nil {
×
503
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
504
                        return
×
505
                }
×
506

507
                forward_Invoices_LookupInvoiceV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
×
508

509
        })
510

511
        mux.Handle("POST", pattern_Invoices_HtlcModifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
×
512
                ctx, cancel := context.WithCancel(req.Context())
×
513
                defer cancel()
×
514
                inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
×
515
                rctx, err := runtime.AnnotateContext(ctx, mux, req, "/invoicesrpc.Invoices/HtlcModifier", runtime.WithHTTPPathPattern("/v2/invoices/htlcmodifier"))
×
516
                if err != nil {
×
517
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
518
                        return
×
519
                }
×
520
                resp, md, err := request_Invoices_HtlcModifier_0(rctx, inboundMarshaler, client, req, pathParams)
×
521
                ctx = runtime.NewServerMetadataContext(ctx, md)
×
522
                if err != nil {
×
523
                        runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
×
524
                        return
×
525
                }
×
526

527
                forward_Invoices_HtlcModifier_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
×
528

529
        })
530

531
        return nil
×
532
}
533

534
var (
535
        pattern_Invoices_SubscribeSingleInvoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "invoices", "subscribe", "r_hash"}, ""))
536

537
        pattern_Invoices_CancelInvoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "invoices", "cancel"}, ""))
538

539
        pattern_Invoices_AddHoldInvoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "invoices", "hodl"}, ""))
540

541
        pattern_Invoices_SettleInvoice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "invoices", "settle"}, ""))
542

543
        pattern_Invoices_LookupInvoiceV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "invoices", "lookup"}, ""))
544

545
        pattern_Invoices_HtlcModifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "invoices", "htlcmodifier"}, ""))
546
)
547

548
var (
549
        forward_Invoices_SubscribeSingleInvoice_0 = runtime.ForwardResponseStream
550

551
        forward_Invoices_CancelInvoice_0 = runtime.ForwardResponseMessage
552

553
        forward_Invoices_AddHoldInvoice_0 = runtime.ForwardResponseMessage
554

555
        forward_Invoices_SettleInvoice_0 = runtime.ForwardResponseMessage
556

557
        forward_Invoices_LookupInvoiceV2_0 = runtime.ForwardResponseMessage
558

559
        forward_Invoices_HtlcModifier_0 = runtime.ForwardResponseStream
560
)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc