Documentation ¶
Index ¶
- type UseCase
- func (uc *UseCase) GetAllAssetRatesByAssetCode(ctx context.Context, organizationID, ledgerID uuid.UUID, fromAssetCode string, ...) ([]*assetrate.AssetRate, http.CursorPagination, error)
- func (uc *UseCase) GetAllMetadataTransactions(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*transaction.Transaction, error)
- func (uc *UseCase) GetAllOperationsByAccount(ctx context.Context, organizationID, ledgerID, accountID uuid.UUID, ...) ([]*operation.Operation, http.CursorPagination, error)
- func (uc *UseCase) GetAllOperationsByPortfolio(ctx context.Context, organizationID, ledgerID, portfolioID uuid.UUID, ...) ([]*operation.Operation, http.CursorPagination, error)
- func (uc *UseCase) GetAllTransactions(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*transaction.Transaction, http.CursorPagination, error)
- func (uc *UseCase) GetAssetRateByExternalID(ctx context.Context, organizationID, ledgerID, externalID uuid.UUID) (*assetrate.AssetRate, error)
- func (uc *UseCase) GetOperationByAccount(ctx context.Context, ...) (*operation.Operation, error)
- func (uc *UseCase) GetOperationByID(ctx context.Context, ...) (*operation.Operation, error)
- func (uc *UseCase) GetOperationByPortfolio(ctx context.Context, ...) (*operation.Operation, error)
- func (uc *UseCase) GetTransactionByID(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID) (*transaction.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 transaction.Repository // AccountGRPCRepo provides an abstraction on top of the account grpc. AccountGRPCRepo out.Repository // OperationRepo provides an abstraction on top of the operation data source. OperationRepo operation.Repository // AssetRateRepo provides an abstraction on top of the operation data source. AssetRateRepo assetrate.Repository // MetadataRepo provides an abstraction on top of the metadata data source. MetadataRepo mongodb.Repository // RabbitMQRepo provides an abstraction on top of the producer rabbitmq. RabbitMQRepo rabbitmq.ConsumerRepository // RedisRepo provides an abstraction on top of the redis consumer. RedisRepo redis.RedisRepository }
UseCase is a struct that aggregates various repositories for simplified access in use case implementations.
func (*UseCase) GetAllAssetRatesByAssetCode ¶ added in v1.31.0
func (uc *UseCase) GetAllAssetRatesByAssetCode(ctx context.Context, organizationID, ledgerID uuid.UUID, fromAssetCode string, filter http.QueryHeader) ([]*assetrate.AssetRate, http.CursorPagination, error)
GetAllAssetRatesByAssetCode returns all asset rates by asset codes.
func (*UseCase) GetAllMetadataTransactions ¶
func (uc *UseCase) GetAllMetadataTransactions(ctx context.Context, organizationID, ledgerID uuid.UUID, filter http.QueryHeader) ([]*transaction.Transaction, error)
GetAllMetadataTransactions fetch all Transactions from the repository
func (*UseCase) GetAllOperationsByAccount ¶
func (*UseCase) GetAllOperationsByPortfolio ¶
func (*UseCase) GetAllTransactions ¶
func (uc *UseCase) GetAllTransactions(ctx context.Context, organizationID, ledgerID uuid.UUID, filter http.QueryHeader) ([]*transaction.Transaction, http.CursorPagination, error)
GetAllTransactions fetch all Transactions from the repository
func (*UseCase) GetAssetRateByExternalID ¶ added in v1.31.0
func (uc *UseCase) GetAssetRateByExternalID(ctx context.Context, organizationID, ledgerID, externalID uuid.UUID) (*assetrate.AssetRate, error)
GetAssetRateByExternalID gets data in the repository.
func (*UseCase) GetOperationByAccount ¶
func (*UseCase) GetOperationByID ¶
func (uc *UseCase) GetOperationByID(ctx context.Context, organizationID, ledgerID, transactionID, operationID uuid.UUID) (*operation.Operation, error)
GetOperationByID gets data in the repository.
func (*UseCase) GetOperationByPortfolio ¶
func (*UseCase) GetTransactionByID ¶
func (uc *UseCase) GetTransactionByID(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID) (*transaction.Transaction, error)
GetTransactionByID gets data in the repository.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.