refactor: localize protobuf definitions
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
package wallet
|
||||
|
||||
import blocks "bsm/full/protobuf"
|
||||
|
||||
type Empty = blocks.Empty
|
||||
type FetchRequest = blocks.FetchRequest
|
||||
type IdentRequest = blocks.IdentRequest
|
||||
type VersionRequest = blocks.VersionRequest
|
||||
type SearchRequest = blocks.SearchRequest
|
||||
type StatusReply = blocks.StatusReply
|
||||
3368
module/finance/wallet/pb/const.pb.go
Normal file
3368
module/finance/wallet/pb/const.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,6 @@
|
||||
package wallet
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -578,7 +577,7 @@ var File_module_finance_wallet_proto_payment_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_finance_wallet_proto_payment_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
")module/finance/wallet/proto/payment.proto\x12\x06wallet\x1a\x15protobuf/blocks.proto\"(\n" +
|
||||
")module/finance/wallet/proto/payment.proto\x12\x06wallet\x1a'module/finance/wallet/proto/const.proto\"(\n" +
|
||||
"\n" +
|
||||
"WayRequest\x12\x1a\n" +
|
||||
"\bplatform\x18\x01 \x01(\tR\bplatform\"-\n" +
|
||||
@@ -649,18 +648,18 @@ func file_module_finance_wallet_proto_payment_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_finance_wallet_proto_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_module_finance_wallet_proto_payment_proto_goTypes = []any{
|
||||
(*WayRequest)(nil), // 0: wallet.WayRequest
|
||||
(*WayReply)(nil), // 1: wallet.WayReply
|
||||
(*WayItem)(nil), // 2: wallet.WayItem
|
||||
(*PaymentItem)(nil), // 3: wallet.PaymentItem
|
||||
(*ChargeRequest)(nil), // 4: wallet.ChargeRequest
|
||||
(*OrderRequest)(nil), // 5: wallet.OrderRequest
|
||||
(*CallbackRequest)(nil), // 6: wallet.CallbackRequest
|
||||
(*PaymentReply)(nil), // 7: wallet.PaymentReply
|
||||
nil, // 8: wallet.PaymentReply.ResultEntry
|
||||
(*protobuf.Empty)(nil), // 9: blocks.Empty
|
||||
(*protobuf.IdentRequest)(nil), // 10: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 11: blocks.StatusReply
|
||||
(*WayRequest)(nil), // 0: wallet.WayRequest
|
||||
(*WayReply)(nil), // 1: wallet.WayReply
|
||||
(*WayItem)(nil), // 2: wallet.WayItem
|
||||
(*PaymentItem)(nil), // 3: wallet.PaymentItem
|
||||
(*ChargeRequest)(nil), // 4: wallet.ChargeRequest
|
||||
(*OrderRequest)(nil), // 5: wallet.OrderRequest
|
||||
(*CallbackRequest)(nil), // 6: wallet.CallbackRequest
|
||||
(*PaymentReply)(nil), // 7: wallet.PaymentReply
|
||||
nil, // 8: wallet.PaymentReply.ResultEntry
|
||||
(*Empty)(nil), // 9: blocks.Empty
|
||||
(*IdentRequest)(nil), // 10: blocks.IdentRequest
|
||||
(*StatusReply)(nil), // 11: blocks.StatusReply
|
||||
}
|
||||
var file_module_finance_wallet_proto_payment_proto_depIdxs = []int32{
|
||||
2, // 0: wallet.WayReply.way:type_name -> wallet.WayItem
|
||||
@@ -689,6 +688,7 @@ func file_module_finance_wallet_proto_payment_proto_init() {
|
||||
if File_module_finance_wallet_proto_payment_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_finance_wallet_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package wallet
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -38,7 +37,7 @@ var (
|
||||
|
||||
func request_Payment_Hello_0(ctx context.Context, marshaler runtime.Marshaler, client PaymentClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.Empty
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -53,7 +52,7 @@ func request_Payment_Hello_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
|
||||
func local_request_Payment_Hello_0(ctx context.Context, marshaler runtime.Marshaler, server PaymentServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.Empty
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -92,7 +91,7 @@ func local_request_Payment_Way_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func request_Payment_Get_0(ctx context.Context, marshaler runtime.Marshaler, client PaymentClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -107,7 +106,7 @@ func request_Payment_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Payment_Get_0(ctx context.Context, marshaler runtime.Marshaler, server PaymentServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package wallet
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -32,17 +31,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 *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error)
|
||||
Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error)
|
||||
// 获取平台支持的支付网关
|
||||
Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error)
|
||||
// 获取支付的详情
|
||||
Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error)
|
||||
Get(ctx context.Context, in *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) (*protobuf.StatusReply, error)
|
||||
Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type paymentClient struct {
|
||||
@@ -53,7 +52,7 @@ func NewPaymentClient(cc grpc.ClientConnInterface) PaymentClient {
|
||||
return &paymentClient{cc}
|
||||
}
|
||||
|
||||
func (c *paymentClient) Hello(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*PaymentReply, error) {
|
||||
func (c *paymentClient) Hello(ctx context.Context, in *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...)
|
||||
@@ -73,7 +72,7 @@ func (c *paymentClient) Way(ctx context.Context, in *WayRequest, opts ...grpc.Ca
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *paymentClient) Get(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) {
|
||||
func (c *paymentClient) Get(ctx context.Context, in *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...)
|
||||
@@ -103,9 +102,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) (*protobuf.StatusReply, error) {
|
||||
func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Payment_Callback_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -117,17 +116,17 @@ func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts
|
||||
// All implementations should embed UnimplementedPaymentServer
|
||||
// for forward compatibility.
|
||||
type PaymentServer interface {
|
||||
Hello(context.Context, *protobuf.Empty) (*PaymentReply, error)
|
||||
Hello(context.Context, *Empty) (*PaymentReply, error)
|
||||
// 获取平台支持的支付网关
|
||||
Way(context.Context, *WayRequest) (*WayReply, error)
|
||||
// 获取支付的详情
|
||||
Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error)
|
||||
Get(context.Context, *IdentRequest) (*PaymentItem, error)
|
||||
// 支付-电商订单
|
||||
ByOrder(context.Context, *OrderRequest) (*PaymentReply, error)
|
||||
// 支付-充值
|
||||
ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error)
|
||||
// 回调更新支付的结果和状态
|
||||
Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error)
|
||||
Callback(context.Context, *CallbackRequest) (*StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedPaymentServer should be embedded to have
|
||||
@@ -137,13 +136,13 @@ type PaymentServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPaymentServer struct{}
|
||||
|
||||
func (UnimplementedPaymentServer) Hello(context.Context, *protobuf.Empty) (*PaymentReply, error) {
|
||||
func (UnimplementedPaymentServer) Hello(context.Context, *Empty) (*PaymentReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Hello not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) Way(context.Context, *WayRequest) (*WayReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Way not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) Get(context.Context, *protobuf.IdentRequest) (*PaymentItem, error) {
|
||||
func (UnimplementedPaymentServer) Get(context.Context, *IdentRequest) (*PaymentItem, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) {
|
||||
@@ -152,7 +151,7 @@ func (UnimplementedPaymentServer) ByOrder(context.Context, *OrderRequest) (*Paym
|
||||
func (UnimplementedPaymentServer) ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ByCharge not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Callback not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) testEmbeddedByValue() {}
|
||||
@@ -176,7 +175,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(protobuf.Empty)
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -188,7 +187,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.(*protobuf.Empty))
|
||||
return srv.(PaymentServer).Hello(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -212,7 +211,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(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -224,7 +223,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.(*protobuf.IdentRequest))
|
||||
return srv.(PaymentServer).Get(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package wallet
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -1086,7 +1085,7 @@ var File_module_finance_wallet_proto_wallet_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_finance_wallet_proto_wallet_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"(module/finance/wallet/proto/wallet.proto\x12\x06wallet\x1a\x15protobuf/blocks.proto\"\x92\x02\n" +
|
||||
"(module/finance/wallet/proto/wallet.proto\x12\x06wallet\x1a'module/finance/wallet/proto/const.proto\"\x92\x02\n" +
|
||||
"\x10GetWalletRequest\x12)\n" +
|
||||
"\x11is_total_today_in\x18\x01 \x01(\bR\x0eisTotalTodayIn\x12+\n" +
|
||||
"\x12is_total_today_out\x18\x02 \x01(\bR\x0fisTotalTodayOut\x12)\n" +
|
||||
@@ -1226,7 +1225,7 @@ var file_module_finance_wallet_proto_wallet_proto_goTypes = []any{
|
||||
(*BankCardInfo)(nil), // 13: wallet.BankCardInfo
|
||||
(*ApplyCashRequest)(nil), // 14: wallet.ApplyCashRequest
|
||||
nil, // 15: wallet.GetWalletReply.TotalEntry
|
||||
(*protobuf.StatusReply)(nil), // 16: blocks.StatusReply
|
||||
(*StatusReply)(nil), // 16: blocks.StatusReply
|
||||
}
|
||||
var file_module_finance_wallet_proto_wallet_proto_depIdxs = []int32{
|
||||
15, // 0: wallet.GetWalletReply.total:type_name -> wallet.GetWalletReply.TotalEntry
|
||||
@@ -1261,6 +1260,7 @@ func file_module_finance_wallet_proto_wallet_proto_init() {
|
||||
if File_module_finance_wallet_proto_wallet_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_finance_wallet_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package wallet
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -37,19 +36,19 @@ type BasicClient interface {
|
||||
// 获取钱包信息
|
||||
GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletReply, error)
|
||||
// 设置支付密码
|
||||
SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 绑定微信或支付宝账户
|
||||
BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 查询交易记录
|
||||
Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error)
|
||||
// 添加银行卡
|
||||
AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取用户银行卡列表
|
||||
GetBankCard(ctx context.Context, in *FinanceEmpty, opts ...grpc.CallOption) (*GetBankCardReply, error)
|
||||
// 删除银行卡
|
||||
RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 申请提现
|
||||
ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type basicClient struct {
|
||||
@@ -70,9 +69,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) (*protobuf.StatusReply, error) {
|
||||
func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_SetPayPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -80,9 +79,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) (*protobuf.StatusReply, error) {
|
||||
func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_BindPaymentId_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -100,9 +99,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) (*protobuf.StatusReply, error) {
|
||||
func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_AddBankCard_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -120,9 +119,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) (*protobuf.StatusReply, error) {
|
||||
func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_RmBankCard_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -130,9 +129,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) (*protobuf.StatusReply, error) {
|
||||
func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Basic_ApplyCash_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -147,19 +146,19 @@ type BasicServer interface {
|
||||
// 获取钱包信息
|
||||
GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error)
|
||||
// 设置支付密码
|
||||
SetPayPassword(context.Context, *SetPayPasswordRequest) (*protobuf.StatusReply, error)
|
||||
SetPayPassword(context.Context, *SetPayPasswordRequest) (*StatusReply, error)
|
||||
// 绑定微信或支付宝账户
|
||||
BindPaymentId(context.Context, *BindPaymentIDRequest) (*protobuf.StatusReply, error)
|
||||
BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error)
|
||||
// 查询交易记录
|
||||
Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error)
|
||||
// 添加银行卡
|
||||
AddBankCard(context.Context, *AddBankCardRequest) (*protobuf.StatusReply, error)
|
||||
AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error)
|
||||
// 获取用户银行卡列表
|
||||
GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error)
|
||||
// 删除银行卡
|
||||
RmBankCard(context.Context, *RmBankCardRequest) (*protobuf.StatusReply, error)
|
||||
RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error)
|
||||
// 申请提现
|
||||
ApplyCash(context.Context, *ApplyCashRequest) (*protobuf.StatusReply, error)
|
||||
ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedBasicServer should be embedded to have
|
||||
@@ -172,25 +171,25 @@ type UnimplementedBasicServer struct{}
|
||||
func (UnimplementedBasicServer) GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetWallet not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetPayPassword not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method BindPaymentId not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Transactions not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddBankCard not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetBankCard not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RmBankCard not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ApplyCash not implemented")
|
||||
}
|
||||
func (UnimplementedBasicServer) testEmbeddedByValue() {}
|
||||
|
||||
Reference in New Issue
Block a user