mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor flowy-core pb
This commit is contained in:
@ -1,3 +1,2 @@
|
||||
|
||||
proto_crates = ["src/notify"]
|
||||
proto_crates = []
|
||||
event_files = []
|
@ -1,7 +1,7 @@
|
||||
pub mod context;
|
||||
pub(crate) mod controller;
|
||||
pub mod core;
|
||||
mod notify;
|
||||
// mod notify;
|
||||
pub mod protobuf;
|
||||
mod ws_receivers;
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
mod observable;
|
@ -1,16 +0,0 @@
|
||||
use dart_notify::DartNotifyBuilder;
|
||||
use flowy_derive::ProtoBuf_Enum;
|
||||
const OBSERVABLE_CATEGORY: &str = "Doc";
|
||||
#[derive(ProtoBuf_Enum, Debug)]
|
||||
pub(crate) enum DocObservable {
|
||||
UserCreateDoc = 0,
|
||||
}
|
||||
|
||||
impl std::convert::From<DocObservable> for i32 {
|
||||
fn from(o: DocObservable) -> Self { o as i32 }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn dart_notify(id: &str, ty: DocObservable) -> DartNotifyBuilder {
|
||||
DartNotifyBuilder::new(id, ty, OBSERVABLE_CATEGORY)
|
||||
}
|
@ -1,5 +1,2 @@
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
// Auto-generated, do not edit
|
||||
|
||||
mod observable;
|
||||
pub use observable::*;
|
||||
|
@ -1,92 +0,0 @@
|
||||
// This file is generated by rust-protobuf 2.22.1. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `observable.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum DocObservable {
|
||||
UserCreateDoc = 0,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for DocObservable {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<DocObservable> {
|
||||
match value {
|
||||
0 => ::std::option::Option::Some(DocObservable::UserCreateDoc),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [DocObservable] = &[
|
||||
DocObservable::UserCreateDoc,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new_pb_name::<DocObservable>("DocObservable", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for DocObservable {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for DocObservable {
|
||||
fn default() -> Self {
|
||||
DocObservable::UserCreateDoc
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for DocObservable {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x10observable.proto*\"\n\rDocObservable\x12\x11\n\rUserCreateDoc\x10\
|
||||
\0JS\n\x06\x12\x04\0\0\x04\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\
|
||||
\x05\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x12\n\
|
||||
\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\x16\n\x0c\n\x05\x05\0\x02\0\x01\
|
||||
\x12\x03\x03\x04\x11\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x14\x15b\
|
||||
\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
enum DocObservable {
|
||||
UserCreateDoc = 0;
|
||||
}
|
Reference in New Issue
Block a user