Flex  0.17.9
remote_storage.h
Go to the documentation of this file.
1 
16 #ifndef FLEX_UTILS_REMOTE_REMOTE_STORAGE_H_
17 #define FLEX_UTILS_REMOTE_REMOTE_STORAGE_H_
18 
19 #include <string>
20 #include "flex/utils/result.h"
21 
22 namespace gs {
23 
25  public:
26  virtual ~RemoteStorageUploader() = default;
27 
32  virtual Status Open() = 0;
33 
42  virtual Status Put(const std::string& local_path,
43  const std::string& remote_path, bool override = false) = 0;
44 
50  virtual Status Delete(const std::string& remote_path) = 0;
51 
55  virtual Status Close() = 0;
56 };
57 
59  public:
60  virtual ~RemoteStorageDownloader() = default;
61 
67  virtual Status Open() = 0;
68 
75  virtual Status Get(const std::string& remote_path,
76  const std::string& local_path) = 0;
77 
84  virtual Status List(const std::string& remote_path,
85  std::vector<std::string>& files) = 0;
86 
90  virtual Status Close() = 0;
91 };
92 
93 } // namespace gs
94 
95 #endif // FLEX_UTILS_REMOTE_REMOTE_STORAGE_H_
Definition: remote_storage.h:58
virtual Status Open()=0
virtual ~RemoteStorageDownloader()=default
virtual Status Get(const std::string &remote_path, const std::string &local_path)=0
virtual Status List(const std::string &remote_path, std::vector< std::string > &files)=0
virtual Status Close()=0
Definition: remote_storage.h:24
virtual Status Close()=0
virtual Status Put(const std::string &local_path, const std::string &remote_path, bool override=false)=0
virtual Status Open()=0
virtual ~RemoteStorageUploader()=default
virtual Status Delete(const std::string &remote_path)=0
Definition: result.h:33
Definition: adj_list.h:23