Documentation ¶
Index ¶
- Variables
- type AccountRepo
- func (r *AccountRepo) Create(ctx context.Context) (acc entity.Account, err error)
- func (r *AccountRepo) GetById(ctx context.Context, id int64) (acc entity.Account, err error)
- func (r *AccountRepo) GetHistory(ctx context.Context, id int64, limit, offset uint64, sort string, ...) (trns []*entity.Transaction, err error)
- func (r *AccountRepo) TransferAmount(ctx context.Context, redeemId, accrId int64, amount float64) (accrAcc, redeemAcc entity.Account, err error)
- func (r *AccountRepo) UpdBalance(ctx context.Context, id, docNum int64, amount float64) (acc entity.Account, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotEnoughMoney error = errors.New("not enough money")
Functions ¶
This section is empty.
Types ¶
type AccountRepo ¶
AccountRepo - repository with account.
func (*AccountRepo) GetHistory ¶
func (r *AccountRepo) GetHistory(ctx context.Context, id int64, limit, offset uint64, sort string, isDecreasing bool) (trns []*entity.Transaction, err error)
GetHistory - get history of transaction.
func (*AccountRepo) TransferAmount ¶
func (r *AccountRepo) TransferAmount(ctx context.Context, redeemId, accrId int64, amount float64) (accrAcc, redeemAcc entity.Account, err error)
TransferAmount - transfer amount of money from redeem account to accrual account.
func (*AccountRepo) UpdBalance ¶
func (r *AccountRepo) UpdBalance(ctx context.Context, id, docNum int64, amount float64) (acc entity.Account, err error)
UpdBalance - update account's balance.
Click to show internal directories.
Click to hide internal directories.