// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: wechat.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 ( Wechat_JsapiPreOrder_FullMethodName = "/wallet.Wechat/JsapiPreOrder" Wechat_AppPreOrder_FullMethodName = "/wallet.Wechat/AppPreOrder" Wechat_NativePreOrder_FullMethodName = "/wallet.Wechat/NativePreOrder" Wechat_Transfer_FullMethodName = "/wallet.Wechat/Transfer" Wechat_WxCallback_FullMethodName = "/wallet.Wechat/WxCallback" ) // WechatClient is the client API for Wechat 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 WechatClient interface { //微信JSAPI下单 JsapiPreOrder(ctx context.Context, in *WxpayJSAPIPreOrderRequest, opts ...grpc.CallOption) (*WxpayJSAPIPreOrderReply, error) //微信APP支付下单 AppPreOrder(ctx context.Context, in *WxpayAppPreOrderRequest, opts ...grpc.CallOption) (*WxpayAppPreOrderReply, error) //微信native二维码支付下单 NativePreOrder(ctx context.Context, in *WxpayNativePreOrderRequest, opts ...grpc.CallOption) (*WxpayNativePreOrderReply, error) //微信转账到零钱 Transfer(ctx context.Context, in *WxpayTransferRequest, opts ...grpc.CallOption) (*WxpayTransferReply, error) //微信支付回调 WxCallback(ctx context.Context, in *WxCallBackRequest, opts ...grpc.CallOption) (*CallBackReply, error) } type wechatClient struct { cc grpc.ClientConnInterface } func NewWechatClient(cc grpc.ClientConnInterface) WechatClient { return &wechatClient{cc} } func (c *wechatClient) JsapiPreOrder(ctx context.Context, in *WxpayJSAPIPreOrderRequest, opts ...grpc.CallOption) (*WxpayJSAPIPreOrderReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WxpayJSAPIPreOrderReply) err := c.cc.Invoke(ctx, Wechat_JsapiPreOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *wechatClient) AppPreOrder(ctx context.Context, in *WxpayAppPreOrderRequest, opts ...grpc.CallOption) (*WxpayAppPreOrderReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WxpayAppPreOrderReply) err := c.cc.Invoke(ctx, Wechat_AppPreOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *wechatClient) NativePreOrder(ctx context.Context, in *WxpayNativePreOrderRequest, opts ...grpc.CallOption) (*WxpayNativePreOrderReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WxpayNativePreOrderReply) err := c.cc.Invoke(ctx, Wechat_NativePreOrder_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *wechatClient) Transfer(ctx context.Context, in *WxpayTransferRequest, opts ...grpc.CallOption) (*WxpayTransferReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(WxpayTransferReply) err := c.cc.Invoke(ctx, Wechat_Transfer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *wechatClient) WxCallback(ctx context.Context, in *WxCallBackRequest, opts ...grpc.CallOption) (*CallBackReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CallBackReply) err := c.cc.Invoke(ctx, Wechat_WxCallback_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // WechatServer is the server API for Wechat service. // All implementations must embed UnimplementedWechatServer // for forward compatibility. type WechatServer interface { //微信JSAPI下单 JsapiPreOrder(context.Context, *WxpayJSAPIPreOrderRequest) (*WxpayJSAPIPreOrderReply, error) //微信APP支付下单 AppPreOrder(context.Context, *WxpayAppPreOrderRequest) (*WxpayAppPreOrderReply, error) //微信native二维码支付下单 NativePreOrder(context.Context, *WxpayNativePreOrderRequest) (*WxpayNativePreOrderReply, error) //微信转账到零钱 Transfer(context.Context, *WxpayTransferRequest) (*WxpayTransferReply, error) //微信支付回调 WxCallback(context.Context, *WxCallBackRequest) (*CallBackReply, error) mustEmbedUnimplementedWechatServer() } // UnimplementedWechatServer 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 UnimplementedWechatServer struct{} func (UnimplementedWechatServer) JsapiPreOrder(context.Context, *WxpayJSAPIPreOrderRequest) (*WxpayJSAPIPreOrderReply, error) { return nil, status.Errorf(codes.Unimplemented, "method JsapiPreOrder not implemented") } func (UnimplementedWechatServer) AppPreOrder(context.Context, *WxpayAppPreOrderRequest) (*WxpayAppPreOrderReply, error) { return nil, status.Errorf(codes.Unimplemented, "method AppPreOrder not implemented") } func (UnimplementedWechatServer) NativePreOrder(context.Context, *WxpayNativePreOrderRequest) (*WxpayNativePreOrderReply, error) { return nil, status.Errorf(codes.Unimplemented, "method NativePreOrder not implemented") } func (UnimplementedWechatServer) Transfer(context.Context, *WxpayTransferRequest) (*WxpayTransferReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") } func (UnimplementedWechatServer) WxCallback(context.Context, *WxCallBackRequest) (*CallBackReply, error) { return nil, status.Errorf(codes.Unimplemented, "method WxCallback not implemented") } func (UnimplementedWechatServer) mustEmbedUnimplementedWechatServer() {} func (UnimplementedWechatServer) testEmbeddedByValue() {} // UnsafeWechatServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to WechatServer will // result in compilation errors. type UnsafeWechatServer interface { mustEmbedUnimplementedWechatServer() } func RegisterWechatServer(s grpc.ServiceRegistrar, srv WechatServer) { // If the following call pancis, it indicates UnimplementedWechatServer 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(&Wechat_ServiceDesc, srv) } func _Wechat_JsapiPreOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WxpayJSAPIPreOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WechatServer).JsapiPreOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Wechat_JsapiPreOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WechatServer).JsapiPreOrder(ctx, req.(*WxpayJSAPIPreOrderRequest)) } return interceptor(ctx, in, info, handler) } func _Wechat_AppPreOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WxpayAppPreOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WechatServer).AppPreOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Wechat_AppPreOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WechatServer).AppPreOrder(ctx, req.(*WxpayAppPreOrderRequest)) } return interceptor(ctx, in, info, handler) } func _Wechat_NativePreOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WxpayNativePreOrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WechatServer).NativePreOrder(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Wechat_NativePreOrder_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WechatServer).NativePreOrder(ctx, req.(*WxpayNativePreOrderRequest)) } return interceptor(ctx, in, info, handler) } func _Wechat_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WxpayTransferRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WechatServer).Transfer(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Wechat_Transfer_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WechatServer).Transfer(ctx, req.(*WxpayTransferRequest)) } return interceptor(ctx, in, info, handler) } func _Wechat_WxCallback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WxCallBackRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WechatServer).WxCallback(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Wechat_WxCallback_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WechatServer).WxCallback(ctx, req.(*WxCallBackRequest)) } return interceptor(ctx, in, info, handler) } // Wechat_ServiceDesc is the grpc.ServiceDesc for Wechat service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Wechat_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wallet.Wechat", HandlerType: (*WechatServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "JsapiPreOrder", Handler: _Wechat_JsapiPreOrder_Handler, }, { MethodName: "AppPreOrder", Handler: _Wechat_AppPreOrder_Handler, }, { MethodName: "NativePreOrder", Handler: _Wechat_NativePreOrder_Handler, }, { MethodName: "Transfer", Handler: _Wechat_Transfer_Handler, }, { MethodName: "WxCallback", Handler: _Wechat_WxCallback_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "wechat.proto", }