Documentation ¶
Overview ¶
Package wallet provides functionality related to user wallets, including balance retrieval, deposits, and withdrawals.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportCurrency = map[string]struct{}{"USD": {}, "RUB": {}, "EUR": {}}
SupportCurrency defines a set of supported currencies for deposit and withdrawal operations.
Functions ¶
This section is empty.
Types ¶
type MainAPI ¶
type MainAPI interface { // GetBalance retrieves the balance for a user in multiple currencies. GetBalance(userId int) (*model.Currency, error) // Deposit adds funds to the user's wallet. Deposit(dep *model.Operation) (float64, error) // Withdraw removes funds from the user's wallet. Withdraw(with *model.Operation) (float64, error) }
MainAPI defines the core wallet operations: retrieving balance, depositing funds, and withdrawing funds.
Click to show internal directories.
Click to hide internal directories.