// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: crypter/v1/service.proto

package crypterv1

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// CrypterServiceClient is the client API for CrypterService 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.
type CrypterServiceClient interface {
	BatchSign(ctx context.Context, in *BatchSignRequest, opts ...grpc.CallOption) (*BatchSignResponse, error)
	BatchVerify(ctx context.Context, in *BatchVerifyRequest, opts ...grpc.CallOption) (*BatchVerifyResponse, error)
	BatchRecover(ctx context.Context, in *BatchRecoverRequest, opts ...grpc.CallOption) (*BatchRecoverResponse, error)
	BatchRecoverTx(ctx context.Context, in *BatchRecoverTxRequest, opts ...grpc.CallOption) (*BatchRecoverTxResponse, error)
}

type crypterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCrypterServiceClient(cc grpc.ClientConnInterface) CrypterServiceClient {
	return &crypterServiceClient{cc}
}

func (c *crypterServiceClient) BatchSign(ctx context.Context, in *BatchSignRequest, opts ...grpc.CallOption) (*BatchSignResponse, error) {
	out := new(BatchSignResponse)
	err := c.cc.Invoke(ctx, "/crypter.v1.CrypterService/BatchSign", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crypterServiceClient) BatchVerify(ctx context.Context, in *BatchVerifyRequest, opts ...grpc.CallOption) (*BatchVerifyResponse, error) {
	out := new(BatchVerifyResponse)
	err := c.cc.Invoke(ctx, "/crypter.v1.CrypterService/BatchVerify", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crypterServiceClient) BatchRecover(ctx context.Context, in *BatchRecoverRequest, opts ...grpc.CallOption) (*BatchRecoverResponse, error) {
	out := new(BatchRecoverResponse)
	err := c.cc.Invoke(ctx, "/crypter.v1.CrypterService/BatchRecover", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crypterServiceClient) BatchRecoverTx(ctx context.Context, in *BatchRecoverTxRequest, opts ...grpc.CallOption) (*BatchRecoverTxResponse, error) {
	out := new(BatchRecoverTxResponse)
	err := c.cc.Invoke(ctx, "/crypter.v1.CrypterService/BatchRecoverTx", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CrypterServiceServer is the server API for CrypterService service.
// All implementations must embed UnimplementedCrypterServiceServer
// for forward compatibility
type CrypterServiceServer interface {
	BatchSign(context.Context, *BatchSignRequest) (*BatchSignResponse, error)
	BatchVerify(context.Context, *BatchVerifyRequest) (*BatchVerifyResponse, error)
	BatchRecover(context.Context, *BatchRecoverRequest) (*BatchRecoverResponse, error)
	BatchRecoverTx(context.Context, *BatchRecoverTxRequest) (*BatchRecoverTxResponse, error)
	mustEmbedUnimplementedCrypterServiceServer()
}

// UnimplementedCrypterServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCrypterServiceServer struct {
}

func (UnimplementedCrypterServiceServer) BatchSign(context.Context, *BatchSignRequest) (*BatchSignResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchSign not implemented")
}
func (UnimplementedCrypterServiceServer) BatchVerify(context.Context, *BatchVerifyRequest) (*BatchVerifyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchVerify not implemented")
}
func (UnimplementedCrypterServiceServer) BatchRecover(context.Context, *BatchRecoverRequest) (*BatchRecoverResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchRecover not implemented")
}
func (UnimplementedCrypterServiceServer) BatchRecoverTx(context.Context, *BatchRecoverTxRequest) (*BatchRecoverTxResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method BatchRecoverTx not implemented")
}
func (UnimplementedCrypterServiceServer) mustEmbedUnimplementedCrypterServiceServer() {}

// UnsafeCrypterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CrypterServiceServer will
// result in compilation errors.
type UnsafeCrypterServiceServer interface {
	mustEmbedUnimplementedCrypterServiceServer()
}

func RegisterCrypterServiceServer(s grpc.ServiceRegistrar, srv CrypterServiceServer) {
	s.RegisterService(&CrypterService_ServiceDesc, srv)
}

func _CrypterService_BatchSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchSignRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrypterServiceServer).BatchSign(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/crypter.v1.CrypterService/BatchSign",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrypterServiceServer).BatchSign(ctx, req.(*BatchSignRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrypterService_BatchVerify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchVerifyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrypterServiceServer).BatchVerify(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/crypter.v1.CrypterService/BatchVerify",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrypterServiceServer).BatchVerify(ctx, req.(*BatchVerifyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrypterService_BatchRecover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchRecoverRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrypterServiceServer).BatchRecover(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/crypter.v1.CrypterService/BatchRecover",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrypterServiceServer).BatchRecover(ctx, req.(*BatchRecoverRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrypterService_BatchRecoverTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BatchRecoverTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrypterServiceServer).BatchRecoverTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/crypter.v1.CrypterService/BatchRecoverTx",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrypterServiceServer).BatchRecoverTx(ctx, req.(*BatchRecoverTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CrypterService_ServiceDesc is the grpc.ServiceDesc for CrypterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CrypterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "crypter.v1.CrypterService",
	HandlerType: (*CrypterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BatchSign",
			Handler:    _CrypterService_BatchSign_Handler,
		},
		{
			MethodName: "BatchVerify",
			Handler:    _CrypterService_BatchVerify_Handler,
		},
		{
			MethodName: "BatchRecover",
			Handler:    _CrypterService_BatchRecover_Handler,
		},
		{
			MethodName: "BatchRecoverTx",
			Handler:    _CrypterService_BatchRecoverTx_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "crypter/v1/service.proto",
}
