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: payment.proto
// - protoc-gen-go-grpc v1.6.2
// - protoc v7.35.0
// source: module/finance/wallet/proto/payment.proto
package wallet
import (
protobuf "bsm/full/protobuf"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -31,17 +32,17 @@ const (
//
// 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 PaymentClient interface {
Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error)
//获取平台支持的支付网关
Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error)
// 获取平台支持的支付网关
Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error)
//获取支付的详情
Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error)
//支付-电商订单
// 获取支付的详情
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error)
// 支付-电商订单
ByOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*PaymentReply, error)
//支付-充值
// 支付-充值
ByCharge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*PaymentReply, error)
//回调更新支付的结果和状态
Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 回调更新支付的结果和状态
Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
}
type paymentClient struct {
@@ -52,7 +53,7 @@ func NewPaymentClient(cc grpc.ClientConnInterface) PaymentClient {
return &paymentClient{cc}
}
func (c *paymentClient) Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error) {
func (c *paymentClient) Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PaymentReply)
err := c.cc.Invoke(ctx, Payment_Hello_FullMethodName, in, out, cOpts...)
@@ -72,7 +73,7 @@ func (c *paymentClient) Way(ctx context.Context, in *WayRequest, opts ...grpc.Ca
return out, nil
}
func (c *paymentClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) {
func (c *paymentClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PaymentItem)
err := c.cc.Invoke(ctx, Payment_Get_FullMethodName, in, out, cOpts...)
@@ -102,9 +103,9 @@ func (c *paymentClient) ByCharge(ctx context.Context, in *ChargeRequest, opts ..
return out, nil
}
func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error) {
func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
out := new(protobuf.StatusReply)
err := c.cc.Invoke(ctx, Payment_Callback_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
@@ -113,50 +114,48 @@ func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts
}
// PaymentServer is the server API for Payment service.
// All implementations must embed UnimplementedPaymentServer
// All implementations should embed UnimplementedPaymentServer
// for forward compatibility.
type PaymentServer interface {
Hello(context.Context, *Empty) (*PaymentReply, error)
//获取平台支持的支付网关
Hello(context.Context, *protobuf.Empty) (*PaymentReply, error)
// 获取平台支持的支付网关
Way(context.Context, *WayRequest) (*WayReply, error)
//获取支付的详情
Get(context.Context, *IdentRequest) (*PaymentItem, error)
//支付-电商订单
// 获取支付的详情
Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error)
// 支付-电商订单
ByOrder(context.Context, *OrderRequest) (*PaymentReply, error)
//支付-充值
// 支付-充值
ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error)
//回调更新支付的结果和状态
Callback(context.Context, *CallbackRequest) (*StatusReply, error)
mustEmbedUnimplementedPaymentServer()
// 回调更新支付的结果和状态
Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error)
}
// UnimplementedPaymentServer must be embedded to have
// UnimplementedPaymentServer 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 UnimplementedPaymentServer struct{}
func (UnimplementedPaymentServer) Hello(context.Context, *Empty) (*PaymentReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented")
func (UnimplementedPaymentServer) Hello(context.Context, *protobuf.Empty) (*PaymentReply, error) {
return nil, status.Error(codes.Unimplemented, "method Hello not implemented")
}
func (UnimplementedPaymentServer) Way(context.Context, *WayRequest) (*WayReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Way not implemented")
return nil, status.Error(codes.Unimplemented, "method Way not implemented")
}
func (UnimplementedPaymentServer) Get(context.Context, *IdentRequest) (*PaymentItem, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
func (UnimplementedPaymentServer) Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error) {
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPaymentServer) ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ByOrder not implemented")
return nil, status.Error(codes.Unimplemented, "method ByOrder not implemented")
}
func (UnimplementedPaymentServer) ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ByCharge not implemented")
return nil, status.Error(codes.Unimplemented, "method ByCharge not implemented")
}
func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Callback not implemented")
func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error) {
return nil, status.Error(codes.Unimplemented, "method Callback not implemented")
}
func (UnimplementedPaymentServer) mustEmbedUnimplementedPaymentServer() {}
func (UnimplementedPaymentServer) testEmbeddedByValue() {}
func (UnimplementedPaymentServer) testEmbeddedByValue() {}
// UnsafePaymentServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PaymentServer will
@@ -166,7 +165,7 @@ type UnsafePaymentServer interface {
}
func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer) {
// If the following call pancis, it indicates UnimplementedPaymentServer was
// If the following call panics, it indicates UnimplementedPaymentServer 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.
@@ -177,7 +176,7 @@ func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer) {
}
func _Payment_Hello_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
}
@@ -189,7 +188,7 @@ func _Payment_Hello_Handler(srv interface{}, ctx context.Context, dec func(inter
FullMethod: Payment_Hello_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServer).Hello(ctx, req.(*Empty))
return srv.(PaymentServer).Hello(ctx, req.(*protobuf.Empty))
}
return interceptor(ctx, in, info, handler)
}
@@ -213,7 +212,7 @@ func _Payment_Way_Handler(srv interface{}, ctx context.Context, dec func(interfa
}
func _Payment_Get_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
}
@@ -225,7 +224,7 @@ func _Payment_Get_Handler(srv interface{}, ctx context.Context, dec func(interfa
FullMethod: Payment_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServer).Get(ctx, req.(*IdentRequest))
return srv.(PaymentServer).Get(ctx, req.(*protobuf.IdentRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -317,5 +316,5 @@ var Payment_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "payment.proto",
Metadata: "module/finance/wallet/proto/payment.proto",
}