19 #ifndef CORE_TRUST_STORE_H_
20 #define CORE_TRUST_STORE_H_
64 : std::runtime_error(implementation_specific)
75 : std::runtime_error(implementation_specific)
125 virtual ~
Query() =
default;
128 virtual Status status()
const = 0;
131 virtual void for_application_id(
const std::string&
id) = 0;
134 virtual void for_feature(std::uint64_t feature) = 0;
143 virtual void all() = 0;
146 virtual void execute() = 0;
149 virtual void next() = 0;
152 virtual void erase() = 0;
162 virtual ~
Store() =
default;
170 virtual void reset() = 0;
175 virtual void add(
const Request& request) = 0;
180 virtual std::shared_ptr<Query> query() = 0;
215 #endif // CORE_TRUST_STORE_H_
Thrown if a store implementation could not reset state and drop all previously stored requests...
The ServiceNameMustNotBeEmpty is thrown if an empty service name is provided when creating a store...
The Request struct encapsulates information about a trust request answered by the user...
All Query-specific error/exception types go here.
Thrown if a store implementation could not access the persistence backend.
Models read/write/query access to persisted trust requests.
Thrown when trying to access the current result although the query status is not has_more_results.
ErrorOpeningStore(const char *implementation_specific)
Thrown if functionality of a query is accessed although the query is in error state.
Status
The state of the query.
All Store-specific error/exception types go here.
Answer
Enumerates the possible answers given by a user.
std::chrono::system_clock::time_point Timestamp
Requests are timestamped with wallclock time.
The Query class encapsulates queries against a trust store instance.
CORE_TRUST_DLL_PUBLIC bool operator==(const Request &lhs, const Request &rhs)
operator == compares two Requests for equality.
ErrorResettingStore(const char *implementation_specific)
All core::trust-specific error/exception types go here.
ServiceNameMustNotBeEmpty()
#define CORE_TRUST_DLL_PUBLIC
CORE_TRUST_DLL_PUBLIC std::shared_ptr< Store > create_default_store(const std::string &service_name)
Creates an instance for the default store implementation.