// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package payment_callback import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // PaymentCallbackServiceClient is the client API for PaymentCallbackService 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 PaymentCallbackServiceClient interface { OnSuccess(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) OnFailure(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) } type paymentCallbackServiceClient struct { cc grpc.ClientConnInterface } func NewPaymentCallbackServiceClient(cc grpc.ClientConnInterface) PaymentCallbackServiceClient { return &paymentCallbackServiceClient{cc} } func (c *paymentCallbackServiceClient) OnSuccess(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/payment_callback.PaymentCallbackService/OnSuccess", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *paymentCallbackServiceClient) OnFailure(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/payment_callback.PaymentCallbackService/OnFailure", in, out, opts...) if err != nil { return nil, err } return out, nil } // PaymentCallbackServiceServer is the server API for PaymentCallbackService service. // All implementations should embed UnimplementedPaymentCallbackServiceServer // for forward compatibility type PaymentCallbackServiceServer interface { OnSuccess(context.Context, *Event) (*emptypb.Empty, error) OnFailure(context.Context, *Event) (*emptypb.Empty, error) } // UnimplementedPaymentCallbackServiceServer should be embedded to have forward compatible implementations. type UnimplementedPaymentCallbackServiceServer struct { } func (UnimplementedPaymentCallbackServiceServer) OnSuccess(context.Context, *Event) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method OnSuccess not implemented") } func (UnimplementedPaymentCallbackServiceServer) OnFailure(context.Context, *Event) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method OnFailure not implemented") } // UnsafePaymentCallbackServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PaymentCallbackServiceServer will // result in compilation errors. type UnsafePaymentCallbackServiceServer interface { mustEmbedUnimplementedPaymentCallbackServiceServer() } func RegisterPaymentCallbackServiceServer(s grpc.ServiceRegistrar, srv PaymentCallbackServiceServer) { s.RegisterService(&PaymentCallbackService_ServiceDesc, srv) } func _PaymentCallbackService_OnSuccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Event) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentCallbackServiceServer).OnSuccess(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/payment_callback.PaymentCallbackService/OnSuccess", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentCallbackServiceServer).OnSuccess(ctx, req.(*Event)) } return interceptor(ctx, in, info, handler) } func _PaymentCallbackService_OnFailure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Event) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentCallbackServiceServer).OnFailure(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/payment_callback.PaymentCallbackService/OnFailure", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentCallbackServiceServer).OnFailure(ctx, req.(*Event)) } return interceptor(ctx, in, info, handler) } // PaymentCallbackService_ServiceDesc is the grpc.ServiceDesc for PaymentCallbackService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PaymentCallbackService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "payment_callback.PaymentCallbackService", HandlerType: (*PaymentCallbackServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "OnSuccess", Handler: _PaymentCallbackService_OnSuccess_Handler, }, { MethodName: "OnFailure", Handler: _PaymentCallbackService_OnFailure_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "callback/service.proto", }