Documentation ¶
Index ¶
- type WalletService
- func (ws *WalletService) Create(ctx context.Context, userID int) (string, error)
- func (ws *WalletService) GetByID(ctx context.Context, userID int) (models.Wallet, error)
- func (ws *WalletService) ListTransactions(ctx context.Context, userID int) ([]models.Transaction, error)
- func (ws *WalletService) Update(ctx context.Context, userID int, amount float64, ttype, description string) error
- type Walleter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WalletService ¶
type WalletService struct {
// contains filtered or unexported fields
}
func (*WalletService) ListTransactions ¶
func (ws *WalletService) ListTransactions(ctx context.Context, userID int) ([]models.Transaction, error)
type Walleter ¶
type Walleter interface { Create(ctx context.Context, userID int) (string, error) GetByID(ctx context.Context, userID int) (models.Wallet, error) Update(ctx context.Context, userID int, amount float64, Type, description string) error ListTransactions(ctx context.Context, userID int) ([]models.Transaction, error) }
func NewWalletService ¶
func NewWalletService(repo repository.WalleterRepository, logger *zap.Logger) Walleter
Click to show internal directories.
Click to hide internal directories.