initialized
This commit is contained in:
parent
585675856b
commit
610dac69a8
8
.devcontainer/Dockerfile
Normal file
8
.devcontainer/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/rust/.devcontainer/base.Dockerfile
|
||||||
|
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
|
||||||
|
ARG VARIANT="bullseye"
|
||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/rust:1-${VARIANT}
|
||||||
|
|
||||||
|
# [Optional] Uncomment this section to install additional packages.
|
||||||
|
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
58
.devcontainer/devcontainer.json
Normal file
58
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
||||||
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/rust
|
||||||
|
{
|
||||||
|
"name": "beteran-protobuf-rust",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
"args": {
|
||||||
|
// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
|
||||||
|
// Use bullseye when on local on arm64/Apple Silicon.
|
||||||
|
"VARIANT": "bullseye"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runArgs": [
|
||||||
|
"--cap-add=SYS_PTRACE",
|
||||||
|
"--security-opt",
|
||||||
|
"seccomp=unconfined"
|
||||||
|
],
|
||||||
|
// Configure tool-specific properties.
|
||||||
|
"customizations": {
|
||||||
|
// Configure properties specific to VS Code.
|
||||||
|
"vscode": {
|
||||||
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {
|
||||||
|
"lldb.verboseLogging": true,
|
||||||
|
"lldb.executable": "/usr/bin/lldb",
|
||||||
|
"search.exclude": {
|
||||||
|
"**/target": true
|
||||||
|
},
|
||||||
|
// VS Code don't watch files under ./target
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/target/**": true
|
||||||
|
},
|
||||||
|
"rust-analyzer.checkOnSave.command": "clippy",
|
||||||
|
"editor.tabSize": 2,
|
||||||
|
"editor.insertSpaces": true,
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
},
|
||||||
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
"extensions": [
|
||||||
|
"donjayamanne.githistory",
|
||||||
|
"eamodio.gitlens",
|
||||||
|
"matklad.rust-analyzer",
|
||||||
|
"mhutchie.git-graph",
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"mutantdino.resourcemonitor",
|
||||||
|
"serayuzgur.crates",
|
||||||
|
"tamasfe.even-better-toml",
|
||||||
|
"vadimcn.vscode-lldb"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
|
"postCreateCommand": "",
|
||||||
|
// Comment out to run as root instead.
|
||||||
|
"remoteUser": "vscode"
|
||||||
|
}
|
7
.devcontainer/rust-toolchain.toml
Normal file
7
.devcontainer/rust-toolchain.toml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[toolchain]
|
||||||
|
channel = "stable"
|
||||||
|
profile = "minimal"
|
||||||
|
components = ["clippy", "rustfmt"]
|
||||||
|
targets = [
|
||||||
|
|
||||||
|
]
|
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
|
||||||
|
/target
|
||||||
|
Cargo.lock
|
75
.rustfmt.toml
Normal file
75
.rustfmt.toml
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
# https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=
|
||||||
|
array_width = 60
|
||||||
|
attr_fn_like_width = 70
|
||||||
|
binop_separator = "Front" # "Front", "Back"
|
||||||
|
blank_lines_lower_bound = 0
|
||||||
|
blank_lines_upper_bound = 1
|
||||||
|
brace_style = "SameLineWhere" #"AlwaysNextLine", "PreferSameLine", "SameLineWhere"
|
||||||
|
chain_width = 60
|
||||||
|
color = "Auto" #"Auto", "Always", "Never"
|
||||||
|
combine_control_expr = true # true, false
|
||||||
|
comment_width = 80
|
||||||
|
condense_wildcard_suffixes = false # true, false
|
||||||
|
control_brace_style = "AlwaysSameLine" # "AlwaysNextLine", "AlwaysSameLine", "ClosingNextLine"
|
||||||
|
disable_all_formatting = false # true, false
|
||||||
|
edition = "2015" # "2015", "2018", "2021"
|
||||||
|
empty_item_single_line = true # true, false
|
||||||
|
enum_discrim_align_threshold = 0
|
||||||
|
error_on_line_overflow = false # true, false
|
||||||
|
error_on_unformatted = false # true, false
|
||||||
|
fn_args_layout = "Tall" # "Compressed", "Tall", "Vertical"
|
||||||
|
fn_call_width = 60
|
||||||
|
fn_single_line = false # true, false
|
||||||
|
force_explicit_abi = true # true, false
|
||||||
|
force_multiline_blocks = false # true, false
|
||||||
|
format_code_in_doc_comments = false # true, false
|
||||||
|
format_generated_files = false # true, false
|
||||||
|
format_macro_matchers = false # true, false
|
||||||
|
format_macro_bodies = true # true, false
|
||||||
|
format_strings = false # true, false
|
||||||
|
group_imports = "Preserve" # "Preserve", "StdExternalCrate"
|
||||||
|
hard_tabs = false # true, false
|
||||||
|
hex_literal_case = "Preserve" # "Upper", "Lower"
|
||||||
|
hide_parse_errors = false # true, false
|
||||||
|
ignore = []
|
||||||
|
imports_indent = "Block" # "Block", "Visual"
|
||||||
|
imports_layout = "Mixed" # "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
|
||||||
|
indent_style = "Block" # "Block", "Visual"
|
||||||
|
inline_attribute_width = 0
|
||||||
|
license_template_path = ""
|
||||||
|
match_arm_blocks = true # true, false
|
||||||
|
match_arm_leading_pipes = "Never" # "Always", "Never", "Preserve"
|
||||||
|
match_block_trailing_comma = false # true, false
|
||||||
|
max_width = 100
|
||||||
|
merge_derives = true # true, false
|
||||||
|
imports_granularity = "Preserve" # "Preserve", "Crate", "Module", "Item", "One"
|
||||||
|
merge_imports = false # true, false
|
||||||
|
newline_style = "Auto" # "Auto", "Native", "Unix", "Windows"
|
||||||
|
normalize_comments = false # true, false
|
||||||
|
normalize_doc_attributes = false # true, false
|
||||||
|
overflow_delimited_expr = false # true, false
|
||||||
|
remove_nested_parens = true # true, false
|
||||||
|
reorder_impl_items = false # true, false
|
||||||
|
reorder_imports = true # true, false
|
||||||
|
reorder_modules = true # true, false
|
||||||
|
report_fixme = "Never" # "Always", "Unnumbered", "Never"
|
||||||
|
report_todo = "Never" # "Always", "Unnumbered", "Never"
|
||||||
|
skip_children = false # true, false
|
||||||
|
single_line_if_else_max_width = 50
|
||||||
|
space_after_colon = true # true, false
|
||||||
|
space_before_colon = false # true, false
|
||||||
|
spaces_around_ranges = false # true, false
|
||||||
|
struct_field_align_threshold = 0
|
||||||
|
struct_lit_single_line = true # true, false
|
||||||
|
struct_lit_width = 18
|
||||||
|
struct_variant_width = 35
|
||||||
|
tab_spaces = 2
|
||||||
|
trailing_comma = "Vertical" # "Always", "Never", "Vertical"
|
||||||
|
trailing_semicolon = true # true, false
|
||||||
|
type_punctuation_density = "Wide" # "Compressed", "Wide"
|
||||||
|
unstable_features = false # true, false
|
||||||
|
use_field_init_shorthand = false # true, false
|
||||||
|
use_small_heuristics = "Default" # "Default", "Off", "Max"
|
||||||
|
use_try_shorthand = false # true, false
|
||||||
|
where_single_line = false # true, false
|
||||||
|
wrap_comments = false # true, false
|
14
Cargo.toml
Normal file
14
Cargo.toml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[package]
|
||||||
|
name = "bbeteran-protobuf-rust"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
[lib]
|
||||||
|
name = "beteran_protobuf_rust"
|
||||||
|
path = "./src/lib.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
prost = "0.10"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
const_format = "0.2"
|
20
src/c2se/backend/identity.rs
Normal file
20
src/c2se/backend/identity.rs
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
use crate::protobuf::rpc;
|
||||||
|
|
||||||
|
|
||||||
|
/// subject = bet.beteran.c2se.backend.identity.Signin
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SigninRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub username: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub password: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub security_code: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SigninResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub error: ::core::option::Option<rpc::Error>,
|
||||||
|
#[prost(string, optional, tag="2")]
|
||||||
|
pub token: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
}
|
47
src/c2se/backend/member.rs
Normal file
47
src/c2se/backend/member.rs
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
use crate::protobuf::rpc;
|
||||||
|
use crate::protobuf::pagination;
|
||||||
|
use crate::models::member;
|
||||||
|
|
||||||
|
/// subject = bet.beteran.c2se.backend.member.ListMembers
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListMembersRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub pagination: ::core::option::Option<pagination::Pagination>,
|
||||||
|
#[prost(message, repeated, tag="2")]
|
||||||
|
pub searches: ::prost::alloc::vec::Vec<pagination::Search>,
|
||||||
|
#[prost(message, repeated, tag="3")]
|
||||||
|
pub sorts: ::prost::alloc::vec::Vec<pagination::Sort>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListMembersResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub error: ::core::option::Option<rpc::Error>,
|
||||||
|
#[prost(message, repeated, tag="2")]
|
||||||
|
pub members: ::prost::alloc::vec::Vec<member::Member>,
|
||||||
|
}
|
||||||
|
/// subject = bet.beteran.c2se.backend.member.GetMember
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct GetMemberRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct GetMemberResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub error: ::core::option::Option<rpc::Error>,
|
||||||
|
#[prost(message, optional, tag="2")]
|
||||||
|
pub member: ::core::option::Option<member::Member>,
|
||||||
|
}
|
||||||
|
/// subject = bet.beteran.c2se.backend.member.GetMemberByUsername
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct GetMemberByUsernameRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub username: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct GetMemberByUsernameResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub error: ::core::option::Option<rpc::Error>,
|
||||||
|
#[prost(message, optional, tag="2")]
|
||||||
|
pub member: ::core::option::Option<member::Member>,
|
||||||
|
}
|
1
src/c2se/backend/mod.rs
Normal file
1
src/c2se/backend/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pub mod identity;
|
19
src/c2se/frontend/identity.rs
Normal file
19
src/c2se/frontend/identity.rs
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
use crate::protobuf::rpc;
|
||||||
|
|
||||||
|
/// subject = bet.beteran.c2se.frontend.identity.Signin
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SigninRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub username: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub password: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub security_code: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SigninResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub error: ::core::option::Option<rpc::Error>,
|
||||||
|
#[prost(string, optional, tag="2")]
|
||||||
|
pub token: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
}
|
1
src/c2se/frontend/mod.rs
Normal file
1
src/c2se/frontend/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pub mod identity;
|
8
src/c2se/mod.rs
Normal file
8
src/c2se/mod.rs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
//!
|
||||||
|
//!
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
pub mod backend;
|
||||||
|
///
|
||||||
|
pub mod frontend;
|
15
src/lib.rs
Normal file
15
src/lib.rs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
//!
|
||||||
|
//!
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
#![deny(missing_debug_implementations)]
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
|
||||||
|
pub mod models;
|
||||||
|
pub mod protobuf;
|
||||||
|
pub mod c2se;
|
||||||
|
pub mod se2c;
|
||||||
|
pub mod ss;
|
||||||
|
|
||||||
|
|
||||||
|
|
91
src/models/member.rs
Normal file
91
src/models/member.rs
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct MemberClass {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(message, optional, boxed, tag="2")]
|
||||||
|
pub parent: ::core::option::Option<::prost::alloc::boxed::Box<MemberClass>>,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub name: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, tag="4")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag="5")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag="6")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct MemberLevel {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub name: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint32, tag="3")]
|
||||||
|
pub order: u32,
|
||||||
|
#[prost(uint64, tag="4")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag="5")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag="6")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct MemberSite {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub url: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, tag="3")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag="4")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag="5")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Member {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub domain_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(message, optional, tag="3")]
|
||||||
|
pub member_class: ::core::option::Option<MemberClass>,
|
||||||
|
#[prost(message, optional, tag="4")]
|
||||||
|
pub member_level: ::core::option::Option<MemberLevel>,
|
||||||
|
#[prost(message, optional, tag="5")]
|
||||||
|
pub member_site: ::core::option::Option<MemberSite>,
|
||||||
|
#[prost(message, optional, boxed, tag="6")]
|
||||||
|
pub referrer: ::core::option::Option<::prost::alloc::boxed::Box<Member>>,
|
||||||
|
#[prost(uint64, tag="7")]
|
||||||
|
pub referred_count: u64,
|
||||||
|
#[prost(string, tag="8")]
|
||||||
|
pub username: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="9")]
|
||||||
|
pub nickname: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, optional, tag="10")]
|
||||||
|
pub mobile_phone_number: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(enumeration="MemberState", tag="11")]
|
||||||
|
pub state: i32,
|
||||||
|
#[prost(uint64, optional, tag="12")]
|
||||||
|
pub state_changed_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(string, optional, tag="13")]
|
||||||
|
pub last_signined_ip: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(uint64, optional, tag="14")]
|
||||||
|
pub last_signined_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(uint64, tag="15")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag="16")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag="17")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MemberState {
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Pending = 2,
|
||||||
|
Withdrawal = 3,
|
||||||
|
Dormancy = 4,
|
||||||
|
Blacklist = 5,
|
||||||
|
Suspended = 6,
|
||||||
|
}
|
1
src/models/mod.rs
Normal file
1
src/models/mod.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pub mod member;
|
2
src/protobuf/mod.rs
Normal file
2
src/protobuf/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
pub mod pagination;
|
||||||
|
pub mod rpc;
|
27
src/protobuf/pagination.rs
Normal file
27
src/protobuf/pagination.rs
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Pagination {
|
||||||
|
#[prost(uint32, optional, tag="1")]
|
||||||
|
pub page: ::core::option::Option<u32>,
|
||||||
|
#[prost(uint32, optional, tag="2")]
|
||||||
|
pub page_size: ::core::option::Option<u32>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Search {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub key: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub value: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Sort {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub by: ::prost::alloc::string::String,
|
||||||
|
#[prost(enumeration="SortOrder", tag="2")]
|
||||||
|
pub order: i32,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum SortOrder {
|
||||||
|
Asc = 0,
|
||||||
|
Desc = 1,
|
||||||
|
}
|
9
src/protobuf/rpc.rs
Normal file
9
src/protobuf/rpc.rs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Error {
|
||||||
|
#[prost(int32, tag="1")]
|
||||||
|
pub code: i32,
|
||||||
|
#[prost(string, optional, tag="2")]
|
||||||
|
pub message: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(bytes="vec", optional, tag="3")]
|
||||||
|
pub data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
|
||||||
|
}
|
48
src/se2c/event_message_attach_files.rs
Normal file
48
src/se2c/event_message_attach_files.rs
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||||||
|
|
||||||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.se2c.event.message_attach_files";
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct MessageAttachFile {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "3")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "4")]
|
||||||
|
pub file_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(enumeration = "MessageAttachFileType", tag = "5")]
|
||||||
|
pub attach_file_type: i32,
|
||||||
|
#[prost(uint64, tag = "6")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag = "7")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag = "8")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(enumeration = "bcprpbp::event::change::ChangeEventType", tag = "9")]
|
||||||
|
pub change_type: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CHANGE: &str = const_format::concatcp!(SUBJECT, ".Change");
|
||||||
|
/// subject = bemily.messenger.chat.messages.se2c.event.message_attach_files.Change;
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeEvent {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub identity_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "3")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(message, repeated, tag = "4")]
|
||||||
|
pub message_attach_files: ::prost::alloc::vec::Vec<MessageAttachFile>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MessageAttachFileType {
|
||||||
|
None = 0,
|
||||||
|
Image = 1,
|
||||||
|
Video = 2,
|
||||||
|
Sound = 3,
|
||||||
|
File = 4,
|
||||||
|
}
|
53
src/se2c/event_messages.rs
Normal file
53
src/se2c/event_messages.rs
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||||||
|
|
||||||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.se2c.event.messages";
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Message {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, optional, tag = "3")]
|
||||||
|
pub sender_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(enumeration = "MessageType", tag = "4")]
|
||||||
|
pub message_type: i32,
|
||||||
|
#[prost(string, tag = "5")]
|
||||||
|
pub message: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, tag = "6")]
|
||||||
|
pub seq: u64,
|
||||||
|
#[prost(uint64, tag = "7")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag = "8")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag = "9")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(enumeration = "bcprpbp::event::change::ChangeEventType", tag = "10")]
|
||||||
|
pub change_type: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CHANGE: &str = const_format::concatcp!(SUBJECT, ".Change");
|
||||||
|
/// subject = bemily.messenger.chat.messages.se2c.event.messages.Change;
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeEvent {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub identity_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(message, optional, tag = "2")]
|
||||||
|
pub message: ::core::option::Option<Message>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MessageType {
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Mass = 2,
|
||||||
|
Image = 3,
|
||||||
|
Video = 4,
|
||||||
|
Sound = 5,
|
||||||
|
File = 6,
|
||||||
|
Emoticon = 7,
|
||||||
|
Smileme = 8,
|
||||||
|
Plan = 9,
|
||||||
|
Combination = 10,
|
||||||
|
Information = 11,
|
||||||
|
}
|
12
src/se2c/mod.rs
Normal file
12
src/se2c/mod.rs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
//!
|
||||||
|
//!
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
#[cfg(feature = "se2c_event_messages")]
|
||||||
|
pub mod event_messages;
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
#[cfg(feature = "se2c_event_message_attach_files")]
|
||||||
|
pub mod event_message_attach_files;
|
48
src/ss/event_message_attach_files.rs
Normal file
48
src/ss/event_message_attach_files.rs
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||||||
|
|
||||||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.ss.event.messages";
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct MessageAttachFile {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "3")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "4")]
|
||||||
|
pub file_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(enumeration = "MessageAttachFileType", tag = "5")]
|
||||||
|
pub attach_file_type: i32,
|
||||||
|
#[prost(uint64, tag = "6")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag = "7")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag = "8")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(enumeration = "bcprpbp::event::change::ChangeEventType", tag = "9")]
|
||||||
|
pub change_type: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CHANGE: &str = const_format::concatcp!(SUBJECT, ".Change");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.event.message_attach_files.Change;
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeEvent {
|
||||||
|
#[prost(string, repeated, tag = "1")]
|
||||||
|
pub identity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "3")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(message, repeated, tag = "4")]
|
||||||
|
pub message_attach_files: ::prost::alloc::vec::Vec<MessageAttachFile>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MessageAttachFileType {
|
||||||
|
None = 0,
|
||||||
|
Image = 1,
|
||||||
|
Video = 2,
|
||||||
|
Sound = 3,
|
||||||
|
File = 4,
|
||||||
|
}
|
65
src/ss/event_messages.rs
Normal file
65
src/ss/event_messages.rs
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||||||
|
|
||||||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.ss.event.messages";
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Message {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, optional, tag = "3")]
|
||||||
|
pub sender_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(enumeration = "MessageType", tag = "4")]
|
||||||
|
pub message_type: i32,
|
||||||
|
#[prost(string, tag = "5")]
|
||||||
|
pub message: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, tag = "6")]
|
||||||
|
pub seq: u64,
|
||||||
|
#[prost(uint64, tag = "7")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag = "8")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag = "9")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(enumeration = "bcprpbp::event::change::ChangeEventType", tag = "10")]
|
||||||
|
pub change_type: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CHANGE: &str = const_format::concatcp!(SUBJECT, ".Change");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.event.messages.Change;
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeEvent {
|
||||||
|
#[prost(string, repeated, tag = "1")]
|
||||||
|
pub identity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||||
|
#[prost(message, optional, tag = "2")]
|
||||||
|
pub message: ::core::option::Option<Message>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CHANGE_MESSAGE: &str = const_format::concatcp!(SUBJECT, ".ChangeMessage");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.event.messages.ChangeMessage;
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeMessageEvent {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "3")]
|
||||||
|
pub message: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MessageType {
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Mass = 2,
|
||||||
|
Image = 3,
|
||||||
|
Video = 4,
|
||||||
|
Sound = 5,
|
||||||
|
File = 6,
|
||||||
|
Emoticon = 7,
|
||||||
|
Smileme = 8,
|
||||||
|
Plan = 9,
|
||||||
|
Combination = 10,
|
||||||
|
Information = 11,
|
||||||
|
}
|
79
src/ss/message_attach_files.rs
Normal file
79
src/ss/message_attach_files.rs
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||||||
|
|
||||||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.ss.message_attach_files";
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct MessageAttachFile {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "3")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "4")]
|
||||||
|
pub file_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(enumeration = "MessageAttachFileType", tag = "5")]
|
||||||
|
pub attach_file_type: i32,
|
||||||
|
#[prost(uint64, tag = "6")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag = "7")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag = "8")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_LIST_BY_MESSAGE_ID: &str = const_format::concatcp!(SUBJECT, ".ListByMessageId");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.message_attach_files.ListByMessageId
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListByMessageIdRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub message_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListByMessageIdResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
#[prost(message, repeated, tag = "2")]
|
||||||
|
pub message_attach_files: ::prost::alloc::vec::Vec<MessageAttachFile>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_DELETE: &str = const_format::concatcp!(SUBJECT, ".Delete");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.message_attach_files.Delete
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_SYNCHRONIZE: &str = const_format::concatcp!(SUBJECT, ".Synchronize");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.message_attach_files.Synchronize
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SynchronizeRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub identity_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, optional, tag = "2")]
|
||||||
|
pub synchronized_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SynchronizeResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
#[prost(uint64, optional, tag = "2")]
|
||||||
|
pub synchronized_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(message, repeated, tag = "3")]
|
||||||
|
pub message_attach_files: ::prost::alloc::vec::Vec<MessageAttachFile>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MessageAttachFileType {
|
||||||
|
None = 0,
|
||||||
|
Image = 1,
|
||||||
|
Video = 2,
|
||||||
|
Sound = 3,
|
||||||
|
File = 4,
|
||||||
|
}
|
140
src/ss/messages.rs
Normal file
140
src/ss/messages.rs
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
use bemily_commons_protobuf_rust::protobuf::bemily::protobuf as bcprpbp;
|
||||||
|
|
||||||
|
pub const SUBJECT: &str = "bemily.messenger.chat.messages.ss.messages";
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Message {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, optional, tag = "3")]
|
||||||
|
pub sender_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(enumeration = "MessageType", tag = "4")]
|
||||||
|
pub message_type: i32,
|
||||||
|
#[prost(string, tag = "5")]
|
||||||
|
pub message: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, tag = "6")]
|
||||||
|
pub seq: u64,
|
||||||
|
#[prost(uint64, tag = "7")]
|
||||||
|
pub created_at: u64,
|
||||||
|
#[prost(uint64, tag = "8")]
|
||||||
|
pub updated_at: u64,
|
||||||
|
#[prost(uint64, optional, tag = "9")]
|
||||||
|
pub deleted_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_GET: &str = const_format::concatcp!(SUBJECT, ".Get");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Get
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct GetRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct GetResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
#[prost(message, optional, tag = "2")]
|
||||||
|
pub message: ::core::option::Option<Message>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_LIST_BY_IDS: &str = const_format::concatcp!(SUBJECT, ".ListByIds");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.messages.ListByIds
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListByIdsRequest {
|
||||||
|
#[prost(string, repeated, tag = "1")]
|
||||||
|
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListByIdsResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
#[prost(message, repeated, tag = "2")]
|
||||||
|
pub messages: ::prost::alloc::vec::Vec<Message>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CREATE: &str = const_format::concatcp!(SUBJECT, ".Create");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Create
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub room_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, optional, tag = "2")]
|
||||||
|
pub sender_id: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
#[prost(enumeration = "MessageType", tag = "3")]
|
||||||
|
pub message_type: i32,
|
||||||
|
#[prost(string, tag = "4")]
|
||||||
|
pub message: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
#[prost(message, optional, tag = "2")]
|
||||||
|
pub message: ::core::option::Option<Message>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_CHANGE_MESSAGE: &str = const_format::concatcp!(SUBJECT, ".ChangeMessage");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.messages.ChangeMessage
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeMessageRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub message: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ChangeMessageResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_DELETE: &str = const_format::concatcp!(SUBJECT, ".Delete");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Delete
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const SUBJECT_SYNCHRONIZE: &str = const_format::concatcp!(SUBJECT, ".Synchronize");
|
||||||
|
/// subject = bemily.messenger.chat.messages.ss.messages.Synchronize
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SynchronizeRequest {
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub identity_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(uint64, optional, tag = "2")]
|
||||||
|
pub synchronized_at: ::core::option::Option<u64>,
|
||||||
|
}
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SynchronizeResponse {
|
||||||
|
#[prost(message, optional, tag = "1")]
|
||||||
|
pub error: ::core::option::Option<bcprpbp::rpc::error::Error>,
|
||||||
|
#[prost(uint64, optional, tag = "2")]
|
||||||
|
pub synchronized_at: ::core::option::Option<u64>,
|
||||||
|
#[prost(message, repeated, tag = "3")]
|
||||||
|
pub messages: ::prost::alloc::vec::Vec<Message>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum MessageType {
|
||||||
|
None = 0,
|
||||||
|
Normal = 1,
|
||||||
|
Mass = 2,
|
||||||
|
Image = 3,
|
||||||
|
Video = 4,
|
||||||
|
Sound = 5,
|
||||||
|
File = 6,
|
||||||
|
Emoticon = 7,
|
||||||
|
Smileme = 8,
|
||||||
|
Plan = 9,
|
||||||
|
Combination = 10,
|
||||||
|
Information = 11,
|
||||||
|
}
|
22
src/ss/mod.rs
Normal file
22
src/ss/mod.rs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
//!
|
||||||
|
//!
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
#[cfg(feature = "ss_messages")]
|
||||||
|
pub mod messages;
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
#[cfg(feature = "ss_message_attach_files")]
|
||||||
|
pub mod message_attach_files;
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
#[cfg(feature = "ss_event_messages")]
|
||||||
|
pub mod event_messages;
|
||||||
|
|
||||||
|
///
|
||||||
|
///
|
||||||
|
#[cfg(feature = "ss_event_message_attach_files")]
|
||||||
|
pub mod event_message_attach_files;
|
Loading…
Reference in New Issue
Block a user