Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountUseCases ¶
type AccountUseCases interface { // GetByID returns an account by its ID. GetByID(ID string) (acc entity.Account, err error) // GetByUserID returns an account by its user ID. GetByUserID(userID int64) (acc entity.Account, err error) // Create creates a new account. Create(userID int64) (err error) // Update updates an account. Update(ID string, balance float64, active bool) (err error) }
AccountUseCases interface defines the methods that the account usecases must implement.
func NewAccountUseCases ¶
func NewAccountUseCases(accountRepo accRepo.AccountRepository, usrRepo userRepo.UserRepository) (usecases AccountUseCases, err error)
NewAccountUseCases returns a new accountUsecases instance.
Click to show internal directories.
Click to hide internal directories.