transferservice

package
v0.0.0-...-e6e2e8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package transferservice manages business logic layer of transfers.

Package transferservice is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepo

type MockRepo struct {
	// contains filtered or unexported fields
}

MockRepo is a mock of Repo interface.

func NewMockRepo

func NewMockRepo(ctrl *gomock.Controller) *MockRepo

NewMockRepo creates a new mock instance.

func (*MockRepo) EXPECT

func (m *MockRepo) EXPECT() *MockRepoMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRepo) Transfer

Transfer mocks base method.

type MockRepoMockRecorder

type MockRepoMockRecorder struct {
	// contains filtered or unexported fields
}

MockRepoMockRecorder is the mock recorder for MockRepo.

func (*MockRepoMockRecorder) Transfer

func (mr *MockRepoMockRecorder) Transfer(ctx, arg interface{}) *gomock.Call

Transfer indicates an expected call of Transfer.

type Repo

type Repo interface {
	Transfer(ctx context.Context, arg domain.CreateTransferParams) (domain.TransferTxResult, error)
}

Repo provides data access layer interface needed by transfer service layer.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service facilitates transfer service layer logic.

func New

func New(tr Repo, as accountdelivery.Service) *Service

New return transfer service struct to manage transfer bussines logic.

func (Service) Transfer

func (s Service) Transfer(ctx context.Context, fromUsername string, arg domain.CreateTransferParams) (domain.TransferTxResult, error)

Transfer checks if a transfer request is valid and then executes transfer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL