Documentation ¶
Index ¶
- type UseCase
- func (uc *UseCase) CreateOperation(ctx context.Context, accounts []*account.Account, transaction *t.Transaction, ...)
- func (uc *UseCase) CreateTransaction(ctx context.Context, organizationID, ledgerID string, ...) (*t.Transaction, error)
- func (uc *UseCase) UpdateTransaction(ctx context.Context, organizationID, ledgerID, transactionID string, ...) (*t.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UseCase ¶
type UseCase struct { // TransactionRepo provides an abstraction on top of the transaction data source. TransactionRepo t.Repository // AccountGRPCRepo provides an abstraction on top of the account grpc. AccountGRPCRepo a.Repository // OperationRepo provides an abstraction on top of the operation data source. OperationRepo o.Repository // MetadataRepo provides an abstraction on top of the metadata data source. MetadataRepo m.Repository }
UseCase is a struct that aggregates various repositories for simplified access in use case implementations.
func (*UseCase) CreateOperation ¶ added in v1.14.0
func (uc *UseCase) CreateOperation(ctx context.Context, accounts []*account.Account, transaction *t.Transaction, dsl *gold.Transaction, result chan []*o.Operation, err chan error)
CreateOperation creates a new operation based on transaction id and persisting data in the repository.
func (*UseCase) CreateTransaction ¶
func (uc *UseCase) CreateTransaction(ctx context.Context, organizationID, ledgerID string, transaction *gold.Transaction) (*t.Transaction, error)
CreateTransaction creates a new transaction persisting data in the repository.
func (*UseCase) UpdateTransaction ¶ added in v1.14.0
func (uc *UseCase) UpdateTransaction(ctx context.Context, organizationID, ledgerID, transactionID string, uti *t.UpdateTransactionInput) (*t.Transaction, error)
UpdateTransaction update an transaction from the repository by given id.
Click to show internal directories.
Click to hide internal directories.