// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.0 // - protoc (unknown) // source: orlynits/v1/service.proto package orlynitsv1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( NitsService_Ready_FullMethodName = "/orlynits.v1.NitsService/Ready" NitsService_GetBlockchainInfo_FullMethodName = "/orlynits.v1.NitsService/GetBlockchainInfo" NitsService_EstimateFee_FullMethodName = "/orlynits.v1.NitsService/EstimateFee" ) // NitsServiceClient is the client API for NitsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // NitsService provides gRPC access to the Bitcoin node (nits/bitcoind) type NitsServiceClient interface { // Ready returns whether bitcoind is responsive and synced enough to use Ready(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReadyResponse, error) // GetBlockchainInfo returns basic chain state information GetBlockchainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BlockchainInfoResponse, error) // EstimateFee returns fee estimation for a given confirmation target EstimateFee(ctx context.Context, in *EstimateFeeRequest, opts ...grpc.CallOption) (*EstimateFeeResponse, error) } type nitsServiceClient struct { cc grpc.ClientConnInterface } func NewNitsServiceClient(cc grpc.ClientConnInterface) NitsServiceClient { return &nitsServiceClient{cc} } func (c *nitsServiceClient) Ready(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReadyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ReadyResponse) err := c.cc.Invoke(ctx, NitsService_Ready_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *nitsServiceClient) GetBlockchainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BlockchainInfoResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BlockchainInfoResponse) err := c.cc.Invoke(ctx, NitsService_GetBlockchainInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *nitsServiceClient) EstimateFee(ctx context.Context, in *EstimateFeeRequest, opts ...grpc.CallOption) (*EstimateFeeResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EstimateFeeResponse) err := c.cc.Invoke(ctx, NitsService_EstimateFee_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // NitsServiceServer is the server API for NitsService service. // All implementations must embed UnimplementedNitsServiceServer // for forward compatibility. // // NitsService provides gRPC access to the Bitcoin node (nits/bitcoind) type NitsServiceServer interface { // Ready returns whether bitcoind is responsive and synced enough to use Ready(context.Context, *Empty) (*ReadyResponse, error) // GetBlockchainInfo returns basic chain state information GetBlockchainInfo(context.Context, *Empty) (*BlockchainInfoResponse, error) // EstimateFee returns fee estimation for a given confirmation target EstimateFee(context.Context, *EstimateFeeRequest) (*EstimateFeeResponse, error) mustEmbedUnimplementedNitsServiceServer() } // UnimplementedNitsServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedNitsServiceServer struct{} func (UnimplementedNitsServiceServer) Ready(context.Context, *Empty) (*ReadyResponse, error) { return nil, status.Error(codes.Unimplemented, "method Ready not implemented") } func (UnimplementedNitsServiceServer) GetBlockchainInfo(context.Context, *Empty) (*BlockchainInfoResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetBlockchainInfo not implemented") } func (UnimplementedNitsServiceServer) EstimateFee(context.Context, *EstimateFeeRequest) (*EstimateFeeResponse, error) { return nil, status.Error(codes.Unimplemented, "method EstimateFee not implemented") } func (UnimplementedNitsServiceServer) mustEmbedUnimplementedNitsServiceServer() {} func (UnimplementedNitsServiceServer) testEmbeddedByValue() {} // UnsafeNitsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NitsServiceServer will // result in compilation errors. type UnsafeNitsServiceServer interface { mustEmbedUnimplementedNitsServiceServer() } func RegisterNitsServiceServer(s grpc.ServiceRegistrar, srv NitsServiceServer) { // If the following call panics, it indicates UnimplementedNitsServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&NitsService_ServiceDesc, srv) } func _NitsService_Ready_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NitsServiceServer).Ready(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NitsService_Ready_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NitsServiceServer).Ready(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _NitsService_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NitsServiceServer).GetBlockchainInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NitsService_GetBlockchainInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NitsServiceServer).GetBlockchainInfo(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _NitsService_EstimateFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EstimateFeeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NitsServiceServer).EstimateFee(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: NitsService_EstimateFee_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NitsServiceServer).EstimateFee(ctx, req.(*EstimateFeeRequest)) } return interceptor(ctx, in, info, handler) } // NitsService_ServiceDesc is the grpc.ServiceDesc for NitsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var NitsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "orlynits.v1.NitsService", HandlerType: (*NitsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ready", Handler: _NitsService_Ready_Handler, }, { MethodName: "GetBlockchainInfo", Handler: _NitsService_GetBlockchainInfo_Handler, }, { MethodName: "EstimateFee", Handler: _NitsService_EstimateFee_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "orlynits/v1/service.proto", }