157 lines
4.5 KiB
Go
157 lines
4.5 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: rpc.proto
|
|
// DO NOT EDIT!
|
|
|
|
/*
|
|
Package lnrpc is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
rpc.proto
|
|
|
|
It has these top-level messages:
|
|
SendManyRequest
|
|
SendManyResponse
|
|
NewAddressRequest
|
|
NewAddressResponse
|
|
*/
|
|
package lnrpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
|
|
type SendManyRequest struct {
|
|
AddrToAmount map[string]uint64 `protobuf:"bytes,1,rep" json:"AddrToAmount,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
|
}
|
|
|
|
func (m *SendManyRequest) Reset() { *m = SendManyRequest{} }
|
|
func (m *SendManyRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SendManyRequest) ProtoMessage() {}
|
|
|
|
func (m *SendManyRequest) GetAddrToAmount() map[string]uint64 {
|
|
if m != nil {
|
|
return m.AddrToAmount
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type SendManyResponse struct {
|
|
Txid string `protobuf:"bytes,1,opt,name=txid" json:"txid,omitempty"`
|
|
}
|
|
|
|
func (m *SendManyResponse) Reset() { *m = SendManyResponse{} }
|
|
func (m *SendManyResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*SendManyResponse) ProtoMessage() {}
|
|
|
|
type NewAddressRequest struct {
|
|
}
|
|
|
|
func (m *NewAddressRequest) Reset() { *m = NewAddressRequest{} }
|
|
func (m *NewAddressRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*NewAddressRequest) ProtoMessage() {}
|
|
|
|
type NewAddressResponse struct {
|
|
Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"`
|
|
}
|
|
|
|
func (m *NewAddressResponse) Reset() { *m = NewAddressResponse{} }
|
|
func (m *NewAddressResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*NewAddressResponse) ProtoMessage() {}
|
|
|
|
func init() {
|
|
}
|
|
|
|
// Client API for LightningServer service
|
|
|
|
type LightningServerClient interface {
|
|
SendMany(ctx context.Context, in *SendManyRequest, opts ...grpc.CallOption) (*SendManyResponse, error)
|
|
NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error)
|
|
}
|
|
|
|
type lightningServerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewLightningServerClient(cc *grpc.ClientConn) LightningServerClient {
|
|
return &lightningServerClient{cc}
|
|
}
|
|
|
|
func (c *lightningServerClient) SendMany(ctx context.Context, in *SendManyRequest, opts ...grpc.CallOption) (*SendManyResponse, error) {
|
|
out := new(SendManyResponse)
|
|
err := grpc.Invoke(ctx, "/lnrpc.LightningServer/SendMany", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *lightningServerClient) NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) {
|
|
out := new(NewAddressResponse)
|
|
err := grpc.Invoke(ctx, "/lnrpc.LightningServer/NewAddress", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for LightningServer service
|
|
|
|
type LightningServerServer interface {
|
|
SendMany(context.Context, *SendManyRequest) (*SendManyResponse, error)
|
|
NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error)
|
|
}
|
|
|
|
func RegisterLightningServerServer(s *grpc.Server, srv LightningServerServer) {
|
|
s.RegisterService(&_LightningServer_serviceDesc, srv)
|
|
}
|
|
|
|
func _LightningServer_SendMany_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
|
|
in := new(SendManyRequest)
|
|
if err := codec.Unmarshal(buf, in); err != nil {
|
|
return nil, err
|
|
}
|
|
out, err := srv.(LightningServerServer).SendMany(ctx, in)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func _LightningServer_NewAddress_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
|
|
in := new(NewAddressRequest)
|
|
if err := codec.Unmarshal(buf, in); err != nil {
|
|
return nil, err
|
|
}
|
|
out, err := srv.(LightningServerServer).NewAddress(ctx, in)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
var _LightningServer_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "lnrpc.LightningServer",
|
|
HandlerType: (*LightningServerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "SendMany",
|
|
Handler: _LightningServer_SendMany_Handler,
|
|
},
|
|
{
|
|
MethodName: "NewAddress",
|
|
Handler: _LightningServer_NewAddress_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
}
|