mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
app crud & test
This commit is contained in:
@ -7,6 +7,7 @@ use crate::{
|
||||
errors::*,
|
||||
impl_def_and_def_mut,
|
||||
};
|
||||
use bytes::Bytes;
|
||||
use flowy_derive::ProtoBuf;
|
||||
use std::convert::TryInto;
|
||||
|
||||
@ -25,17 +26,28 @@ pub struct CreateAppRequest {
|
||||
pub color_style: ColorStyle,
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default, Debug)]
|
||||
#[derive(ProtoBuf, Default, Debug, Clone)]
|
||||
pub struct ColorStyle {
|
||||
#[pb(index = 1)]
|
||||
pub theme_color: String,
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct CreateAppParams {
|
||||
#[pb(index = 1)]
|
||||
pub workspace_id: String,
|
||||
|
||||
#[pb(index = 2)]
|
||||
pub name: String,
|
||||
|
||||
#[pb(index = 3)]
|
||||
pub desc: String,
|
||||
|
||||
#[pb(index = 4)]
|
||||
pub color_style: ColorStyle,
|
||||
|
||||
#[pb(index = 5)]
|
||||
pub user_id: String,
|
||||
}
|
||||
|
||||
impl TryInto<CreateAppParams> for CreateAppRequest {
|
||||
@ -62,6 +74,7 @@ impl TryInto<CreateAppParams> for CreateAppRequest {
|
||||
name: name.0,
|
||||
desc: self.desc,
|
||||
color_style: color_style.0,
|
||||
user_id: "".to_string(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
entities::app::parser::BelongToId,
|
||||
entities::app::parser::AppId,
|
||||
errors::{ErrorBuilder, WorkspaceError, WsErrCode},
|
||||
};
|
||||
use flowy_derive::ProtoBuf;
|
||||
@ -11,7 +11,9 @@ pub struct DeleteAppRequest {
|
||||
pub app_id: String,
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf)]
|
||||
pub struct DeleteAppParams {
|
||||
#[pb(index = 1)]
|
||||
pub app_id: String,
|
||||
}
|
||||
|
||||
@ -19,7 +21,7 @@ impl TryInto<DeleteAppParams> for DeleteAppRequest {
|
||||
type Error = WorkspaceError;
|
||||
|
||||
fn try_into(self) -> Result<DeleteAppParams, Self::Error> {
|
||||
let app_id = BelongToId::parse(self.app_id)
|
||||
let app_id = AppId::parse(self.app_id)
|
||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||
.0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::{entities::app::parser::BelongToId, errors::*};
|
||||
use crate::{entities::app::parser::AppId, errors::*};
|
||||
use flowy_derive::ProtoBuf;
|
||||
use std::convert::TryInto;
|
||||
|
||||
@ -34,9 +34,15 @@ impl QueryAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct QueryAppParams {
|
||||
#[pb(index = 1)]
|
||||
pub app_id: String,
|
||||
|
||||
#[pb(index = 2)]
|
||||
pub read_belongings: bool,
|
||||
|
||||
#[pb(index = 3)]
|
||||
pub is_trash: bool,
|
||||
}
|
||||
|
||||
@ -44,7 +50,7 @@ impl TryInto<QueryAppParams> for QueryAppRequest {
|
||||
type Error = WorkspaceError;
|
||||
|
||||
fn try_into(self) -> Result<QueryAppParams, Self::Error> {
|
||||
let app_id = BelongToId::parse(self.app_id)
|
||||
let app_id = AppId::parse(self.app_id)
|
||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||
.0;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
entities::{
|
||||
app::{
|
||||
parser::{AppColorStyle, AppName, BelongToId},
|
||||
parser::{AppColorStyle, AppId, AppName},
|
||||
ColorStyle,
|
||||
},
|
||||
workspace::parser::WorkspaceId,
|
||||
@ -32,12 +32,24 @@ pub struct UpdateAppRequest {
|
||||
pub is_trash: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct UpdateAppParams {
|
||||
#[pb(index = 1)]
|
||||
pub app_id: String,
|
||||
|
||||
#[pb(index = 2, one_of)]
|
||||
pub workspace_id: Option<String>,
|
||||
|
||||
#[pb(index = 3, one_of)]
|
||||
pub name: Option<String>,
|
||||
|
||||
#[pb(index = 4, one_of)]
|
||||
pub desc: Option<String>,
|
||||
|
||||
#[pb(index = 5, one_of)]
|
||||
pub color_style: Option<ColorStyle>,
|
||||
|
||||
#[pb(index = 6, one_of)]
|
||||
pub is_trash: Option<bool>,
|
||||
}
|
||||
|
||||
@ -45,7 +57,7 @@ impl TryInto<UpdateAppParams> for UpdateAppRequest {
|
||||
type Error = WorkspaceError;
|
||||
|
||||
fn try_into(self) -> Result<UpdateAppParams, Self::Error> {
|
||||
let app_id = BelongToId::parse(self.app_id)
|
||||
let app_id = AppId::parse(self.app_id)
|
||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||
.0;
|
||||
|
||||
|
17
rust-lib/flowy-workspace/src/entities/app/parser/app_desc.rs
Normal file
17
rust-lib/flowy-workspace/src/entities/app/parser/app_desc.rs
Normal file
@ -0,0 +1,17 @@
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
#[derive(Debug)]
|
||||
pub struct AppDesc(pub String);
|
||||
|
||||
impl AppDesc {
|
||||
pub fn parse(s: String) -> Result<AppDesc, String> {
|
||||
if s.graphemes(true).count() > 1024 {
|
||||
return Err(format!("Workspace description too long"));
|
||||
}
|
||||
|
||||
Ok(Self(s))
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for AppDesc {
|
||||
fn as_ref(&self) -> &str { &self.0 }
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
#[derive(Debug)]
|
||||
pub struct BelongToId(pub String);
|
||||
pub struct AppId(pub String);
|
||||
|
||||
impl BelongToId {
|
||||
pub fn parse(s: String) -> Result<BelongToId, String> {
|
||||
impl AppId {
|
||||
pub fn parse(s: String) -> Result<AppId, String> {
|
||||
if s.trim().is_empty() {
|
||||
return Err(format!("App id can not be empty or whitespace"));
|
||||
}
|
||||
@ -11,6 +11,6 @@ impl BelongToId {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for BelongToId {
|
||||
impl AsRef<str> for AppId {
|
||||
fn as_ref(&self) -> &str { &self.0 }
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
mod app_color_style;
|
||||
mod app_desc;
|
||||
mod app_id;
|
||||
mod app_name;
|
||||
mod belong_to_id;
|
||||
|
||||
pub use app_color_style::*;
|
||||
pub use app_desc::*;
|
||||
pub use app_id::*;
|
||||
pub use app_name::*;
|
||||
pub use belong_to_id::*;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
entities::{app::parser::BelongToId, view::parser::*},
|
||||
entities::{app::parser::AppId, view::parser::*},
|
||||
errors::{ErrorBuilder, WorkspaceError, WsErrCode},
|
||||
impl_def_and_def_mut,
|
||||
sql_tables::view::ViewTableType,
|
||||
@ -51,7 +51,7 @@ impl TryInto<CreateViewParams> for CreateViewRequest {
|
||||
.map_err(|e| ErrorBuilder::new(WsErrCode::ViewNameInvalid).msg(e).build())?
|
||||
.0;
|
||||
|
||||
let belong_to_id = BelongToId::parse(self.belong_to_id)
|
||||
let belong_to_id = AppId::parse(self.belong_to_id)
|
||||
.map_err(|e| ErrorBuilder::new(WsErrCode::AppIdInvalid).msg(e).build())?
|
||||
.0;
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
mod workspace_desc;
|
||||
mod workspace_id;
|
||||
mod workspace_name;
|
||||
|
||||
pub use workspace_desc::*;
|
||||
pub use workspace_id::*;
|
||||
pub use workspace_name::*;
|
||||
|
@ -0,0 +1,18 @@
|
||||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct WorkspaceDesc(pub String);
|
||||
|
||||
impl WorkspaceDesc {
|
||||
pub fn parse(s: String) -> Result<WorkspaceDesc, String> {
|
||||
if s.graphemes(true).count() > 1024 {
|
||||
return Err(format!("Workspace description too long"));
|
||||
}
|
||||
|
||||
Ok(Self(s))
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for WorkspaceDesc {
|
||||
fn as_ref(&self) -> &str { &self.0 }
|
||||
}
|
@ -23,8 +23,8 @@ pub struct CreateWorkspaceParams {
|
||||
#[pb(index = 2)]
|
||||
pub desc: String,
|
||||
|
||||
#[pb(index = 3, one_of)]
|
||||
pub user_id: Option<String>,
|
||||
#[pb(index = 3)]
|
||||
pub user_id: String,
|
||||
}
|
||||
|
||||
impl TryInto<CreateWorkspaceParams> for CreateWorkspaceRequest {
|
||||
@ -32,15 +32,21 @@ impl TryInto<CreateWorkspaceParams> for CreateWorkspaceRequest {
|
||||
|
||||
fn try_into(self) -> Result<CreateWorkspaceParams, Self::Error> {
|
||||
let name = WorkspaceName::parse(self.name).map_err(|e| {
|
||||
ErrorBuilder::new(WsErrCode::WorkspaceNameInvalid)
|
||||
ErrorBuilder::new(WsErrCode::WorkspaceDescInvalid)
|
||||
.msg(e)
|
||||
.build()
|
||||
})?;
|
||||
|
||||
let desc = WorkspaceDesc::parse(self.desc).map_err(|e| {
|
||||
ErrorBuilder::new(WsErrCode::WorkspaceDescInvalid)
|
||||
.msg(e)
|
||||
.build()
|
||||
})?;
|
||||
|
||||
Ok(CreateWorkspaceParams {
|
||||
name: name.0,
|
||||
desc: self.desc,
|
||||
user_id: None,
|
||||
desc: desc.0,
|
||||
user_id: "".to_string(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ pub struct DeleteWorkspaceRequest {
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct DeleteWorkspaceParams {
|
||||
#[pb(index = 1)]
|
||||
workspace_id: String,
|
||||
pub workspace_id: String,
|
||||
}
|
||||
|
||||
impl TryInto<DeleteWorkspaceParams> for DeleteWorkspaceRequest {
|
||||
|
@ -2,6 +2,7 @@ use bytes::Bytes;
|
||||
use derive_more::Display;
|
||||
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
|
||||
use flowy_dispatch::prelude::{EventResponse, ResponseBuilder};
|
||||
use flowy_net::errors::ErrorCode;
|
||||
use std::convert::TryInto;
|
||||
|
||||
#[derive(Debug, Default, Clone, ProtoBuf)]
|
||||
@ -36,6 +37,9 @@ pub enum WsErrCode {
|
||||
#[display(fmt = "Color style of the App is invalid")]
|
||||
AppColorStyleInvalid = 3,
|
||||
|
||||
#[display(fmt = "Workspace desc is invalid")]
|
||||
WorkspaceDescInvalid = 4,
|
||||
|
||||
#[display(fmt = "Id of the App is invalid")]
|
||||
AppIdInvalid = 10,
|
||||
|
||||
@ -68,6 +72,8 @@ pub enum WsErrCode {
|
||||
|
||||
#[display(fmt = "Server error")]
|
||||
ServerError = 1000,
|
||||
#[display(fmt = "Record not found")]
|
||||
RecordNotFound = 1001,
|
||||
}
|
||||
|
||||
impl std::default::Default for WsErrCode {
|
||||
@ -76,9 +82,15 @@ impl std::default::Default for WsErrCode {
|
||||
|
||||
impl std::convert::From<flowy_net::errors::ServerError> for WorkspaceError {
|
||||
fn from(error: flowy_net::errors::ServerError) -> Self {
|
||||
ErrorBuilder::new(WsErrCode::ServerError)
|
||||
.error(error.msg)
|
||||
.build()
|
||||
match error.code {
|
||||
ErrorCode::RecordNotFound => ErrorBuilder::new(WsErrCode::RecordNotFound)
|
||||
.error(error.msg)
|
||||
.build(),
|
||||
|
||||
_ => ErrorBuilder::new(WsErrCode::ServerError)
|
||||
.error(error.msg)
|
||||
.build(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -482,6 +482,348 @@ impl ::protobuf::reflect::ProtobufValue for ColorStyle {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct CreateAppParams {
|
||||
// message fields
|
||||
pub workspace_id: ::std::string::String,
|
||||
pub name: ::std::string::String,
|
||||
pub desc: ::std::string::String,
|
||||
pub color_style: ::protobuf::SingularPtrField<ColorStyle>,
|
||||
pub user_id: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a CreateAppParams {
|
||||
fn default() -> &'a CreateAppParams {
|
||||
<CreateAppParams as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl CreateAppParams {
|
||||
pub fn new() -> CreateAppParams {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string workspace_id = 1;
|
||||
|
||||
|
||||
pub fn get_workspace_id(&self) -> &str {
|
||||
&self.workspace_id
|
||||
}
|
||||
pub fn clear_workspace_id(&mut self) {
|
||||
self.workspace_id.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_workspace_id(&mut self, v: ::std::string::String) {
|
||||
self.workspace_id = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.workspace_id
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_workspace_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.workspace_id, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string name = 2;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_name(&mut self, v: ::std::string::String) {
|
||||
self.name = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_name(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.name
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string desc = 3;
|
||||
|
||||
|
||||
pub fn get_desc(&self) -> &str {
|
||||
&self.desc
|
||||
}
|
||||
pub fn clear_desc(&mut self) {
|
||||
self.desc.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_desc(&mut self, v: ::std::string::String) {
|
||||
self.desc = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_desc(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.desc
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_desc(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.desc, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// .ColorStyle color_style = 4;
|
||||
|
||||
|
||||
pub fn get_color_style(&self) -> &ColorStyle {
|
||||
self.color_style.as_ref().unwrap_or_else(|| <ColorStyle as ::protobuf::Message>::default_instance())
|
||||
}
|
||||
pub fn clear_color_style(&mut self) {
|
||||
self.color_style.clear();
|
||||
}
|
||||
|
||||
pub fn has_color_style(&self) -> bool {
|
||||
self.color_style.is_some()
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_color_style(&mut self, v: ColorStyle) {
|
||||
self.color_style = ::protobuf::SingularPtrField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_color_style(&mut self) -> &mut ColorStyle {
|
||||
if self.color_style.is_none() {
|
||||
self.color_style.set_default();
|
||||
}
|
||||
self.color_style.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_color_style(&mut self) -> ColorStyle {
|
||||
self.color_style.take().unwrap_or_else(|| ColorStyle::new())
|
||||
}
|
||||
|
||||
// string user_id = 5;
|
||||
|
||||
|
||||
pub fn get_user_id(&self) -> &str {
|
||||
&self.user_id
|
||||
}
|
||||
pub fn clear_user_id(&mut self) {
|
||||
self.user_id.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_user_id(&mut self, v: ::std::string::String) {
|
||||
self.user_id = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_user_id(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.user_id
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_user_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.user_id, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for CreateAppParams {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.color_style {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.workspace_id)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?;
|
||||
},
|
||||
5 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_id)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.workspace_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.workspace_id);
|
||||
}
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(2, &self.name);
|
||||
}
|
||||
if !self.desc.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(3, &self.desc);
|
||||
}
|
||||
if let Some(ref v) = self.color_style.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
if !self.user_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(5, &self.user_id);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.workspace_id.is_empty() {
|
||||
os.write_string(1, &self.workspace_id)?;
|
||||
}
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(2, &self.name)?;
|
||||
}
|
||||
if !self.desc.is_empty() {
|
||||
os.write_string(3, &self.desc)?;
|
||||
}
|
||||
if let Some(ref v) = self.color_style.as_ref() {
|
||||
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
if !self.user_id.is_empty() {
|
||||
os.write_string(5, &self.user_id)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> CreateAppParams {
|
||||
CreateAppParams::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"workspace_id",
|
||||
|m: &CreateAppParams| { &m.workspace_id },
|
||||
|m: &mut CreateAppParams| { &mut m.workspace_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &CreateAppParams| { &m.name },
|
||||
|m: &mut CreateAppParams| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"desc",
|
||||
|m: &CreateAppParams| { &m.desc },
|
||||
|m: &mut CreateAppParams| { &mut m.desc },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ColorStyle>>(
|
||||
"color_style",
|
||||
|m: &CreateAppParams| { &m.color_style },
|
||||
|m: &mut CreateAppParams| { &mut m.color_style },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"user_id",
|
||||
|m: &CreateAppParams| { &m.user_id },
|
||||
|m: &mut CreateAppParams| { &mut m.user_id },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateAppParams>(
|
||||
"CreateAppParams",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static CreateAppParams {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateAppParams> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateAppParams::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for CreateAppParams {
|
||||
fn clear(&mut self) {
|
||||
self.workspace_id.clear();
|
||||
self.name.clear();
|
||||
self.desc.clear();
|
||||
self.color_style.clear();
|
||||
self.user_id.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for CreateAppParams {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateAppParams {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct App {
|
||||
// message fields
|
||||
@ -1031,52 +1373,72 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\
|
||||
\x01(\tR\x04desc\x12,\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\x0b.ColorSt\
|
||||
yleR\ncolorStyle\"-\n\nColorStyle\x12\x1f\n\x0btheme_color\x18\x01\x20\
|
||||
\x01(\tR\nthemeColor\"\xa9\x01\n\x03App\x12\x0e\n\x02id\x18\x01\x20\x01(\
|
||||
\tR\x02id\x12!\n\x0cworkspace_id\x18\x02\x20\x01(\tR\x0bworkspaceId\x12\
|
||||
\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x04\x20\
|
||||
\x01(\tR\x04desc\x12-\n\nbelongings\x18\x05\x20\x01(\x0b2\r.RepeatedView\
|
||||
R\nbelongings\x12\x18\n\x07version\x18\x06\x20\x01(\x03R\x07version\")\n\
|
||||
\x0bRepeatedApp\x12\x1a\n\x05items\x18\x01\x20\x03(\x0b2\x04.AppR\x05ite\
|
||||
msJ\x9f\x06\n\x06\x12\x04\0\0\x16\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\
|
||||
\t\n\x02\x03\0\x12\x03\x01\0\x1b\n\n\n\x02\x04\0\x12\x04\x03\0\x08\x01\n\
|
||||
\n\n\x03\x04\0\x01\x12\x03\x03\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\
|
||||
\x04\x04\x1c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\n\x0c\n\x05\
|
||||
\x04\0\x02\0\x01\x12\x03\x04\x0b\x17\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\
|
||||
\x04\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x04\x14\n\x0c\n\x05\
|
||||
\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\
|
||||
\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x05\x12\x13\n\x0b\
|
||||
\n\x04\x04\0\x02\x02\x12\x03\x06\x04\x14\n\x0c\n\x05\x04\0\x02\x02\x05\
|
||||
\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x06\x0b\x0f\n\
|
||||
\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x06\x12\x13\n\x0b\n\x04\x04\0\x02\
|
||||
\x03\x12\x03\x07\x04\x1f\n\x0c\n\x05\x04\0\x02\x03\x06\x12\x03\x07\x04\
|
||||
\x0e\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x07\x0f\x1a\n\x0c\n\x05\x04\0\
|
||||
\x02\x03\x03\x12\x03\x07\x1d\x1e\n\n\n\x02\x04\x01\x12\x04\t\0\x0b\x01\n\
|
||||
\n\n\x03\x04\x01\x01\x12\x03\t\x08\x12\n\x0b\n\x04\x04\x01\x02\0\x12\x03\
|
||||
\n\x04\x1b\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\
|
||||
\x01\x02\0\x01\x12\x03\n\x0b\x16\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\n\
|
||||
\x19\x1a\n\n\n\x02\x04\x02\x12\x04\x0c\0\x13\x01\n\n\n\x03\x04\x02\x01\
|
||||
\x12\x03\x0c\x08\x0b\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\x12\n\x0c\n\
|
||||
\x05\x04\x02\x02\0\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\
|
||||
\x03\r\x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\r\x10\x11\n\x0b\n\x04\
|
||||
\x04\x02\x02\x01\x12\x03\x0e\x04\x1c\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\
|
||||
\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0e\x0b\x17\n\x0c\
|
||||
\n\x05\x04\x02\x02\x01\x03\x12\x03\x0e\x1a\x1b\n\x0b\n\x04\x04\x02\x02\
|
||||
\x02\x12\x03\x0f\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x0f\x04\
|
||||
\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0f\x0b\x0f\n\x0c\n\x05\x04\
|
||||
\x02\x02\x02\x03\x12\x03\x0f\x12\x13\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\
|
||||
\x10\x04\x14\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x10\x04\n\n\x0c\n\
|
||||
\x05\x04\x02\x02\x03\x01\x12\x03\x10\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x03\
|
||||
\x03\x12\x03\x10\x12\x13\n\x0b\n\x04\x04\x02\x02\x04\x12\x03\x11\x04\x20\
|
||||
\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03\x11\x04\x10\n\x0c\n\x05\x04\x02\
|
||||
\x02\x04\x01\x12\x03\x11\x11\x1b\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\
|
||||
\x11\x1e\x1f\n\x0b\n\x04\x04\x02\x02\x05\x12\x03\x12\x04\x16\n\x0c\n\x05\
|
||||
\x04\x02\x02\x05\x05\x12\x03\x12\x04\t\n\x0c\n\x05\x04\x02\x02\x05\x01\
|
||||
\x12\x03\x12\n\x11\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03\x12\x14\x15\n\
|
||||
\n\n\x02\x04\x03\x12\x04\x14\0\x16\x01\n\n\n\x03\x04\x03\x01\x12\x03\x14\
|
||||
\x08\x13\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x15\x04\x1b\n\x0c\n\x05\x04\
|
||||
\x03\x02\0\x04\x12\x03\x15\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03\
|
||||
\x15\r\x10\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x15\x11\x16\n\x0c\n\x05\
|
||||
\x04\x03\x02\0\x03\x12\x03\x15\x19\x1ab\x06proto3\
|
||||
\x01(\tR\nthemeColor\"\xa3\x01\n\x0fCreateAppParams\x12!\n\x0cworkspace_\
|
||||
id\x18\x01\x20\x01(\tR\x0bworkspaceId\x12\x12\n\x04name\x18\x02\x20\x01(\
|
||||
\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12,\n\x0bcolo\
|
||||
r_style\x18\x04\x20\x01(\x0b2\x0b.ColorStyleR\ncolorStyle\x12\x17\n\x07u\
|
||||
ser_id\x18\x05\x20\x01(\tR\x06userId\"\xa9\x01\n\x03App\x12\x0e\n\x02id\
|
||||
\x18\x01\x20\x01(\tR\x02id\x12!\n\x0cworkspace_id\x18\x02\x20\x01(\tR\
|
||||
\x0bworkspaceId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x12\n\
|
||||
\x04desc\x18\x04\x20\x01(\tR\x04desc\x12-\n\nbelongings\x18\x05\x20\x01(\
|
||||
\x0b2\r.RepeatedViewR\nbelongings\x12\x18\n\x07version\x18\x06\x20\x01(\
|
||||
\x03R\x07version\")\n\x0bRepeatedApp\x12\x1a\n\x05items\x18\x01\x20\x03(\
|
||||
\x0b2\x04.AppR\x05itemsJ\xca\x08\n\x06\x12\x04\0\0\x1d\x01\n\x08\n\x01\
|
||||
\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x1b\n\n\n\x02\x04\0\
|
||||
\x12\x04\x03\0\x08\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x18\n\x0b\n\
|
||||
\x04\x04\0\x02\0\x12\x03\x04\x04\x1c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\
|
||||
\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x17\n\x0c\n\x05\
|
||||
\x04\0\x02\0\x03\x12\x03\x04\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\
|
||||
\x05\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\x05\
|
||||
\x04\0\x02\x01\x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\
|
||||
\x03\x05\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x06\x04\x14\n\x0c\n\
|
||||
\x05\x04\0\x02\x02\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\
|
||||
\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x06\x12\x13\n\
|
||||
\x0b\n\x04\x04\0\x02\x03\x12\x03\x07\x04\x1f\n\x0c\n\x05\x04\0\x02\x03\
|
||||
\x06\x12\x03\x07\x04\x0e\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x07\x0f\
|
||||
\x1a\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x07\x1d\x1e\n\n\n\x02\x04\x01\
|
||||
\x12\x04\t\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\t\x08\x12\n\x0b\n\x04\
|
||||
\x04\x01\x02\0\x12\x03\n\x04\x1b\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\
|
||||
\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\n\x0b\x16\n\x0c\n\x05\x04\
|
||||
\x01\x02\0\x03\x12\x03\n\x19\x1a\n\n\n\x02\x04\x02\x12\x04\x0c\0\x12\x01\
|
||||
\n\n\n\x03\x04\x02\x01\x12\x03\x0c\x08\x17\n\x0b\n\x04\x04\x02\x02\0\x12\
|
||||
\x03\r\x04\x1c\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\r\x04\n\n\x0c\n\x05\
|
||||
\x04\x02\x02\0\x01\x12\x03\r\x0b\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\
|
||||
\x03\r\x1a\x1b\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x0e\x04\x14\n\x0c\n\
|
||||
\x05\x04\x02\x02\x01\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x01\
|
||||
\x01\x12\x03\x0e\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x0e\x12\
|
||||
\x13\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\x0f\x04\x14\n\x0c\n\x05\x04\x02\
|
||||
\x02\x02\x05\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\
|
||||
\x0f\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0f\x12\x13\n\x0b\n\
|
||||
\x04\x04\x02\x02\x03\x12\x03\x10\x04\x1f\n\x0c\n\x05\x04\x02\x02\x03\x06\
|
||||
\x12\x03\x10\x04\x0e\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x10\x0f\x1a\
|
||||
\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03\x10\x1d\x1e\n\x0b\n\x04\x04\x02\
|
||||
\x02\x04\x12\x03\x11\x04\x17\n\x0c\n\x05\x04\x02\x02\x04\x05\x12\x03\x11\
|
||||
\x04\n\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03\x11\x0b\x12\n\x0c\n\x05\
|
||||
\x04\x02\x02\x04\x03\x12\x03\x11\x15\x16\n\n\n\x02\x04\x03\x12\x04\x13\0\
|
||||
\x1a\x01\n\n\n\x03\x04\x03\x01\x12\x03\x13\x08\x0b\n\x0b\n\x04\x04\x03\
|
||||
\x02\0\x12\x03\x14\x04\x12\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x14\x04\
|
||||
\n\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x14\x0b\r\n\x0c\n\x05\x04\x03\
|
||||
\x02\0\x03\x12\x03\x14\x10\x11\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x15\
|
||||
\x04\x1c\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x15\x04\n\n\x0c\n\x05\
|
||||
\x04\x03\x02\x01\x01\x12\x03\x15\x0b\x17\n\x0c\n\x05\x04\x03\x02\x01\x03\
|
||||
\x12\x03\x15\x1a\x1b\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x16\x04\x14\n\
|
||||
\x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x16\x04\n\n\x0c\n\x05\x04\x03\x02\
|
||||
\x02\x01\x12\x03\x16\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x16\
|
||||
\x12\x13\n\x0b\n\x04\x04\x03\x02\x03\x12\x03\x17\x04\x14\n\x0c\n\x05\x04\
|
||||
\x03\x02\x03\x05\x12\x03\x17\x04\n\n\x0c\n\x05\x04\x03\x02\x03\x01\x12\
|
||||
\x03\x17\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03\x17\x12\x13\n\
|
||||
\x0b\n\x04\x04\x03\x02\x04\x12\x03\x18\x04\x20\n\x0c\n\x05\x04\x03\x02\
|
||||
\x04\x06\x12\x03\x18\x04\x10\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03\x18\
|
||||
\x11\x1b\n\x0c\n\x05\x04\x03\x02\x04\x03\x12\x03\x18\x1e\x1f\n\x0b\n\x04\
|
||||
\x04\x03\x02\x05\x12\x03\x19\x04\x16\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\
|
||||
\x03\x19\x04\t\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x03\x19\n\x11\n\x0c\n\
|
||||
\x05\x04\x03\x02\x05\x03\x12\x03\x19\x14\x15\n\n\n\x02\x04\x04\x12\x04\
|
||||
\x1b\0\x1d\x01\n\n\n\x03\x04\x04\x01\x12\x03\x1b\x08\x13\n\x0b\n\x04\x04\
|
||||
\x04\x02\0\x12\x03\x1c\x04\x1b\n\x0c\n\x05\x04\x04\x02\0\x04\x12\x03\x1c\
|
||||
\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x06\x12\x03\x1c\r\x10\n\x0c\n\x05\x04\
|
||||
\x04\x02\0\x01\x12\x03\x1c\x11\x16\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\
|
||||
\x1c\x19\x1ab\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -182,13 +182,177 @@ impl ::protobuf::reflect::ProtobufValue for DeleteAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct DeleteAppParams {
|
||||
// message fields
|
||||
pub app_id: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a DeleteAppParams {
|
||||
fn default() -> &'a DeleteAppParams {
|
||||
<DeleteAppParams as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl DeleteAppParams {
|
||||
pub fn new() -> DeleteAppParams {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string app_id = 1;
|
||||
|
||||
|
||||
pub fn get_app_id(&self) -> &str {
|
||||
&self.app_id
|
||||
}
|
||||
pub fn clear_app_id(&mut self) {
|
||||
self.app_id.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_app_id(&mut self, v: ::std::string::String) {
|
||||
self.app_id = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.app_id
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_app_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.app_id, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for DeleteAppParams {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.app_id)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.app_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.app_id);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.app_id.is_empty() {
|
||||
os.write_string(1, &self.app_id)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> DeleteAppParams {
|
||||
DeleteAppParams::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"app_id",
|
||||
|m: &DeleteAppParams| { &m.app_id },
|
||||
|m: &mut DeleteAppParams| { &mut m.app_id },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<DeleteAppParams>(
|
||||
"DeleteAppParams",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static DeleteAppParams {
|
||||
static instance: ::protobuf::rt::LazyV2<DeleteAppParams> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(DeleteAppParams::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for DeleteAppParams {
|
||||
fn clear(&mut self) {
|
||||
self.app_id.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for DeleteAppParams {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for DeleteAppParams {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x10app_delete.proto\")\n\x10DeleteAppRequest\x12\x15\n\x06app_id\x18\
|
||||
\x01\x20\x01(\tR\x05appIdJa\n\x06\x12\x04\0\0\x04\x01\n\x08\n\x01\x0c\
|
||||
\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x04\0\
|
||||
\x01\x12\x03\x02\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x16\n\
|
||||
\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\
|
||||
\x12\x03\x03\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x14\x15b\
|
||||
\x01\x20\x01(\tR\x05appId\"(\n\x0fDeleteAppParams\x12\x15\n\x06app_id\
|
||||
\x18\x01\x20\x01(\tR\x05appIdJ\xb0\x01\n\x06\x12\x04\0\0\x07\x01\n\x08\n\
|
||||
\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\n\x03\
|
||||
\x04\0\x01\x12\x03\x02\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\
|
||||
\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\
|
||||
\0\x01\x12\x03\x03\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x14\
|
||||
\x15\n\n\n\x02\x04\x01\x12\x04\x05\0\x07\x01\n\n\n\x03\x04\x01\x01\x12\
|
||||
\x03\x05\x08\x17\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x06\x04\x16\n\x0c\n\
|
||||
\x05\x04\x01\x02\0\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\
|
||||
\x12\x03\x06\x0b\x11\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x06\x14\x15b\
|
||||
\x06proto3\
|
||||
";
|
||||
|
||||
|
@ -252,21 +252,262 @@ impl ::protobuf::reflect::ProtobufValue for QueryAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct QueryAppParams {
|
||||
// message fields
|
||||
pub app_id: ::std::string::String,
|
||||
pub read_belongings: bool,
|
||||
pub is_trash: bool,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a QueryAppParams {
|
||||
fn default() -> &'a QueryAppParams {
|
||||
<QueryAppParams as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl QueryAppParams {
|
||||
pub fn new() -> QueryAppParams {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string app_id = 1;
|
||||
|
||||
|
||||
pub fn get_app_id(&self) -> &str {
|
||||
&self.app_id
|
||||
}
|
||||
pub fn clear_app_id(&mut self) {
|
||||
self.app_id.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_app_id(&mut self, v: ::std::string::String) {
|
||||
self.app_id = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.app_id
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_app_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.app_id, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// bool read_belongings = 2;
|
||||
|
||||
|
||||
pub fn get_read_belongings(&self) -> bool {
|
||||
self.read_belongings
|
||||
}
|
||||
pub fn clear_read_belongings(&mut self) {
|
||||
self.read_belongings = false;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_read_belongings(&mut self, v: bool) {
|
||||
self.read_belongings = v;
|
||||
}
|
||||
|
||||
// bool is_trash = 3;
|
||||
|
||||
|
||||
pub fn get_is_trash(&self) -> bool {
|
||||
self.is_trash
|
||||
}
|
||||
pub fn clear_is_trash(&mut self) {
|
||||
self.is_trash = false;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_is_trash(&mut self, v: bool) {
|
||||
self.is_trash = v;
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for QueryAppParams {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.app_id)?;
|
||||
},
|
||||
2 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_bool()?;
|
||||
self.read_belongings = tmp;
|
||||
},
|
||||
3 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_bool()?;
|
||||
self.is_trash = tmp;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.app_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.app_id);
|
||||
}
|
||||
if self.read_belongings != false {
|
||||
my_size += 2;
|
||||
}
|
||||
if self.is_trash != false {
|
||||
my_size += 2;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.app_id.is_empty() {
|
||||
os.write_string(1, &self.app_id)?;
|
||||
}
|
||||
if self.read_belongings != false {
|
||||
os.write_bool(2, self.read_belongings)?;
|
||||
}
|
||||
if self.is_trash != false {
|
||||
os.write_bool(3, self.is_trash)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> QueryAppParams {
|
||||
QueryAppParams::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"app_id",
|
||||
|m: &QueryAppParams| { &m.app_id },
|
||||
|m: &mut QueryAppParams| { &mut m.app_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
|
||||
"read_belongings",
|
||||
|m: &QueryAppParams| { &m.read_belongings },
|
||||
|m: &mut QueryAppParams| { &mut m.read_belongings },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
|
||||
"is_trash",
|
||||
|m: &QueryAppParams| { &m.is_trash },
|
||||
|m: &mut QueryAppParams| { &mut m.is_trash },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryAppParams>(
|
||||
"QueryAppParams",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static QueryAppParams {
|
||||
static instance: ::protobuf::rt::LazyV2<QueryAppParams> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(QueryAppParams::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for QueryAppParams {
|
||||
fn clear(&mut self) {
|
||||
self.app_id.clear();
|
||||
self.read_belongings = false;
|
||||
self.is_trash = false;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for QueryAppParams {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for QueryAppParams {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x0fapp_query.proto\"l\n\x0fQueryAppRequest\x12\x15\n\x06app_id\x18\
|
||||
\x01\x20\x01(\tR\x05appId\x12'\n\x0fread_belongings\x18\x02\x20\x01(\x08\
|
||||
R\x0ereadBelongings\x12\x19\n\x08is_trash\x18\x03\x20\x01(\x08R\x07isTra\
|
||||
shJ\xcf\x01\n\x06\x12\x04\0\0\x06\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\
|
||||
\n\n\x02\x04\0\x12\x04\x02\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\
|
||||
\x17\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x16\n\x0c\n\x05\x04\0\x02\0\
|
||||
\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x11\n\
|
||||
\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x14\x15\n\x0b\n\x04\x04\0\x02\x01\
|
||||
\x12\x03\x04\x04\x1d\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\x08\n\
|
||||
\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\t\x18\n\x0c\n\x05\x04\0\x02\x01\
|
||||
\x03\x12\x03\x04\x1b\x1c\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x16\n\
|
||||
\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\x08\n\x0c\n\x05\x04\0\x02\
|
||||
\x02\x01\x12\x03\x05\t\x11\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x14\
|
||||
\x15b\x06proto3\
|
||||
sh\"k\n\x0eQueryAppParams\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05app\
|
||||
Id\x12'\n\x0fread_belongings\x18\x02\x20\x01(\x08R\x0ereadBelongings\x12\
|
||||
\x19\n\x08is_trash\x18\x03\x20\x01(\x08R\x07isTrashJ\x8c\x03\n\x06\x12\
|
||||
\x04\0\0\x0b\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\
|
||||
\x02\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x17\n\x0b\n\x04\x04\0\
|
||||
\x02\0\x12\x03\x03\x04\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\
|
||||
\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x11\n\x0c\n\x05\x04\0\x02\0\
|
||||
\x03\x12\x03\x03\x14\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x1d\n\
|
||||
\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\x08\n\x0c\n\x05\x04\0\x02\
|
||||
\x01\x01\x12\x03\x04\t\x18\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x1b\
|
||||
\x1c\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x16\n\x0c\n\x05\x04\0\x02\
|
||||
\x02\x05\x12\x03\x05\x04\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\t\
|
||||
\x11\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x14\x15\n\n\n\x02\x04\x01\
|
||||
\x12\x04\x07\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\x07\x08\x16\n\x0b\n\
|
||||
\x04\x04\x01\x02\0\x12\x03\x08\x04\x16\n\x0c\n\x05\x04\x01\x02\0\x05\x12\
|
||||
\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x08\x0b\x11\n\x0c\n\
|
||||
\x05\x04\x01\x02\0\x03\x12\x03\x08\x14\x15\n\x0b\n\x04\x04\x01\x02\x01\
|
||||
\x12\x03\t\x04\x1d\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\t\x04\x08\n\
|
||||
\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\t\x18\n\x0c\n\x05\x04\x01\x02\
|
||||
\x01\x03\x12\x03\t\x1b\x1c\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\n\x04\x16\
|
||||
\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\n\x04\x08\n\x0c\n\x05\x04\x01\
|
||||
\x02\x02\x01\x12\x03\n\t\x11\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\n\
|
||||
\x14\x15b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -572,6 +572,555 @@ impl ::protobuf::reflect::ProtobufValue for UpdateAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct UpdateAppParams {
|
||||
// message fields
|
||||
pub app_id: ::std::string::String,
|
||||
// message oneof groups
|
||||
pub one_of_workspace_id: ::std::option::Option<UpdateAppParams_oneof_one_of_workspace_id>,
|
||||
pub one_of_name: ::std::option::Option<UpdateAppParams_oneof_one_of_name>,
|
||||
pub one_of_desc: ::std::option::Option<UpdateAppParams_oneof_one_of_desc>,
|
||||
pub one_of_color_style: ::std::option::Option<UpdateAppParams_oneof_one_of_color_style>,
|
||||
pub one_of_is_trash: ::std::option::Option<UpdateAppParams_oneof_one_of_is_trash>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a UpdateAppParams {
|
||||
fn default() -> &'a UpdateAppParams {
|
||||
<UpdateAppParams as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppParams_oneof_one_of_workspace_id {
|
||||
workspace_id(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppParams_oneof_one_of_name {
|
||||
name(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppParams_oneof_one_of_desc {
|
||||
desc(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppParams_oneof_one_of_color_style {
|
||||
color_style(super::app_create::ColorStyle),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppParams_oneof_one_of_is_trash {
|
||||
is_trash(bool),
|
||||
}
|
||||
|
||||
impl UpdateAppParams {
|
||||
pub fn new() -> UpdateAppParams {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string app_id = 1;
|
||||
|
||||
|
||||
pub fn get_app_id(&self) -> &str {
|
||||
&self.app_id
|
||||
}
|
||||
pub fn clear_app_id(&mut self) {
|
||||
self.app_id.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_app_id(&mut self, v: ::std::string::String) {
|
||||
self.app_id = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_app_id(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.app_id
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_app_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.app_id, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string workspace_id = 2;
|
||||
|
||||
|
||||
pub fn get_workspace_id(&self) -> &str {
|
||||
match self.one_of_workspace_id {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
pub fn clear_workspace_id(&mut self) {
|
||||
self.one_of_workspace_id = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_workspace_id(&self) -> bool {
|
||||
match self.one_of_workspace_id {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_workspace_id(&mut self, v: ::std::string::String) {
|
||||
self.one_of_workspace_id = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(_)) = self.one_of_workspace_id {
|
||||
} else {
|
||||
self.one_of_workspace_id = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_workspace_id {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_workspace_id(&mut self) -> ::std::string::String {
|
||||
if self.has_workspace_id() {
|
||||
match self.one_of_workspace_id.take() {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::std::string::String::new()
|
||||
}
|
||||
}
|
||||
|
||||
// string name = 3;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
pub fn clear_name(&mut self) {
|
||||
self.one_of_name = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_name(&self) -> bool {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_name(&mut self, v: ::std::string::String) {
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_name(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(_)) = self.one_of_name {
|
||||
} else {
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
if self.has_name() {
|
||||
match self.one_of_name.take() {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::std::string::String::new()
|
||||
}
|
||||
}
|
||||
|
||||
// string desc = 4;
|
||||
|
||||
|
||||
pub fn get_desc(&self) -> &str {
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
pub fn clear_desc(&mut self) {
|
||||
self.one_of_desc = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_desc(&self) -> bool {
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_desc(&mut self, v: ::std::string::String) {
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_desc(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(_)) = self.one_of_desc {
|
||||
} else {
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_desc(&mut self) -> ::std::string::String {
|
||||
if self.has_desc() {
|
||||
match self.one_of_desc.take() {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::std::string::String::new()
|
||||
}
|
||||
}
|
||||
|
||||
// .ColorStyle color_style = 5;
|
||||
|
||||
|
||||
pub fn get_color_style(&self) -> &super::app_create::ColorStyle {
|
||||
match self.one_of_color_style {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) => v,
|
||||
_ => <super::app_create::ColorStyle as ::protobuf::Message>::default_instance(),
|
||||
}
|
||||
}
|
||||
pub fn clear_color_style(&mut self) {
|
||||
self.one_of_color_style = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_color_style(&self) -> bool {
|
||||
match self.one_of_color_style {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_color_style(&mut self, v: super::app_create::ColorStyle) {
|
||||
self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_color_style(&mut self) -> &mut super::app_create::ColorStyle {
|
||||
if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style {
|
||||
} else {
|
||||
self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(super::app_create::ColorStyle::new()));
|
||||
}
|
||||
match self.one_of_color_style {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_color_style(&mut self) -> super::app_create::ColorStyle {
|
||||
if self.has_color_style() {
|
||||
match self.one_of_color_style.take() {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
super::app_create::ColorStyle::new()
|
||||
}
|
||||
}
|
||||
|
||||
// bool is_trash = 6;
|
||||
|
||||
|
||||
pub fn get_is_trash(&self) -> bool {
|
||||
match self.one_of_is_trash {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v)) => v,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
pub fn clear_is_trash(&mut self) {
|
||||
self.one_of_is_trash = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_is_trash(&self) -> bool {
|
||||
match self.one_of_is_trash {
|
||||
::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_is_trash(&mut self, v: bool) {
|
||||
self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v))
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for UpdateAppParams {
|
||||
fn is_initialized(&self) -> bool {
|
||||
if let Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.app_id)?;
|
||||
},
|
||||
2 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.one_of_workspace_id = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_workspace_id::workspace_id(is.read_string()?));
|
||||
},
|
||||
3 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(is.read_string()?));
|
||||
},
|
||||
4 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(is.read_string()?));
|
||||
},
|
||||
5 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(is.read_message()?));
|
||||
},
|
||||
6 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(is.read_bool()?));
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.app_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.app_id);
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_workspace_id {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_workspace_id::workspace_id(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(2, &v);
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_name::name(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(3, &v);
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_desc {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_desc::desc(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(4, &v);
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_color_style {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => {
|
||||
my_size += 2;
|
||||
},
|
||||
};
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.app_id.is_empty() {
|
||||
os.write_string(1, &self.app_id)?;
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_workspace_id {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_workspace_id::workspace_id(ref v) => {
|
||||
os.write_string(2, v)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_name::name(ref v) => {
|
||||
os.write_string(3, v)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_desc {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_desc::desc(ref v) => {
|
||||
os.write_string(4, v)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_color_style {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => {
|
||||
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
|
||||
match v {
|
||||
&UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => {
|
||||
os.write_bool(6, v)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> UpdateAppParams {
|
||||
UpdateAppParams::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"app_id",
|
||||
|m: &UpdateAppParams| { &m.app_id },
|
||||
|m: &mut UpdateAppParams| { &mut m.app_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"workspace_id",
|
||||
UpdateAppParams::has_workspace_id,
|
||||
UpdateAppParams::get_workspace_id,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"name",
|
||||
UpdateAppParams::has_name,
|
||||
UpdateAppParams::get_name,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"desc",
|
||||
UpdateAppParams::has_desc,
|
||||
UpdateAppParams::get_desc,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::app_create::ColorStyle>(
|
||||
"color_style",
|
||||
UpdateAppParams::has_color_style,
|
||||
UpdateAppParams::get_color_style,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
|
||||
"is_trash",
|
||||
UpdateAppParams::has_is_trash,
|
||||
UpdateAppParams::get_is_trash,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateAppParams>(
|
||||
"UpdateAppParams",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static UpdateAppParams {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateAppParams> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateAppParams::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for UpdateAppParams {
|
||||
fn clear(&mut self) {
|
||||
self.app_id.clear();
|
||||
self.one_of_workspace_id = ::std::option::Option::None;
|
||||
self.one_of_name = ::std::option::Option::None;
|
||||
self.one_of_desc = ::std::option::Option::None;
|
||||
self.one_of_color_style = ::std::option::Option::None;
|
||||
self.one_of_is_trash = ::std::option::Option::None;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for UpdateAppParams {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateAppParams {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x10app_update.proto\x1a\x10app_create.proto\"\xa5\x02\n\x10UpdateAppR\
|
||||
equest\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05appId\x12#\n\x0cworksp\
|
||||
@ -580,32 +1129,63 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
desc\x12.\n\x0bcolor_style\x18\x05\x20\x01(\x0b2\x0b.ColorStyleH\x03R\nc\
|
||||
olorStyle\x12\x1b\n\x08is_trash\x18\x06\x20\x01(\x08H\x04R\x07isTrashB\
|
||||
\x15\n\x13one_of_workspace_idB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\
|
||||
\x14\n\x12one_of_color_styleB\x11\n\x0fone_of_is_trashJ\x86\x04\n\x06\
|
||||
\x12\x04\0\0\n\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\
|
||||
\x03\x01\0\x1a\n\n\n\x02\x04\0\x12\x04\x03\0\n\x01\n\n\n\x03\x04\0\x01\
|
||||
\x12\x03\x03\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x16\n\x0c\n\
|
||||
\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\
|
||||
\x03\x04\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x04\x14\x15\n\x0b\n\
|
||||
\x04\x04\0\x08\0\x12\x03\x05\x04:\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03\
|
||||
\x05\n\x1d\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x208\n\x0c\n\x05\x04\0\
|
||||
\x02\x01\x05\x12\x03\x05\x20&\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x05'\
|
||||
3\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x0567\n\x0b\n\x04\x04\0\x08\x01\
|
||||
\x12\x03\x06\x04*\n\x0c\n\x05\x04\0\x08\x01\x01\x12\x03\x06\n\x15\n\x0b\
|
||||
\n\x04\x04\0\x02\x02\x12\x03\x06\x18(\n\x0c\n\x05\x04\0\x02\x02\x05\x12\
|
||||
\x03\x06\x18\x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x06\x1f#\n\x0c\n\
|
||||
\x05\x04\0\x02\x02\x03\x12\x03\x06&'\n\x0b\n\x04\x04\0\x08\x02\x12\x03\
|
||||
\x07\x04*\n\x0c\n\x05\x04\0\x08\x02\x01\x12\x03\x07\n\x15\n\x0b\n\x04\
|
||||
\x04\0\x02\x03\x12\x03\x07\x18(\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\
|
||||
\x07\x18\x1e\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x07\x1f#\n\x0c\n\x05\
|
||||
\x04\0\x02\x03\x03\x12\x03\x07&'\n\x0b\n\x04\x04\0\x08\x03\x12\x03\x08\
|
||||
\x04<\n\x0c\n\x05\x04\0\x08\x03\x01\x12\x03\x08\n\x1c\n\x0b\n\x04\x04\0\
|
||||
\x02\x04\x12\x03\x08\x1f:\n\x0c\n\x05\x04\0\x02\x04\x06\x12\x03\x08\x1f)\
|
||||
\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x08*5\n\x0c\n\x05\x04\0\x02\x04\
|
||||
\x03\x12\x03\x0889\n\x0b\n\x04\x04\0\x08\x04\x12\x03\t\x040\n\x0c\n\x05\
|
||||
\x04\0\x08\x04\x01\x12\x03\t\n\x19\n\x0b\n\x04\x04\0\x02\x05\x12\x03\t\
|
||||
\x1c.\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\t\x1c\x20\n\x0c\n\x05\x04\0\
|
||||
\x02\x05\x01\x12\x03\t!)\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\t,-b\x06p\
|
||||
roto3\
|
||||
\x14\n\x12one_of_color_styleB\x11\n\x0fone_of_is_trash\"\xa4\x02\n\x0fUp\
|
||||
dateAppParams\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05appId\x12#\n\
|
||||
\x0cworkspace_id\x18\x02\x20\x01(\tH\0R\x0bworkspaceId\x12\x14\n\x04name\
|
||||
\x18\x03\x20\x01(\tH\x01R\x04name\x12\x14\n\x04desc\x18\x04\x20\x01(\tH\
|
||||
\x02R\x04desc\x12.\n\x0bcolor_style\x18\x05\x20\x01(\x0b2\x0b.ColorStyle\
|
||||
H\x03R\ncolorStyle\x12\x1b\n\x08is_trash\x18\x06\x20\x01(\x08H\x04R\x07i\
|
||||
sTrashB\x15\n\x13one_of_workspace_idB\r\n\x0bone_of_nameB\r\n\x0bone_of_\
|
||||
descB\x14\n\x12one_of_color_styleB\x11\n\x0fone_of_is_trashJ\xef\x07\n\
|
||||
\x06\x12\x04\0\0\x12\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\
|
||||
\x12\x03\x01\0\x1a\n\n\n\x02\x04\0\x12\x04\x03\0\n\x01\n\n\n\x03\x04\0\
|
||||
\x01\x12\x03\x03\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x16\n\
|
||||
\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\
|
||||
\x12\x03\x04\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x04\x14\x15\n\
|
||||
\x0b\n\x04\x04\0\x08\0\x12\x03\x05\x04:\n\x0c\n\x05\x04\0\x08\0\x01\x12\
|
||||
\x03\x05\n\x1d\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x208\n\x0c\n\x05\
|
||||
\x04\0\x02\x01\x05\x12\x03\x05\x20&\n\x0c\n\x05\x04\0\x02\x01\x01\x12\
|
||||
\x03\x05'3\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x0567\n\x0b\n\x04\x04\0\
|
||||
\x08\x01\x12\x03\x06\x04*\n\x0c\n\x05\x04\0\x08\x01\x01\x12\x03\x06\n\
|
||||
\x15\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x06\x18(\n\x0c\n\x05\x04\0\x02\
|
||||
\x02\x05\x12\x03\x06\x18\x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x06\
|
||||
\x1f#\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x06&'\n\x0b\n\x04\x04\0\x08\
|
||||
\x02\x12\x03\x07\x04*\n\x0c\n\x05\x04\0\x08\x02\x01\x12\x03\x07\n\x15\n\
|
||||
\x0b\n\x04\x04\0\x02\x03\x12\x03\x07\x18(\n\x0c\n\x05\x04\0\x02\x03\x05\
|
||||
\x12\x03\x07\x18\x1e\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x07\x1f#\n\
|
||||
\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x07&'\n\x0b\n\x04\x04\0\x08\x03\x12\
|
||||
\x03\x08\x04<\n\x0c\n\x05\x04\0\x08\x03\x01\x12\x03\x08\n\x1c\n\x0b\n\
|
||||
\x04\x04\0\x02\x04\x12\x03\x08\x1f:\n\x0c\n\x05\x04\0\x02\x04\x06\x12\
|
||||
\x03\x08\x1f)\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x08*5\n\x0c\n\x05\
|
||||
\x04\0\x02\x04\x03\x12\x03\x0889\n\x0b\n\x04\x04\0\x08\x04\x12\x03\t\x04\
|
||||
0\n\x0c\n\x05\x04\0\x08\x04\x01\x12\x03\t\n\x19\n\x0b\n\x04\x04\0\x02\
|
||||
\x05\x12\x03\t\x1c.\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\t\x1c\x20\n\
|
||||
\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\t!)\n\x0c\n\x05\x04\0\x02\x05\x03\
|
||||
\x12\x03\t,-\n\n\n\x02\x04\x01\x12\x04\x0b\0\x12\x01\n\n\n\x03\x04\x01\
|
||||
\x01\x12\x03\x0b\x08\x17\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x0c\x04\x16\n\
|
||||
\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x0c\x04\n\n\x0c\n\x05\x04\x01\x02\0\
|
||||
\x01\x12\x03\x0c\x0b\x11\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0c\x14\
|
||||
\x15\n\x0b\n\x04\x04\x01\x08\0\x12\x03\r\x04:\n\x0c\n\x05\x04\x01\x08\0\
|
||||
\x01\x12\x03\r\n\x1d\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\r\x208\n\x0c\n\
|
||||
\x05\x04\x01\x02\x01\x05\x12\x03\r\x20&\n\x0c\n\x05\x04\x01\x02\x01\x01\
|
||||
\x12\x03\r'3\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\r67\n\x0b\n\x04\x04\
|
||||
\x01\x08\x01\x12\x03\x0e\x04*\n\x0c\n\x05\x04\x01\x08\x01\x01\x12\x03\
|
||||
\x0e\n\x15\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x0e\x18(\n\x0c\n\x05\x04\
|
||||
\x01\x02\x02\x05\x12\x03\x0e\x18\x1e\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\
|
||||
\x03\x0e\x1f#\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x0e&'\n\x0b\n\x04\
|
||||
\x04\x01\x08\x02\x12\x03\x0f\x04*\n\x0c\n\x05\x04\x01\x08\x02\x01\x12\
|
||||
\x03\x0f\n\x15\n\x0b\n\x04\x04\x01\x02\x03\x12\x03\x0f\x18(\n\x0c\n\x05\
|
||||
\x04\x01\x02\x03\x05\x12\x03\x0f\x18\x1e\n\x0c\n\x05\x04\x01\x02\x03\x01\
|
||||
\x12\x03\x0f\x1f#\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x0f&'\n\x0b\n\
|
||||
\x04\x04\x01\x08\x03\x12\x03\x10\x04<\n\x0c\n\x05\x04\x01\x08\x03\x01\
|
||||
\x12\x03\x10\n\x1c\n\x0b\n\x04\x04\x01\x02\x04\x12\x03\x10\x1f:\n\x0c\n\
|
||||
\x05\x04\x01\x02\x04\x06\x12\x03\x10\x1f)\n\x0c\n\x05\x04\x01\x02\x04\
|
||||
\x01\x12\x03\x10*5\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03\x1089\n\x0b\n\
|
||||
\x04\x04\x01\x08\x04\x12\x03\x11\x040\n\x0c\n\x05\x04\x01\x08\x04\x01\
|
||||
\x12\x03\x11\n\x19\n\x0b\n\x04\x04\x01\x02\x05\x12\x03\x11\x1c.\n\x0c\n\
|
||||
\x05\x04\x01\x02\x05\x05\x12\x03\x11\x1c\x20\n\x0c\n\x05\x04\x01\x02\x05\
|
||||
\x01\x12\x03\x11!)\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03\x11,-b\x06pro\
|
||||
to3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -219,6 +219,7 @@ pub enum WsErrCode {
|
||||
WorkspaceNameInvalid = 1,
|
||||
WorkspaceIdInvalid = 2,
|
||||
AppColorStyleInvalid = 3,
|
||||
WorkspaceDescInvalid = 4,
|
||||
AppIdInvalid = 10,
|
||||
AppNameInvalid = 11,
|
||||
ViewNameInvalid = 20,
|
||||
@ -230,6 +231,7 @@ pub enum WsErrCode {
|
||||
UserInternalError = 102,
|
||||
UserNotLoginYet = 103,
|
||||
ServerError = 1000,
|
||||
RecordNotFound = 1001,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for WsErrCode {
|
||||
@ -243,6 +245,7 @@ impl ::protobuf::ProtobufEnum for WsErrCode {
|
||||
1 => ::std::option::Option::Some(WsErrCode::WorkspaceNameInvalid),
|
||||
2 => ::std::option::Option::Some(WsErrCode::WorkspaceIdInvalid),
|
||||
3 => ::std::option::Option::Some(WsErrCode::AppColorStyleInvalid),
|
||||
4 => ::std::option::Option::Some(WsErrCode::WorkspaceDescInvalid),
|
||||
10 => ::std::option::Option::Some(WsErrCode::AppIdInvalid),
|
||||
11 => ::std::option::Option::Some(WsErrCode::AppNameInvalid),
|
||||
20 => ::std::option::Option::Some(WsErrCode::ViewNameInvalid),
|
||||
@ -254,6 +257,7 @@ impl ::protobuf::ProtobufEnum for WsErrCode {
|
||||
102 => ::std::option::Option::Some(WsErrCode::UserInternalError),
|
||||
103 => ::std::option::Option::Some(WsErrCode::UserNotLoginYet),
|
||||
1000 => ::std::option::Option::Some(WsErrCode::ServerError),
|
||||
1001 => ::std::option::Option::Some(WsErrCode::RecordNotFound),
|
||||
_ => ::std::option::Option::None
|
||||
}
|
||||
}
|
||||
@ -264,6 +268,7 @@ impl ::protobuf::ProtobufEnum for WsErrCode {
|
||||
WsErrCode::WorkspaceNameInvalid,
|
||||
WsErrCode::WorkspaceIdInvalid,
|
||||
WsErrCode::AppColorStyleInvalid,
|
||||
WsErrCode::WorkspaceDescInvalid,
|
||||
WsErrCode::AppIdInvalid,
|
||||
WsErrCode::AppNameInvalid,
|
||||
WsErrCode::ViewNameInvalid,
|
||||
@ -275,6 +280,7 @@ impl ::protobuf::ProtobufEnum for WsErrCode {
|
||||
WsErrCode::UserInternalError,
|
||||
WsErrCode::UserNotLoginYet,
|
||||
WsErrCode::ServerError,
|
||||
WsErrCode::RecordNotFound,
|
||||
];
|
||||
values
|
||||
}
|
||||
@ -305,53 +311,59 @@ impl ::protobuf::reflect::ProtobufValue for WsErrCode {
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x0cerrors.proto\"B\n\x0eWorkspaceError\x12\x1e\n\x04code\x18\x01\x20\
|
||||
\x01(\x0e2\n.WsErrCodeR\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03\
|
||||
msg*\xd7\x02\n\tWsErrCode\x12\x0b\n\x07Unknown\x10\0\x12\x18\n\x14Worksp\
|
||||
msg*\x86\x03\n\tWsErrCode\x12\x0b\n\x07Unknown\x10\0\x12\x18\n\x14Worksp\
|
||||
aceNameInvalid\x10\x01\x12\x16\n\x12WorkspaceIdInvalid\x10\x02\x12\x18\n\
|
||||
\x14AppColorStyleInvalid\x10\x03\x12\x10\n\x0cAppIdInvalid\x10\n\x12\x12\
|
||||
\n\x0eAppNameInvalid\x10\x0b\x12\x13\n\x0fViewNameInvalid\x10\x14\x12\
|
||||
\x18\n\x14ViewThumbnailInvalid\x10\x15\x12\x11\n\rViewIdInvalid\x10\x16\
|
||||
\x12\x13\n\x0fViewDescInvalid\x10\x17\x12\x1a\n\x16DatabaseConnectionFai\
|
||||
l\x10d\x12\x1a\n\x16WorkspaceDatabaseError\x10e\x12\x15\n\x11UserInterna\
|
||||
lError\x10f\x12\x13\n\x0fUserNotLoginYet\x10g\x12\x10\n\x0bServerError\
|
||||
\x10\xe8\x07J\x97\x06\n\x06\x12\x04\0\0\x16\x01\n\x08\n\x01\x0c\x12\x03\
|
||||
\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\x03\x04\0\x01\x12\
|
||||
\x03\x02\x08\x16\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x17\n\x0c\n\x05\
|
||||
\x04\0\x02\0\x06\x12\x03\x03\x04\r\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\
|
||||
\x03\x0e\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x15\x16\n\x0b\n\x04\
|
||||
\x04\0\x02\x01\x12\x03\x04\x04\x13\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\
|
||||
\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x0b\x0e\n\x0c\n\x05\
|
||||
\x04\0\x02\x01\x03\x12\x03\x04\x11\x12\n\n\n\x02\x05\0\x12\x04\x06\0\x16\
|
||||
\x01\n\n\n\x03\x05\0\x01\x12\x03\x06\x05\x0e\n\x0b\n\x04\x05\0\x02\0\x12\
|
||||
\x03\x07\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x07\x04\x0b\n\x0c\n\
|
||||
\x05\x05\0\x02\0\x02\x12\x03\x07\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\
|
||||
\x03\x08\x04\x1d\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x08\x04\x18\n\x0c\
|
||||
\n\x05\x05\0\x02\x01\x02\x12\x03\x08\x1b\x1c\n\x0b\n\x04\x05\0\x02\x02\
|
||||
\x12\x03\t\x04\x1b\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\t\x04\x16\n\x0c\
|
||||
\n\x05\x05\0\x02\x02\x02\x12\x03\t\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\x12\
|
||||
\x03\n\x04\x1d\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\n\x04\x18\n\x0c\n\
|
||||
\x05\x05\0\x02\x03\x02\x12\x03\n\x1b\x1c\n\x0b\n\x04\x05\0\x02\x04\x12\
|
||||
\x03\x0b\x04\x16\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x0b\x04\x10\n\x0c\
|
||||
\n\x05\x05\0\x02\x04\x02\x12\x03\x0b\x13\x15\n\x0b\n\x04\x05\0\x02\x05\
|
||||
\x12\x03\x0c\x04\x18\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\x0c\x04\x12\n\
|
||||
\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x0c\x15\x17\n\x0b\n\x04\x05\0\x02\
|
||||
\x06\x12\x03\r\x04\x19\n\x0c\n\x05\x05\0\x02\x06\x01\x12\x03\r\x04\x13\n\
|
||||
\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\r\x16\x18\n\x0b\n\x04\x05\0\x02\x07\
|
||||
\x12\x03\x0e\x04\x1e\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03\x0e\x04\x18\n\
|
||||
\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\x0e\x1b\x1d\n\x0b\n\x04\x05\0\x02\
|
||||
\x08\x12\x03\x0f\x04\x17\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03\x0f\x04\
|
||||
\x11\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0f\x14\x16\n\x0b\n\x04\x05\0\
|
||||
\x02\t\x12\x03\x10\x04\x19\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03\x10\x04\
|
||||
\x13\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x10\x16\x18\n\x0b\n\x04\x05\0\
|
||||
\x02\n\x12\x03\x11\x04!\n\x0c\n\x05\x05\0\x02\n\x01\x12\x03\x11\x04\x1a\
|
||||
\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\x11\x1d\x20\n\x0b\n\x04\x05\0\x02\
|
||||
\x0b\x12\x03\x12\x04!\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\x12\x04\x1a\
|
||||
\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x12\x1d\x20\n\x0b\n\x04\x05\0\x02\
|
||||
\x0c\x12\x03\x13\x04\x1c\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\x03\x13\x04\
|
||||
\x15\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x13\x18\x1b\n\x0b\n\x04\x05\0\
|
||||
\x02\r\x12\x03\x14\x04\x1a\n\x0c\n\x05\x05\0\x02\r\x01\x12\x03\x14\x04\
|
||||
\x13\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x14\x16\x19\n\x0b\n\x04\x05\0\
|
||||
\x02\x0e\x12\x03\x15\x04\x17\n\x0c\n\x05\x05\0\x02\x0e\x01\x12\x03\x15\
|
||||
\x04\x0f\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\x15\x12\x16b\x06proto3\
|
||||
\x14AppColorStyleInvalid\x10\x03\x12\x18\n\x14WorkspaceDescInvalid\x10\
|
||||
\x04\x12\x10\n\x0cAppIdInvalid\x10\n\x12\x12\n\x0eAppNameInvalid\x10\x0b\
|
||||
\x12\x13\n\x0fViewNameInvalid\x10\x14\x12\x18\n\x14ViewThumbnailInvalid\
|
||||
\x10\x15\x12\x11\n\rViewIdInvalid\x10\x16\x12\x13\n\x0fViewDescInvalid\
|
||||
\x10\x17\x12\x1a\n\x16DatabaseConnectionFail\x10d\x12\x1a\n\x16Workspace\
|
||||
DatabaseError\x10e\x12\x15\n\x11UserInternalError\x10f\x12\x13\n\x0fUser\
|
||||
NotLoginYet\x10g\x12\x10\n\x0bServerError\x10\xe8\x07\x12\x13\n\x0eRecor\
|
||||
dNotFound\x10\xe9\x07J\xe9\x06\n\x06\x12\x04\0\0\x18\x01\n\x08\n\x01\x0c\
|
||||
\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\x03\x04\0\
|
||||
\x01\x12\x03\x02\x08\x16\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x17\n\
|
||||
\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x03\x04\r\n\x0c\n\x05\x04\0\x02\0\x01\
|
||||
\x12\x03\x03\x0e\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x15\x16\n\
|
||||
\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x13\n\x0c\n\x05\x04\0\x02\x01\
|
||||
\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x0b\x0e\
|
||||
\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x11\x12\n\n\n\x02\x05\0\x12\
|
||||
\x04\x06\0\x18\x01\n\n\n\x03\x05\0\x01\x12\x03\x06\x05\x0e\n\x0b\n\x04\
|
||||
\x05\0\x02\0\x12\x03\x07\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x07\
|
||||
\x04\x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x07\x0e\x0f\n\x0b\n\x04\x05\
|
||||
\0\x02\x01\x12\x03\x08\x04\x1d\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x08\
|
||||
\x04\x18\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x08\x1b\x1c\n\x0b\n\x04\
|
||||
\x05\0\x02\x02\x12\x03\t\x04\x1b\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\t\
|
||||
\x04\x16\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\t\x19\x1a\n\x0b\n\x04\x05\
|
||||
\0\x02\x03\x12\x03\n\x04\x1d\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\n\x04\
|
||||
\x18\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\n\x1b\x1c\n\x0b\n\x04\x05\0\
|
||||
\x02\x04\x12\x03\x0b\x04\x1d\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x0b\
|
||||
\x04\x18\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x0b\x1b\x1c\n\x0b\n\x04\
|
||||
\x05\0\x02\x05\x12\x03\x0c\x04\x16\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\
|
||||
\x0c\x04\x10\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x0c\x13\x15\n\x0b\n\
|
||||
\x04\x05\0\x02\x06\x12\x03\r\x04\x18\n\x0c\n\x05\x05\0\x02\x06\x01\x12\
|
||||
\x03\r\x04\x12\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\r\x15\x17\n\x0b\n\
|
||||
\x04\x05\0\x02\x07\x12\x03\x0e\x04\x19\n\x0c\n\x05\x05\0\x02\x07\x01\x12\
|
||||
\x03\x0e\x04\x13\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\x0e\x16\x18\n\x0b\
|
||||
\n\x04\x05\0\x02\x08\x12\x03\x0f\x04\x1e\n\x0c\n\x05\x05\0\x02\x08\x01\
|
||||
\x12\x03\x0f\x04\x18\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0f\x1b\x1d\n\
|
||||
\x0b\n\x04\x05\0\x02\t\x12\x03\x10\x04\x17\n\x0c\n\x05\x05\0\x02\t\x01\
|
||||
\x12\x03\x10\x04\x11\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x10\x14\x16\n\
|
||||
\x0b\n\x04\x05\0\x02\n\x12\x03\x11\x04\x19\n\x0c\n\x05\x05\0\x02\n\x01\
|
||||
\x12\x03\x11\x04\x13\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\x11\x16\x18\n\
|
||||
\x0b\n\x04\x05\0\x02\x0b\x12\x03\x12\x04!\n\x0c\n\x05\x05\0\x02\x0b\x01\
|
||||
\x12\x03\x12\x04\x1a\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x12\x1d\x20\n\
|
||||
\x0b\n\x04\x05\0\x02\x0c\x12\x03\x13\x04!\n\x0c\n\x05\x05\0\x02\x0c\x01\
|
||||
\x12\x03\x13\x04\x1a\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x13\x1d\x20\n\
|
||||
\x0b\n\x04\x05\0\x02\r\x12\x03\x14\x04\x1c\n\x0c\n\x05\x05\0\x02\r\x01\
|
||||
\x12\x03\x14\x04\x15\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x14\x18\x1b\n\
|
||||
\x0b\n\x04\x05\0\x02\x0e\x12\x03\x15\x04\x1a\n\x0c\n\x05\x05\0\x02\x0e\
|
||||
\x01\x12\x03\x15\x04\x13\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\x15\x16\
|
||||
\x19\n\x0b\n\x04\x05\0\x02\x0f\x12\x03\x16\x04\x17\n\x0c\n\x05\x05\0\x02\
|
||||
\x0f\x01\x12\x03\x16\x04\x0f\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\x03\x16\
|
||||
\x12\x16\n\x0b\n\x04\x05\0\x02\x10\x12\x03\x17\x04\x1a\n\x0c\n\x05\x05\0\
|
||||
\x02\x10\x01\x12\x03\x17\x04\x12\n\x0c\n\x05\x05\0\x02\x10\x02\x12\x03\
|
||||
\x17\x15\x19b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -229,8 +229,7 @@ pub struct CreateWorkspaceParams {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub desc: ::std::string::String,
|
||||
// message oneof groups
|
||||
pub one_of_user_id: ::std::option::Option<CreateWorkspaceParams_oneof_one_of_user_id>,
|
||||
pub user_id: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
@ -242,11 +241,6 @@ impl<'a> ::std::default::Default for &'a CreateWorkspaceParams {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum CreateWorkspaceParams_oneof_one_of_user_id {
|
||||
user_id(::std::string::String),
|
||||
}
|
||||
|
||||
impl CreateWorkspaceParams {
|
||||
pub fn new() -> CreateWorkspaceParams {
|
||||
::std::default::Default::default()
|
||||
@ -308,49 +302,26 @@ impl CreateWorkspaceParams {
|
||||
|
||||
|
||||
pub fn get_user_id(&self) -> &str {
|
||||
match self.one_of_user_id {
|
||||
::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
&self.user_id
|
||||
}
|
||||
pub fn clear_user_id(&mut self) {
|
||||
self.one_of_user_id = ::std::option::Option::None;
|
||||
}
|
||||
|
||||
pub fn has_user_id(&self) -> bool {
|
||||
match self.one_of_user_id {
|
||||
::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
self.user_id.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_user_id(&mut self, v: ::std::string::String) {
|
||||
self.one_of_user_id = ::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(v))
|
||||
self.user_id = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_user_id(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(_)) = self.one_of_user_id {
|
||||
} else {
|
||||
self.one_of_user_id = ::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_user_id {
|
||||
::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
&mut self.user_id
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_user_id(&mut self) -> ::std::string::String {
|
||||
if self.has_user_id() {
|
||||
match self.one_of_user_id.take() {
|
||||
::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
::std::string::String::new()
|
||||
}
|
||||
::std::mem::replace(&mut self.user_id, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
@ -370,10 +341,7 @@ impl ::protobuf::Message for CreateWorkspaceParams {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
|
||||
},
|
||||
3 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
self.one_of_user_id = ::std::option::Option::Some(CreateWorkspaceParams_oneof_one_of_user_id::user_id(is.read_string()?));
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_id)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -393,12 +361,8 @@ impl ::protobuf::Message for CreateWorkspaceParams {
|
||||
if !self.desc.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(2, &self.desc);
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_user_id {
|
||||
match v {
|
||||
&CreateWorkspaceParams_oneof_one_of_user_id::user_id(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(3, &v);
|
||||
},
|
||||
};
|
||||
if !self.user_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(3, &self.user_id);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
@ -412,12 +376,8 @@ impl ::protobuf::Message for CreateWorkspaceParams {
|
||||
if !self.desc.is_empty() {
|
||||
os.write_string(2, &self.desc)?;
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_user_id {
|
||||
match v {
|
||||
&CreateWorkspaceParams_oneof_one_of_user_id::user_id(ref v) => {
|
||||
os.write_string(3, v)?;
|
||||
},
|
||||
};
|
||||
if !self.user_id.is_empty() {
|
||||
os.write_string(3, &self.user_id)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
@ -467,10 +427,10 @@ impl ::protobuf::Message for CreateWorkspaceParams {
|
||||
|m: &CreateWorkspaceParams| { &m.desc },
|
||||
|m: &mut CreateWorkspaceParams| { &mut m.desc },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"user_id",
|
||||
CreateWorkspaceParams::has_user_id,
|
||||
CreateWorkspaceParams::get_user_id,
|
||||
|m: &CreateWorkspaceParams| { &m.user_id },
|
||||
|m: &mut CreateWorkspaceParams| { &mut m.user_id },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspaceParams>(
|
||||
"CreateWorkspaceParams",
|
||||
@ -490,7 +450,7 @@ impl ::protobuf::Clear for CreateWorkspaceParams {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.desc.clear();
|
||||
self.one_of_user_id = ::std::option::Option::None;
|
||||
self.user_id.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
@ -976,49 +936,48 @@ impl ::protobuf::reflect::ProtobufValue for Workspaces {
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x16workspace_create.proto\x1a\x10app_create.proto\"@\n\x16CreateWorks\
|
||||
paceRequest\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04d\
|
||||
esc\x18\x02\x20\x01(\tR\x04desc\"l\n\x15CreateWorkspaceParams\x12\x12\n\
|
||||
esc\x18\x02\x20\x01(\tR\x04desc\"X\n\x15CreateWorkspaceParams\x12\x12\n\
|
||||
\x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x02\x20\x01(\
|
||||
\tR\x04desc\x12\x19\n\x07user_id\x18\x03\x20\x01(\tH\0R\x06userIdB\x10\n\
|
||||
\x0eone_of_user_id\"e\n\tWorkspace\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\
|
||||
\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\
|
||||
\x18\x03\x20\x01(\tR\x04desc\x12\x20\n\x04apps\x18\x04\x20\x01(\x0b2\x0c\
|
||||
.RepeatedAppR\x04apps\".\n\nWorkspaces\x12\x20\n\x05items\x18\x01\x20\
|
||||
\x03(\x0b2\n.WorkspaceR\x05itemsJ\xcc\x05\n\x06\x12\x04\0\0\x14\x01\n\
|
||||
\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x1a\n\n\n\
|
||||
\x02\x04\0\x12\x04\x03\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x1e\
|
||||
\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x14\n\x0c\n\x05\x04\0\x02\0\x05\
|
||||
\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x0f\n\x0c\
|
||||
\n\x05\x04\0\x02\0\x03\x12\x03\x04\x12\x13\n\x0b\n\x04\x04\0\x02\x01\x12\
|
||||
\x03\x05\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\
|
||||
\x05\x04\0\x02\x01\x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\
|
||||
\x12\x03\x05\x12\x13\n\n\n\x02\x04\x01\x12\x04\x07\0\x0b\x01\n\n\n\x03\
|
||||
\x04\x01\x01\x12\x03\x07\x08\x1d\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\
|
||||
\x04\x14\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\
|
||||
\x01\x02\0\x01\x12\x03\x08\x0b\x0f\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\
|
||||
\x08\x12\x13\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\t\x04\x14\n\x0c\n\x05\
|
||||
\x04\x01\x02\x01\x05\x12\x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\
|
||||
\x03\t\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\t\x12\x13\n\x0b\n\
|
||||
\x04\x04\x01\x08\0\x12\x03\n\x040\n\x0c\n\x05\x04\x01\x08\0\x01\x12\x03\
|
||||
\n\n\x18\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\n\x1b.\n\x0c\n\x05\x04\x01\
|
||||
\x02\x02\x05\x12\x03\n\x1b!\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\n\")\
|
||||
\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\n,-\n\n\n\x02\x04\x02\x12\x04\
|
||||
\x0c\0\x11\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0c\x08\x11\n\x0b\n\x04\x04\
|
||||
\x02\x02\0\x12\x03\r\x04\x12\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\r\x04\
|
||||
\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\r\x0b\r\n\x0c\n\x05\x04\x02\x02\
|
||||
\0\x03\x12\x03\r\x10\x11\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x0e\x04\x14\
|
||||
\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\
|
||||
\x02\x01\x01\x12\x03\x0e\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\
|
||||
\x0e\x12\x13\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\x0f\x04\x14\n\x0c\n\x05\
|
||||
\x04\x02\x02\x02\x05\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\
|
||||
\x12\x03\x0f\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0f\x12\x13\
|
||||
\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\x10\x04\x19\n\x0c\n\x05\x04\x02\x02\
|
||||
\x03\x06\x12\x03\x10\x04\x0f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x10\
|
||||
\x10\x14\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03\x10\x17\x18\n\n\n\x02\
|
||||
\x04\x03\x12\x04\x12\0\x14\x01\n\n\n\x03\x04\x03\x01\x12\x03\x12\x08\x12\
|
||||
\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x13\x04!\n\x0c\n\x05\x04\x03\x02\0\
|
||||
\x04\x12\x03\x13\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03\x13\r\x16\
|
||||
\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x13\x17\x1c\n\x0c\n\x05\x04\x03\
|
||||
\x02\0\x03\x12\x03\x13\x1f\x20b\x06proto3\
|
||||
\tR\x04desc\x12\x17\n\x07user_id\x18\x03\x20\x01(\tR\x06userId\"e\n\tWor\
|
||||
kspace\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\
|
||||
\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\
|
||||
\x12\x20\n\x04apps\x18\x04\x20\x01(\x0b2\x0c.RepeatedAppR\x04apps\".\n\n\
|
||||
Workspaces\x12\x20\n\x05items\x18\x01\x20\x03(\x0b2\n.WorkspaceR\x05item\
|
||||
sJ\xb1\x05\n\x06\x12\x04\0\0\x14\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\
|
||||
\n\x02\x03\0\x12\x03\x01\0\x1a\n\n\n\x02\x04\0\x12\x04\x03\0\x06\x01\n\n\
|
||||
\n\x03\x04\0\x01\x12\x03\x03\x08\x1e\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\
|
||||
\x04\x14\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\
|
||||
\x02\0\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x04\
|
||||
\x12\x13\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x04\x14\n\x0c\n\x05\x04\0\
|
||||
\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x05\
|
||||
\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x05\x12\x13\n\n\n\x02\x04\
|
||||
\x01\x12\x04\x07\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\x07\x08\x1d\n\
|
||||
\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x14\n\x0c\n\x05\x04\x01\x02\0\
|
||||
\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x08\x0b\x0f\
|
||||
\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x12\x13\n\x0b\n\x04\x04\x01\
|
||||
\x02\x01\x12\x03\t\x04\x14\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\t\x04\
|
||||
\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\x0b\x0f\n\x0c\n\x05\x04\x01\
|
||||
\x02\x01\x03\x12\x03\t\x12\x13\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\n\x04\
|
||||
\x17\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\x01\
|
||||
\x02\x02\x01\x12\x03\n\x0b\x12\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\n\
|
||||
\x15\x16\n\n\n\x02\x04\x02\x12\x04\x0c\0\x11\x01\n\n\n\x03\x04\x02\x01\
|
||||
\x12\x03\x0c\x08\x11\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\x12\n\x0c\n\
|
||||
\x05\x04\x02\x02\0\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\
|
||||
\x03\r\x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\r\x10\x11\n\x0b\n\x04\
|
||||
\x04\x02\x02\x01\x12\x03\x0e\x04\x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\
|
||||
\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0e\x0b\x0f\n\x0c\
|
||||
\n\x05\x04\x02\x02\x01\x03\x12\x03\x0e\x12\x13\n\x0b\n\x04\x04\x02\x02\
|
||||
\x02\x12\x03\x0f\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x0f\x04\
|
||||
\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0f\x0b\x0f\n\x0c\n\x05\x04\
|
||||
\x02\x02\x02\x03\x12\x03\x0f\x12\x13\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\
|
||||
\x10\x04\x19\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03\x10\x04\x0f\n\x0c\n\
|
||||
\x05\x04\x02\x02\x03\x01\x12\x03\x10\x10\x14\n\x0c\n\x05\x04\x02\x02\x03\
|
||||
\x03\x12\x03\x10\x17\x18\n\n\n\x02\x04\x03\x12\x04\x12\0\x14\x01\n\n\n\
|
||||
\x03\x04\x03\x01\x12\x03\x12\x08\x12\n\x0b\n\x04\x04\x03\x02\0\x12\x03\
|
||||
\x13\x04!\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03\x13\x04\x0c\n\x0c\n\x05\
|
||||
\x04\x03\x02\0\x06\x12\x03\x13\r\x16\n\x0c\n\x05\x04\x03\x02\0\x01\x12\
|
||||
\x03\x13\x17\x1c\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x13\x1f\x20b\x06p\
|
||||
roto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -10,6 +10,13 @@ message CreateAppRequest {
|
||||
message ColorStyle {
|
||||
string theme_color = 1;
|
||||
}
|
||||
message CreateAppParams {
|
||||
string workspace_id = 1;
|
||||
string name = 2;
|
||||
string desc = 3;
|
||||
ColorStyle color_style = 4;
|
||||
string user_id = 5;
|
||||
}
|
||||
message App {
|
||||
string id = 1;
|
||||
string workspace_id = 2;
|
||||
|
@ -3,3 +3,6 @@ syntax = "proto3";
|
||||
message DeleteAppRequest {
|
||||
string app_id = 1;
|
||||
}
|
||||
message DeleteAppParams {
|
||||
string app_id = 1;
|
||||
}
|
||||
|
@ -5,3 +5,8 @@ message QueryAppRequest {
|
||||
bool read_belongings = 2;
|
||||
bool is_trash = 3;
|
||||
}
|
||||
message QueryAppParams {
|
||||
string app_id = 1;
|
||||
bool read_belongings = 2;
|
||||
bool is_trash = 3;
|
||||
}
|
||||
|
@ -9,3 +9,11 @@ message UpdateAppRequest {
|
||||
oneof one_of_color_style { ColorStyle color_style = 5; };
|
||||
oneof one_of_is_trash { bool is_trash = 6; };
|
||||
}
|
||||
message UpdateAppParams {
|
||||
string app_id = 1;
|
||||
oneof one_of_workspace_id { string workspace_id = 2; };
|
||||
oneof one_of_name { string name = 3; };
|
||||
oneof one_of_desc { string desc = 4; };
|
||||
oneof one_of_color_style { ColorStyle color_style = 5; };
|
||||
oneof one_of_is_trash { bool is_trash = 6; };
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ enum WsErrCode {
|
||||
WorkspaceNameInvalid = 1;
|
||||
WorkspaceIdInvalid = 2;
|
||||
AppColorStyleInvalid = 3;
|
||||
WorkspaceDescInvalid = 4;
|
||||
AppIdInvalid = 10;
|
||||
AppNameInvalid = 11;
|
||||
ViewNameInvalid = 20;
|
||||
@ -20,4 +21,5 @@ enum WsErrCode {
|
||||
UserInternalError = 102;
|
||||
UserNotLoginYet = 103;
|
||||
ServerError = 1000;
|
||||
RecordNotFound = 1001;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ message CreateWorkspaceRequest {
|
||||
message CreateWorkspaceParams {
|
||||
string name = 1;
|
||||
string desc = 2;
|
||||
oneof one_of_user_id { string user_id = 3; };
|
||||
string user_id = 3;
|
||||
}
|
||||
message Workspace {
|
||||
string id = 1;
|
||||
|
@ -7,6 +7,7 @@ use crate::{
|
||||
sql_tables::app::{AppTable, AppTableChangeset, AppTableSql},
|
||||
};
|
||||
use flowy_dispatch::prelude::DispatchFuture;
|
||||
use flowy_net::request::HttpRequestBuilder;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct AppController {
|
||||
@ -29,7 +30,12 @@ impl AppController {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_app(&self, params: CreateAppParams) -> Result<App, WorkspaceError> {
|
||||
pub fn create_app(&self, mut params: CreateAppParams) -> Result<App, WorkspaceError> {
|
||||
let user_id = self.user.user_id()?;
|
||||
params.user_id = user_id;
|
||||
|
||||
// TODO: server
|
||||
|
||||
let app_table = AppTable::new(params);
|
||||
let app: App = app_table.clone().into();
|
||||
let _ = self.sql.create_app(app_table)?;
|
||||
@ -73,3 +79,52 @@ impl AppController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn create_app_request(params: CreateAppParams, url: &str) -> Result<App, WorkspaceError> {
|
||||
let app = HttpRequestBuilder::post(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?
|
||||
.response()
|
||||
.await?;
|
||||
Ok(app)
|
||||
}
|
||||
|
||||
pub async fn read_app_request(
|
||||
params: QueryAppParams,
|
||||
url: &str,
|
||||
) -> Result<Option<App>, WorkspaceError> {
|
||||
let result = HttpRequestBuilder::get(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?
|
||||
.response::<App>()
|
||||
.await;
|
||||
|
||||
match result {
|
||||
Ok(app) => Ok(Some(app)),
|
||||
Err(e) => {
|
||||
if e.is_not_found() {
|
||||
Ok(None)
|
||||
} else {
|
||||
Err(e.into())
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn update_app_request(params: UpdateAppParams, url: &str) -> Result<(), WorkspaceError> {
|
||||
let _ = HttpRequestBuilder::patch(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn delete_app_request(params: DeleteAppParams, url: &str) -> Result<(), WorkspaceError> {
|
||||
let _ = HttpRequestBuilder::delete(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
@ -35,7 +35,9 @@ impl WorkspaceController {
|
||||
mut params: CreateWorkspaceParams,
|
||||
) -> Result<Workspace, WorkspaceError> {
|
||||
let user_id = self.user.user_id()?;
|
||||
params.user_id = Some(user_id.clone());
|
||||
params.user_id = user_id.clone();
|
||||
|
||||
// TODO: server
|
||||
|
||||
let workspace_table = WorkspaceTable::new(params, &user_id);
|
||||
let workspace: Workspace = workspace_table.clone().into();
|
||||
@ -124,18 +126,52 @@ pub async fn create_workspace_request(
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?
|
||||
.response()?;
|
||||
.response()
|
||||
.await?;
|
||||
Ok(workspace)
|
||||
}
|
||||
|
||||
pub async fn read_workspace_request(
|
||||
params: QueryWorkspaceParams,
|
||||
url: &str,
|
||||
) -> Result<Workspace, WorkspaceError> {
|
||||
let workspace = HttpRequestBuilder::get(&url.to_owned())
|
||||
) -> Result<Option<Workspace>, WorkspaceError> {
|
||||
let result = HttpRequestBuilder::get(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?
|
||||
.response()?;
|
||||
Ok(workspace)
|
||||
.response::<Workspace>()
|
||||
.await;
|
||||
|
||||
match result {
|
||||
Ok(workspace) => Ok(Some(workspace)),
|
||||
Err(e) => {
|
||||
if e.is_not_found() {
|
||||
Ok(None)
|
||||
} else {
|
||||
Err(e.into())
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn update_workspace_request(
|
||||
params: UpdateWorkspaceParams,
|
||||
url: &str,
|
||||
) -> Result<(), WorkspaceError> {
|
||||
let _ = HttpRequestBuilder::patch(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn delete_workspace_request(
|
||||
params: DeleteWorkspaceParams,
|
||||
url: &str,
|
||||
) -> Result<(), WorkspaceError> {
|
||||
let _ = HttpRequestBuilder::delete(&url.to_owned())
|
||||
.protobuf(params)?
|
||||
.send()
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user