Documentation ¶
Index ¶
- type AuthPostgres
- type Tokens
- type TransactionPostgres
- func (r *TransactionPostgres) CreateTransaction(walletId, userId int64, transaction domain.Transaction) (int64, error)
- func (r *TransactionPostgres) DeleteTransaction(userId, walletId, transactionId int64, amount float64) error
- func (r *TransactionPostgres) GetAllTransactions(walletId int64) ([]domain.Transaction, error)
- func (r *TransactionPostgres) GetTransactionById(walletId, transactionId int64) (domain.Transaction, error)
- func (r *TransactionPostgres) UpdateTransaction(userId, walletId, transactionId int64, input domain.UpdateTransactionInput, ...) error
- func (r *TransactionPostgres) UpdateTransactionBalance(walletId, transactionId int64, amount float64) error
- type WalletPostgres
- func (r *WalletPostgres) CreateWallet(userId int64, wallet domain.Wallet) (int64, error)
- func (r *WalletPostgres) DeleteWallet(userId, walletId int64) error
- func (r *WalletPostgres) GetAllWallets(userId int64) ([]domain.Wallet, error)
- func (r *WalletPostgres) GetWalletById(userId, walletId int64) (domain.Wallet, error)
- func (r *WalletPostgres) UpdateWallet(userId, walletId int64, input domain.UpdateWalletInput) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthPostgres ¶
type AuthPostgres struct {
// contains filtered or unexported fields
}
func NewAuthPostgres ¶
func NewAuthPostgres(db *sqlx.DB) *AuthPostgres
func (*AuthPostgres) CreateUser ¶
func (r *AuthPostgres) CreateUser(user domain.User) (int64, error)
type TransactionPostgres ¶
type TransactionPostgres struct {
// contains filtered or unexported fields
}
func NewTransactionPostgres ¶
func NewTransactionPostgres(db *sqlx.DB) *TransactionPostgres
func (*TransactionPostgres) CreateTransaction ¶
func (r *TransactionPostgres) CreateTransaction(walletId, userId int64, transaction domain.Transaction) (int64, error)
func (*TransactionPostgres) DeleteTransaction ¶
func (r *TransactionPostgres) DeleteTransaction(userId, walletId, transactionId int64, amount float64) error
func (*TransactionPostgres) GetAllTransactions ¶
func (r *TransactionPostgres) GetAllTransactions(walletId int64) ([]domain.Transaction, error)
func (*TransactionPostgres) GetTransactionById ¶
func (r *TransactionPostgres) GetTransactionById(walletId, transactionId int64) (domain.Transaction, error)
func (*TransactionPostgres) UpdateTransaction ¶
func (r *TransactionPostgres) UpdateTransaction(userId, walletId, transactionId int64, input domain.UpdateTransactionInput, amount float64) error
func (*TransactionPostgres) UpdateTransactionBalance ¶
func (r *TransactionPostgres) UpdateTransactionBalance(walletId, transactionId int64, amount float64) error
type WalletPostgres ¶
type WalletPostgres struct {
// contains filtered or unexported fields
}
func NewWalletPostgres ¶
func NewWalletPostgres(db *sqlx.DB) *WalletPostgres
func (*WalletPostgres) CreateWallet ¶
func (*WalletPostgres) DeleteWallet ¶
func (r *WalletPostgres) DeleteWallet(userId, walletId int64) error
func (*WalletPostgres) GetAllWallets ¶
func (r *WalletPostgres) GetAllWallets(userId int64) ([]domain.Wallet, error)
func (*WalletPostgres) GetWalletById ¶
func (r *WalletPostgres) GetWalletById(userId, walletId int64) (domain.Wallet, error)
func (*WalletPostgres) UpdateWallet ¶
func (r *WalletPostgres) UpdateWallet(userId, walletId int64, input domain.UpdateWalletInput) error
Click to show internal directories.
Click to hide internal directories.