// Copyright (C) 2024 Declan Teevan // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: stocklet/payment/v1/service.proto package payment_v1 import ( context "context" v1 "github.com/hexolan/stocklet/internal/pkg/protogen/common/v1" v11 "github.com/hexolan/stocklet/internal/pkg/protogen/events/v1" 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 const ( PaymentService_ServiceInfo_FullMethodName = "/stocklet.payment.v1.PaymentService/ServiceInfo" PaymentService_ViewTransaction_FullMethodName = "/stocklet.payment.v1.PaymentService/ViewTransaction" PaymentService_ViewBalance_FullMethodName = "/stocklet.payment.v1.PaymentService/ViewBalance" PaymentService_ProcessUserCreatedEvent_FullMethodName = "/stocklet.payment.v1.PaymentService/ProcessUserCreatedEvent" PaymentService_ProcessUserDeletedEvent_FullMethodName = "/stocklet.payment.v1.PaymentService/ProcessUserDeletedEvent" PaymentService_ProcessShipmentAllocationEvent_FullMethodName = "/stocklet.payment.v1.PaymentService/ProcessShipmentAllocationEvent" ) // PaymentServiceClient is the client API for PaymentService 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 PaymentServiceClient interface { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) ViewTransaction(ctx context.Context, in *ViewTransactionRequest, opts ...grpc.CallOption) (*ViewTransactionResponse, error) ViewBalance(ctx context.Context, in *ViewBalanceRequest, opts ...grpc.CallOption) (*ViewBalanceResponse, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessUserCreatedEvent(ctx context.Context, in *v11.UserCreatedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessUserDeletedEvent(ctx context.Context, in *v11.UserDeletedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessShipmentAllocationEvent(ctx context.Context, in *v11.ShipmentAllocationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) } type paymentServiceClient struct { cc grpc.ClientConnInterface } func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient { return &paymentServiceClient{cc} } func (c *paymentServiceClient) ServiceInfo(ctx context.Context, in *v1.ServiceInfoRequest, opts ...grpc.CallOption) (*v1.ServiceInfoResponse, error) { out := new(v1.ServiceInfoResponse) err := c.cc.Invoke(ctx, PaymentService_ServiceInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *paymentServiceClient) ViewTransaction(ctx context.Context, in *ViewTransactionRequest, opts ...grpc.CallOption) (*ViewTransactionResponse, error) { out := new(ViewTransactionResponse) err := c.cc.Invoke(ctx, PaymentService_ViewTransaction_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *paymentServiceClient) ViewBalance(ctx context.Context, in *ViewBalanceRequest, opts ...grpc.CallOption) (*ViewBalanceResponse, error) { out := new(ViewBalanceResponse) err := c.cc.Invoke(ctx, PaymentService_ViewBalance_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *paymentServiceClient) ProcessUserCreatedEvent(ctx context.Context, in *v11.UserCreatedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, PaymentService_ProcessUserCreatedEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *paymentServiceClient) ProcessUserDeletedEvent(ctx context.Context, in *v11.UserDeletedEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, PaymentService_ProcessUserDeletedEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *paymentServiceClient) ProcessShipmentAllocationEvent(ctx context.Context, in *v11.ShipmentAllocationEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, PaymentService_ProcessShipmentAllocationEvent_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // PaymentServiceServer is the server API for PaymentService service. // All implementations must embed UnimplementedPaymentServiceServer // for forward compatibility type PaymentServiceServer interface { // View information about the service. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) ViewTransaction(context.Context, *ViewTransactionRequest) (*ViewTransactionResponse, error) ViewBalance(context.Context, *ViewBalanceRequest) (*ViewBalanceResponse, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessUserCreatedEvent(context.Context, *v11.UserCreatedEvent) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error) // A consumer will call this method to process events. // // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE // buf:lint:ignore RPC_REQUEST_STANDARD_NAME // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME ProcessShipmentAllocationEvent(context.Context, *v11.ShipmentAllocationEvent) (*emptypb.Empty, error) mustEmbedUnimplementedPaymentServiceServer() } // UnimplementedPaymentServiceServer must be embedded to have forward compatible implementations. type UnimplementedPaymentServiceServer struct { } func (UnimplementedPaymentServiceServer) ServiceInfo(context.Context, *v1.ServiceInfoRequest) (*v1.ServiceInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServiceInfo not implemented") } func (UnimplementedPaymentServiceServer) ViewTransaction(context.Context, *ViewTransactionRequest) (*ViewTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ViewTransaction not implemented") } func (UnimplementedPaymentServiceServer) ViewBalance(context.Context, *ViewBalanceRequest) (*ViewBalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ViewBalance not implemented") } func (UnimplementedPaymentServiceServer) ProcessUserCreatedEvent(context.Context, *v11.UserCreatedEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessUserCreatedEvent not implemented") } func (UnimplementedPaymentServiceServer) ProcessUserDeletedEvent(context.Context, *v11.UserDeletedEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessUserDeletedEvent not implemented") } func (UnimplementedPaymentServiceServer) ProcessShipmentAllocationEvent(context.Context, *v11.ShipmentAllocationEvent) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProcessShipmentAllocationEvent not implemented") } func (UnimplementedPaymentServiceServer) mustEmbedUnimplementedPaymentServiceServer() {} // UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PaymentServiceServer will // result in compilation errors. type UnsafePaymentServiceServer interface { mustEmbedUnimplementedPaymentServiceServer() } func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer) { s.RegisterService(&PaymentService_ServiceDesc, srv) } func _PaymentService_ServiceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v1.ServiceInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).ServiceInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_ServiceInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).ServiceInfo(ctx, req.(*v1.ServiceInfoRequest)) } return interceptor(ctx, in, info, handler) } func _PaymentService_ViewTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewTransactionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).ViewTransaction(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_ViewTransaction_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).ViewTransaction(ctx, req.(*ViewTransactionRequest)) } return interceptor(ctx, in, info, handler) } func _PaymentService_ViewBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewBalanceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).ViewBalance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_ViewBalance_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).ViewBalance(ctx, req.(*ViewBalanceRequest)) } return interceptor(ctx, in, info, handler) } func _PaymentService_ProcessUserCreatedEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.UserCreatedEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).ProcessUserCreatedEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_ProcessUserCreatedEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).ProcessUserCreatedEvent(ctx, req.(*v11.UserCreatedEvent)) } return interceptor(ctx, in, info, handler) } func _PaymentService_ProcessUserDeletedEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.UserDeletedEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).ProcessUserDeletedEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_ProcessUserDeletedEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).ProcessUserDeletedEvent(ctx, req.(*v11.UserDeletedEvent)) } return interceptor(ctx, in, info, handler) } func _PaymentService_ProcessShipmentAllocationEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(v11.ShipmentAllocationEvent) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PaymentServiceServer).ProcessShipmentAllocationEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PaymentService_ProcessShipmentAllocationEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PaymentServiceServer).ProcessShipmentAllocationEvent(ctx, req.(*v11.ShipmentAllocationEvent)) } return interceptor(ctx, in, info, handler) } // PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PaymentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "stocklet.payment.v1.PaymentService", HandlerType: (*PaymentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ServiceInfo", Handler: _PaymentService_ServiceInfo_Handler, }, { MethodName: "ViewTransaction", Handler: _PaymentService_ViewTransaction_Handler, }, { MethodName: "ViewBalance", Handler: _PaymentService_ViewBalance_Handler, }, { MethodName: "ProcessUserCreatedEvent", Handler: _PaymentService_ProcessUserCreatedEvent_Handler, }, { MethodName: "ProcessUserDeletedEvent", Handler: _PaymentService_ProcessUserDeletedEvent_Handler, }, { MethodName: "ProcessShipmentAllocationEvent", Handler: _PaymentService_ProcessShipmentAllocationEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stocklet/payment/v1/service.proto", }