重新组织项目结构
This commit is contained in:
1 parent
28206cd50e
commit
4d7dde104d
15 files changed
+59
-83
No files matched your search
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// Created by Shell on 2026-06-18.
|
||||
//
|
||||
|
||||
#ifndef SEADISK_REPO_INFO_HPP
|
||||
#define SEADISK_REPO_INFO_HPP
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace seafile
|
||||
{
|
||||
/**
|
||||
*@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;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(
|
||||
RepoInfo,
|
||||
type,
|
||||
id,
|
||||
owner,
|
||||
name,
|
||||
mtime,
|
||||
size,
|
||||
encrypted,
|
||||
root,
|
||||
permission,
|
||||
modifier_email,
|
||||
modifier_contact_email,
|
||||
modifier_name,
|
||||
file_count,
|
||||
head_commit_id,
|
||||
enc_version,
|
||||
salt,
|
||||
magic,
|
||||
random_key)
|
||||
};
|
||||
}
|
||||
#endif //SEADISK_REPO_INFO_HPP
|
||||
Reference in new issue
Block a user