2023-06-13 13:22:51 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2024-03-16 15:50:37 +00:00
// versions:
2024-04-17 22:35:13 +00:00
// - protoc-gen-go-grpc v1.3.0
2024-03-16 15:50:37 +00:00
// - protoc (unknown)
// source: callback/service.proto
2023-06-13 13:22:51 +00:00
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
2024-04-17 22:35:13 +00:00
const (
PaymentCallbackService_OnSuccess_FullMethodName = "/payment_callback.PaymentCallbackService/OnSuccess"
PaymentCallbackService_OnFailure_FullMethodName = "/payment_callback.PaymentCallbackService/OnFailure"
)
2023-06-13 13:22:51 +00:00
// 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 )
2024-04-17 22:35:13 +00:00
err := c . cc . Invoke ( ctx , PaymentCallbackService_OnSuccess_FullMethodName , in , out , opts ... )
2023-06-13 13:22:51 +00:00
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 )
2024-04-17 22:35:13 +00:00
err := c . cc . Invoke ( ctx , PaymentCallbackService_OnFailure_FullMethodName , in , out , opts ... )
2023-06-13 13:22:51 +00:00
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 ,
2024-04-17 22:35:13 +00:00
FullMethod : PaymentCallbackService_OnSuccess_FullMethodName ,
2023-06-13 13:22:51 +00:00
}
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 ,
2024-04-17 22:35:13 +00:00
FullMethod : PaymentCallbackService_OnFailure_FullMethodName ,
2023-06-13 13:22:51 +00:00
}
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" ,
}