lnrpc: update grpc-gateway library to v2

This commit is contained in:
Oliver Gugger
2021-07-27 12:59:59 +02:00
parent 76e1223bf2
commit dd749fe580
70 changed files with 8799 additions and 8287 deletions

View File

@@ -1,17 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc-gen-go v1.26.0
// protoc v3.6.1
// source: watchtowerrpc/watchtower.proto
package watchtowerrpc
import (
context "context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -25,10 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type GetInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -235,91 +226,3 @@ func file_watchtowerrpc_watchtower_proto_init() {
file_watchtowerrpc_watchtower_proto_goTypes = nil
file_watchtowerrpc_watchtower_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// WatchtowerClient is the client API for Watchtower service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type WatchtowerClient interface {
// lncli: tower info
//GetInfo returns general information concerning the companion watchtower
//including its public key and URIs where the server is currently
//listening for clients.
GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
}
type watchtowerClient struct {
cc grpc.ClientConnInterface
}
func NewWatchtowerClient(cc grpc.ClientConnInterface) WatchtowerClient {
return &watchtowerClient{cc}
}
func (c *watchtowerClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) {
out := new(GetInfoResponse)
err := c.cc.Invoke(ctx, "/watchtowerrpc.Watchtower/GetInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WatchtowerServer is the server API for Watchtower service.
type WatchtowerServer interface {
// lncli: tower info
//GetInfo returns general information concerning the companion watchtower
//including its public key and URIs where the server is currently
//listening for clients.
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
}
// UnimplementedWatchtowerServer can be embedded to have forward compatible implementations.
type UnimplementedWatchtowerServer struct {
}
func (*UnimplementedWatchtowerServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func RegisterWatchtowerServer(s *grpc.Server, srv WatchtowerServer) {
s.RegisterService(&_Watchtower_serviceDesc, srv)
}
func _Watchtower_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WatchtowerServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/watchtowerrpc.Watchtower/GetInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WatchtowerServer).GetInfo(ctx, req.(*GetInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Watchtower_serviceDesc = grpc.ServiceDesc{
ServiceName: "watchtowerrpc.Watchtower",
HandlerType: (*WatchtowerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetInfo",
Handler: _Watchtower_GetInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "watchtowerrpc/watchtower.proto",
}