初步实现功能
This commit is contained in:
1 parent
f23c6a3fbb
commit
f0b6efb126
15 files changed
+783
-708
No files matched your search
@@ -59,7 +59,7 @@ namespace seafile::fs::storage
|
||||
/// Whether the entry is starred by the current user.
|
||||
std::optional<bool> starred{};
|
||||
|
||||
static auto from_api_model(const std::string& repo_id, const std::string& path,
|
||||
static auto from_api_model(const std::string& repo_id, const std::string& parent_path,
|
||||
const api::RepoEntry& entry) -> RepoEntry;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// Created by Shell on 2026/7/30.
|
||||
//
|
||||
|
||||
#ifndef SEADISK_STORAGE_REPO_INFO_HPP
|
||||
#define SEADISK_STORAGE_REPO_INFO_HPP
|
||||
#include <string>
|
||||
|
||||
#include "seafile/api/repo_info.hpp"
|
||||
|
||||
namespace seafile::fs::storage {
|
||||
/**
|
||||
*@brief Seafile repository metadata.
|
||||
*/
|
||||
struct RepoInfo final {
|
||||
/// Object type, usually "repo".
|
||||
std::string type;
|
||||
|
||||
/// Repository UUID.
|
||||
std::string id;
|
||||
|
||||
/// Repository owner identifier.
|
||||
std::string owner;
|
||||
|
||||
/// Repository name.
|
||||
std::string name;
|
||||
|
||||
/// Last modification time (Unix timestamp, seconds).
|
||||
std::int64_t mtime{};
|
||||
|
||||
/// Repository size in bytes.
|
||||
std::uint64_t size{};
|
||||
|
||||
/// Indicates whether the repository is encrypted.
|
||||
bool encrypted{};
|
||||
|
||||
/// Root directory object ID.
|
||||
std::string root;
|
||||
|
||||
/// Current user's permission (e.g. "r", "rw").
|
||||
std::string permission;
|
||||
|
||||
/// Internal email address of the last modifier.
|
||||
std::string modifier_email;
|
||||
|
||||
/// Contact email address of the last modifier.
|
||||
std::string modifier_contact_email;
|
||||
|
||||
/// Display name of the last modifier.
|
||||
std::string modifier_name;
|
||||
|
||||
/// Total number of files in the repository.
|
||||
std::uint64_t file_count{};
|
||||
|
||||
/// Head commit identifier.
|
||||
std::string head_commit_id;
|
||||
|
||||
/// Repository encryption version.
|
||||
int enc_version{};
|
||||
|
||||
/// Encryption salt.
|
||||
std::string salt;
|
||||
|
||||
/// Encryption magic value.
|
||||
std::string magic;
|
||||
|
||||
/// Repository random key.
|
||||
std::string random_key;
|
||||
|
||||
static auto from_api_model(const api::RepoInfo& repo_info) -> RepoInfo;
|
||||
};
|
||||
}
|
||||
#endif //SEADISK_STORAGE_REPO_INFO_HPP
|
||||
Reference in new issue
Block a user