hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::proto::ProtoQueryResponseFactory Class Reference

#include "proto_query_response_factory.hpp"

Inheritance diagram for shared_model::proto::ProtoQueryResponseFactory:
Inheritance graph
Collaboration diagram for shared_model::proto::ProtoQueryResponseFactory:
Collaboration graph

Public Member Functions

std::unique_ptr< interface::QueryResponsecreateAccountAssetResponse (std::vector< std::tuple< interface::types::AccountIdType, interface::types::AssetIdType, shared_model::interface::Amount >> assets, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateAccountDetailResponse (interface::types::DetailType account_detail, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateAccountResponse (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 override
 
std::unique_ptr< interface::QueryResponsecreateBlockResponse (std::unique_ptr< interface::Block > block, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateErrorQueryResponse (ErrorQueryType error_type, interface::ErrorQueryResponse::ErrorMessageType error_msg, interface::ErrorQueryResponse::ErrorCodeType error_code, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateSignatoriesResponse (std::vector< interface::types::PubkeyType > signatories, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateTransactionsResponse (std::vector< std::unique_ptr< shared_model::interface::Transaction >> transactions, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateTransactionsPageResponse (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 override
 
std::unique_ptr< interface::QueryResponsecreateTransactionsPageResponse (std::vector< std::unique_ptr< shared_model::interface::Transaction >> transactions, interface::types::TransactionsNumberType all_transactions_size, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateAssetResponse (interface::types::AssetIdType asset_id, interface::types::DomainIdType domain_id, interface::types::PrecisionType precision, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateRolesResponse (std::vector< interface::types::RoleIdType > roles, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::QueryResponsecreateRolePermissionsResponse (interface::RolePermissionSet role_permissions, const crypto::Hash &query_hash) const override
 
std::unique_ptr< interface::BlockQueryResponsecreateBlockQueryResponse (std::shared_ptr< const interface::Block > block) const override
 
std::unique_ptr< interface::BlockQueryResponsecreateBlockQueryResponse (std::string error_message) const override
 
- Public Member Functions inherited from shared_model::interface::QueryResponseFactory
virtual ~QueryResponseFactory ()=default
 
virtual std::unique_ptr< QueryResponsecreateAccountAssetResponse (std::vector< std::tuple< types::AccountIdType, types::AssetIdType, shared_model::interface::Amount >> assets, const crypto::Hash &query_hash) const =0
 
virtual std::unique_ptr< QueryResponsecreateBlockResponse (std::unique_ptr< Block > block, const crypto::Hash &query_hash) const =0
 
virtual std::unique_ptr< QueryResponsecreateSignatoriesResponse (std::vector< types::PubkeyType > signatories, const crypto::Hash &query_hash) const =0
 
virtual std::unique_ptr< QueryResponsecreateTransactionsResponse (std::vector< std::unique_ptr< shared_model::interface::Transaction >> transactions, const crypto::Hash &query_hash) const =0
 
virtual std::unique_ptr< QueryResponsecreateTransactionsPageResponse (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< QueryResponsecreateTransactionsPageResponse (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< QueryResponsecreateRolesResponse (std::vector< types::RoleIdType > roles, const crypto::Hash &query_hash) const =0
 
virtual std::unique_ptr< BlockQueryResponsecreateBlockQueryResponse (std::shared_ptr< const Block > block) const =0
 

Additional Inherited Members

- Public Types inherited from shared_model::interface::QueryResponseFactory
enum  ErrorQueryType {
  ErrorQueryType::kStatelessFailed, ErrorQueryType::kStatefulFailed, ErrorQueryType::kNoAccount, ErrorQueryType::kNoAccountAssets,
  ErrorQueryType::kNoAccountDetail, ErrorQueryType::kNoSignatories, ErrorQueryType::kNotSupported, ErrorQueryType::kNoAsset,
  ErrorQueryType::kNoRoles
}
 

Member Function Documentation

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createAccountAssetResponse ( std::vector< std::tuple< interface::types::AccountIdType, interface::types::AssetIdType, shared_model::interface::Amount >>  assets,
const crypto::Hash query_hash 
) const
override
std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createAccountDetailResponse ( interface::types::DetailType  account_detail,
const crypto::Hash query_hash 
) const
overridevirtual

Create response for account detail query

Parameters
account_detailto be inserted into the response
query_hash- hash of the query, for which response is created
Returns
account detail response

Implements shared_model::interface::QueryResponseFactory.

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::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
overridevirtual

Create response for account query

Parameters
account_idof account to be inserted into the response
domain_idof account to be inserted into the response
quorumof account to be inserted into the response
jsonDataof account to be inserted into the response
rolesto be inserted into the response
query_hash- hash of the query, for which response is created
Returns
account response

Implements shared_model::interface::QueryResponseFactory.

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createAssetResponse ( interface::types::AssetIdType  asset_id,
interface::types::DomainIdType  domain_id,
interface::types::PrecisionType  precision,
const crypto::Hash query_hash 
) const
overridevirtual

Create response for asset query

Parameters
asset_idof asset to be inserted into the response
domain_idof asset to be inserted into the response
precisionof asset to be inserted into the response
query_hash- hash of the query, for which response is created
Returns
asset response

Implements shared_model::interface::QueryResponseFactory.

std::unique_ptr<interface::BlockQueryResponse> shared_model::proto::ProtoQueryResponseFactory::createBlockQueryResponse ( std::shared_ptr< const interface::Block block) const
override

Here is the caller graph for this function:

std::unique_ptr< shared_model::interface::BlockQueryResponse > shared_model::proto::ProtoQueryResponseFactory::createBlockQueryResponse ( std::string  error_message) const
overridevirtual

Create response for block query with error

Parameters
error_messageto be inserted into the response
Returns
block query response with error

Implements shared_model::interface::QueryResponseFactory.

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createBlockResponse ( std::unique_ptr< interface::Block block,
const crypto::Hash query_hash 
) const
override
std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createErrorQueryResponse ( ErrorQueryType  error_type,
interface::ErrorQueryResponse::ErrorMessageType  error_msg,
interface::ErrorQueryResponse::ErrorCodeType  error_code,
const crypto::Hash query_hash 
) const
overridevirtual

Create response for failed query

Parameters
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
Returns
error response

Implements shared_model::interface::QueryResponseFactory.

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createRolePermissionsResponse ( interface::RolePermissionSet  role_permissions,
const crypto::Hash query_hash 
) const
overridevirtual

Create response for role permissions query

Parameters
role_permissionsto be inserted into the response
query_hash- hash of the query, for which response is created
Returns
role permissions response

Implements shared_model::interface::QueryResponseFactory.

Here is the call graph for this function:

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createRolesResponse ( std::vector< interface::types::RoleIdType roles,
const crypto::Hash query_hash 
) const
override
std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createSignatoriesResponse ( std::vector< interface::types::PubkeyType signatories,
const crypto::Hash query_hash 
) const
override
std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::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
override

Here is the call graph for this function:

std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createTransactionsPageResponse ( std::vector< std::unique_ptr< shared_model::interface::Transaction >>  transactions,
interface::types::TransactionsNumberType  all_transactions_size,
const crypto::Hash query_hash 
) const
override
std::unique_ptr< shared_model::interface::QueryResponse > shared_model::proto::ProtoQueryResponseFactory::createTransactionsResponse ( std::vector< std::unique_ptr< shared_model::interface::Transaction >>  transactions,
const crypto::Hash query_hash 
) const
override

The documentation for this class was generated from the following files: