Wallet/pkg/proto/payment_grpc.pb.go

236 lines
9.7 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.28.3
// source: payment.proto
package proto
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 (
PaymentService_GetWallet_FullMethodName = "/proto.PaymentService/GetWallet"
PaymentService_GetTransaction_FullMethodName = "/proto.PaymentService/GetTransaction"
PaymentService_MakeTransaction_FullMethodName = "/proto.PaymentService/MakeTransaction"
PaymentService_MakeTransactionWithAccount_FullMethodName = "/proto.PaymentService/MakeTransactionWithAccount"
)
// 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 {
GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletResponse, error)
GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error)
MakeTransaction(ctx context.Context, in *MakeTransactionRequest, opts ...grpc.CallOption) (*TransactionInfo, error)
MakeTransactionWithAccount(ctx context.Context, in *MakeTransactionWithAccountRequest, opts ...grpc.CallOption) (*TransactionInfo, error)
}
type paymentServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient {
return &paymentServiceClient{cc}
}
func (c *paymentServiceClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetWalletResponse)
err := c.cc.Invoke(ctx, PaymentService_GetWallet_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetTransactionResponse)
err := c.cc.Invoke(ctx, PaymentService_GetTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) MakeTransaction(ctx context.Context, in *MakeTransactionRequest, opts ...grpc.CallOption) (*TransactionInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TransactionInfo)
err := c.cc.Invoke(ctx, PaymentService_MakeTransaction_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentServiceClient) MakeTransactionWithAccount(ctx context.Context, in *MakeTransactionWithAccountRequest, opts ...grpc.CallOption) (*TransactionInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TransactionInfo)
err := c.cc.Invoke(ctx, PaymentService_MakeTransactionWithAccount_FullMethodName, in, out, cOpts...)
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 {
GetWallet(context.Context, *GetWalletRequest) (*GetWalletResponse, error)
GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
MakeTransaction(context.Context, *MakeTransactionRequest) (*TransactionInfo, error)
MakeTransactionWithAccount(context.Context, *MakeTransactionWithAccountRequest) (*TransactionInfo, error)
mustEmbedUnimplementedPaymentServiceServer()
}
// UnimplementedPaymentServiceServer 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 UnimplementedPaymentServiceServer struct{}
func (UnimplementedPaymentServiceServer) GetWallet(context.Context, *GetWalletRequest) (*GetWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWallet not implemented")
}
func (UnimplementedPaymentServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented")
}
func (UnimplementedPaymentServiceServer) MakeTransaction(context.Context, *MakeTransactionRequest) (*TransactionInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method MakeTransaction not implemented")
}
func (UnimplementedPaymentServiceServer) MakeTransactionWithAccount(context.Context, *MakeTransactionWithAccountRequest) (*TransactionInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method MakeTransactionWithAccount not implemented")
}
func (UnimplementedPaymentServiceServer) mustEmbedUnimplementedPaymentServiceServer() {}
func (UnimplementedPaymentServiceServer) testEmbeddedByValue() {}
// 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) {
// If the following call pancis, it indicates UnimplementedPaymentServiceServer 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(&PaymentService_ServiceDesc, srv)
}
func _PaymentService_GetWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).GetWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_GetWallet_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).GetWallet(ctx, req.(*GetWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).GetTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_GetTransaction_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).GetTransaction(ctx, req.(*GetTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_MakeTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MakeTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).MakeTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_MakeTransaction_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).MakeTransaction(ctx, req.(*MakeTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PaymentService_MakeTransactionWithAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MakeTransactionWithAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServiceServer).MakeTransactionWithAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PaymentService_MakeTransactionWithAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServiceServer).MakeTransactionWithAccount(ctx, req.(*MakeTransactionWithAccountRequest))
}
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: "proto.PaymentService",
HandlerType: (*PaymentServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetWallet",
Handler: _PaymentService_GetWallet_Handler,
},
{
MethodName: "GetTransaction",
Handler: _PaymentService_GetTransaction_Handler,
},
{
MethodName: "MakeTransaction",
Handler: _PaymentService_MakeTransaction_Handler,
},
{
MethodName: "MakeTransactionWithAccount",
Handler: _PaymentService_MakeTransactionWithAccount_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "payment.proto",
}