#[derive(Clone, PartialEq, ::prost::Message)]
pub struct File {
#[prost(enumeration = "file::FileType", tag = "1")]
pub r#type: i32,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub size: u32,
#[prost(bytes = "vec", tag = "4")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "5")]
pub md5sum: ::prost::alloc::string::String,
}
pub mod file {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileType {
File = 0,
Dir = 1,
}
impl FileType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::File => "FILE",
Self::Dir => "DIR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FILE" => Some(Self::File),
"DIR" => Some(Self::Dir),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InfoRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InfoResponse {
#[prost(uint64, tag = "1")]
pub total_space: u64,
#[prost(uint64, tag = "2")]
pub free_space: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimestampResponse {
#[prost(uint32, tag = "1")]
pub timestamp: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatResponse {
#[prost(message, optional, tag = "1")]
pub file: ::core::option::Option<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub include_md5: bool,
#[prost(uint32, tag = "3")]
pub filter_max_size: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResponse {
#[prost(message, repeated, tag = "1")]
pub file: ::prost::alloc::vec::Vec<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadResponse {
#[prost(message, optional, tag = "1")]
pub file: ::core::option::Option<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub file: ::core::option::Option<File>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub recursive: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MkdirRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Md5sumRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Md5sumResponse {
#[prost(string, tag = "1")]
pub md5sum: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RenameRequest {
#[prost(string, tag = "1")]
pub old_path: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub new_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupCreateRequest {
#[prost(string, tag = "1")]
pub archive_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupRestoreRequest {
#[prost(string, tag = "1")]
pub archive_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TarExtractRequest {
#[prost(string, tag = "1")]
pub tar_path: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub out_path: ::prost::alloc::string::String,
}