command

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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