client/golang/wallet/wallet_grpc.pb.go

404 lines
15 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: wallet.proto
package wallet
import (
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 (
Basic_GetWallet_FullMethodName = "/wallet.Basic/GetWallet"
Basic_SetPayPassword_FullMethodName = "/wallet.Basic/SetPayPassword"
Basic_BindPaymentId_FullMethodName = "/wallet.Basic/BindPaymentId"
Basic_Transactions_FullMethodName = "/wallet.Basic/Transactions"
Basic_AddBankCard_FullMethodName = "/wallet.Basic/AddBankCard"
Basic_GetBankCard_FullMethodName = "/wallet.Basic/GetBankCard"
Basic_RmBankCard_FullMethodName = "/wallet.Basic/RmBankCard"
Basic_ApplyCash_FullMethodName = "/wallet.Basic/ApplyCash"
)
// BasicClient is the client API for Basic 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 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)
//查询交易记录
Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, 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) (*StatusReply, error)
//申请提现
ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error)
}
type basicClient struct {
cc grpc.ClientConnInterface
}
func NewBasicClient(cc grpc.ClientConnInterface) BasicClient {
return &basicClient{cc}
}
func (c *basicClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetWalletReply)
err := c.cc.Invoke(ctx, Basic_GetWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Basic_SetPayPassword_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Basic_BindPaymentId_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TransactionsReply)
err := c.cc.Invoke(ctx, Basic_Transactions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Basic_AddBankCard_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) GetBankCard(ctx context.Context, in *FinanceEmpty, opts ...grpc.CallOption) (*GetBankCardReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetBankCardReply)
err := c.cc.Invoke(ctx, Basic_GetBankCard_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Basic_RmBankCard_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Basic_ApplyCash_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// BasicServer is the server API for Basic service.
// All implementations must 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)
//查询交易记录
Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error)
//添加银行卡
AddBankCard(context.Context, *AddBankCardRequest) (*StatusReply, error)
//获取用户银行卡列表
GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error)
//删除银行卡
RmBankCard(context.Context, *RmBankCardRequest) (*StatusReply, error)
//申请提现
ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error)
mustEmbedUnimplementedBasicServer()
}
// UnimplementedBasicServer must 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 UnimplementedBasicServer struct{}
func (UnimplementedBasicServer) GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) {
return nil, status.Errorf(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) BindPaymentId(context.Context, *BindPaymentIDRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method BindPaymentId not implemented")
}
func (UnimplementedBasicServer) Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) {
return nil, status.Errorf(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) GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) {
return nil, status.Errorf(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) ApplyCash(context.Context, *ApplyCashRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ApplyCash not implemented")
}
func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {}
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
// result in compilation errors.
type UnsafeBasicServer interface {
mustEmbedUnimplementedBasicServer()
}
func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) {
// If the following call pancis, 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.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Basic_ServiceDesc, srv)
}
func _Basic_GetWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).GetWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_GetWallet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).GetWallet(ctx, req.(*GetWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_SetPayPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetPayPasswordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).SetPayPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_SetPayPassword_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).SetPayPassword(ctx, req.(*SetPayPasswordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_BindPaymentId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BindPaymentIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).BindPaymentId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_BindPaymentId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).BindPaymentId(ctx, req.(*BindPaymentIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_Transactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TransactionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).Transactions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_Transactions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).Transactions(ctx, req.(*TransactionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_AddBankCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddBankCardRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).AddBankCard(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_AddBankCard_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).AddBankCard(ctx, req.(*AddBankCardRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_GetBankCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FinanceEmpty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).GetBankCard(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_GetBankCard_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).GetBankCard(ctx, req.(*FinanceEmpty))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_RmBankCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RmBankCardRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).RmBankCard(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_RmBankCard_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).RmBankCard(ctx, req.(*RmBankCardRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Basic_ApplyCash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ApplyCashRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BasicServer).ApplyCash(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Basic_ApplyCash_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasicServer).ApplyCash(ctx, req.(*ApplyCashRequest))
}
return interceptor(ctx, in, info, handler)
}
// Basic_ServiceDesc is the grpc.ServiceDesc for Basic service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Basic_ServiceDesc = grpc.ServiceDesc{
ServiceName: "wallet.Basic",
HandlerType: (*BasicServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetWallet",
Handler: _Basic_GetWallet_Handler,
},
{
MethodName: "SetPayPassword",
Handler: _Basic_SetPayPassword_Handler,
},
{
MethodName: "BindPaymentId",
Handler: _Basic_BindPaymentId_Handler,
},
{
MethodName: "Transactions",
Handler: _Basic_Transactions_Handler,
},
{
MethodName: "AddBankCard",
Handler: _Basic_AddBankCard_Handler,
},
{
MethodName: "GetBankCard",
Handler: _Basic_GetBankCard_Handler,
},
{
MethodName: "RmBankCard",
Handler: _Basic_RmBankCard_Handler,
},
{
MethodName: "ApplyCash",
Handler: _Basic_ApplyCash_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "wallet.proto",
}