client/golnag/wallet/alipay_grpc.pb.go

244 lines
8.9 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: alipay.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 (
Alipay_WapPay_FullMethodName = "/wallet.Alipay/WapPay"
Alipay_PagePay_FullMethodName = "/wallet.Alipay/PagePay"
Alipay_AppPay_FullMethodName = "/wallet.Alipay/AppPay"
Alipay_Transfer_FullMethodName = "/wallet.Alipay/Transfer"
)
// AlipayClient is the client API for Alipay 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 AlipayClient interface {
//支付宝wap支付
WapPay(ctx context.Context, in *AlipayTradeWapPayRequest, opts ...grpc.CallOption) (*AlipayTradeWapPayReply, error)
//支付宝电脑网站支付
PagePay(ctx context.Context, in *AlipayTradePagePayRequest, opts ...grpc.CallOption) (*AlipayTradePagePayReply, error)
//支付宝APP支付
AppPay(ctx context.Context, in *AlipayTradeAppPayRequest, opts ...grpc.CallOption) (*AlipayTradeAppPayReply, error)
//支付宝转账到个人支付宝账户
Transfer(ctx context.Context, in *AlipayUniTransferRequest, opts ...grpc.CallOption) (*AlipayUniTransferReply, error)
}
type alipayClient struct {
cc grpc.ClientConnInterface
}
func NewAlipayClient(cc grpc.ClientConnInterface) AlipayClient {
return &alipayClient{cc}
}
func (c *alipayClient) WapPay(ctx context.Context, in *AlipayTradeWapPayRequest, opts ...grpc.CallOption) (*AlipayTradeWapPayReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AlipayTradeWapPayReply)
err := c.cc.Invoke(ctx, Alipay_WapPay_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alipayClient) PagePay(ctx context.Context, in *AlipayTradePagePayRequest, opts ...grpc.CallOption) (*AlipayTradePagePayReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AlipayTradePagePayReply)
err := c.cc.Invoke(ctx, Alipay_PagePay_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alipayClient) AppPay(ctx context.Context, in *AlipayTradeAppPayRequest, opts ...grpc.CallOption) (*AlipayTradeAppPayReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AlipayTradeAppPayReply)
err := c.cc.Invoke(ctx, Alipay_AppPay_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alipayClient) Transfer(ctx context.Context, in *AlipayUniTransferRequest, opts ...grpc.CallOption) (*AlipayUniTransferReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AlipayUniTransferReply)
err := c.cc.Invoke(ctx, Alipay_Transfer_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// AlipayServer is the server API for Alipay service.
// All implementations must embed UnimplementedAlipayServer
// for forward compatibility.
type AlipayServer interface {
//支付宝wap支付
WapPay(context.Context, *AlipayTradeWapPayRequest) (*AlipayTradeWapPayReply, error)
//支付宝电脑网站支付
PagePay(context.Context, *AlipayTradePagePayRequest) (*AlipayTradePagePayReply, error)
//支付宝APP支付
AppPay(context.Context, *AlipayTradeAppPayRequest) (*AlipayTradeAppPayReply, error)
//支付宝转账到个人支付宝账户
Transfer(context.Context, *AlipayUniTransferRequest) (*AlipayUniTransferReply, error)
mustEmbedUnimplementedAlipayServer()
}
// UnimplementedAlipayServer 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 UnimplementedAlipayServer struct{}
func (UnimplementedAlipayServer) WapPay(context.Context, *AlipayTradeWapPayRequest) (*AlipayTradeWapPayReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method WapPay not implemented")
}
func (UnimplementedAlipayServer) PagePay(context.Context, *AlipayTradePagePayRequest) (*AlipayTradePagePayReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method PagePay not implemented")
}
func (UnimplementedAlipayServer) AppPay(context.Context, *AlipayTradeAppPayRequest) (*AlipayTradeAppPayReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method AppPay not implemented")
}
func (UnimplementedAlipayServer) Transfer(context.Context, *AlipayUniTransferRequest) (*AlipayUniTransferReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented")
}
func (UnimplementedAlipayServer) mustEmbedUnimplementedAlipayServer() {}
func (UnimplementedAlipayServer) testEmbeddedByValue() {}
// UnsafeAlipayServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AlipayServer will
// result in compilation errors.
type UnsafeAlipayServer interface {
mustEmbedUnimplementedAlipayServer()
}
func RegisterAlipayServer(s grpc.ServiceRegistrar, srv AlipayServer) {
// If the following call pancis, it indicates UnimplementedAlipayServer 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(&Alipay_ServiceDesc, srv)
}
func _Alipay_WapPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AlipayTradeWapPayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlipayServer).WapPay(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Alipay_WapPay_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlipayServer).WapPay(ctx, req.(*AlipayTradeWapPayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Alipay_PagePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AlipayTradePagePayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlipayServer).PagePay(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Alipay_PagePay_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlipayServer).PagePay(ctx, req.(*AlipayTradePagePayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Alipay_AppPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AlipayTradeAppPayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlipayServer).AppPay(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Alipay_AppPay_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlipayServer).AppPay(ctx, req.(*AlipayTradeAppPayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Alipay_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AlipayUniTransferRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlipayServer).Transfer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Alipay_Transfer_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlipayServer).Transfer(ctx, req.(*AlipayUniTransferRequest))
}
return interceptor(ctx, in, info, handler)
}
// Alipay_ServiceDesc is the grpc.ServiceDesc for Alipay service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Alipay_ServiceDesc = grpc.ServiceDesc{
ServiceName: "wallet.Alipay",
HandlerType: (*AlipayServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "WapPay",
Handler: _Alipay_WapPay_Handler,
},
{
MethodName: "PagePay",
Handler: _Alipay_PagePay_Handler,
},
{
MethodName: "AppPay",
Handler: _Alipay_AppPay_Handler,
},
{
MethodName: "Transfer",
Handler: _Alipay_Transfer_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "alipay.proto",
}