interactor

package
v0.0.0-...-9e87bf8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelTransactionInteractor

type CancelTransactionInteractor struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewCancelTransactionInteractor

func NewCancelTransactionInteractor(transactionRepository repositories.TransactionRepository) *CancelTransactionInteractor

NewCancelTransactionInteractor creates a new CancelTransactionInteractor

func (*CancelTransactionInteractor) Execute

Execute will cancel all odd transactions and update the balance

type SourceTypeInteractor

type SourceTypeInteractor struct {
	// contains filtered or unexported fields
}

func NewSourceTypeInteractor

func NewSourceTypeInteractor(Repository repositories.SourceTypeRepository) *SourceTypeInteractor

func (*SourceTypeInteractor) ExistsByName

func (s *SourceTypeInteractor) ExistsByName(ctx context.Context, name string) (bool, error)

type TransactionInteractor

type TransactionInteractor struct {
	// contains filtered or unexported fields
}

func NewTransactionInteractor

func NewTransactionInteractor(transactionRepository repositories.TransactionRepository, userRepository repositories.UserRepository, sourceType repositories.SourceTypeRepository) *TransactionInteractor

func (*TransactionInteractor) ProcessTransaction

func (i *TransactionInteractor) ProcessTransaction(userID string, sourceType string, dto *dtos.TransactionDTO) (*repositories.TransactionRow, error)

type UserInteractor

type UserInteractor struct {
	// contains filtered or unexported fields
}

func NewUserInteractor

func NewUserInteractor(Repository repositories.UserRepository) *UserInteractor

func (*UserInteractor) ExistsByID

func (u *UserInteractor) ExistsByID(ctx context.Context, id string) (bool, error)

func (*UserInteractor) GetBalance

func (u *UserInteractor) GetBalance(ctx context.Context, id string) (float64, error)

Jump to

Keyboard shortcuts

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