refactor: centralize protobuf and remove go-zero

This commit is contained in:
2026-08-09 15:10:19 +08:00
parent 5cc5fd92ed
commit 4bbed3156c
357 changed files with 14208 additions and 19903 deletions

View File

@@ -1,12 +1,13 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: data.proto
// - 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"
@@ -33,15 +34,15 @@ const (
// 数据服务
type DataClient interface {
// 概况
Overview(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*OverviewReply, error)
Overview(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*OverviewReply, error)
// 会员列表
MemberFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error)
MemberFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error)
// 会员详情
MemberDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error)
MemberDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error)
// 订单列表
OrderFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error)
OrderFetch(ctx context.Context, in *protobuf.MarketFetchRequest, opts ...grpc.CallOption) (*DataReply, error)
// 订单详情
OrderDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error)
OrderDetails(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*KeyVal, error)
}
type dataClient struct {
@@ -52,7 +53,7 @@ func NewDataClient(cc grpc.ClientConnInterface) DataClient {
return &dataClient{cc}
}
func (c *dataClient) Overview(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*OverviewReply, error) {
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...)
@@ -62,7 +63,7 @@ func (c *dataClient) Overview(ctx context.Context, in *Empty, opts ...grpc.CallO
return out, nil
}
func (c *dataClient) MemberFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error) {
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...)
@@ -72,7 +73,7 @@ func (c *dataClient) MemberFetch(ctx context.Context, in *FetchRequest, opts ...
return out, nil
}
func (c *dataClient) MemberDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) {
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...)
@@ -82,7 +83,7 @@ func (c *dataClient) MemberDetails(ctx context.Context, in *IdentRequest, opts .
return out, nil
}
func (c *dataClient) OrderFetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*DataReply, error) {
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...)
@@ -92,7 +93,7 @@ func (c *dataClient) OrderFetch(ctx context.Context, in *FetchRequest, opts ...g
return out, nil
}
func (c *dataClient) OrderDetails(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*KeyVal, error) {
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...)
@@ -103,48 +104,46 @@ func (c *dataClient) OrderDetails(ctx context.Context, in *IdentRequest, opts ..
}
// DataServer is the server API for Data service.
// All implementations must embed UnimplementedDataServer
// All implementations should embed UnimplementedDataServer
// for forward compatibility.
//
// 数据服务
type DataServer interface {
// 概况
Overview(context.Context, *Empty) (*OverviewReply, error)
Overview(context.Context, *protobuf.Empty) (*OverviewReply, error)
// 会员列表
MemberFetch(context.Context, *FetchRequest) (*DataReply, error)
MemberFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error)
// 会员详情
MemberDetails(context.Context, *IdentRequest) (*KeyVal, error)
MemberDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error)
// 订单列表
OrderFetch(context.Context, *FetchRequest) (*DataReply, error)
OrderFetch(context.Context, *protobuf.MarketFetchRequest) (*DataReply, error)
// 订单详情
OrderDetails(context.Context, *IdentRequest) (*KeyVal, error)
mustEmbedUnimplementedDataServer()
OrderDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error)
}
// UnimplementedDataServer must be embedded to have
// 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, *Empty) (*OverviewReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Overview not implemented")
func (UnimplementedDataServer) Overview(context.Context, *protobuf.Empty) (*OverviewReply, error) {
return nil, status.Error(codes.Unimplemented, "method Overview not implemented")
}
func (UnimplementedDataServer) MemberFetch(context.Context, *FetchRequest) (*DataReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method MemberFetch 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, *IdentRequest) (*KeyVal, error) {
return nil, status.Errorf(codes.Unimplemented, "method MemberDetails 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, *FetchRequest) (*DataReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method OrderFetch 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, *IdentRequest) (*KeyVal, error) {
return nil, status.Errorf(codes.Unimplemented, "method OrderDetails not implemented")
func (UnimplementedDataServer) OrderDetails(context.Context, *protobuf.IdentRequest) (*KeyVal, error) {
return nil, status.Error(codes.Unimplemented, "method OrderDetails not implemented")
}
func (UnimplementedDataServer) mustEmbedUnimplementedDataServer() {}
func (UnimplementedDataServer) testEmbeddedByValue() {}
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
@@ -154,7 +153,7 @@ type UnsafeDataServer interface {
}
func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) {
// If the following call pancis, it indicates UnimplementedDataServer was
// 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.
@@ -165,7 +164,7 @@ func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) {
}
func _Data_Overview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
in := new(protobuf.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -177,13 +176,13 @@ func _Data_Overview_Handler(srv interface{}, ctx context.Context, dec func(inter
FullMethod: Data_Overview_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DataServer).Overview(ctx, req.(*Empty))
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(FetchRequest)
in := new(protobuf.MarketFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -195,13 +194,13 @@ func _Data_MemberFetch_Handler(srv interface{}, ctx context.Context, dec func(in
FullMethod: Data_MemberFetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DataServer).MemberFetch(ctx, req.(*FetchRequest))
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(IdentRequest)
in := new(protobuf.IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -213,13 +212,13 @@ func _Data_MemberDetails_Handler(srv interface{}, ctx context.Context, dec func(
FullMethod: Data_MemberDetails_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DataServer).MemberDetails(ctx, req.(*IdentRequest))
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(FetchRequest)
in := new(protobuf.MarketFetchRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -231,13 +230,13 @@ func _Data_OrderFetch_Handler(srv interface{}, ctx context.Context, dec func(int
FullMethod: Data_OrderFetch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DataServer).OrderFetch(ctx, req.(*FetchRequest))
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(IdentRequest)
in := new(protobuf.IdentRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -249,7 +248,7 @@ func _Data_OrderDetails_Handler(srv interface{}, ctx context.Context, dec func(i
FullMethod: Data_OrderDetails_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DataServer).OrderDetails(ctx, req.(*IdentRequest))
return srv.(DataServer).OrderDetails(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -283,5 +282,5 @@ var Data_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "data.proto",
Metadata: "module/ec/market/proto/data.proto",
}