service

package
v0.0.0-...-d1da606 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) Create

func (ws *WalletService) Create(ctx context.Context, userID int) (string, error)

func (*WalletService) GetByID

func (ws *WalletService) GetByID(ctx context.Context, userID int) (models.Wallet, error)

func (*WalletService) ListTransactions

func (ws *WalletService) ListTransactions(ctx context.Context, userID int) ([]models.Transaction, error)

func (*WalletService) Update

func (ws *WalletService) Update(ctx context.Context, userID int, amount float64, ttype, description string) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL