Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Repository ¶
type Repository struct { Authorization Tokens Wallet Transaction }
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
type Tokens ¶
type Tokens interface { Create(token domain.RefreshToken) error Get(token string) (domain.RefreshToken, error) }
type Transaction ¶
type Transaction interface { CreateTransaction(walletId, userId int64, transaction domain.Transaction) (int64, error) GetAllTransactions(walletId int64) ([]domain.Transaction, error) GetTransactionById(userId, transactionId int64) (domain.Transaction, error) UpdateTransaction(userId, walletId, transactionId int64, input domain.UpdateTransactionInput, amount float64) error UpdateTransactionBalance(walletId, transactionId int64, amount float64) error DeleteTransaction(userId, walletId, transactionId int64, amount float64) error }
type Wallet ¶
type Wallet interface { CreateWallet(userId int64, wallet domain.Wallet) (int64, error) GetAllWallets(userId int64) ([]domain.Wallet, error) GetWalletById(userId, walletId int64) (domain.Wallet, error) UpdateWallet(userId, walletId int64, input domain.UpdateWalletInput) error DeleteWallet(userId, walletId int64) error }
Click to show internal directories.
Click to hide internal directories.