Documentation ¶
Index ¶
- Variables
- type TransactionRepository
- type TransactionRepositoryFake
- type UserRepository
- type UserRepositoryFake
- func (r UserRepositoryFake) CreatePayee(payee *entity.Payee) (*entity.Payee, error)
- func (r UserRepositoryFake) CreatePayer(payer *entity.Payer) (*entity.Payer, error)
- func (r UserRepositoryFake) GetPayeeByID(ID string) (*entity.Payee, error)
- func (r UserRepositoryFake) GetPayerByID(ID string) (*entity.Payer, error)
- func (r UserRepositoryFake) UpdatePayee(payee *entity.Payee) (*entity.Payee, error)
- func (r UserRepositoryFake) UpdatePayer(payer *entity.Payer) (*entity.Payer, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserRepositoryPayerNotFoundError = errors.New("Payer not found in user repository") UserRepositoryPayeeNotFoundError = errors.New("Payee not found in user repository") )
View Source
var (
TransactionNotFoundError = errors.New("Transaction not found in transaction repository")
)
Functions ¶
This section is empty.
Types ¶
type TransactionRepository ¶
type TransactionRepository interface { Create(transaction entity.Transaction) (*entity.Transaction, error) Update(transaction entity.Transaction) error GetByID(ID string) (*entity.Transaction, error) }
type TransactionRepositoryFake ¶
type TransactionRepositoryFake struct { FakeCreate func(transaction entity.Transaction) (*entity.Transaction, error) FakeUpdate func(transaction entity.Transaction) error FakeGetByID func(ID string) (*entity.Transaction, error) }
func NewTransactionRepositoryFake ¶
func NewTransactionRepositoryFake() TransactionRepositoryFake
func (TransactionRepositoryFake) Create ¶
func (r TransactionRepositoryFake) Create(transaction entity.Transaction) (*entity.Transaction, error)
func (TransactionRepositoryFake) GetByID ¶
func (r TransactionRepositoryFake) GetByID(ID string) (*entity.Transaction, error)
func (TransactionRepositoryFake) Update ¶
func (r TransactionRepositoryFake) Update(transaction entity.Transaction) error
type UserRepository ¶
type UserRepository interface { GetPayerByID(ID string) (*entity.Payer, error) GetPayeeByID(ID string) (*entity.Payee, error) CreatePayer(payer *entity.Payer) (*entity.Payer, error) CreatePayee(payee *entity.Payee) (*entity.Payee, error) UpdatePayer(payer *entity.Payer) (*entity.Payer, error) UpdatePayee(payee *entity.Payee) (*entity.Payee, error) }
type UserRepositoryFake ¶
type UserRepositoryFake struct { FakeGetPayerByID func(ID string) (*entity.Payer, error) FakeGetPayeeByID func(ID string) (*entity.Payee, error) FakeCreatePayer func(payer *entity.Payer) (*entity.Payer, error) FakeCreatePayee func(payee *entity.Payee) (*entity.Payee, error) FakeUpdatePayer func(payer *entity.Payer) (*entity.Payer, error) FakeUpdatePayee func(payee *entity.Payee) (*entity.Payee, error) }
func NewUserRepositoryFake ¶
func NewUserRepositoryFake() UserRepositoryFake
func (UserRepositoryFake) CreatePayee ¶
func (UserRepositoryFake) CreatePayer ¶
func (UserRepositoryFake) GetPayeeByID ¶
func (r UserRepositoryFake) GetPayeeByID(ID string) (*entity.Payee, error)
func (UserRepositoryFake) GetPayerByID ¶
func (r UserRepositoryFake) GetPayerByID(ID string) (*entity.Payer, error)
func (UserRepositoryFake) UpdatePayee ¶
func (UserRepositoryFake) UpdatePayer ¶
Click to show internal directories.
Click to hide internal directories.