#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, const crypto::Hash &query_hash) const =0 |
virtual std::unique_ptr< QueryResponse > | createAccountDetailResponse (types::DetailType account_detail, 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< types::PubkeyType > 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, const crypto::Hash &next_tx_hash, interface::types::TransactionsNumberType all_transactions_size, const crypto::Hash &query_hash) const =0 |
virtual std::unique_ptr< QueryResponse > | createTransactionsPageResponse (std::vector< std::unique_ptr< shared_model::interface::Transaction >> transactions, interface::types::TransactionsNumberType all_transactions_size, 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< BlockQueryResponse > | createBlockQueryResponse (std::unique_ptr< 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 |
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 |
query_hash | - hash of the query, for which response is created |
Implemented in shared_model::proto::ProtoQueryResponseFactory.
|
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 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 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 |
|
pure virtual |
Create response for transactions pagination query
transactions | - list of transactions in this page |
next_tx_hash | - hash of the transaction after the last in the page |
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 pagination query without next hash
transactions | - list of transactions in this page |
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 |