Documentation ¶
Overview ¶
Package service is a directory of grpc service implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QontoRESTService ¶
type QontoRESTService struct { *QontoService // contains filtered or unexported fields }
QontoRESTService Wrapper on top of the GRPC server to be able to use the interceptor for REST request as it is used for grpc request.
func NewQontoRESTService ¶
func NewQontoRESTService(service *QontoService) *QontoRESTService
NewQontoRESTService creates an instance of QontoService.
func (*QontoRESTService) RegisterHandlerService ¶
func (s *QontoRESTService) RegisterHandlerService(mux *runtime.ServeMux) error
RegisterHandlerService registers the service implementation to mux.
func (*QontoRESTService) TransferBulk ¶
func (s *QontoRESTService) TransferBulk(ctx context.Context, req *api.TransferBulkRequest) (*emptypb.Empty, error)
TransferBulk is wrapper on the unary RPC to performs given transfers for REST calls.
func (*QontoRESTService) WithUnaryServerInterceptor ¶
func (s *QontoRESTService) WithUnaryServerInterceptor(i grpc.UnaryServerInterceptor) rest.ServiceServer
WithUnaryServerInterceptor set the UnaryServerInterceptor for the REST service.
type QontoService ¶
type QontoService struct { api.UnimplementedQontoServiceServer // contains filtered or unexported fields }
QontoService is the server that manages transfers.
func NewQontoService ¶
func NewQontoService(transactionBulk usecase.TransactionBulk) *QontoService
NewQontoService creates an instance of QontoService.
func (*QontoService) RegisterService ¶
func (s *QontoService) RegisterService(sr grpc.ServiceRegistrar)
RegisterService registers the service implementation to grpc service.
func (*QontoService) TransferBulk ¶
func (s *QontoService) TransferBulk(ctx context.Context, req *api.TransferBulkRequest) (*emptypb.Empty, error)
TransferBulk performs given transfers.
Receives a request with bulk of transfer to perform. Responses whether the transfer were done successfully or not, due to: - account not found - not enough funds in the account - internal server.