#include "query_response_factory.hpp"


Public Member Functions | |
| virtual | ~QueryResponseFactory ()=default |
| virtual std::unique_ptr< QueryResponse > | createAccountAssetResponse (std::vector< std::tuple< types::AccountIdType, types::AssetIdType, shared_model::interface::Amount >> assets, size_t total_assets_number, std::optional< shared_model::interface::types::AssetIdType > next_asset_id, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createAccountDetailResponse (types::DetailType account_detail, size_t total_number, std::optional< std::reference_wrapper< const shared_model::interface::AccountDetailRecordId >> next_record_id, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createAccountResponse (interface::types::AccountIdType account_id, interface::types::DomainIdType domain_id, interface::types::QuorumType quorum, interface::types::JsonType jsonData, std::vector< std::string > roles, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createBlockResponse (std::unique_ptr< Block > block, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createErrorQueryResponse (ErrorQueryType error_type, ErrorQueryResponse::ErrorMessageType error_msg, ErrorQueryResponse::ErrorCodeType error_code, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createSignatoriesResponse (std::vector< std::string > signatories, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createTransactionsResponse (std::vector< std::unique_ptr< shared_model::interface::Transaction >> transactions, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createTransactionsPageResponse (std::vector< std::unique_ptr< shared_model::interface::Transaction >> transactions, std::optional< std::reference_wrapper< const crypto::Hash >> next_tx_hash, interface::types::TransactionsNumberType all_transactions_size, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createPendingTransactionsPageResponse (std::vector< std::unique_ptr< interface::Transaction >> transactions, interface::types::TransactionsNumberType all_transactions_size, std::optional< interface::PendingTransactionsPageResponse::BatchInfo > next_batch_info, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createAssetResponse (types::AssetIdType asset_id, types::DomainIdType domain_id, types::PrecisionType precision, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createRolesResponse (std::vector< types::RoleIdType > roles, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createRolePermissionsResponse (RolePermissionSet role_permissions, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createPeersResponse (types::PeerList peers, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< QueryResponse > | createEngineReceiptsResponse (const std::vector< std::unique_ptr< EngineReceipt >> &engine_response_records, const crypto::Hash &query_hash) const =0 |
| virtual std::unique_ptr< BlockQueryResponse > | createBlockQueryResponse (std::shared_ptr< const Block > block) const =0 |
| virtual std::unique_ptr< BlockQueryResponse > | createBlockQueryResponse (std::string error_message) const =0 |
Factory for building query responses
|
virtualdefault |
|
pure virtual |
Create response for account asset query
| assets | to be inserted into the response |
| total_assets_number | the number of all assets as opposed to the page size |
| next_asset_id | if there are more assets ofter the provided ones, this specifies the id of the first following asset; otherwise none |
| query_hash | - hash of the query, for which response is created |
|
pure virtual |
Create response for account detail query
| account_detail | to be inserted into the response |
| total_number | the total number of detail records matching the query, regardless of pagination metadata |
| next_record_id | the next record id, if any |
| query_hash | - hash of the query, for which response is created |
|
pure virtual |
Create response for account query
| account_id | of account to be inserted into the response |
| domain_id | of account to be inserted into the response |
| quorum | of account to be inserted into the response |
| jsonData | of account to be inserted into the response |
| roles | to be inserted into the response |
| query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create response for asset query
| asset_id | of asset to be inserted into the response |
| domain_id | of asset to be inserted into the response |
| precision | of asset to be inserted into the response |
| query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create response for block query with block
| block | to be inserted into the response |
|
pure virtual |
Create response for block query with error
| error_message | to be inserted into the response |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create response for get block query
| block | to be inserted into the response |
| query_hash | - hash of the query, for which response is created |
|
pure virtual |
Create response for EVM response
| engine_response_records | a vector of EVM responses for commands within a transaction |
|
pure virtual |
Create response for failed query
| error_type | - type of error to be inserted into the response |
| error_msg | - message, which is to be set in the response |
| error_code | - stateful error code to be set in the response |
| query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create response for get peers query
| peers | - list of peers |
| query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create paged response for pending transaction query
| transactions | - list of transactions on the page |
| all_transactions_size | - total number of transactions among all the batches in a pending storage for the user |
| next_batch_info | - optional struct with hash of the first transaction for the following batch and its size (if exists) |
| query_hash | - hash of the corresponding query |
|
pure virtual |
Create response for role permissions query
| role_permissions | to be inserted into the response |
| query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create response for roles query
| roles | to be inserted into the response |
| query_hash | - hash of the query, for which response is created |
|
pure virtual |
Create response for signatories query
| signatories | to be inserted into the response |
| query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
pure virtual |
Create response for transactions pagination query
| transactions | - list of transactions in this page the last in the page |
| next_tx_hash | - hash of the transaction after |
| all_transactions_size | - total number of transactions for this query |
| query_hash | - hash of the query, for which response is created |
|
pure virtual |
Create response for transactions query
| transactions | to be inserted into the response |
| query_hash | - hash of the query, for which response is created |