// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.21.12 // source: transactions.proto package transactions 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.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // TransactionsServiceClient is the client API for TransactionsService 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 TransactionsServiceClient interface { Create(ctx context.Context, in *TransactionCreate, opts ...grpc.CallOption) (*IdMessage, error) Update(ctx context.Context, in *TransactionUpdate, opts ...grpc.CallOption) (*NullResponse, error) Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*NullResponse, error) Balance(ctx context.Context, in *UserIdMessage, opts ...grpc.CallOption) (*BalanceResponse, error) Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*TransactionItem, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*TransactionList, error) } type transactionsServiceClient struct { cc grpc.ClientConnInterface } func NewTransactionsServiceClient(cc grpc.ClientConnInterface) TransactionsServiceClient { return &transactionsServiceClient{cc} } func (c *transactionsServiceClient) Create(ctx context.Context, in *TransactionCreate, opts ...grpc.CallOption) (*IdMessage, error) { out := new(IdMessage) err := c.cc.Invoke(ctx, "/transactions.TransactionsService/Create", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *transactionsServiceClient) Update(ctx context.Context, in *TransactionUpdate, opts ...grpc.CallOption) (*NullResponse, error) { out := new(NullResponse) err := c.cc.Invoke(ctx, "/transactions.TransactionsService/Update", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *transactionsServiceClient) Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*NullResponse, error) { out := new(NullResponse) err := c.cc.Invoke(ctx, "/transactions.TransactionsService/Delete", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *transactionsServiceClient) Balance(ctx context.Context, in *UserIdMessage, opts ...grpc.CallOption) (*BalanceResponse, error) { out := new(BalanceResponse) err := c.cc.Invoke(ctx, "/transactions.TransactionsService/Balance", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *transactionsServiceClient) Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*TransactionItem, error) { out := new(TransactionItem) err := c.cc.Invoke(ctx, "/transactions.TransactionsService/Get", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *transactionsServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*TransactionList, error) { out := new(TransactionList) err := c.cc.Invoke(ctx, "/transactions.TransactionsService/List", in, out, opts...) if err != nil { return nil, err } return out, nil } // TransactionsServiceServer is the server API for TransactionsService service. // All implementations must embed UnimplementedTransactionsServiceServer // for forward compatibility type TransactionsServiceServer interface { Create(context.Context, *TransactionCreate) (*IdMessage, error) Update(context.Context, *TransactionUpdate) (*NullResponse, error) Delete(context.Context, *IdMessage) (*NullResponse, error) Balance(context.Context, *UserIdMessage) (*BalanceResponse, error) Get(context.Context, *IdMessage) (*TransactionItem, error) List(context.Context, *ListRequest) (*TransactionList, error) mustEmbedUnimplementedTransactionsServiceServer() } // UnimplementedTransactionsServiceServer must be embedded to have forward compatible implementations. type UnimplementedTransactionsServiceServer struct { } func (UnimplementedTransactionsServiceServer) Create(context.Context, *TransactionCreate) (*IdMessage, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } func (UnimplementedTransactionsServiceServer) Update(context.Context, *TransactionUpdate) (*NullResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (UnimplementedTransactionsServiceServer) Delete(context.Context, *IdMessage) (*NullResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } func (UnimplementedTransactionsServiceServer) Balance(context.Context, *UserIdMessage) (*BalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") } func (UnimplementedTransactionsServiceServer) Get(context.Context, *IdMessage) (*TransactionItem, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } func (UnimplementedTransactionsServiceServer) List(context.Context, *ListRequest) (*TransactionList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func (UnimplementedTransactionsServiceServer) mustEmbedUnimplementedTransactionsServiceServer() {} // UnsafeTransactionsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TransactionsServiceServer will // result in compilation errors. type UnsafeTransactionsServiceServer interface { mustEmbedUnimplementedTransactionsServiceServer() } func RegisterTransactionsServiceServer(s grpc.ServiceRegistrar, srv TransactionsServiceServer) { s.RegisterService(&TransactionsService_ServiceDesc, srv) } func _TransactionsService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TransactionCreate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TransactionsServiceServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/transactions.TransactionsService/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TransactionsServiceServer).Create(ctx, req.(*TransactionCreate)) } return interceptor(ctx, in, info, handler) } func _TransactionsService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TransactionUpdate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TransactionsServiceServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/transactions.TransactionsService/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TransactionsServiceServer).Update(ctx, req.(*TransactionUpdate)) } return interceptor(ctx, in, info, handler) } func _TransactionsService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IdMessage) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TransactionsServiceServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/transactions.TransactionsService/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TransactionsServiceServer).Delete(ctx, req.(*IdMessage)) } return interceptor(ctx, in, info, handler) } func _TransactionsService_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserIdMessage) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TransactionsServiceServer).Balance(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/transactions.TransactionsService/Balance", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TransactionsServiceServer).Balance(ctx, req.(*UserIdMessage)) } return interceptor(ctx, in, info, handler) } func _TransactionsService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(IdMessage) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TransactionsServiceServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/transactions.TransactionsService/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TransactionsServiceServer).Get(ctx, req.(*IdMessage)) } return interceptor(ctx, in, info, handler) } func _TransactionsService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TransactionsServiceServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/transactions.TransactionsService/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TransactionsServiceServer).List(ctx, req.(*ListRequest)) } return interceptor(ctx, in, info, handler) } // TransactionsService_ServiceDesc is the grpc.ServiceDesc for TransactionsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var TransactionsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transactions.TransactionsService", HandlerType: (*TransactionsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _TransactionsService_Create_Handler, }, { MethodName: "Update", Handler: _TransactionsService_Update_Handler, }, { MethodName: "Delete", Handler: _TransactionsService_Delete_Handler, }, { MethodName: "Balance", Handler: _TransactionsService_Balance_Handler, }, { MethodName: "Get", Handler: _TransactionsService_Get_Handler, }, { MethodName: "List", Handler: _TransactionsService_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "transactions.proto", }