#pragma once #include "binary-cache-store.hh" namespace Aws { namespace Client { class ClientConfiguration; } } namespace Aws { namespace S3 { class S3Client; } } namespace nix { class S3BinaryCacheStore : public BinaryCacheStore { private: std::string bucketName; ref config; ref client; public: S3BinaryCacheStore(ref localStore, const Path & secretKeyFile, const Path & publicKeyFile, const std::string & bucketName); void init() override; private: ref makeConfig(); protected: bool fileExists(const std::string & path) override; void upsertFile(const std::string & path, const std::string & data) override; std::string getFile(const std::string & path) override; }; }