Documentation ¶
Index ¶
- type UseCase
- func (uc *UseCase) CreateAssetRate(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) (*ar.AssetRate, error)
- func (uc *UseCase) CreateOperation(ctx context.Context, accounts []*account.Account, transactionID string, ...)
- func (uc *UseCase) CreateTransaction(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) (*t.Transaction, error)
- func (uc *UseCase) UpdateOperation(ctx context.Context, ...) (*o.Operation, error)
- func (uc *UseCase) UpdateTransaction(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, ...) (*t.Transaction, error)
- func (uc *UseCase) UpdateTransactionStatus(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, ...) (*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 // AssetRateRepo provides an abstraction on top of the operation data source. AssetRateRepo ar.Repository // MetadataRepo provides an abstraction on top of the metadata data source. MetadataRepo m.Repository // RabbitMQRepo provides an abstraction on top of the producer rabbitmq. RabbitMQRepo rmq.ProducerRepository }
UseCase is a struct that aggregates various repositories for simplified access in use case implementations.
func (*UseCase) CreateAssetRate ¶ added in v1.24.0
func (uc *UseCase) CreateAssetRate(ctx context.Context, organizationID, ledgerID uuid.UUID, cari *ar.CreateAssetRateInput) (*ar.AssetRate, error)
CreateAssetRate creates a new asset rate and persists data in the repository.
func (*UseCase) CreateOperation ¶ added in v1.14.0
func (uc *UseCase) CreateOperation(ctx context.Context, accounts []*account.Account, transactionID string, dsl *gold.Transaction, validate gold.Responses, 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 uuid.UUID, transaction *gold.Transaction) (*t.Transaction, error)
CreateTransaction creates a new transaction persisting data in the repository.
func (*UseCase) UpdateOperation ¶ added in v1.18.0
func (uc *UseCase) UpdateOperation(ctx context.Context, organizationID, ledgerID, transactionID, operationID uuid.UUID, uoi *o.UpdateOperationInput) (*o.Operation, error)
UpdateOperation update an operation from the repository by given id.
func (*UseCase) UpdateTransaction ¶ added in v1.14.0
func (uc *UseCase) UpdateTransaction(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, uti *t.UpdateTransactionInput) (*t.Transaction, error)
UpdateTransaction update a transaction from the repository by given id.
func (*UseCase) UpdateTransactionStatus ¶ added in v1.24.0
func (uc *UseCase) UpdateTransactionStatus(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, description string) (*t.Transaction, error)
UpdateTransactionStatus update a status transaction from the repository by given id.
Click to show internal directories.
Click to hide internal directories.