CCF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ccf::GovEndpointRegistry Class Reference

#include <gov_endpoint_registry.h>

Inherits ccf::CommonEndpointRegistry.

Public Member Functions

 GovEndpointRegistry (NetworkState &network_, ccf::AbstractNodeContext &context_)
 
void init_handlers () override
 
bool request_needs_root (const RpcContext &rpc_ctx) override
 
void handle_event_request_completed (const ccf::endpoints::RequestCompletedEvent &event) override
 
void handle_event_dispatch_failed (const ccf::endpoints::DispatchFailedEvent &event) override
 
void api_endpoint (ccf::endpoints::ReadOnlyEndpointContext &ctx) override
 
- Public Member Functions inherited from ccf::CommonEndpointRegistry
 CommonEndpointRegistry (const std::string &method_prefix_, ccf::AbstractNodeContext &context_)
 
- Public Member Functions inherited from ccf::BaseEndpointRegistry
 BaseEndpointRegistry (const std::string &method_prefix_, ccf::AbstractNodeContext &context_)
 
ApiResult get_view_history_v1 (std::vector< ccf::TxID > &history, ccf::View since=1)
 
ApiResult get_view_history_v2 (std::vector< ccf::TxID > &history, ccf::View since, ccf::InvalidArgsReason &reason)
 
ApiResult get_status_for_txid_v1 (ccf::View view, ccf::SeqNo seqno, ccf::TxStatus &tx_status)
 
ApiResult get_last_committed_txid_v1 (ccf::View &view, ccf::SeqNo &seqno)
 
ApiResult generate_openapi_document_v1 (ccf::kv::ReadOnlyTx &tx, const std::string &title, const std::string &description, const std::string &document_version, nlohmann::json &document)
 
ApiResult get_quote_for_this_node_v1 (ccf::kv::ReadOnlyTx &tx, QuoteInfo &quote_info)
 
ApiResult get_id_for_this_node_v1 (NodeId &node_id)
 
ApiResult get_quotes_for_all_trusted_nodes_v1 (ccf::kv::ReadOnlyTx &tx, std::map< NodeId, QuoteInfo > &quotes)
 
ApiResult get_view_for_seqno_v1 (ccf::SeqNo seqno, ccf::View &view)
 
ApiResult get_user_data_v1 (ccf::kv::ReadOnlyTx &tx, const UserId &user_id, nlohmann::json &user_data)
 
ApiResult get_member_data_v1 (ccf::kv::ReadOnlyTx &tx, const MemberId &member_id, nlohmann::json &member_data)
 
ApiResult get_user_cert_v1 (ccf::kv::ReadOnlyTx &tx, const UserId &user_id, ccf::crypto::Pem &user_cert_pem)
 
ApiResult get_member_cert_v1 (ccf::kv::ReadOnlyTx &tx, const MemberId &member_id, ccf::crypto::Pem &member_cert_pem)
 
ApiResult get_untrusted_host_time_v1 (::timespec &time)
 
- Public Member Functions inherited from ccf::endpoints::EndpointRegistry
template<typename T >
bool get_path_param (const ccf::PathParams &params, const std::string &param_name, T &value, std::string &error)
 
template<>
bool get_path_param (const ccf::PathParams &params, const std::string &param_name, std::string &value, std::string &error)
 
 EndpointRegistry (const std::string &method_prefix_)
 
virtual ~EndpointRegistry ()
 
virtual Endpoint make_endpoint (const std::string &method, RESTVerb verb, const EndpointFunction &f, const AuthnPolicies &ap)
 
virtual Endpoint make_read_only_endpoint (const std::string &method, RESTVerb verb, const ReadOnlyEndpointFunction &f, const AuthnPolicies &ap)
 
virtual Endpoint make_endpoint_with_local_commit_handler (const std::string &method, RESTVerb verb, const EndpointFunction &f, const LocallyCommittedEndpointFunction &l, const AuthnPolicies &ap)
 
virtual Endpoint make_read_only_endpoint_with_local_commit_handler (const std::string &method, RESTVerb verb, const ReadOnlyEndpointFunction &f, const LocallyCommittedEndpointFunction &l, const AuthnPolicies &ap)
 
virtual Endpoint make_command_endpoint (const std::string &method, RESTVerb verb, const CommandEndpointFunction &f, const AuthnPolicies &ap)
 
void install (Endpoint &endpoint) override
 
void set_default (EndpointFunction f, const AuthnPolicies &ap)
 
virtual void build_api (nlohmann::json &document, ccf::kv::ReadOnlyTx &)
 
virtual EndpointDefinitionPtr find_endpoint (ccf::kv::Tx &, ccf::RpcContext &rpc_ctx)
 
virtual void execute_endpoint (EndpointDefinitionPtr e, EndpointContext &ctx)
 
virtual void execute_endpoint_locally_committed (EndpointDefinitionPtr e, CommandEndpointContext &ctx, const TxID &tx_id)
 
virtual std::set< RESTVerbget_allowed_verbs (ccf::kv::Tx &, const ccf::RpcContext &rpc_ctx)
 
virtual void report_ambiguous_templated_path (const std::string &path, const std::vector< EndpointDefinitionPtr > &matches)
 
virtual void tick (std::chrono::milliseconds)
 
void set_consensus (ccf::kv::Consensus *c)
 
void set_history (ccf::kv::TxHistory *h)
 
virtual bool apply_uncommitted_tx_backpressure () const
 

Additional Inherited Members

- Public Types inherited from ccf::endpoints::EndpointRegistry
enum  ReadWrite { Read , Write }
 
- Public Attributes inherited from ccf::endpoints::EndpointRegistry
const std::string method_prefix
 
struct ccf::endpoints::EndpointRegistry::OpenApiInfo openapi_info
 
- Protected Attributes inherited from ccf::BaseEndpointRegistry
ccf::AbstractNodeContextcontext
 
- Protected Attributes inherited from ccf::endpoints::EndpointRegistry
EndpointPtr default_endpoint
 
std::map< std::string, std::map< RESTVerb, EndpointPtr > > fully_qualified_endpoints
 
std::map< std::string, std::map< RESTVerb, std::shared_ptr< PathTemplatedEndpoint > > > templated_endpoints
 
ccf::kv::Consensusconsensus = nullptr
 
ccf::kv::TxHistoryhistory = nullptr
 

Constructor & Destructor Documentation

◆ GovEndpointRegistry()

ccf::GovEndpointRegistry::GovEndpointRegistry ( NetworkState network_,
ccf::AbstractNodeContext context_ 
)
inline

Member Function Documentation

◆ api_endpoint()

void ccf::GovEndpointRegistry::api_endpoint ( ccf::endpoints::ReadOnlyEndpointContext ctx)
inlineoverridevirtual

Reimplemented from ccf::CommonEndpointRegistry.

◆ handle_event_dispatch_failed()

void ccf::GovEndpointRegistry::handle_event_dispatch_failed ( const ccf::endpoints::DispatchFailedEvent event)
inlineoverridevirtual

Reimplemented from ccf::endpoints::EndpointRegistry.

◆ handle_event_request_completed()

void ccf::GovEndpointRegistry::handle_event_request_completed ( const ccf::endpoints::RequestCompletedEvent event)
inlineoverridevirtual

Reimplemented from ccf::endpoints::EndpointRegistry.

◆ init_handlers()

void ccf::GovEndpointRegistry::init_handlers ( )
inlineoverridevirtual

Reimplemented from ccf::CommonEndpointRegistry.

◆ request_needs_root()

bool ccf::GovEndpointRegistry::request_needs_root ( const RpcContext rpc_ctx)
inlineoverridevirtual

Reimplemented from ccf::endpoints::EndpointRegistry.


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