refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -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: wallet.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/finance/wallet/proto/wallet.proto
|
||||
|
||||
package wallet
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -33,22 +34,22 @@ 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 BasicClient interface {
|
||||
//获取钱包信息
|
||||
// 获取钱包信息
|
||||
GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletReply, error)
|
||||
//设置支付密码
|
||||
SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//绑定微信或支付宝账户
|
||||
BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//查询交易记录
|
||||
// 设置支付密码
|
||||
SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 绑定微信或支付宝账户
|
||||
BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 查询交易记录
|
||||
Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error)
|
||||
//添加银行卡
|
||||
AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//获取用户银行卡列表
|
||||
// 添加银行卡
|
||||
AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 获取用户银行卡列表
|
||||
GetBankCard(ctx context.Context, in *FinanceEmpty, opts ...grpc.CallOption) (*GetBankCardReply, error)
|
||||
//删除银行卡
|
||||
RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
//申请提现
|
||||
ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 删除银行卡
|
||||
RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
// 申请提现
|
||||
ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
type basicClient struct {
|
||||
@@ -69,9 +70,9 @@ func (c *basicClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, 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, Basic_SetPayPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -79,9 +80,9 @@ func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequ
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, 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, Basic_BindPaymentId_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -99,9 +100,9 @@ func (c *basicClient) Transactions(ctx context.Context, in *TransactionsRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, 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, Basic_AddBankCard_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -119,9 +120,9 @@ func (c *basicClient) GetBankCard(ctx context.Context, in *FinanceEmpty, opts ..
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, 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, Basic_RmBankCard_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -129,9 +130,9 @@ func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, 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, Basic_ApplyCash_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -140,29 +141,28 @@ func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts
|
||||
}
|
||||
|
||||
// BasicServer is the server API for Basic service.
|
||||
// All implementations must embed UnimplementedBasicServer
|
||||
// All implementations should embed UnimplementedBasicServer
|
||||
// for forward compatibility.
|
||||
type BasicServer interface {
|
||||
//获取钱包信息
|
||||
// 获取钱包信息
|
||||
GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error)
|
||||
//设置支付密码
|
||||
SetPayPassword(context.Context, *SetPayPasswordRequest) (*StatusReply, error)
|
||||
//绑定微信或支付宝账户
|
||||
BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error)
|
||||
//查询交易记录
|
||||
// 设置支付密码
|
||||
SetPayPassword(context.Context, *SetPayPasswordRequest) (*protobuf.StatusReply, error)
|
||||
// 绑定微信或支付宝账户
|
||||
BindPaymentId(context.Context, *BindPaymentIDRequest) (*protobuf.StatusReply, error)
|
||||
// 查询交易记录
|
||||
Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error)
|
||||
//添加银行卡
|
||||
AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error)
|
||||
//获取用户银行卡列表
|
||||
// 添加银行卡
|
||||
AddBankCard(context.Context, *AddBankCardRequest) (*protobuf.StatusReply, error)
|
||||
// 获取用户银行卡列表
|
||||
GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error)
|
||||
//删除银行卡
|
||||
RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error)
|
||||
//申请提现
|
||||
ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedBasicServer()
|
||||
// 删除银行卡
|
||||
RmBankCard(context.Context, *RmBankCardRequest) (*protobuf.StatusReply, error)
|
||||
// 申请提现
|
||||
ApplyCash(context.Context, *ApplyCashRequest) (*protobuf.StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedBasicServer must be embedded to have
|
||||
// UnimplementedBasicServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
@@ -170,31 +170,30 @@ type BasicServer interface {
|
||||
type UnimplementedBasicServer struct{}
|
||||
|
||||
func (UnimplementedBasicServer) GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetWallet not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method GetWallet not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetPayPassword not implemented")
|
||||
func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetPayPassword not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindPaymentId not implemented")
|
||||
func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method BindPaymentId not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Transactions not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Transactions not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddBankCard not implemented")
|
||||
func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddBankCard not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBankCard not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method GetBankCard not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RmBankCard not implemented")
|
||||
func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RmBankCard not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ApplyCash not implemented")
|
||||
func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*protobuf.StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyCash not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
|
||||
func (UnimplementedBasicServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedBasicServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeBasicServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to BasicServer will
|
||||
@@ -204,7 +203,7 @@ type UnsafeBasicServer interface {
|
||||
}
|
||||
|
||||
func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
|
||||
// If the following call pancis, it indicates UnimplementedBasicServer was
|
||||
// If the following call panics, it indicates UnimplementedBasicServer 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.
|
||||
@@ -399,5 +398,5 @@ var Basic_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "wallet.proto",
|
||||
Metadata: "module/finance/wallet/proto/wallet.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user