mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: build with offline mode
This commit is contained in:
parent
e588f15277
commit
dd357c18cf
@ -11,6 +11,8 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
|||||||
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
|
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
|
||||||
CARGO_MAKE_CRATE_NAME = "dart-ffi"
|
CARGO_MAKE_CRATE_NAME = "dart-ffi"
|
||||||
VERSION = "0.0.1"
|
VERSION = "0.0.1"
|
||||||
|
FEATURES = "flutter,http_server"
|
||||||
|
PRODUCT_NAME = "AppFlowy"
|
||||||
|
|
||||||
#CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
|
#CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
|
||||||
[env.development-mac]
|
[env.development-mac]
|
||||||
@ -22,7 +24,9 @@ CRATE_TYPE = "cdylib"
|
|||||||
BUILD_FLAG = "debug"
|
BUILD_FLAG = "debug"
|
||||||
FLUTTER_PLATFORM = "macos"
|
FLUTTER_PLATFORM = "macos"
|
||||||
FLUTTER_OUTPUT_DIR = "Debug"
|
FLUTTER_OUTPUT_DIR = "Debug"
|
||||||
PRODUCT_NAME = "app_flowy.app"
|
FEATURES = "flutter"
|
||||||
|
PRODUCT_EXT = "app"
|
||||||
|
|
||||||
|
|
||||||
[env.production-mac]
|
[env.production-mac]
|
||||||
DEV = false
|
DEV = false
|
||||||
@ -33,7 +37,8 @@ CRATE_TYPE = "cdylib"
|
|||||||
BUILD_FLAG = "release"
|
BUILD_FLAG = "release"
|
||||||
FLUTTER_PLATFORM = "macos"
|
FLUTTER_PLATFORM = "macos"
|
||||||
FLUTTER_OUTPUT_DIR = "Release"
|
FLUTTER_OUTPUT_DIR = "Release"
|
||||||
PRODUCT_NAME = "app_flowy.app"
|
FEATURES = "flutter"
|
||||||
|
PRODUCT_EXT = "app"
|
||||||
|
|
||||||
[env.production-ios]
|
[env.production-ios]
|
||||||
DEV = false
|
DEV = false
|
||||||
@ -43,7 +48,7 @@ CRATE_TYPE = "staticlib"
|
|||||||
BUILD_FLAG = "release"
|
BUILD_FLAG = "release"
|
||||||
FLUTTER_PLATFORM = "ios"
|
FLUTTER_PLATFORM = "ios"
|
||||||
FLUTTER_OUTPUT_DIR = "Release"
|
FLUTTER_OUTPUT_DIR = "Release"
|
||||||
PRODUCT_NAME = "app_flowy.ipa"
|
PRODUCT_EXT = "ipa"
|
||||||
|
|
||||||
[env.production-android]
|
[env.production-android]
|
||||||
DEV = false
|
DEV = false
|
||||||
@ -53,7 +58,7 @@ CRATE_TYPE = "cdylib"
|
|||||||
BUILD_FLAG = "release"
|
BUILD_FLAG = "release"
|
||||||
FLUTTER_PLATFORM = "apk"
|
FLUTTER_PLATFORM = "apk"
|
||||||
FLUTTER_OUTPUT_DIR = "Release"
|
FLUTTER_OUTPUT_DIR = "Release"
|
||||||
PRODUCT_NAME = "app_flowy.apk"
|
PRODUCT_EXT = "apk"
|
||||||
|
|
||||||
[env.production-win]
|
[env.production-win]
|
||||||
DEV = false
|
DEV = false
|
||||||
@ -63,7 +68,7 @@ CRATE_TYPE = "cdylib"
|
|||||||
BUILD_FLAG = "release"
|
BUILD_FLAG = "release"
|
||||||
FLUTTER_PLATFORM = "apk"
|
FLUTTER_PLATFORM = "apk"
|
||||||
FLUTTER_OUTPUT_DIR = "Release"
|
FLUTTER_OUTPUT_DIR = "Release"
|
||||||
PRODUCT_NAME = "app_flowy.exe"
|
PRODUCT_EXT = "exe"
|
||||||
|
|
||||||
[tasks.setup-crate-type]
|
[tasks.setup-crate-type]
|
||||||
private = true
|
private = true
|
||||||
|
@ -13,6 +13,7 @@ class SignInRequest extends $pb.GeneratedMessage {
|
|||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInRequest', createEmptyInstance: create)
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInRequest', createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')
|
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
|
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
|
||||||
|
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||||
..hasRequiredFields = false
|
..hasRequiredFields = false
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ class SignInRequest extends $pb.GeneratedMessage {
|
|||||||
factory SignInRequest({
|
factory SignInRequest({
|
||||||
$core.String? email,
|
$core.String? email,
|
||||||
$core.String? password,
|
$core.String? password,
|
||||||
|
$core.String? name,
|
||||||
}) {
|
}) {
|
||||||
final _result = create();
|
final _result = create();
|
||||||
if (email != null) {
|
if (email != null) {
|
||||||
@ -28,6 +30,9 @@ class SignInRequest extends $pb.GeneratedMessage {
|
|||||||
if (password != null) {
|
if (password != null) {
|
||||||
_result.password = password;
|
_result.password = password;
|
||||||
}
|
}
|
||||||
|
if (name != null) {
|
||||||
|
_result.name = name;
|
||||||
|
}
|
||||||
return _result;
|
return _result;
|
||||||
}
|
}
|
||||||
factory SignInRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
factory SignInRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||||
@ -68,12 +73,22 @@ class SignInRequest extends $pb.GeneratedMessage {
|
|||||||
$core.bool hasPassword() => $_has(1);
|
$core.bool hasPassword() => $_has(1);
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
void clearPassword() => clearField(2);
|
void clearPassword() => clearField(2);
|
||||||
|
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.String get name => $_getSZ(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
set name($core.String v) { $_setString(2, v); }
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.bool hasName() => $_has(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
void clearName() => clearField(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SignInParams extends $pb.GeneratedMessage {
|
class SignInParams extends $pb.GeneratedMessage {
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInParams', createEmptyInstance: create)
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInParams', createEmptyInstance: create)
|
||||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')
|
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')
|
||||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
|
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
|
||||||
|
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||||
..hasRequiredFields = false
|
..hasRequiredFields = false
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -81,6 +96,7 @@ class SignInParams extends $pb.GeneratedMessage {
|
|||||||
factory SignInParams({
|
factory SignInParams({
|
||||||
$core.String? email,
|
$core.String? email,
|
||||||
$core.String? password,
|
$core.String? password,
|
||||||
|
$core.String? name,
|
||||||
}) {
|
}) {
|
||||||
final _result = create();
|
final _result = create();
|
||||||
if (email != null) {
|
if (email != null) {
|
||||||
@ -89,6 +105,9 @@ class SignInParams extends $pb.GeneratedMessage {
|
|||||||
if (password != null) {
|
if (password != null) {
|
||||||
_result.password = password;
|
_result.password = password;
|
||||||
}
|
}
|
||||||
|
if (name != null) {
|
||||||
|
_result.name = name;
|
||||||
|
}
|
||||||
return _result;
|
return _result;
|
||||||
}
|
}
|
||||||
factory SignInParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
factory SignInParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||||
@ -129,6 +148,15 @@ class SignInParams extends $pb.GeneratedMessage {
|
|||||||
$core.bool hasPassword() => $_has(1);
|
$core.bool hasPassword() => $_has(1);
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
void clearPassword() => clearField(2);
|
void clearPassword() => clearField(2);
|
||||||
|
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.String get name => $_getSZ(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
set name($core.String v) { $_setString(2, v); }
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.bool hasName() => $_has(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
void clearName() => clearField(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SignInResponse extends $pb.GeneratedMessage {
|
class SignInResponse extends $pb.GeneratedMessage {
|
||||||
|
@ -14,22 +14,24 @@ const SignInRequest$json = const {
|
|||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
|
const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
|
||||||
const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},
|
const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},
|
||||||
|
const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `SignInRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `SignInRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List signInRequestDescriptor = $convert.base64Decode('Cg1TaWduSW5SZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBIaCghwYXNzd29yZBgCIAEoCVIIcGFzc3dvcmQ=');
|
final $typed_data.Uint8List signInRequestDescriptor = $convert.base64Decode('Cg1TaWduSW5SZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBIaCghwYXNzd29yZBgCIAEoCVIIcGFzc3dvcmQSEgoEbmFtZRgDIAEoCVIEbmFtZQ==');
|
||||||
@$core.Deprecated('Use signInParamsDescriptor instead')
|
@$core.Deprecated('Use signInParamsDescriptor instead')
|
||||||
const SignInParams$json = const {
|
const SignInParams$json = const {
|
||||||
'1': 'SignInParams',
|
'1': 'SignInParams',
|
||||||
'2': const [
|
'2': const [
|
||||||
const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
|
const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
|
||||||
const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},
|
const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},
|
||||||
|
const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Descriptor for `SignInParams`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `SignInParams`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List signInParamsDescriptor = $convert.base64Decode('CgxTaWduSW5QYXJhbXMSFAoFZW1haWwYASABKAlSBWVtYWlsEhoKCHBhc3N3b3JkGAIgASgJUghwYXNzd29yZA==');
|
final $typed_data.Uint8List signInParamsDescriptor = $convert.base64Decode('CgxTaWduSW5QYXJhbXMSFAoFZW1haWwYASABKAlSBWVtYWlsEhoKCHBhc3N3b3JkGAIgASgJUghwYXNzd29yZBISCgRuYW1lGAMgASgJUgRuYW1l');
|
||||||
@$core.Deprecated('Use signInResponseDescriptor instead')
|
@$core.Deprecated('Use signInResponseDescriptor instead')
|
||||||
const SignInResponse$json = const {
|
const SignInResponse$json = const {
|
||||||
'1': 'SignInResponse',
|
'1': 'SignInResponse',
|
||||||
|
@ -71,9 +71,12 @@ struct WsSenderImpl {
|
|||||||
|
|
||||||
impl DocumentWebSocket for WsSenderImpl {
|
impl DocumentWebSocket for WsSenderImpl {
|
||||||
fn send(&self, data: WsDocumentData) -> Result<(), DocError> {
|
fn send(&self, data: WsDocumentData) -> Result<(), DocError> {
|
||||||
|
if cfg!(feature = "http_server") {
|
||||||
let msg: WsMessage = data.into();
|
let msg: WsMessage = data.into();
|
||||||
let sender = self.user.ws_controller.sender().map_err(internal_error)?;
|
let sender = self.user.ws_controller.sender().map_err(internal_error)?;
|
||||||
sender.send_msg(msg).map_err(internal_error)?;
|
sender.send_msg(msg).map_err(internal_error)?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ pub struct SignInRequest {
|
|||||||
|
|
||||||
#[pb(index = 2)]
|
#[pb(index = 2)]
|
||||||
pub password: String,
|
pub password: String,
|
||||||
|
|
||||||
|
#[pb(index = 3)]
|
||||||
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, ProtoBuf, Debug)]
|
#[derive(Default, ProtoBuf, Debug)]
|
||||||
@ -18,6 +21,9 @@ pub struct SignInParams {
|
|||||||
|
|
||||||
#[pb(index = 2)]
|
#[pb(index = 2)]
|
||||||
pub password: String,
|
pub password: String,
|
||||||
|
|
||||||
|
#[pb(index = 3)]
|
||||||
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default, ProtoBuf)]
|
#[derive(Debug, Default, ProtoBuf)]
|
||||||
@ -45,6 +51,7 @@ impl TryInto<SignInParams> for SignInRequest {
|
|||||||
Ok(SignInParams {
|
Ok(SignInParams {
|
||||||
email: email.0,
|
email: email.0,
|
||||||
password: password.0,
|
password: password.0,
|
||||||
|
name: self.name,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ pub struct SignInRequest {
|
|||||||
// message fields
|
// message fields
|
||||||
pub email: ::std::string::String,
|
pub email: ::std::string::String,
|
||||||
pub password: ::std::string::String,
|
pub password: ::std::string::String,
|
||||||
|
pub name: ::std::string::String,
|
||||||
// special fields
|
// special fields
|
||||||
pub unknown_fields: ::protobuf::UnknownFields,
|
pub unknown_fields: ::protobuf::UnknownFields,
|
||||||
pub cached_size: ::protobuf::CachedSize,
|
pub cached_size: ::protobuf::CachedSize,
|
||||||
@ -95,6 +96,32 @@ impl SignInRequest {
|
|||||||
pub fn take_password(&mut self) -> ::std::string::String {
|
pub fn take_password(&mut self) -> ::std::string::String {
|
||||||
::std::mem::replace(&mut self.password, ::std::string::String::new())
|
::std::mem::replace(&mut self.password, ::std::string::String::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// string name = 3;
|
||||||
|
|
||||||
|
|
||||||
|
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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ::protobuf::Message for SignInRequest {
|
impl ::protobuf::Message for SignInRequest {
|
||||||
@ -112,6 +139,9 @@ impl ::protobuf::Message for SignInRequest {
|
|||||||
2 => {
|
2 => {
|
||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
|
||||||
},
|
},
|
||||||
|
3 => {
|
||||||
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||||
},
|
},
|
||||||
@ -130,6 +160,9 @@ impl ::protobuf::Message for SignInRequest {
|
|||||||
if !self.password.is_empty() {
|
if !self.password.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(2, &self.password);
|
my_size += ::protobuf::rt::string_size(2, &self.password);
|
||||||
}
|
}
|
||||||
|
if !self.name.is_empty() {
|
||||||
|
my_size += ::protobuf::rt::string_size(3, &self.name);
|
||||||
|
}
|
||||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||||
self.cached_size.set(my_size);
|
self.cached_size.set(my_size);
|
||||||
my_size
|
my_size
|
||||||
@ -142,6 +175,9 @@ impl ::protobuf::Message for SignInRequest {
|
|||||||
if !self.password.is_empty() {
|
if !self.password.is_empty() {
|
||||||
os.write_string(2, &self.password)?;
|
os.write_string(2, &self.password)?;
|
||||||
}
|
}
|
||||||
|
if !self.name.is_empty() {
|
||||||
|
os.write_string(3, &self.name)?;
|
||||||
|
}
|
||||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||||
::std::result::Result::Ok(())
|
::std::result::Result::Ok(())
|
||||||
}
|
}
|
||||||
@ -190,6 +226,11 @@ impl ::protobuf::Message for SignInRequest {
|
|||||||
|m: &SignInRequest| { &m.password },
|
|m: &SignInRequest| { &m.password },
|
||||||
|m: &mut SignInRequest| { &mut m.password },
|
|m: &mut SignInRequest| { &mut m.password },
|
||||||
));
|
));
|
||||||
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||||
|
"name",
|
||||||
|
|m: &SignInRequest| { &m.name },
|
||||||
|
|m: &mut SignInRequest| { &mut m.name },
|
||||||
|
));
|
||||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInRequest>(
|
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInRequest>(
|
||||||
"SignInRequest",
|
"SignInRequest",
|
||||||
fields,
|
fields,
|
||||||
@ -208,6 +249,7 @@ impl ::protobuf::Clear for SignInRequest {
|
|||||||
fn clear(&mut self) {
|
fn clear(&mut self) {
|
||||||
self.email.clear();
|
self.email.clear();
|
||||||
self.password.clear();
|
self.password.clear();
|
||||||
|
self.name.clear();
|
||||||
self.unknown_fields.clear();
|
self.unknown_fields.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,6 +271,7 @@ pub struct SignInParams {
|
|||||||
// message fields
|
// message fields
|
||||||
pub email: ::std::string::String,
|
pub email: ::std::string::String,
|
||||||
pub password: ::std::string::String,
|
pub password: ::std::string::String,
|
||||||
|
pub name: ::std::string::String,
|
||||||
// special fields
|
// special fields
|
||||||
pub unknown_fields: ::protobuf::UnknownFields,
|
pub unknown_fields: ::protobuf::UnknownFields,
|
||||||
pub cached_size: ::protobuf::CachedSize,
|
pub cached_size: ::protobuf::CachedSize,
|
||||||
@ -296,6 +339,32 @@ impl SignInParams {
|
|||||||
pub fn take_password(&mut self) -> ::std::string::String {
|
pub fn take_password(&mut self) -> ::std::string::String {
|
||||||
::std::mem::replace(&mut self.password, ::std::string::String::new())
|
::std::mem::replace(&mut self.password, ::std::string::String::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// string name = 3;
|
||||||
|
|
||||||
|
|
||||||
|
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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ::protobuf::Message for SignInParams {
|
impl ::protobuf::Message for SignInParams {
|
||||||
@ -313,6 +382,9 @@ impl ::protobuf::Message for SignInParams {
|
|||||||
2 => {
|
2 => {
|
||||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;
|
||||||
},
|
},
|
||||||
|
3 => {
|
||||||
|
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||||
},
|
},
|
||||||
@ -331,6 +403,9 @@ impl ::protobuf::Message for SignInParams {
|
|||||||
if !self.password.is_empty() {
|
if !self.password.is_empty() {
|
||||||
my_size += ::protobuf::rt::string_size(2, &self.password);
|
my_size += ::protobuf::rt::string_size(2, &self.password);
|
||||||
}
|
}
|
||||||
|
if !self.name.is_empty() {
|
||||||
|
my_size += ::protobuf::rt::string_size(3, &self.name);
|
||||||
|
}
|
||||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||||
self.cached_size.set(my_size);
|
self.cached_size.set(my_size);
|
||||||
my_size
|
my_size
|
||||||
@ -343,6 +418,9 @@ impl ::protobuf::Message for SignInParams {
|
|||||||
if !self.password.is_empty() {
|
if !self.password.is_empty() {
|
||||||
os.write_string(2, &self.password)?;
|
os.write_string(2, &self.password)?;
|
||||||
}
|
}
|
||||||
|
if !self.name.is_empty() {
|
||||||
|
os.write_string(3, &self.name)?;
|
||||||
|
}
|
||||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||||
::std::result::Result::Ok(())
|
::std::result::Result::Ok(())
|
||||||
}
|
}
|
||||||
@ -391,6 +469,11 @@ impl ::protobuf::Message for SignInParams {
|
|||||||
|m: &SignInParams| { &m.password },
|
|m: &SignInParams| { &m.password },
|
||||||
|m: &mut SignInParams| { &mut m.password },
|
|m: &mut SignInParams| { &mut m.password },
|
||||||
));
|
));
|
||||||
|
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||||
|
"name",
|
||||||
|
|m: &SignInParams| { &m.name },
|
||||||
|
|m: &mut SignInParams| { &mut m.name },
|
||||||
|
));
|
||||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInParams>(
|
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInParams>(
|
||||||
"SignInParams",
|
"SignInParams",
|
||||||
fields,
|
fields,
|
||||||
@ -409,6 +492,7 @@ impl ::protobuf::Clear for SignInParams {
|
|||||||
fn clear(&mut self) {
|
fn clear(&mut self) {
|
||||||
self.email.clear();
|
self.email.clear();
|
||||||
self.password.clear();
|
self.password.clear();
|
||||||
|
self.name.clear();
|
||||||
self.unknown_fields.clear();
|
self.unknown_fields.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1482,79 +1566,86 @@ impl ::protobuf::reflect::ProtobufValue for SignUpResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||||
\n\nauth.proto\"A\n\rSignInRequest\x12\x14\n\x05email\x18\x01\x20\x01(\t\
|
\n\nauth.proto\"U\n\rSignInRequest\x12\x14\n\x05email\x18\x01\x20\x01(\t\
|
||||||
R\x05email\x12\x1a\n\x08password\x18\x02\x20\x01(\tR\x08password\"@\n\
|
R\x05email\x12\x1a\n\x08password\x18\x02\x20\x01(\tR\x08password\x12\x12\
|
||||||
\x0cSignInParams\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\x12\x1a\
|
\n\x04name\x18\x03\x20\x01(\tR\x04name\"T\n\x0cSignInParams\x12\x14\n\
|
||||||
\n\x08password\x18\x02\x20\x01(\tR\x08password\"i\n\x0eSignInResponse\
|
\x05email\x18\x01\x20\x01(\tR\x05email\x12\x1a\n\x08password\x18\x02\x20\
|
||||||
\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\x12\x12\n\x04name\
|
\x01(\tR\x08password\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\"i\n\
|
||||||
\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\x03\x20\x01(\tR\x05e\
|
\x0eSignInResponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\
|
||||||
mail\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05token\"U\n\rSignUpRequest\
|
\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\
|
||||||
\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\x12\x12\n\x04name\x18\
|
\x03\x20\x01(\tR\x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05toke\
|
||||||
\x02\x20\x01(\tR\x04name\x12\x1a\n\x08password\x18\x03\x20\x01(\tR\x08pa\
|
n\"U\n\rSignUpRequest\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\
|
||||||
ssword\"T\n\x0cSignUpParams\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05em\
|
\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1a\n\x08password\x18\
|
||||||
ail\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1a\n\x08password\
|
\x03\x20\x01(\tR\x08password\"T\n\x0cSignUpParams\x12\x14\n\x05email\x18\
|
||||||
\x18\x03\x20\x01(\tR\x08password\"i\n\x0eSignUpResponse\x12\x17\n\x07use\
|
\x01\x20\x01(\tR\x05email\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\
|
||||||
r_id\x18\x01\x20\x01(\tR\x06userId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\
|
\x12\x1a\n\x08password\x18\x03\x20\x01(\tR\x08password\"i\n\x0eSignUpRes\
|
||||||
\x04name\x12\x14\n\x05email\x18\x03\x20\x01(\tR\x05email\x12\x14\n\x05to\
|
ponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\x12\x12\n\x04na\
|
||||||
ken\x18\x04\x20\x01(\tR\x05tokenJ\x80\t\n\x06\x12\x04\0\0\x1f\x01\n\x08\
|
me\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\x03\x20\x01(\tR\
|
||||||
\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\
|
\x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05tokenJ\xee\t\n\x06\
|
||||||
\x03\x04\0\x01\x12\x03\x02\x08\x15\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\
|
\x12\x04\0\0!\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\
|
||||||
\x04\x15\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\
|
\x04\x02\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x15\n\x0b\n\x04\
|
||||||
\x02\0\x01\x12\x03\x03\x0b\x10\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\
|
\x04\0\x02\0\x12\x03\x03\x04\x15\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\
|
||||||
\x13\x14\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x18\n\x0c\n\x05\x04\0\
|
\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x10\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\
|
\x02\0\x03\x12\x03\x03\x13\x14\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\
|
||||||
\x0b\x13\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x16\x17\n\n\n\x02\x04\
|
\x18\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\
|
||||||
\x01\x12\x04\x06\0\t\x01\n\n\n\x03\x04\x01\x01\x12\x03\x06\x08\x14\n\x0b\
|
\x02\x01\x01\x12\x03\x04\x0b\x13\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\
|
||||||
\n\x04\x04\x01\x02\0\x12\x03\x07\x04\x15\n\x0c\n\x05\x04\x01\x02\0\x05\
|
\x04\x16\x17\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\x05\
|
||||||
\x12\x03\x07\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x07\x0b\x10\n\
|
\x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\
|
||||||
\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x07\x13\x14\n\x0b\n\x04\x04\x01\x02\
|
\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x12\x13\n\n\n\
|
||||||
\x01\x12\x03\x08\x04\x18\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x08\x04\
|
\x02\x04\x01\x12\x04\x07\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\x07\x08\
|
||||||
\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x08\x0b\x13\n\x0c\n\x05\x04\
|
\x14\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x15\n\x0c\n\x05\x04\x01\
|
||||||
\x01\x02\x01\x03\x12\x03\x08\x16\x17\n\n\n\x02\x04\x02\x12\x04\n\0\x0f\
|
\x02\0\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x08\
|
||||||
\x01\n\n\n\x03\x04\x02\x01\x12\x03\n\x08\x16\n\x0b\n\x04\x04\x02\x02\0\
|
\x0b\x10\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x13\x14\n\x0b\n\x04\
|
||||||
\x12\x03\x0b\x04\x17\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0b\x04\n\n\
|
\x04\x01\x02\x01\x12\x03\t\x04\x18\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\
|
||||||
\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0b\x0b\x12\n\x0c\n\x05\x04\x02\x02\
|
\x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\x0b\x13\n\x0c\n\
|
||||||
\0\x03\x12\x03\x0b\x15\x16\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x0c\x04\
|
\x05\x04\x01\x02\x01\x03\x12\x03\t\x16\x17\n\x0b\n\x04\x04\x01\x02\x02\
|
||||||
\x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x0c\x04\n\n\x0c\n\x05\x04\
|
\x12\x03\n\x04\x14\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\n\x04\n\n\x0c\
|
||||||
\x02\x02\x01\x01\x12\x03\x0c\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\
|
\n\x05\x04\x01\x02\x02\x01\x12\x03\n\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x02\
|
||||||
\x03\x0c\x12\x13\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\r\x04\x15\n\x0c\n\
|
\x03\x12\x03\n\x12\x13\n\n\n\x02\x04\x02\x12\x04\x0c\0\x11\x01\n\n\n\x03\
|
||||||
\x05\x04\x02\x02\x02\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\
|
\x04\x02\x01\x12\x03\x0c\x08\x16\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\
|
||||||
\x12\x03\r\x0b\x10\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\r\x13\x14\n\
|
\x17\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\
|
||||||
\x0b\n\x04\x04\x02\x02\x03\x12\x03\x0e\x04\x15\n\x0c\n\x05\x04\x02\x02\
|
\x02\0\x01\x12\x03\r\x0b\x12\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\r\x15\
|
||||||
\x03\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x0e\
|
\x16\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x0e\x04\x14\n\x0c\n\x05\x04\x02\
|
||||||
\x0b\x10\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03\x0e\x13\x14\n\n\n\x02\
|
\x02\x01\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\
|
||||||
\x04\x03\x12\x04\x10\0\x14\x01\n\n\n\x03\x04\x03\x01\x12\x03\x10\x08\x15\
|
\x0e\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x0e\x12\x13\n\x0b\n\
|
||||||
\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x11\x04\x15\n\x0c\n\x05\x04\x03\x02\0\
|
\x04\x04\x02\x02\x02\x12\x03\x0f\x04\x15\n\x0c\n\x05\x04\x02\x02\x02\x05\
|
||||||
\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x11\x0b\x10\
|
\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0f\x0b\x10\n\
|
||||||
\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x11\x13\x14\n\x0b\n\x04\x04\x03\
|
\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0f\x13\x14\n\x0b\n\x04\x04\x02\
|
||||||
\x02\x01\x12\x03\x12\x04\x14\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x12\
|
\x02\x03\x12\x03\x10\x04\x15\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x10\
|
||||||
\x04\n\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x03\x12\x0b\x0f\n\x0c\n\x05\
|
\x04\n\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x10\x0b\x10\n\x0c\n\x05\
|
||||||
\x04\x03\x02\x01\x03\x12\x03\x12\x12\x13\n\x0b\n\x04\x04\x03\x02\x02\x12\
|
\x04\x02\x02\x03\x03\x12\x03\x10\x13\x14\n\n\n\x02\x04\x03\x12\x04\x12\0\
|
||||||
\x03\x13\x04\x18\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x13\x04\n\n\x0c\
|
\x16\x01\n\n\n\x03\x04\x03\x01\x12\x03\x12\x08\x15\n\x0b\n\x04\x04\x03\
|
||||||
\n\x05\x04\x03\x02\x02\x01\x12\x03\x13\x0b\x13\n\x0c\n\x05\x04\x03\x02\
|
\x02\0\x12\x03\x13\x04\x15\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x13\x04\
|
||||||
\x02\x03\x12\x03\x13\x16\x17\n\n\n\x02\x04\x04\x12\x04\x15\0\x19\x01\n\n\
|
\n\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x13\x0b\x10\n\x0c\n\x05\x04\x03\
|
||||||
\n\x03\x04\x04\x01\x12\x03\x15\x08\x14\n\x0b\n\x04\x04\x04\x02\0\x12\x03\
|
\x02\0\x03\x12\x03\x13\x13\x14\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x14\
|
||||||
\x16\x04\x15\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03\x16\x04\n\n\x0c\n\x05\
|
\x04\x14\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x14\x04\n\n\x0c\n\x05\
|
||||||
\x04\x04\x02\0\x01\x12\x03\x16\x0b\x10\n\x0c\n\x05\x04\x04\x02\0\x03\x12\
|
\x04\x03\x02\x01\x01\x12\x03\x14\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\
|
||||||
\x03\x16\x13\x14\n\x0b\n\x04\x04\x04\x02\x01\x12\x03\x17\x04\x14\n\x0c\n\
|
\x12\x03\x14\x12\x13\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x15\x04\x18\n\
|
||||||
\x05\x04\x04\x02\x01\x05\x12\x03\x17\x04\n\n\x0c\n\x05\x04\x04\x02\x01\
|
\x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\x03\x02\
|
||||||
\x01\x12\x03\x17\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x17\x12\
|
\x02\x01\x12\x03\x15\x0b\x13\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x15\
|
||||||
\x13\n\x0b\n\x04\x04\x04\x02\x02\x12\x03\x18\x04\x18\n\x0c\n\x05\x04\x04\
|
\x16\x17\n\n\n\x02\x04\x04\x12\x04\x17\0\x1b\x01\n\n\n\x03\x04\x04\x01\
|
||||||
\x02\x02\x05\x12\x03\x18\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\
|
\x12\x03\x17\x08\x14\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x18\x04\x15\n\x0c\
|
||||||
\x18\x0b\x13\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03\x18\x16\x17\n\n\n\
|
\n\x05\x04\x04\x02\0\x05\x12\x03\x18\x04\n\n\x0c\n\x05\x04\x04\x02\0\x01\
|
||||||
\x02\x04\x05\x12\x04\x1a\0\x1f\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1a\x08\
|
\x12\x03\x18\x0b\x10\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x18\x13\x14\n\
|
||||||
\x16\n\x0b\n\x04\x04\x05\x02\0\x12\x03\x1b\x04\x17\n\x0c\n\x05\x04\x05\
|
\x0b\n\x04\x04\x04\x02\x01\x12\x03\x19\x04\x14\n\x0c\n\x05\x04\x04\x02\
|
||||||
\x02\0\x05\x12\x03\x1b\x04\n\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03\x1b\
|
\x01\x05\x12\x03\x19\x04\n\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03\x19\
|
||||||
\x0b\x12\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03\x1b\x15\x16\n\x0b\n\x04\
|
\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x19\x12\x13\n\x0b\n\x04\
|
||||||
\x04\x05\x02\x01\x12\x03\x1c\x04\x14\n\x0c\n\x05\x04\x05\x02\x01\x05\x12\
|
\x04\x04\x02\x02\x12\x03\x1a\x04\x18\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\
|
||||||
\x03\x1c\x04\n\n\x0c\n\x05\x04\x05\x02\x01\x01\x12\x03\x1c\x0b\x0f\n\x0c\
|
\x03\x1a\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\x1a\x0b\x13\n\x0c\
|
||||||
\n\x05\x04\x05\x02\x01\x03\x12\x03\x1c\x12\x13\n\x0b\n\x04\x04\x05\x02\
|
\n\x05\x04\x04\x02\x02\x03\x12\x03\x1a\x16\x17\n\n\n\x02\x04\x05\x12\x04\
|
||||||
\x02\x12\x03\x1d\x04\x15\n\x0c\n\x05\x04\x05\x02\x02\x05\x12\x03\x1d\x04\
|
\x1c\0!\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1c\x08\x16\n\x0b\n\x04\x04\
|
||||||
\n\n\x0c\n\x05\x04\x05\x02\x02\x01\x12\x03\x1d\x0b\x10\n\x0c\n\x05\x04\
|
\x05\x02\0\x12\x03\x1d\x04\x17\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x1d\
|
||||||
\x05\x02\x02\x03\x12\x03\x1d\x13\x14\n\x0b\n\x04\x04\x05\x02\x03\x12\x03\
|
\x04\n\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03\x1d\x0b\x12\n\x0c\n\x05\x04\
|
||||||
\x1e\x04\x15\n\x0c\n\x05\x04\x05\x02\x03\x05\x12\x03\x1e\x04\n\n\x0c\n\
|
\x05\x02\0\x03\x12\x03\x1d\x15\x16\n\x0b\n\x04\x04\x05\x02\x01\x12\x03\
|
||||||
\x05\x04\x05\x02\x03\x01\x12\x03\x1e\x0b\x10\n\x0c\n\x05\x04\x05\x02\x03\
|
\x1e\x04\x14\n\x0c\n\x05\x04\x05\x02\x01\x05\x12\x03\x1e\x04\n\n\x0c\n\
|
||||||
\x03\x12\x03\x1e\x13\x14b\x06proto3\
|
\x05\x04\x05\x02\x01\x01\x12\x03\x1e\x0b\x0f\n\x0c\n\x05\x04\x05\x02\x01\
|
||||||
|
\x03\x12\x03\x1e\x12\x13\n\x0b\n\x04\x04\x05\x02\x02\x12\x03\x1f\x04\x15\
|
||||||
|
\n\x0c\n\x05\x04\x05\x02\x02\x05\x12\x03\x1f\x04\n\n\x0c\n\x05\x04\x05\
|
||||||
|
\x02\x02\x01\x12\x03\x1f\x0b\x10\n\x0c\n\x05\x04\x05\x02\x02\x03\x12\x03\
|
||||||
|
\x1f\x13\x14\n\x0b\n\x04\x04\x05\x02\x03\x12\x03\x20\x04\x15\n\x0c\n\x05\
|
||||||
|
\x04\x05\x02\x03\x05\x12\x03\x20\x04\n\n\x0c\n\x05\x04\x05\x02\x03\x01\
|
||||||
|
\x12\x03\x20\x0b\x10\n\x0c\n\x05\x04\x05\x02\x03\x03\x12\x03\x20\x13\x14\
|
||||||
|
b\x06proto3\
|
||||||
";
|
";
|
||||||
|
|
||||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||||
|
@ -3,10 +3,12 @@ syntax = "proto3";
|
|||||||
message SignInRequest {
|
message SignInRequest {
|
||||||
string email = 1;
|
string email = 1;
|
||||||
string password = 2;
|
string password = 2;
|
||||||
|
string name = 3;
|
||||||
}
|
}
|
||||||
message SignInParams {
|
message SignInParams {
|
||||||
string email = 1;
|
string email = 1;
|
||||||
string password = 2;
|
string password = 2;
|
||||||
|
string name = 3;
|
||||||
}
|
}
|
||||||
message SignInResponse {
|
message SignInResponse {
|
||||||
string user_id = 1;
|
string user_id = 1;
|
||||||
|
@ -28,7 +28,7 @@ impl UserServerAPI for UserServerMock {
|
|||||||
ResultFuture::new(async {
|
ResultFuture::new(async {
|
||||||
Ok(SignInResponse {
|
Ok(SignInResponse {
|
||||||
user_id: user_id.clone(),
|
user_id: user_id.clone(),
|
||||||
name: "fake name".to_owned(),
|
name: params.name,
|
||||||
email: params.email,
|
email: params.email,
|
||||||
token: user_id,
|
token: user_id,
|
||||||
})
|
})
|
||||||
@ -42,7 +42,7 @@ impl UserServerAPI for UserServerMock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_user(&self, _token: &str) -> ResultFuture<UserProfile, UserError> {
|
fn get_user(&self, _token: &str) -> ResultFuture<UserProfile, UserError> {
|
||||||
ResultFuture::new(async { Err(UserError::internal().context("mock data, ignore this error")) })
|
ResultFuture::new(async { Ok(UserProfile::default()) })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ws_addr(&self) -> String { "ws://localhost:8000/ws/".to_owned() }
|
fn ws_addr(&self) -> String { "ws://localhost:8000/ws/".to_owned() }
|
||||||
|
@ -147,8 +147,8 @@ impl UserSession {
|
|||||||
|
|
||||||
pub async fn init_user(&self) -> Result<(), UserError> {
|
pub async fn init_user(&self) -> Result<(), UserError> {
|
||||||
let (_, token) = self.get_session()?.into_part();
|
let (_, token) = self.get_session()?.into_part();
|
||||||
|
|
||||||
let _ = self.start_ws_connection(&token).await?;
|
let _ = self.start_ws_connection(&token).await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,10 +282,11 @@ impl UserSession {
|
|||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, token))]
|
#[tracing::instrument(level = "debug", skip(self, token))]
|
||||||
pub async fn start_ws_connection(&self, token: &str) -> Result<(), UserError> {
|
pub async fn start_ws_connection(&self, token: &str) -> Result<(), UserError> {
|
||||||
|
if cfg!(feature = "http_server") {
|
||||||
let addr = format!("{}/{}", self.server.ws_addr(), token);
|
let addr = format!("{}/{}", self.server.ws_addr(), token);
|
||||||
self.listen_on_websocket();
|
self.listen_on_websocket();
|
||||||
|
|
||||||
let _ = self.ws_controller.start_connect(addr).await?;
|
let _ = self.ws_controller.start_connect(addr).await?;
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ script = [
|
|||||||
cd rust-lib/
|
cd rust-lib/
|
||||||
if [ ${PROD} == true ]
|
if [ ${PROD} == true ]
|
||||||
then
|
then
|
||||||
cargo build --${BUILD_FLAG} --package=dart-ffi --target ${DESKTOP_TARGET} --features="flutter","http_server"
|
cargo build --${BUILD_FLAG} --package=dart-ffi --target ${DESKTOP_TARGET} --features=${FEATURES}
|
||||||
else
|
else
|
||||||
cargo build --package=dart-ffi --target ${DESKTOP_TARGET} --features="flutter","http_server"
|
cargo build --package=dart-ffi --target ${DESKTOP_TARGET} --features=${FEATURES}
|
||||||
fi
|
fi
|
||||||
cd ../
|
cd ../
|
||||||
""",
|
""",
|
||||||
|
@ -26,8 +26,10 @@ script = [
|
|||||||
fi
|
fi
|
||||||
mkdir -p ${output_path}
|
mkdir -p ${output_path}
|
||||||
|
|
||||||
cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${FLUTTER_PLATFORM}/Build/Products/${FLUTTER_OUTPUT_DIR}/${PRODUCT_NAME} \
|
product=${PRODUCT_NAME}.${PRODUCT_EXT}
|
||||||
${output_path}/${PRODUCT_NAME}
|
|
||||||
|
cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/build/${FLUTTER_PLATFORM}/Build/Products/${FLUTTER_OUTPUT_DIR}/${product} \
|
||||||
|
${output_path}/${product}
|
||||||
""",
|
""",
|
||||||
]
|
]
|
||||||
script_runner = "@shell"
|
script_runner = "@shell"
|
||||||
|
Loading…
Reference in New Issue
Block a user