Documentation
¶
Index ¶
- type UseCase
- func (uc *UseCase) GetAccountAndLock(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Balance, error)
- func (uc *UseCase) GetAllAssetRatesByAssetCode(ctx context.Context, organizationID, ledgerID uuid.UUID, fromAssetCode string, ...) ([]*assetrate.AssetRate, http.CursorPagination, error)
- func (uc *UseCase) GetAllBalances(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Balance, http.CursorPagination, error)
- func (uc *UseCase) GetAllBalancesByAccountID(ctx context.Context, organizationID, ledgerID, accountID uuid.UUID, ...) ([]*mmodel.Balance, http.CursorPagination, error)
- func (uc *UseCase) GetAllMetadataTransactions(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*transaction.Transaction, error)
- func (uc *UseCase) GetAllOperations(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, ...) ([]*operation.Operation, http.CursorPagination, error)
- func (uc *UseCase) GetAllOperationsByAccount(ctx context.Context, organizationID, ledgerID, accountID 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) GetBalanceByID(ctx context.Context, organizationID, ledgerID, balanceID uuid.UUID) (*mmodel.Balance, error)
- func (uc *UseCase) GetBalances(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Balance, error)
- func (uc *UseCase) GetOperationByAccount(ctx context.Context, ...) (*operation.Operation, error)
- func (uc *UseCase) GetOperationByID(ctx context.Context, ...) (*operation.Operation, error)
- func (uc *UseCase) GetOperationsByTransaction(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) (*transaction.Transaction, error)
- func (uc *UseCase) GetParentByTransactionID(ctx context.Context, organizationID, ledgerID, parentID uuid.UUID) (*transaction.Transaction, 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 // 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 // BalanceRepo provides an abstraction on top of the balance data source. BalanceRepo balance.Repository // MetadataRepo provides an abstraction on top of the metadata data source. MetadataRepo mongodb.Repository // 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) GetAccountAndLock ¶ added in v1.48.0
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) GetAllBalances ¶ added in v1.48.0
func (*UseCase) GetAllBalancesByAccountID ¶ added in v1.48.0
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) GetAllOperations ¶ added in v1.46.0
func (*UseCase) GetAllOperationsByAccount ¶
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) GetBalanceByID ¶ added in v1.48.0
func (uc *UseCase) GetBalanceByID(ctx context.Context, organizationID, ledgerID, balanceID uuid.UUID) (*mmodel.Balance, error)
GetBalanceByID gets data in the repository.
func (*UseCase) GetBalances ¶ added in v1.48.0
func (uc *UseCase) GetBalances(ctx context.Context, organizationID, ledgerID uuid.UUID, validate *goldModel.Responses) ([]*mmodel.Balance, error)
GetBalances methods responsible to get balances.
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) GetOperationsByTransaction ¶ added in v1.46.0
func (uc *UseCase) GetOperationsByTransaction(ctx context.Context, organizationID, ledgerID uuid.UUID, tran *transaction.Transaction, filter http.QueryHeader) (*transaction.Transaction, error)
func (*UseCase) GetParentByTransactionID ¶ added in v1.45.0
func (uc *UseCase) GetParentByTransactionID(ctx context.Context, organizationID, ledgerID, parentID uuid.UUID) (*transaction.Transaction, error)
GetParentByTransactionID gets data in the repository.
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
¶
- get-all-assetrates-assetcode.go
- get-all-balances-account.go
- get-all-balances.go
- get-all-metadata-transactions.go
- get-all-operations-account.go
- get-all-operations.go
- get-all-transactions.go
- get-balances.go
- get-external-id-assetrate.go
- get-id-balance.go
- get-id-operation-account.go
- get-id-operation.go
- get-id-transaction.go
- get-parent-id-transaction.go
- query.go
Click to show internal directories.
Click to hide internal directories.