Where a client keeps verified files between runs, by content hash, and the digest of each application's last verified bundle.
More...
#include <service_client.hpp>
|
|
| IBundleStore (IBundleStore const &)=delete |
|
IBundleStore & | operator= (IBundleStore const &)=delete |
|
| IBundleStore (IBundleStore &&)=delete |
|
IBundleStore & | operator= (IBundleStore &&)=delete |
| virtual std::optional< std::string > | get (std::string_view hash) const =0 |
| | Reads a file.
|
| virtual void | put (std::string const &hash, std::string bytes)=0 |
| | Keeps a file.
|
| virtual void | remove (std::string_view hash)=0 |
| | Drops a file.
|
| virtual std::optional< std::string > | lastDigest (std::string_view application) const =0 |
| | The digest of an application's last verified bundle.
|
| virtual void | setLastDigest (std::string const &application, std::string digest)=0 |
| | Records an application's last verified bundle.
|
Where a client keeps verified files between runs, by content hash, and the digest of each application's last verified bundle.
A store is not trusted: VerifiedCache hashes what it reads back. A client calls it from whichever thread its exchange calls back on, and runs of several opens may overlap, so an implementation is safe to call from any thread.
Definition at line 46 of file service_client.hpp.
◆ get()
| virtual std::optional< std::string > morph::ui::IBundleStore::get |
( |
std::string_view | hash | ) |
const |
|
nodiscardpure virtual |
Reads a file.
- Parameters
-
| hash | The file's content hash. |
- Returns
- Its bytes, or nothing when the store has none.
Implemented in morph::ui::MemoryBundleStore.
◆ put()
| virtual void morph::ui::IBundleStore::put |
( |
std::string const & | hash, |
|
|
std::string | bytes ) |
|
pure virtual |
◆ remove()
| virtual void morph::ui::IBundleStore::remove |
( |
std::string_view | hash | ) |
|
|
pure virtual |
◆ lastDigest()
| virtual std::optional< std::string > morph::ui::IBundleStore::lastDigest |
( |
std::string_view | application | ) |
const |
|
nodiscardpure virtual |
The digest of an application's last verified bundle.
- Parameters
-
| application | The application's id. |
- Returns
- The digest, or nothing.
Implemented in morph::ui::MemoryBundleStore.
◆ setLastDigest()
| virtual void morph::ui::IBundleStore::setLastDigest |
( |
std::string const & | application, |
|
|
std::string | digest ) |
|
pure virtual |
Records an application's last verified bundle.
- Parameters
-
| application | The application's id. |
| digest | The manifest's content hash. |
Implemented in morph::ui::MemoryBundleStore.
The documentation for this class was generated from the following file: