usecase

package
v0.0.0-...-7af7f6b Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBankStatement

func ParseBankStatement(record []string) (model.BankStatement, error)

func ParseTransactionRecord

func ParseTransactionRecord(record []string) (model.Transaction, error)

Types

type FileCompiler

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

FileCompiler implements the CompilerUseCase

func NewFileCompiler

func NewFileCompiler(
	cfg *config.Config,
	storageRepo repository.GCSRepository,
	bankStmtRepo repository.BankStatementRepository,
	transactionRepo repository.InternalTransactionRepository,
	kafkaRepo repository.KafkaRepository,
) *FileCompiler

NewFileCompiler creates a new FileCompiler instance

func (*FileCompiler) ProcessEvent

func (fc *FileCompiler) ProcessEvent(event []byte) error

ProcessFile handles the entire process of downloading, parsing and storing file data

func (*FileCompiler) SaveBankStatementBatch

func (fc *FileCompiler) SaveBankStatementBatch(statements []model.BankStatement) error

func (*FileCompiler) SaveTransactionBatch

func (fc *FileCompiler) SaveTransactionBatch(transactions []model.Transaction) error

saveTransactionBatch saves a batch of transactions to the database

type ListUsecase

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

ListUsecase handles listing operations for reconciliation data

func NewListUsecase

func NewListUsecase(reconRepo repository.ReconResultRepository) *ListUsecase

NewListUsecase creates a new instance of ListUsecase

func (*ListUsecase) ListReconSummaries

func (u *ListUsecase) ListReconSummaries(ctx context.Context, limit, offset int) (*model.PaginatedResponse, error)

ListReconSummaries retrieves a paginated list of reconciliation summaries

func (*ListUsecase) ListUnmatchedBankStatements

func (u *ListUsecase) ListUnmatchedBankStatements(ctx context.Context, taskID string, limit, offset int) (*model.PaginatedResponse, error)

ListUnmatchedBankStatements retrieves all unmatched bank statements by task ID

func (*ListUsecase) ListUnmatchedTransactions

func (u *ListUsecase) ListUnmatchedTransactions(ctx context.Context, taskID string, limit, offset int) (*model.PaginatedResponse, error)

ListUnmatchedTransactions retrieves all unmatched transactions by task ID

type ReconManager

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

func NewReconManager

func NewReconManager(
	gcsRepo repository.GCSRepository,
	kafkaRepo repository.KafkaRepository,
	cfg *config.Config,
) *ReconManager

func (*ReconManager) GenerateUploadURLs

func (rm *ReconManager) GenerateUploadURLs(ctx context.Context) (*model.UploadURLResponse, error)

func (*ReconManager) InitiateCompilation

func (rm *ReconManager) InitiateCompilation(ctx context.Context, req model.CompilerRequest) error

type ReconciliationUsecase

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

func (*ReconciliationUsecase) GenerateReport

func (r *ReconciliationUsecase) GenerateReport(unmatchedInternal []model.Transaction, unmatchedBank []model.BankStatement) string

func (*ReconciliationUsecase) ProcessEvent

func (r *ReconciliationUsecase) ProcessEvent(event []byte) error

func (*ReconciliationUsecase) ReconcileTransactions

func (r *ReconciliationUsecase) ReconcileTransactions(event model.ReconciliationEvent) error

Jump to

Keyboard shortcuts

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