154 lines
5.5 KiB
Go
154 lines
5.5 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: invoicesrpc/invoices.proto
|
|
|
|
package invoicesrpc // import "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import lnrpc "github.com/lightningnetwork/lnd/lnrpc"
|
|
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// InvoicesClient is the client API for Invoices service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type InvoicesClient interface {
|
|
// *
|
|
// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
|
// to notify the client of state transitions of the specified invoice.
|
|
// Initially the current invoice state is always sent out.
|
|
SubscribeSingleInvoice(ctx context.Context, in *lnrpc.PaymentHash, opts ...grpc.CallOption) (Invoices_SubscribeSingleInvoiceClient, error)
|
|
}
|
|
|
|
type invoicesClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewInvoicesClient(cc *grpc.ClientConn) InvoicesClient {
|
|
return &invoicesClient{cc}
|
|
}
|
|
|
|
func (c *invoicesClient) SubscribeSingleInvoice(ctx context.Context, in *lnrpc.PaymentHash, opts ...grpc.CallOption) (Invoices_SubscribeSingleInvoiceClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_Invoices_serviceDesc.Streams[0], "/invoicesrpc.Invoices/SubscribeSingleInvoice", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &invoicesSubscribeSingleInvoiceClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type Invoices_SubscribeSingleInvoiceClient interface {
|
|
Recv() (*lnrpc.Invoice, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type invoicesSubscribeSingleInvoiceClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *invoicesSubscribeSingleInvoiceClient) Recv() (*lnrpc.Invoice, error) {
|
|
m := new(lnrpc.Invoice)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// InvoicesServer is the server API for Invoices service.
|
|
type InvoicesServer interface {
|
|
// *
|
|
// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
|
|
// to notify the client of state transitions of the specified invoice.
|
|
// Initially the current invoice state is always sent out.
|
|
SubscribeSingleInvoice(*lnrpc.PaymentHash, Invoices_SubscribeSingleInvoiceServer) error
|
|
}
|
|
|
|
func RegisterInvoicesServer(s *grpc.Server, srv InvoicesServer) {
|
|
s.RegisterService(&_Invoices_serviceDesc, srv)
|
|
}
|
|
|
|
func _Invoices_SubscribeSingleInvoice_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(lnrpc.PaymentHash)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(InvoicesServer).SubscribeSingleInvoice(m, &invoicesSubscribeSingleInvoiceServer{stream})
|
|
}
|
|
|
|
type Invoices_SubscribeSingleInvoiceServer interface {
|
|
Send(*lnrpc.Invoice) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type invoicesSubscribeSingleInvoiceServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *invoicesSubscribeSingleInvoiceServer) Send(m *lnrpc.Invoice) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
var _Invoices_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "invoicesrpc.Invoices",
|
|
HandlerType: (*InvoicesServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "SubscribeSingleInvoice",
|
|
Handler: _Invoices_SubscribeSingleInvoice_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "invoicesrpc/invoices.proto",
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("invoicesrpc/invoices.proto", fileDescriptor_invoices_c6414974947f2940)
|
|
}
|
|
|
|
var fileDescriptor_invoices_c6414974947f2940 = []byte{
|
|
// 177 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8e, 0xb1, 0x8e, 0xc2, 0x30,
|
|
0x10, 0x44, 0x75, 0xcd, 0xe9, 0x2e, 0x27, 0x5d, 0xe1, 0x82, 0xc2, 0xe2, 0x1b, 0xb2, 0x40, 0x7a,
|
|
0x0a, 0x2a, 0xa0, 0x42, 0x4a, 0x47, 0x67, 0x1b, 0xcb, 0x59, 0xe1, 0xec, 0x5a, 0xce, 0x06, 0xc4,
|
|
0xdf, 0x23, 0x82, 0x91, 0xd2, 0x8d, 0x66, 0xe6, 0x49, 0xaf, 0xd2, 0x48, 0x37, 0x46, 0xe7, 0x87,
|
|
0x9c, 0x1c, 0x7c, 0x72, 0x9d, 0x32, 0x0b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