usecases

package
v0.0.0-...-e754585 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 7 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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