Documentation ¶
Index ¶
- type WalletRepositoryDB
- func (wr *WalletRepositoryDB) AddTransaction(ctx context.Context, transaction models.Transaction) error
- func (wr *WalletRepositoryDB) Create(ctx context.Context, userID int) error
- func (wr *WalletRepositoryDB) GetByID(ctx context.Context, userID int) (models.Wallet, error)
- func (wr *WalletRepositoryDB) ListTransactionsByUser(ctx context.Context, userID int) ([]models.Transaction, error)
- func (wr *WalletRepositoryDB) Update(ctx context.Context, userID int, amount float64) error
- type WalleterRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WalletRepositoryDB ¶
type WalletRepositoryDB struct {
// contains filtered or unexported fields
}
func (*WalletRepositoryDB) AddTransaction ¶
func (wr *WalletRepositoryDB) AddTransaction(ctx context.Context, transaction models.Transaction) error
func (*WalletRepositoryDB) Create ¶
func (wr *WalletRepositoryDB) Create(ctx context.Context, userID int) error
func (*WalletRepositoryDB) ListTransactionsByUser ¶
func (wr *WalletRepositoryDB) ListTransactionsByUser(ctx context.Context, userID int) ([]models.Transaction, error)
type WalleterRepository ¶
type WalleterRepository interface { Create(ctx context.Context, userID int) error GetByID(ctx context.Context, userID int) (models.Wallet, error) Update(ctx context.Context, userID int, amount float64) error AddTransaction(ctx context.Context, transaction models.Transaction) error ListTransactionsByUser(ctx context.Context, userID int) ([]models.Transaction, error) }
func NewWalletRepositoryDB ¶
func NewWalletRepositoryDB(db *sqlx.DB) WalleterRepository
Click to show internal directories.
Click to hide internal directories.