74 lines
1.8 KiB
C++
74 lines
1.8 KiB
C++
//
|
|
// 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
|