refactor s3 provider
This commit is contained in:
@ -36,15 +36,21 @@ public:
|
||||
|
||||
~sia_provider() override = default;
|
||||
|
||||
public:
|
||||
sia_provider(const sia_provider &) = delete;
|
||||
sia_provider(sia_provider &&) = delete;
|
||||
auto operator=(const sia_provider &) -> sia_provider & = delete;
|
||||
auto operator=(sia_provider &&) -> sia_provider & = delete;
|
||||
|
||||
private:
|
||||
app_config &config_;
|
||||
i_http_comm &comm_;
|
||||
|
||||
private:
|
||||
const std::string DB_NAME = "meta_db";
|
||||
api_item_added_callback api_item_added_;
|
||||
std::unique_ptr<rocksdb::DB> db_;
|
||||
i_file_manager *fm_ = nullptr;
|
||||
std::string DB_NAME = "meta_db";
|
||||
i_file_manager *fm_{};
|
||||
|
||||
private:
|
||||
[[nodiscard]] static auto create_api_file(std::string path,
|
||||
@ -57,7 +63,7 @@ private:
|
||||
[[nodiscard]] auto get_object_info(const std::string &api_path,
|
||||
json &object_info) const -> api_error;
|
||||
|
||||
[[nodiscard]] auto get_object_list(const std::string api_path,
|
||||
[[nodiscard]] auto get_object_list(const std::string &api_path,
|
||||
nlohmann::json &object_list) const -> bool;
|
||||
|
||||
void remove_deleted_files();
|
||||
@ -185,7 +191,6 @@ public:
|
||||
|
||||
[[nodiscard]] auto upload_file(const std::string &api_path,
|
||||
const std::string &source_path,
|
||||
const std::string & /* encryption_token */,
|
||||
stop_type &stop_requested)
|
||||
-> api_error override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user