// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.0
// source: module/ec/market/proto/data.proto

package market

import (
	protobuf "bsm/full/protobuf"
	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 (
	Data_Overview_FullMethodName      = "/market.Data/Overview"
	Data_MemberFetch_FullMethodName   = "/market.Data/MemberFetch"
	Data_MemberDetails_FullMethodName = "/market.Data/MemberDetails"
	Data_OrderFetch_FullMethodName    = "/market.Data/OrderFetch"
	Data_OrderDetails_FullMethodName  = "/market.Data/OrderDetails"
)

// DataClient is the client API for Data 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 DataClient interface {
	// 概况
	Overview(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*OverviewReply, error)
	// 会员列表
	MemberFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error)
	// 会员详情
	MemberDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error)
	// 订单列表
	OrderFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error)
	// 订单详情
	OrderDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error)
}

type dataClient struct {
	cc grpc.ClientConnInterface
}

func NewDataClient(cc grpc.ClientConnInterface) DataClient {
	return &dataClient{cc}
}

func (c *dataClient) Overview(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*OverviewReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OverviewReply)
	err := c.cc.Invoke(ctx, Data_Overview_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataClient) MemberFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DataReply)
	err := c.cc.Invoke(ctx, Data_MemberFetch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataClient) MemberDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(KeyVal)
	err := c.cc.Invoke(ctx, Data_MemberDetails_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataClient) OrderFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DataReply)
	err := c.cc.Invoke(ctx, Data_OrderFetch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dataClient) OrderDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(KeyVal)
	err := c.cc.Invoke(ctx, Data_OrderDetails_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DataServer is the server API for Data service.
// All implementations should embed UnimplementedDataServer
// for forward compatibility.
//
// 数据服务
type DataServer interface {
	// 概况
	Overview(context.Context, *protobuf.Empty) (*OverviewReply, error)
	// 会员列表
	MemberFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error)
	// 会员详情
	MemberDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error)
	// 订单列表
	OrderFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error)
	// 订单详情
	OrderDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error)
}

// UnimplementedDataServer should 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 UnimplementedDataServer struct{}

func (UnimplementedDataServer) Overview(context.Context, *protobuf.Empty) (*OverviewReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Overview not implemented")
}
func (UnimplementedDataServer) MemberFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error) {
	return nil, status.Error(codes.Unimplemented, "method MemberFetch not implemented")
}
func (UnimplementedDataServer) MemberDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) {
	return nil, status.Error(codes.Unimplemented, "method MemberDetails not implemented")
}
func (UnimplementedDataServer) OrderFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error) {
	return nil, status.Error(codes.Unimplemented, "method OrderFetch not implemented")
}
func (UnimplementedDataServer) OrderDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) {
	return nil, status.Error(codes.Unimplemented, "method OrderDetails not implemented")
}
func (UnimplementedDataServer) testEmbeddedByValue() {}

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

func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) {
	// If the following call panics, it indicates UnimplementedDataServer 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(&Data_ServiceDesc, srv)
}

func _Data_Overview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataServer).Overview(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Data_Overview_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataServer).Overview(ctx, req.(*protobuf.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Data_MemberFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.MarketFetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataServer).MemberFetch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Data_MemberFetch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataServer).MemberFetch(ctx, req.(*protobuf.MarketFetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Data_MemberDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataServer).MemberDetails(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Data_MemberDetails_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataServer).MemberDetails(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Data_OrderFetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.MarketFetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataServer).OrderFetch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Data_OrderFetch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataServer).OrderFetch(ctx, req.(*protobuf.MarketFetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Data_OrderDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DataServer).OrderDetails(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Data_OrderDetails_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DataServer).OrderDetails(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Data_ServiceDesc is the grpc.ServiceDesc for Data service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Data_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "market.Data",
	HandlerType: (*DataServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Overview",
			Handler:    _Data_Overview_Handler,
		},
		{
			MethodName: "MemberFetch",
			Handler:    _Data_MemberFetch_Handler,
		},
		{
			MethodName: "MemberDetails",
			Handler:    _Data_MemberDetails_Handler,
		},
		{
			MethodName: "OrderFetch",
			Handler:    _Data_OrderFetch_Handler,
		},
		{
			MethodName: "OrderDetails",
			Handler:    _Data_OrderDetails_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/ec/market/proto/data.proto",
}
