github.com/decred/dcrlnd@v0.7.6/lnrpc/watchtowerrpc/watchtower.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.31.0
     4  // 	protoc        v3.4.0
     5  // source: watchtowerrpc/watchtower.proto
     6  
     7  package watchtowerrpc
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    15  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    16  	reflect "reflect"
    17  	sync "sync"
    18  )
    19  
    20  const (
    21  	// Verify that this generated code is sufficiently up-to-date.
    22  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    23  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    25  )
    26  
    27  type GetInfoRequest struct {
    28  	state         protoimpl.MessageState
    29  	sizeCache     protoimpl.SizeCache
    30  	unknownFields protoimpl.UnknownFields
    31  }
    32  
    33  func (x *GetInfoRequest) Reset() {
    34  	*x = GetInfoRequest{}
    35  	if protoimpl.UnsafeEnabled {
    36  		mi := &file_watchtowerrpc_watchtower_proto_msgTypes[0]
    37  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    38  		ms.StoreMessageInfo(mi)
    39  	}
    40  }
    41  
    42  func (x *GetInfoRequest) String() string {
    43  	return protoimpl.X.MessageStringOf(x)
    44  }
    45  
    46  func (*GetInfoRequest) ProtoMessage() {}
    47  
    48  func (x *GetInfoRequest) ProtoReflect() protoreflect.Message {
    49  	mi := &file_watchtowerrpc_watchtower_proto_msgTypes[0]
    50  	if protoimpl.UnsafeEnabled && x != nil {
    51  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    52  		if ms.LoadMessageInfo() == nil {
    53  			ms.StoreMessageInfo(mi)
    54  		}
    55  		return ms
    56  	}
    57  	return mi.MessageOf(x)
    58  }
    59  
    60  // Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
    61  func (*GetInfoRequest) Descriptor() ([]byte, []int) {
    62  	return file_watchtowerrpc_watchtower_proto_rawDescGZIP(), []int{0}
    63  }
    64  
    65  type GetInfoResponse struct {
    66  	state         protoimpl.MessageState
    67  	sizeCache     protoimpl.SizeCache
    68  	unknownFields protoimpl.UnknownFields
    69  
    70  	// The public key of the watchtower.
    71  	Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
    72  	// The listening addresses of the watchtower.
    73  	Listeners []string `protobuf:"bytes,2,rep,name=listeners,proto3" json:"listeners,omitempty"`
    74  	// The URIs of the watchtower.
    75  	Uris []string `protobuf:"bytes,3,rep,name=uris,proto3" json:"uris,omitempty"`
    76  }
    77  
    78  func (x *GetInfoResponse) Reset() {
    79  	*x = GetInfoResponse{}
    80  	if protoimpl.UnsafeEnabled {
    81  		mi := &file_watchtowerrpc_watchtower_proto_msgTypes[1]
    82  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    83  		ms.StoreMessageInfo(mi)
    84  	}
    85  }
    86  
    87  func (x *GetInfoResponse) String() string {
    88  	return protoimpl.X.MessageStringOf(x)
    89  }
    90  
    91  func (*GetInfoResponse) ProtoMessage() {}
    92  
    93  func (x *GetInfoResponse) ProtoReflect() protoreflect.Message {
    94  	mi := &file_watchtowerrpc_watchtower_proto_msgTypes[1]
    95  	if protoimpl.UnsafeEnabled && x != nil {
    96  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  		if ms.LoadMessageInfo() == nil {
    98  			ms.StoreMessageInfo(mi)
    99  		}
   100  		return ms
   101  	}
   102  	return mi.MessageOf(x)
   103  }
   104  
   105  // Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
   106  func (*GetInfoResponse) Descriptor() ([]byte, []int) {
   107  	return file_watchtowerrpc_watchtower_proto_rawDescGZIP(), []int{1}
   108  }
   109  
   110  func (x *GetInfoResponse) GetPubkey() []byte {
   111  	if x != nil {
   112  		return x.Pubkey
   113  	}
   114  	return nil
   115  }
   116  
   117  func (x *GetInfoResponse) GetListeners() []string {
   118  	if x != nil {
   119  		return x.Listeners
   120  	}
   121  	return nil
   122  }
   123  
   124  func (x *GetInfoResponse) GetUris() []string {
   125  	if x != nil {
   126  		return x.Uris
   127  	}
   128  	return nil
   129  }
   130  
   131  var File_watchtowerrpc_watchtower_proto protoreflect.FileDescriptor
   132  
   133  var file_watchtowerrpc_watchtower_proto_rawDesc = []byte{
   134  	0x0a, 0x1e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2f,
   135  	0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   136  	0x12, 0x0d, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x22,
   137  	0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
   138  	0x74, 0x22, 0x5b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
   139  	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01,
   140  	0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09,
   141  	0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
   142  	0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72,
   143  	0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x69, 0x73, 0x32, 0x56,
   144  	0x0a, 0x0a, 0x57, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x07,
   145  	0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74,
   146  	0x6f, 0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
   147  	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f,
   148  	0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
   149  	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
   150  	0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x63, 0x72, 0x65, 0x64, 0x2f, 0x64, 0x63, 0x72, 0x6c,
   151  	0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f,
   152  	0x77, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   153  }
   154  
   155  var (
   156  	file_watchtowerrpc_watchtower_proto_rawDescOnce sync.Once
   157  	file_watchtowerrpc_watchtower_proto_rawDescData = file_watchtowerrpc_watchtower_proto_rawDesc
   158  )
   159  
   160  func file_watchtowerrpc_watchtower_proto_rawDescGZIP() []byte {
   161  	file_watchtowerrpc_watchtower_proto_rawDescOnce.Do(func() {
   162  		file_watchtowerrpc_watchtower_proto_rawDescData = protoimpl.X.CompressGZIP(file_watchtowerrpc_watchtower_proto_rawDescData)
   163  	})
   164  	return file_watchtowerrpc_watchtower_proto_rawDescData
   165  }
   166  
   167  var file_watchtowerrpc_watchtower_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   168  var file_watchtowerrpc_watchtower_proto_goTypes = []interface{}{
   169  	(*GetInfoRequest)(nil),  // 0: watchtowerrpc.GetInfoRequest
   170  	(*GetInfoResponse)(nil), // 1: watchtowerrpc.GetInfoResponse
   171  }
   172  var file_watchtowerrpc_watchtower_proto_depIdxs = []int32{
   173  	0, // 0: watchtowerrpc.Watchtower.GetInfo:input_type -> watchtowerrpc.GetInfoRequest
   174  	1, // 1: watchtowerrpc.Watchtower.GetInfo:output_type -> watchtowerrpc.GetInfoResponse
   175  	1, // [1:2] is the sub-list for method output_type
   176  	0, // [0:1] is the sub-list for method input_type
   177  	0, // [0:0] is the sub-list for extension type_name
   178  	0, // [0:0] is the sub-list for extension extendee
   179  	0, // [0:0] is the sub-list for field type_name
   180  }
   181  
   182  func init() { file_watchtowerrpc_watchtower_proto_init() }
   183  func file_watchtowerrpc_watchtower_proto_init() {
   184  	if File_watchtowerrpc_watchtower_proto != nil {
   185  		return
   186  	}
   187  	if !protoimpl.UnsafeEnabled {
   188  		file_watchtowerrpc_watchtower_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   189  			switch v := v.(*GetInfoRequest); i {
   190  			case 0:
   191  				return &v.state
   192  			case 1:
   193  				return &v.sizeCache
   194  			case 2:
   195  				return &v.unknownFields
   196  			default:
   197  				return nil
   198  			}
   199  		}
   200  		file_watchtowerrpc_watchtower_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   201  			switch v := v.(*GetInfoResponse); i {
   202  			case 0:
   203  				return &v.state
   204  			case 1:
   205  				return &v.sizeCache
   206  			case 2:
   207  				return &v.unknownFields
   208  			default:
   209  				return nil
   210  			}
   211  		}
   212  	}
   213  	type x struct{}
   214  	out := protoimpl.TypeBuilder{
   215  		File: protoimpl.DescBuilder{
   216  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   217  			RawDescriptor: file_watchtowerrpc_watchtower_proto_rawDesc,
   218  			NumEnums:      0,
   219  			NumMessages:   2,
   220  			NumExtensions: 0,
   221  			NumServices:   1,
   222  		},
   223  		GoTypes:           file_watchtowerrpc_watchtower_proto_goTypes,
   224  		DependencyIndexes: file_watchtowerrpc_watchtower_proto_depIdxs,
   225  		MessageInfos:      file_watchtowerrpc_watchtower_proto_msgTypes,
   226  	}.Build()
   227  	File_watchtowerrpc_watchtower_proto = out.File
   228  	file_watchtowerrpc_watchtower_proto_rawDesc = nil
   229  	file_watchtowerrpc_watchtower_proto_goTypes = nil
   230  	file_watchtowerrpc_watchtower_proto_depIdxs = nil
   231  }
   232  
   233  // Reference imports to suppress errors if they are not otherwise used.
   234  var _ context.Context
   235  var _ grpc.ClientConnInterface
   236  
   237  // This is a compile-time assertion to ensure that this generated file
   238  // is compatible with the grpc package it is being compiled against.
   239  const _ = grpc.SupportPackageIsVersion6
   240  
   241  // WatchtowerClient is the client API for Watchtower service.
   242  //
   243  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   244  type WatchtowerClient interface {
   245  	// lncli: tower info
   246  	// GetInfo returns general information concerning the companion watchtower
   247  	// including its public key and URIs where the server is currently
   248  	// listening for clients.
   249  	GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
   250  }
   251  
   252  type watchtowerClient struct {
   253  	cc grpc.ClientConnInterface
   254  }
   255  
   256  func NewWatchtowerClient(cc grpc.ClientConnInterface) WatchtowerClient {
   257  	return &watchtowerClient{cc}
   258  }
   259  
   260  func (c *watchtowerClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) {
   261  	out := new(GetInfoResponse)
   262  	err := c.cc.Invoke(ctx, "/watchtowerrpc.Watchtower/GetInfo", in, out, opts...)
   263  	if err != nil {
   264  		return nil, err
   265  	}
   266  	return out, nil
   267  }
   268  
   269  // WatchtowerServer is the server API for Watchtower service.
   270  type WatchtowerServer interface {
   271  	// lncli: tower info
   272  	// GetInfo returns general information concerning the companion watchtower
   273  	// including its public key and URIs where the server is currently
   274  	// listening for clients.
   275  	GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
   276  }
   277  
   278  // UnimplementedWatchtowerServer can be embedded to have forward compatible implementations.
   279  type UnimplementedWatchtowerServer struct {
   280  }
   281  
   282  func (*UnimplementedWatchtowerServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) {
   283  	return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
   284  }
   285  
   286  func RegisterWatchtowerServer(s *grpc.Server, srv WatchtowerServer) {
   287  	s.RegisterService(&_Watchtower_serviceDesc, srv)
   288  }
   289  
   290  func _Watchtower_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   291  	in := new(GetInfoRequest)
   292  	if err := dec(in); err != nil {
   293  		return nil, err
   294  	}
   295  	if interceptor == nil {
   296  		return srv.(WatchtowerServer).GetInfo(ctx, in)
   297  	}
   298  	info := &grpc.UnaryServerInfo{
   299  		Server:     srv,
   300  		FullMethod: "/watchtowerrpc.Watchtower/GetInfo",
   301  	}
   302  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   303  		return srv.(WatchtowerServer).GetInfo(ctx, req.(*GetInfoRequest))
   304  	}
   305  	return interceptor(ctx, in, info, handler)
   306  }
   307  
   308  var _Watchtower_serviceDesc = grpc.ServiceDesc{
   309  	ServiceName: "watchtowerrpc.Watchtower",
   310  	HandlerType: (*WatchtowerServer)(nil),
   311  	Methods: []grpc.MethodDesc{
   312  		{
   313  			MethodName: "GetInfo",
   314  			Handler:    _Watchtower_GetInfo_Handler,
   315  		},
   316  	},
   317  	Streams:  []grpc.StreamDesc{},
   318  	Metadata: "watchtowerrpc/watchtower.proto",
   319  }