Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
move network state to lib-infra
appflowybb07eeb2e207
diff --git a/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart b/frontend/app_flowy/lib/user/infrastructure/network_monitor.dartindex 1a56194e83..acc7dbd070 100644--- a/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart+++ b/frontend/app_flowy/lib/user/infrastructure/network_monitor.dart@@ -3,7 +3,7 @@ import 'dart:async';import 'package:connectivity_plus/connectivity_plus.dart';import 'package:flowy_log/flowy_log.dart';import 'package:flowy_sdk/dispatch/dispatch.dart';-import 'package:flowy_sdk/protobuf/flowy-user/observable.pb.dart';+import 'package:flowy_sdk/protobuf/lib-infra/protobuf.dart';import 'package:flutter/services.dart';class NetworkMonitor {diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dartindex b402bce694..583cb004f9 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart@@ -4,6 +4,7 @@ import 'package:flowy_log/flowy_log.dart';import 'package:flowy_sdk/protobuf/dart-ffi/ffi_response.pb.dart';import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart';import 'package:flowy_sdk/protobuf/flowy-workspace/event.pb.dart';+import 'package:flowy_sdk/protobuf/lib-infra/network_state.pb.dart';import 'package:isolates/isolates.dart';import 'package:isolates/ports.dart';import 'package:ffi/ffi.dart';diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pb.dartdeleted file mode 100644index c12f33e0f1..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pb.dart+++ /dev/null@@ -1,489 +0,0 @@-///-// Generated code. Do not modify.-// source: auth.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields--import 'dart:core' as $core;--import 'package:protobuf/protobuf.dart' as $pb;--class SignInRequest extends $pb.GeneratedMessage {- 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(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..hasRequiredFields = false- ;-- SignInRequest._() : super();- factory SignInRequest({- $core.String? email,- $core.String? password,- $core.String? name,- }) {- final _result = create();- if (email != null) {- _result.email = email;- }- if (password != null) {- _result.password = password;- }- if (name != null) {- _result.name = name;- }- return _result;- }- factory SignInRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory SignInRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- SignInRequest clone() => SignInRequest()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- SignInRequest copyWith(void Function(SignInRequest) updates) => super.copyWith((message) => updates(message as SignInRequest)) as SignInRequest; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static SignInRequest create() => SignInRequest._();- SignInRequest createEmptyInstance() => create();- static $pb.PbList<SignInRequest> createRepeated() => $pb.PbList<SignInRequest>();- @$core.pragma('dart2js:noInline')- static SignInRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignInRequest>(create);- static SignInRequest? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get email => $_getSZ(0);- @$pb.TagNumber(1)- set email($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasEmail() => $_has(0);- @$pb.TagNumber(1)- void clearEmail() => clearField(1);-- @$pb.TagNumber(2)- $core.String get password => $_getSZ(1);- @$pb.TagNumber(2)- set password($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasPassword() => $_has(1);- @$pb.TagNumber(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 {- 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(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..hasRequiredFields = false- ;-- SignInParams._() : super();- factory SignInParams({- $core.String? email,- $core.String? password,- $core.String? name,- }) {- final _result = create();- if (email != null) {- _result.email = email;- }- if (password != null) {- _result.password = password;- }- if (name != null) {- _result.name = name;- }- return _result;- }- factory SignInParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory SignInParams.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- SignInParams clone() => SignInParams()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- SignInParams copyWith(void Function(SignInParams) updates) => super.copyWith((message) => updates(message as SignInParams)) as SignInParams; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static SignInParams create() => SignInParams._();- SignInParams createEmptyInstance() => create();- static $pb.PbList<SignInParams> createRepeated() => $pb.PbList<SignInParams>();- @$core.pragma('dart2js:noInline')- static SignInParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignInParams>(create);- static SignInParams? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get email => $_getSZ(0);- @$pb.TagNumber(1)- set email($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasEmail() => $_has(0);- @$pb.TagNumber(1)- void clearEmail() => clearField(1);-- @$pb.TagNumber(2)- $core.String get password => $_getSZ(1);- @$pb.TagNumber(2)- set password($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasPassword() => $_has(1);- @$pb.TagNumber(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 {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInResponse', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'userId')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'token')- ..hasRequiredFields = false- ;-- SignInResponse._() : super();- factory SignInResponse({- $core.String? userId,- $core.String? name,- $core.String? email,- $core.String? token,- }) {- final _result = create();- if (userId != null) {- _result.userId = userId;- }- if (name != null) {- _result.name = name;- }- if (email != null) {- _result.email = email;- }- if (token != null) {- _result.token = token;- }- return _result;- }- factory SignInResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory SignInResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- SignInResponse clone() => SignInResponse()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- SignInResponse copyWith(void Function(SignInResponse) updates) => super.copyWith((message) => updates(message as SignInResponse)) as SignInResponse; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static SignInResponse create() => SignInResponse._();- SignInResponse createEmptyInstance() => create();- static $pb.PbList<SignInResponse> createRepeated() => $pb.PbList<SignInResponse>();- @$core.pragma('dart2js:noInline')- static SignInResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignInResponse>(create);- static SignInResponse? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get userId => $_getSZ(0);- @$pb.TagNumber(1)- set userId($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasUserId() => $_has(0);- @$pb.TagNumber(1)- void clearUserId() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get email => $_getSZ(2);- @$pb.TagNumber(3)- set email($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasEmail() => $_has(2);- @$pb.TagNumber(3)- void clearEmail() => clearField(3);-- @$pb.TagNumber(4)- $core.String get token => $_getSZ(3);- @$pb.TagNumber(4)- set token($core.String v) { $_setString(3, v); }- @$pb.TagNumber(4)- $core.bool hasToken() => $_has(3);- @$pb.TagNumber(4)- void clearToken() => clearField(4);-}--class SignUpRequest extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignUpRequest', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..hasRequiredFields = false- ;-- SignUpRequest._() : super();- factory SignUpRequest({- $core.String? email,- $core.String? name,- $core.String? password,- }) {- final _result = create();- if (email != null) {- _result.email = email;- }- if (name != null) {- _result.name = name;- }- if (password != null) {- _result.password = password;- }- return _result;- }- factory SignUpRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory SignUpRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- SignUpRequest clone() => SignUpRequest()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- SignUpRequest copyWith(void Function(SignUpRequest) updates) => super.copyWith((message) => updates(message as SignUpRequest)) as SignUpRequest; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static SignUpRequest create() => SignUpRequest._();- SignUpRequest createEmptyInstance() => create();- static $pb.PbList<SignUpRequest> createRepeated() => $pb.PbList<SignUpRequest>();- @$core.pragma('dart2js:noInline')- static SignUpRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignUpRequest>(create);- static SignUpRequest? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get email => $_getSZ(0);- @$pb.TagNumber(1)- set email($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasEmail() => $_has(0);- @$pb.TagNumber(1)- void clearEmail() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get password => $_getSZ(2);- @$pb.TagNumber(3)- set password($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasPassword() => $_has(2);- @$pb.TagNumber(3)- void clearPassword() => clearField(3);-}--class SignUpParams extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignUpParams', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..hasRequiredFields = false- ;-- SignUpParams._() : super();- factory SignUpParams({- $core.String? email,- $core.String? name,- $core.String? password,- }) {- final _result = create();- if (email != null) {- _result.email = email;- }- if (name != null) {- _result.name = name;- }- if (password != null) {- _result.password = password;- }- return _result;- }- factory SignUpParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory SignUpParams.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- SignUpParams clone() => SignUpParams()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- SignUpParams copyWith(void Function(SignUpParams) updates) => super.copyWith((message) => updates(message as SignUpParams)) as SignUpParams; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static SignUpParams create() => SignUpParams._();- SignUpParams createEmptyInstance() => create();- static $pb.PbList<SignUpParams> createRepeated() => $pb.PbList<SignUpParams>();- @$core.pragma('dart2js:noInline')- static SignUpParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignUpParams>(create);- static SignUpParams? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get email => $_getSZ(0);- @$pb.TagNumber(1)- set email($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasEmail() => $_has(0);- @$pb.TagNumber(1)- void clearEmail() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get password => $_getSZ(2);- @$pb.TagNumber(3)- set password($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasPassword() => $_has(2);- @$pb.TagNumber(3)- void clearPassword() => clearField(3);-}--class SignUpResponse extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignUpResponse', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'userId')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'token')- ..hasRequiredFields = false- ;-- SignUpResponse._() : super();- factory SignUpResponse({- $core.String? userId,- $core.String? name,- $core.String? email,- $core.String? token,- }) {- final _result = create();- if (userId != null) {- _result.userId = userId;- }- if (name != null) {- _result.name = name;- }- if (email != null) {- _result.email = email;- }- if (token != null) {- _result.token = token;- }- return _result;- }- factory SignUpResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory SignUpResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- SignUpResponse clone() => SignUpResponse()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- SignUpResponse copyWith(void Function(SignUpResponse) updates) => super.copyWith((message) => updates(message as SignUpResponse)) as SignUpResponse; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static SignUpResponse create() => SignUpResponse._();- SignUpResponse createEmptyInstance() => create();- static $pb.PbList<SignUpResponse> createRepeated() => $pb.PbList<SignUpResponse>();- @$core.pragma('dart2js:noInline')- static SignUpResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignUpResponse>(create);- static SignUpResponse? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get userId => $_getSZ(0);- @$pb.TagNumber(1)- set userId($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasUserId() => $_has(0);- @$pb.TagNumber(1)- void clearUserId() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get email => $_getSZ(2);- @$pb.TagNumber(3)- set email($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasEmail() => $_has(2);- @$pb.TagNumber(3)- void clearEmail() => clearField(3);-- @$pb.TagNumber(4)- $core.String get token => $_getSZ(3);- @$pb.TagNumber(4)- set token($core.String v) { $_setString(3, v); }- @$pb.TagNumber(4)- $core.bool hasToken() => $_has(3);- @$pb.TagNumber(4)- void clearToken() => clearField(4);-}-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbenum.dartdeleted file mode 100644index 85704d4362..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbenum.dart+++ /dev/null@@ -1,7 +0,0 @@-///-// Generated code. Do not modify.-// source: auth.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbjson.dartdeleted file mode 100644index c277f3f28c..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbjson.dart+++ /dev/null@@ -1,84 +0,0 @@-///-// Generated code. Do not modify.-// source: auth.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package--import 'dart:core' as $core;-import 'dart:convert' as $convert;-import 'dart:typed_data' as $typed_data;-@$core.Deprecated('Use signInRequestDescriptor instead')-const SignInRequest$json = const {- '1': 'SignInRequest',- '2': const [- const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},- 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`.-final $typed_data.Uint8List signInRequestDescriptor = $convert.base64Decode('Cg1TaWduSW5SZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBIaCghwYXNzd29yZBgCIAEoCVIIcGFzc3dvcmQSEgoEbmFtZRgDIAEoCVIEbmFtZQ==');-@$core.Deprecated('Use signInParamsDescriptor instead')-const SignInParams$json = const {- '1': 'SignInParams',- '2': const [- const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},- 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`.-final $typed_data.Uint8List signInParamsDescriptor = $convert.base64Decode('CgxTaWduSW5QYXJhbXMSFAoFZW1haWwYASABKAlSBWVtYWlsEhoKCHBhc3N3b3JkGAIgASgJUghwYXNzd29yZBISCgRuYW1lGAMgASgJUgRuYW1l');-@$core.Deprecated('Use signInResponseDescriptor instead')-const SignInResponse$json = const {- '1': 'SignInResponse',- '2': const [- const {'1': 'user_id', '3': 1, '4': 1, '5': 9, '10': 'userId'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},- const {'1': 'email', '3': 3, '4': 1, '5': 9, '10': 'email'},- const {'1': 'token', '3': 4, '4': 1, '5': 9, '10': 'token'},- ],-};--/// Descriptor for `SignInResponse`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List signInResponseDescriptor = $convert.base64Decode('Cg5TaWduSW5SZXNwb25zZRIXCgd1c2VyX2lkGAEgASgJUgZ1c2VySWQSEgoEbmFtZRgCIAEoCVIEbmFtZRIUCgVlbWFpbBgDIAEoCVIFZW1haWwSFAoFdG9rZW4YBCABKAlSBXRva2Vu');-@$core.Deprecated('Use signUpRequestDescriptor instead')-const SignUpRequest$json = const {- '1': 'SignUpRequest',- '2': const [- const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},- const {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'},- ],-};--/// Descriptor for `SignUpRequest`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List signUpRequestDescriptor = $convert.base64Decode('Cg1TaWduVXBSZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBISCgRuYW1lGAIgASgJUgRuYW1lEhoKCHBhc3N3b3JkGAMgASgJUghwYXNzd29yZA==');-@$core.Deprecated('Use signUpParamsDescriptor instead')-const SignUpParams$json = const {- '1': 'SignUpParams',- '2': const [- const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},- const {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'},- ],-};--/// Descriptor for `SignUpParams`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List signUpParamsDescriptor = $convert.base64Decode('CgxTaWduVXBQYXJhbXMSFAoFZW1haWwYASABKAlSBWVtYWlsEhIKBG5hbWUYAiABKAlSBG5hbWUSGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3Jk');-@$core.Deprecated('Use signUpResponseDescriptor instead')-const SignUpResponse$json = const {- '1': 'SignUpResponse',- '2': const [- const {'1': 'user_id', '3': 1, '4': 1, '5': 9, '10': 'userId'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},- const {'1': 'email', '3': 3, '4': 1, '5': 9, '10': 'email'},- const {'1': 'token', '3': 4, '4': 1, '5': 9, '10': 'token'},- ],-};--/// Descriptor for `SignUpResponse`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List signUpResponseDescriptor = $convert.base64Decode('Cg5TaWduVXBSZXNwb25zZRIXCgd1c2VyX2lkGAEgASgJUgZ1c2VySWQSEgoEbmFtZRgCIAEoCVIEbmFtZRIUCgVlbWFpbBgDIAEoCVIFZW1haWwSFAoFdG9rZW4YBCABKAlSBXRva2Vu');diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbserver.dartdeleted file mode 100644index cc8d01b7cc..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/auth.pbserver.dart+++ /dev/null@@ -1,9 +0,0 @@-///-// Generated code. Do not modify.-// source: auth.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package--export 'auth.pb.dart';-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dartindex d1e44053d6..f1a6d9fcdb 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart@@ -7,56 +7,5 @@import 'dart:core' as $core;-import 'package:protobuf/protobuf.dart' as $pb;--import 'observable.pbenum.dart';-export 'observable.pbenum.dart';-class NetworkState extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'NetworkState', createEmptyInstance: create)- ..e<NetworkType>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ty', $pb.PbFieldType.OE, defaultOrMaker: NetworkType.UnknownNetworkType, valueOf: NetworkType.valueOf, enumValues: NetworkType.values)- ..hasRequiredFields = false- ;-- NetworkState._() : super();- factory NetworkState({- NetworkType? ty,- }) {- final _result = create();- if (ty != null) {- _result.ty = ty;- }- return _result;- }- factory NetworkState.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory NetworkState.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- NetworkState clone() => NetworkState()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- NetworkState copyWith(void Function(NetworkState) updates) => super.copyWith((message) => updates(message as NetworkState)) as NetworkState; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static NetworkState create() => NetworkState._();- NetworkState createEmptyInstance() => create();- static $pb.PbList<NetworkState> createRepeated() => $pb.PbList<NetworkState>();- @$core.pragma('dart2js:noInline')- static NetworkState getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<NetworkState>(create);- static NetworkState? _defaultInstance;-- @$pb.TagNumber(1)- NetworkType get ty => $_getN(0);- @$pb.TagNumber(1)- set ty(NetworkType v) { setField(1, v); }- @$pb.TagNumber(1)- $core.bool hasTy() => $_has(0);- @$pb.TagNumber(1)- void clearTy() => clearField(1);-}-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dartindex 1b099689db..64e2fc3b49 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dart@@ -30,22 +30,3 @@ class UserNotification extends $pb.ProtobufEnum {const UserNotification._($core.int v, $core.String n) : super(v, n);}-class NetworkType extends $pb.ProtobufEnum {- static const NetworkType UnknownNetworkType = NetworkType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnknownNetworkType');- static const NetworkType Wifi = NetworkType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Wifi');- static const NetworkType Cell = NetworkType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Cell');- static const NetworkType Ethernet = NetworkType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Ethernet');-- static const $core.List<NetworkType> values = <NetworkType> [- UnknownNetworkType,- Wifi,- Cell,- Ethernet,- ];-- static final $core.Map<$core.int, NetworkType> _byValue = $pb.ProtobufEnum.initByValue(values);- static NetworkType? valueOf($core.int value) => _byValue[value];-- const NetworkType._($core.int v, $core.String n) : super(v, n);-}-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbjson.dartindex 7fd6e236a4..95aed3d85e 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbjson.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbjson.dart@@ -22,26 +22,3 @@ const UserNotification$json = const {/// Descriptor for `UserNotification`. Decode as a `google.protobuf.EnumDescriptorProto`.final $typed_data.Uint8List userNotificationDescriptor = $convert.base64Decode('ChBVc2VyTm90aWZpY2F0aW9uEgsKB1Vua25vd24QABITCg9Vc2VyQXV0aENoYW5nZWQQARIWChJVc2VyUHJvZmlsZVVwZGF0ZWQQAhIUChBVc2VyVW5hdXRob3JpemVkEAMSHQoZVXNlcldzQ29ubmVjdFN0YXRlQ2hhbmdlZBAE');-@$core.Deprecated('Use networkTypeDescriptor instead')-const NetworkType$json = const {- '1': 'NetworkType',- '2': const [- const {'1': 'UnknownNetworkType', '2': 0},- const {'1': 'Wifi', '2': 1},- const {'1': 'Cell', '2': 2},- const {'1': 'Ethernet', '2': 3},- ],-};--/// Descriptor for `NetworkType`. Decode as a `google.protobuf.EnumDescriptorProto`.-final $typed_data.Uint8List networkTypeDescriptor = $convert.base64Decode('CgtOZXR3b3JrVHlwZRIWChJVbmtub3duTmV0d29ya1R5cGUQABIICgRXaWZpEAESCAoEQ2VsbBACEgwKCEV0aGVybmV0EAM=');-@$core.Deprecated('Use networkStateDescriptor instead')-const NetworkState$json = const {- '1': 'NetworkState',- '2': const [- const {'1': 'ty', '3': 1, '4': 1, '5': 14, '6': '.NetworkType', '10': 'ty'},- ],-};--/// Descriptor for `NetworkState`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List networkStateDescriptor = $convert.base64Decode('CgxOZXR3b3JrU3RhdGUSHAoCdHkYASABKA4yDC5OZXR3b3JrVHlwZVICdHk=');diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dartindex ed5c08559d..bb4f1f6e45 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart@@ -1,7 +1,4 @@// Auto-generated, do not editexport './observable.pb.dart';-export './user_table.pb.dart';export './errors.pb.dart';-export './user_profile.pb.dart';export './event.pb.dart';-export './auth.pb.dart';diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pb.dartdeleted file mode 100644index b1299286cb..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pb.dart+++ /dev/null@@ -1,403 +0,0 @@-///-// Generated code. Do not modify.-// source: user_profile.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields--import 'dart:core' as $core;--import 'package:protobuf/protobuf.dart' as $pb;--class UserToken extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UserToken', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'token')- ..hasRequiredFields = false- ;-- UserToken._() : super();- factory UserToken({- $core.String? token,- }) {- final _result = create();- if (token != null) {- _result.token = token;- }- return _result;- }- factory UserToken.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory UserToken.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- UserToken clone() => UserToken()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- UserToken copyWith(void Function(UserToken) updates) => super.copyWith((message) => updates(message as UserToken)) as UserToken; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static UserToken create() => UserToken._();- UserToken createEmptyInstance() => create();- static $pb.PbList<UserToken> createRepeated() => $pb.PbList<UserToken>();- @$core.pragma('dart2js:noInline')- static UserToken getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UserToken>(create);- static UserToken? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get token => $_getSZ(0);- @$pb.TagNumber(1)- set token($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasToken() => $_has(0);- @$pb.TagNumber(1)- void clearToken() => clearField(1);-}--class UserProfile extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UserProfile', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'token')- ..hasRequiredFields = false- ;-- UserProfile._() : super();- factory UserProfile({- $core.String? id,- $core.String? email,- $core.String? name,- $core.String? token,- }) {- final _result = create();- if (id != null) {- _result.id = id;- }- if (email != null) {- _result.email = email;- }- if (name != null) {- _result.name = name;- }- if (token != null) {- _result.token = token;- }- return _result;- }- factory UserProfile.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory UserProfile.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- UserProfile clone() => UserProfile()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- UserProfile copyWith(void Function(UserProfile) updates) => super.copyWith((message) => updates(message as UserProfile)) as UserProfile; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static UserProfile create() => UserProfile._();- UserProfile createEmptyInstance() => create();- static $pb.PbList<UserProfile> createRepeated() => $pb.PbList<UserProfile>();- @$core.pragma('dart2js:noInline')- static UserProfile getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UserProfile>(create);- static UserProfile? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get id => $_getSZ(0);- @$pb.TagNumber(1)- set id($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasId() => $_has(0);- @$pb.TagNumber(1)- void clearId() => clearField(1);-- @$pb.TagNumber(2)- $core.String get email => $_getSZ(1);- @$pb.TagNumber(2)- set email($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasEmail() => $_has(1);- @$pb.TagNumber(2)- void clearEmail() => 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);-- @$pb.TagNumber(4)- $core.String get token => $_getSZ(3);- @$pb.TagNumber(4)- set token($core.String v) { $_setString(3, v); }- @$pb.TagNumber(4)- $core.bool hasToken() => $_has(3);- @$pb.TagNumber(4)- void clearToken() => clearField(4);-}--enum UpdateUserRequest_OneOfName {- name,- notSet-}--enum UpdateUserRequest_OneOfEmail {- email,- notSet-}--enum UpdateUserRequest_OneOfPassword {- password,- notSet-}--class UpdateUserRequest extends $pb.GeneratedMessage {- static const $core.Map<$core.int, UpdateUserRequest_OneOfName> _UpdateUserRequest_OneOfNameByTag = {- 2 : UpdateUserRequest_OneOfName.name,- 0 : UpdateUserRequest_OneOfName.notSet- };- static const $core.Map<$core.int, UpdateUserRequest_OneOfEmail> _UpdateUserRequest_OneOfEmailByTag = {- 3 : UpdateUserRequest_OneOfEmail.email,- 0 : UpdateUserRequest_OneOfEmail.notSet- };- static const $core.Map<$core.int, UpdateUserRequest_OneOfPassword> _UpdateUserRequest_OneOfPasswordByTag = {- 4 : UpdateUserRequest_OneOfPassword.password,- 0 : UpdateUserRequest_OneOfPassword.notSet- };- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateUserRequest', createEmptyInstance: create)- ..oo(0, [2])- ..oo(1, [3])- ..oo(2, [4])- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..hasRequiredFields = false- ;-- UpdateUserRequest._() : super();- factory UpdateUserRequest({- $core.String? id,- $core.String? name,- $core.String? email,- $core.String? password,- }) {- final _result = create();- if (id != null) {- _result.id = id;- }- if (name != null) {- _result.name = name;- }- if (email != null) {- _result.email = email;- }- if (password != null) {- _result.password = password;- }- return _result;- }- factory UpdateUserRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory UpdateUserRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- UpdateUserRequest clone() => UpdateUserRequest()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- UpdateUserRequest copyWith(void Function(UpdateUserRequest) updates) => super.copyWith((message) => updates(message as UpdateUserRequest)) as UpdateUserRequest; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static UpdateUserRequest create() => UpdateUserRequest._();- UpdateUserRequest createEmptyInstance() => create();- static $pb.PbList<UpdateUserRequest> createRepeated() => $pb.PbList<UpdateUserRequest>();- @$core.pragma('dart2js:noInline')- static UpdateUserRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateUserRequest>(create);- static UpdateUserRequest? _defaultInstance;-- UpdateUserRequest_OneOfName whichOneOfName() => _UpdateUserRequest_OneOfNameByTag[$_whichOneof(0)]!;- void clearOneOfName() => clearField($_whichOneof(0));-- UpdateUserRequest_OneOfEmail whichOneOfEmail() => _UpdateUserRequest_OneOfEmailByTag[$_whichOneof(1)]!;- void clearOneOfEmail() => clearField($_whichOneof(1));-- UpdateUserRequest_OneOfPassword whichOneOfPassword() => _UpdateUserRequest_OneOfPasswordByTag[$_whichOneof(2)]!;- void clearOneOfPassword() => clearField($_whichOneof(2));-- @$pb.TagNumber(1)- $core.String get id => $_getSZ(0);- @$pb.TagNumber(1)- set id($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasId() => $_has(0);- @$pb.TagNumber(1)- void clearId() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get email => $_getSZ(2);- @$pb.TagNumber(3)- set email($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasEmail() => $_has(2);- @$pb.TagNumber(3)- void clearEmail() => clearField(3);-- @$pb.TagNumber(4)- $core.String get password => $_getSZ(3);- @$pb.TagNumber(4)- set password($core.String v) { $_setString(3, v); }- @$pb.TagNumber(4)- $core.bool hasPassword() => $_has(3);- @$pb.TagNumber(4)- void clearPassword() => clearField(4);-}--enum UpdateUserParams_OneOfName {- name,- notSet-}--enum UpdateUserParams_OneOfEmail {- email,- notSet-}--enum UpdateUserParams_OneOfPassword {- password,- notSet-}--class UpdateUserParams extends $pb.GeneratedMessage {- static const $core.Map<$core.int, UpdateUserParams_OneOfName> _UpdateUserParams_OneOfNameByTag = {- 2 : UpdateUserParams_OneOfName.name,- 0 : UpdateUserParams_OneOfName.notSet- };- static const $core.Map<$core.int, UpdateUserParams_OneOfEmail> _UpdateUserParams_OneOfEmailByTag = {- 3 : UpdateUserParams_OneOfEmail.email,- 0 : UpdateUserParams_OneOfEmail.notSet- };- static const $core.Map<$core.int, UpdateUserParams_OneOfPassword> _UpdateUserParams_OneOfPasswordByTag = {- 4 : UpdateUserParams_OneOfPassword.password,- 0 : UpdateUserParams_OneOfPassword.notSet- };- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateUserParams', createEmptyInstance: create)- ..oo(0, [2])- ..oo(1, [3])- ..oo(2, [4])- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..hasRequiredFields = false- ;-- UpdateUserParams._() : super();- factory UpdateUserParams({- $core.String? id,- $core.String? name,- $core.String? email,- $core.String? password,- }) {- final _result = create();- if (id != null) {- _result.id = id;- }- if (name != null) {- _result.name = name;- }- if (email != null) {- _result.email = email;- }- if (password != null) {- _result.password = password;- }- return _result;- }- factory UpdateUserParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory UpdateUserParams.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- UpdateUserParams clone() => UpdateUserParams()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- UpdateUserParams copyWith(void Function(UpdateUserParams) updates) => super.copyWith((message) => updates(message as UpdateUserParams)) as UpdateUserParams; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static UpdateUserParams create() => UpdateUserParams._();- UpdateUserParams createEmptyInstance() => create();- static $pb.PbList<UpdateUserParams> createRepeated() => $pb.PbList<UpdateUserParams>();- @$core.pragma('dart2js:noInline')- static UpdateUserParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateUserParams>(create);- static UpdateUserParams? _defaultInstance;-- UpdateUserParams_OneOfName whichOneOfName() => _UpdateUserParams_OneOfNameByTag[$_whichOneof(0)]!;- void clearOneOfName() => clearField($_whichOneof(0));-- UpdateUserParams_OneOfEmail whichOneOfEmail() => _UpdateUserParams_OneOfEmailByTag[$_whichOneof(1)]!;- void clearOneOfEmail() => clearField($_whichOneof(1));-- UpdateUserParams_OneOfPassword whichOneOfPassword() => _UpdateUserParams_OneOfPasswordByTag[$_whichOneof(2)]!;- void clearOneOfPassword() => clearField($_whichOneof(2));-- @$pb.TagNumber(1)- $core.String get id => $_getSZ(0);- @$pb.TagNumber(1)- set id($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasId() => $_has(0);- @$pb.TagNumber(1)- void clearId() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get email => $_getSZ(2);- @$pb.TagNumber(3)- set email($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasEmail() => $_has(2);- @$pb.TagNumber(3)- void clearEmail() => clearField(3);-- @$pb.TagNumber(4)- $core.String get password => $_getSZ(3);- @$pb.TagNumber(4)- set password($core.String v) { $_setString(3, v); }- @$pb.TagNumber(4)- $core.bool hasPassword() => $_has(3);- @$pb.TagNumber(4)- void clearPassword() => clearField(4);-}-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbenum.dartdeleted file mode 100644index e73b70b723..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbenum.dart+++ /dev/null@@ -1,7 +0,0 @@-///-// Generated code. Do not modify.-// source: user_profile.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbjson.dartdeleted file mode 100644index 30b3e96da4..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbjson.dart+++ /dev/null@@ -1,69 +0,0 @@-///-// Generated code. Do not modify.-// source: user_profile.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package--import 'dart:core' as $core;-import 'dart:convert' as $convert;-import 'dart:typed_data' as $typed_data;-@$core.Deprecated('Use userTokenDescriptor instead')-const UserToken$json = const {- '1': 'UserToken',- '2': const [- const {'1': 'token', '3': 1, '4': 1, '5': 9, '10': 'token'},- ],-};--/// Descriptor for `UserToken`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List userTokenDescriptor = $convert.base64Decode('CglVc2VyVG9rZW4SFAoFdG9rZW4YASABKAlSBXRva2Vu');-@$core.Deprecated('Use userProfileDescriptor instead')-const UserProfile$json = const {- '1': 'UserProfile',- '2': const [- const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},- const {'1': 'email', '3': 2, '4': 1, '5': 9, '10': 'email'},- const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},- const {'1': 'token', '3': 4, '4': 1, '5': 9, '10': 'token'},- ],-};--/// Descriptor for `UserProfile`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List userProfileDescriptor = $convert.base64Decode('CgtVc2VyUHJvZmlsZRIOCgJpZBgBIAEoCVICaWQSFAoFZW1haWwYAiABKAlSBWVtYWlsEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFdG9rZW4YBCABKAlSBXRva2Vu');-@$core.Deprecated('Use updateUserRequestDescriptor instead')-const UpdateUserRequest$json = const {- '1': 'UpdateUserRequest',- '2': const [- const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'},- const {'1': 'email', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'email'},- const {'1': 'password', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'password'},- ],- '8': const [- const {'1': 'one_of_name'},- const {'1': 'one_of_email'},- const {'1': 'one_of_password'},- ],-};--/// Descriptor for `UpdateUserRequest`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List updateUserRequestDescriptor = $convert.base64Decode('ChFVcGRhdGVVc2VyUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhYKBWVtYWlsGAMgASgJSAFSBWVtYWlsEhwKCHBhc3N3b3JkGAQgASgJSAJSCHBhc3N3b3JkQg0KC29uZV9vZl9uYW1lQg4KDG9uZV9vZl9lbWFpbEIRCg9vbmVfb2ZfcGFzc3dvcmQ=');-@$core.Deprecated('Use updateUserParamsDescriptor instead')-const UpdateUserParams$json = const {- '1': 'UpdateUserParams',- '2': const [- const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'},- const {'1': 'email', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'email'},- const {'1': 'password', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'password'},- ],- '8': const [- const {'1': 'one_of_name'},- const {'1': 'one_of_email'},- const {'1': 'one_of_password'},- ],-};--/// Descriptor for `UpdateUserParams`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List updateUserParamsDescriptor = $convert.base64Decode('ChBVcGRhdGVVc2VyUGFyYW1zEg4KAmlkGAEgASgJUgJpZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFgoFZW1haWwYAyABKAlIAVIFZW1haWwSHAoIcGFzc3dvcmQYBCABKAlIAlIIcGFzc3dvcmRCDQoLb25lX29mX25hbWVCDgoMb25lX29mX2VtYWlsQhEKD29uZV9vZl9wYXNzd29yZA==');diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbserver.dartdeleted file mode 100644index 20445601d6..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_profile.pbserver.dart+++ /dev/null@@ -1,9 +0,0 @@-///-// Generated code. Do not modify.-// source: user_profile.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package--export 'user_profile.pb.dart';-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pb.dartdeleted file mode 100644index 97f85fa415..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pb.dart+++ /dev/null@@ -1,100 +0,0 @@-///-// Generated code. Do not modify.-// source: user_table.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields--import 'dart:core' as $core;--import 'package:protobuf/protobuf.dart' as $pb;--class User extends $pb.GeneratedMessage {- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'User', createEmptyInstance: create)- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')- ..hasRequiredFields = false- ;-- User._() : super();- factory User({- $core.String? id,- $core.String? name,- $core.String? email,- $core.String? password,- }) {- final _result = create();- if (id != null) {- _result.id = id;- }- if (name != null) {- _result.name = name;- }- if (email != null) {- _result.email = email;- }- if (password != null) {- _result.password = password;- }- return _result;- }- factory User.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);- factory User.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '- 'Will be removed in next major version')- User clone() => User()..mergeFromMessage(this);- @$core.Deprecated(- 'Using this can add significant overhead to your binary. '- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '- 'Will be removed in next major version')- User copyWith(void Function(User) updates) => super.copyWith((message) => updates(message as User)) as User; // ignore: deprecated_member_use- $pb.BuilderInfo get info_ => _i;- @$core.pragma('dart2js:noInline')- static User create() => User._();- User createEmptyInstance() => create();- static $pb.PbList<User> createRepeated() => $pb.PbList<User>();- @$core.pragma('dart2js:noInline')- static User getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<User>(create);- static User? _defaultInstance;-- @$pb.TagNumber(1)- $core.String get id => $_getSZ(0);- @$pb.TagNumber(1)- set id($core.String v) { $_setString(0, v); }- @$pb.TagNumber(1)- $core.bool hasId() => $_has(0);- @$pb.TagNumber(1)- void clearId() => clearField(1);-- @$pb.TagNumber(2)- $core.String get name => $_getSZ(1);- @$pb.TagNumber(2)- set name($core.String v) { $_setString(1, v); }- @$pb.TagNumber(2)- $core.bool hasName() => $_has(1);- @$pb.TagNumber(2)- void clearName() => clearField(2);-- @$pb.TagNumber(3)- $core.String get email => $_getSZ(2);- @$pb.TagNumber(3)- set email($core.String v) { $_setString(2, v); }- @$pb.TagNumber(3)- $core.bool hasEmail() => $_has(2);- @$pb.TagNumber(3)- void clearEmail() => clearField(3);-- @$pb.TagNumber(4)- $core.String get password => $_getSZ(3);- @$pb.TagNumber(4)- set password($core.String v) { $_setString(3, v); }- @$pb.TagNumber(4)- $core.bool hasPassword() => $_has(3);- @$pb.TagNumber(4)- void clearPassword() => clearField(4);-}-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbenum.dartdeleted file mode 100644index 9000c27feb..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbenum.dart+++ /dev/null@@ -1,7 +0,0 @@-///-// Generated code. Do not modify.-// source: user_table.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields-diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbjson.dartdeleted file mode 100644index 87bd8932df..0000000000--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbjson.dart+++ /dev/null@@ -1,23 +0,0 @@-///-// Generated code. Do not modify.-// source: user_table.proto-//-// @dart = 2.12-// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package--import 'dart:core' as $core;-import 'dart:convert' as $convert;-import 'dart:typed_data' as $typed_data;-@$core.Deprecated('Use userDescriptor instead')-const User$json = const {- '1': 'User',- '2': const [- const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},- const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},- const {'1': 'email', '3': 3, '4': 1, '5': 9, '10': 'email'},- const {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'},- ],-};--/// Descriptor for `User`. Decode as a `google.protobuf.DescriptorProto`.-final $typed_data.Uint8List userDescriptor = $convert.base64Decode('CgRVc2VyEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lEhQKBWVtYWlsGAMgASgJUgVlbWFpbBIaCghwYXNzd29yZBgEIAEoCVIIcGFzc3dvcmQ=');diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pb.dartnew file mode 100644index 0000000000..0e45d98939--- /dev/null+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pb.dart@@ -0,0 +1,62 @@+///+// Generated code. Do not modify.+// source: network_state.proto+//+// @dart = 2.12+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields++import 'dart:core' as $core;++import 'package:protobuf/protobuf.dart' as $pb;++import 'network_state.pbenum.dart';++export 'network_state.pbenum.dart';++class NetworkState extends $pb.GeneratedMessage {+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'NetworkState', createEmptyInstance: create)+ ..e<NetworkType>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ty', $pb.PbFieldType.OE, defaultOrMaker: NetworkType.UnknownNetworkType, valueOf: NetworkType.valueOf, enumValues: NetworkType.values)+ ..hasRequiredFields = false+ ;++ NetworkState._() : super();+ factory NetworkState({+ NetworkType? ty,+ }) {+ final _result = create();+ if (ty != null) {+ _result.ty = ty;+ }+ return _result;+ }+ factory NetworkState.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);+ factory NetworkState.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);+ @$core.Deprecated(+ 'Using this can add significant overhead to your binary. '+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '+ 'Will be removed in next major version')+ NetworkState clone() => NetworkState()..mergeFromMessage(this);+ @$core.Deprecated(+ 'Using this can add significant overhead to your binary. '+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '+ 'Will be removed in next major version')+ NetworkState copyWith(void Function(NetworkState) updates) => super.copyWith((message) => updates(message as NetworkState)) as NetworkState; // ignore: deprecated_member_use+ $pb.BuilderInfo get info_ => _i;+ @$core.pragma('dart2js:noInline')+ static NetworkState create() => NetworkState._();+ NetworkState createEmptyInstance() => create();+ static $pb.PbList<NetworkState> createRepeated() => $pb.PbList<NetworkState>();+ @$core.pragma('dart2js:noInline')+ static NetworkState getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<NetworkState>(create);+ static NetworkState? _defaultInstance;++ @$pb.TagNumber(1)+ NetworkType get ty => $_getN(0);+ @$pb.TagNumber(1)+ set ty(NetworkType v) { setField(1, v); }+ @$pb.TagNumber(1)+ $core.bool hasTy() => $_has(0);+ @$pb.TagNumber(1)+ void clearTy() => clearField(1);+}+diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbenum.dartnew file mode 100644index 0000000000..bbb75f42ec--- /dev/null+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbenum.dart@@ -0,0 +1,30 @@+///+// Generated code. Do not modify.+// source: network_state.proto+//+// @dart = 2.12+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields++// ignore_for_file: UNDEFINED_SHOWN_NAME+import 'dart:core' as $core;+import 'package:protobuf/protobuf.dart' as $pb;++class NetworkType extends $pb.ProtobufEnum {+ static const NetworkType UnknownNetworkType = NetworkType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnknownNetworkType');+ static const NetworkType Wifi = NetworkType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Wifi');+ static const NetworkType Cell = NetworkType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Cell');+ static const NetworkType Ethernet = NetworkType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Ethernet');++ static const $core.List<NetworkType> values = <NetworkType> [+ UnknownNetworkType,+ Wifi,+ Cell,+ Ethernet,+ ];++ static final $core.Map<$core.int, NetworkType> _byValue = $pb.ProtobufEnum.initByValue(values);+ static NetworkType? valueOf($core.int value) => _byValue[value];++ const NetworkType._($core.int v, $core.String n) : super(v, n);+}+diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbjson.dartnew file mode 100644index 0000000000..5ca9f339a4--- /dev/null+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbjson.dart@@ -0,0 +1,33 @@+///+// Generated code. Do not modify.+// source: network_state.proto+//+// @dart = 2.12+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package++import 'dart:core' as $core;+import 'dart:convert' as $convert;+import 'dart:typed_data' as $typed_data;+@$core.Deprecated('Use networkTypeDescriptor instead')+const NetworkType$json = const {+ '1': 'NetworkType',+ '2': const [+ const {'1': 'UnknownNetworkType', '2': 0},+ const {'1': 'Wifi', '2': 1},+ const {'1': 'Cell', '2': 2},+ const {'1': 'Ethernet', '2': 3},+ ],+};++/// Descriptor for `NetworkType`. Decode as a `google.protobuf.EnumDescriptorProto`.+final $typed_data.Uint8List networkTypeDescriptor = $convert.base64Decode('CgtOZXR3b3JrVHlwZRIWChJVbmtub3duTmV0d29ya1R5cGUQABIICgRXaWZpEAESCAoEQ2VsbBACEgwKCEV0aGVybmV0EAM=');+@$core.Deprecated('Use networkStateDescriptor instead')+const NetworkState$json = const {+ '1': 'NetworkState',+ '2': const [+ const {'1': 'ty', '3': 1, '4': 1, '5': 14, '6': '.NetworkType', '10': 'ty'},+ ],+};++/// Descriptor for `NetworkState`. Decode as a `google.protobuf.DescriptorProto`.+final $typed_data.Uint8List networkStateDescriptor = $convert.base64Decode('CgxOZXR3b3JrU3RhdGUSHAoCdHkYASABKA4yDC5OZXR3b3JrVHlwZVICdHk=');diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbserver.dartsimilarity index 83%rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbserver.dartrename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbserver.dartindex 1999686ad2..1a2105cef0 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/user_table.pbserver.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/network_state.pbserver.dart@@ -1,9 +1,9 @@///// Generated code. Do not modify.-// source: user_table.proto+// source: network_state.proto//// @dart = 2.12// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package-export 'user_table.pb.dart';+export 'network_state.pb.dart';diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/protobuf.dartindex ccc75e7e37..2cc2dfd9ee 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/protobuf.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/lib-infra/protobuf.dart@@ -1,2 +1,3 @@// Auto-generated, do not editexport './kv.pb.dart';+export './network_state.pb.dart';diff --git a/frontend/rust-lib/flowy-sdk/src/lib.rs b/frontend/rust-lib/flowy-sdk/src/lib.rsindex 06f3d4d0ef..69769d893c 100644--- a/frontend/rust-lib/flowy-sdk/src/lib.rs+++ b/frontend/rust-lib/flowy-sdk/src/lib.rs@@ -5,12 +5,12 @@ use crate::deps_resolve::WorkspaceDepsResolver;use backend_service::config::ServerConfig;use flowy_document::module::FlowyDocument;use flowy_user::{- notify::{NetworkState, NetworkType},prelude::UserStatus,services::user::{UserSession, UserSessionConfig},};use flowy_workspace::{errors::WorkspaceError, prelude::WorkspaceController};use lib_dispatch::prelude::*;+use lib_infra::entities::network_state::NetworkState;use module::mk_modules;pub use module::*;use std::sync::{@@ -102,10 +102,14 @@ impl FlowySDK {fn _init(dispatch: &EventDispatcher, user_session: Arc<UserSession>, workspace_controller: Arc<WorkspaceController>) {let user_status_subscribe = user_session.notifier.user_status_subscribe();let network_status_subscribe = user_session.notifier.network_status_subscribe();+ let cloned_workspace_controller = workspace_controller.clone();+dispatch.spawn(async move {user_session.init();_listen_user_status(user_status_subscribe, workspace_controller.clone()).await;- _listen_network_status(network_status_subscribe, workspace_controller).await;+ });+ dispatch.spawn(async move {+ _listen_network_status(network_status_subscribe, cloned_workspace_controller).await;});}@@ -142,23 +146,10 @@ async fn _listen_user_status(async fn _listen_network_status(mut subscribe: broadcast::Receiver<NetworkState>,- _workspace_controller: Arc<WorkspaceController>,+ workspace_controller: Arc<WorkspaceController>,) {- while let Ok(status) = subscribe.recv().await {- let result = || async {- match status.ty {- NetworkType::UnknownNetworkType => {},- NetworkType::Wifi => {},- NetworkType::Cell => {},- NetworkType::Ethernet => {},- }- Ok::<(), WorkspaceError>(())- };-- match result().await {- Ok(_) => {},- Err(e) => log::error!("{}", e),- }+ while let Ok(state) = subscribe.recv().await {+ workspace_controller.network_state_changed(state);}}diff --git a/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs b/frontend/rust-lib/flowy-user/src/handlers/user_handler.rsindex adf8e79199..8b28ef4eb8 100644--- a/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs+++ b/frontend/rust-lib/flowy-user/src/handlers/user_handler.rs@@ -1,7 +1,6 @@use crate::{entities::*, errors::UserError, services::user::UserSession};use lib_dispatch::prelude::*;--use crate::notify::NetworkState;+use lib_infra::entities::network_state::NetworkState;use std::{convert::TryInto, sync::Arc};#[tracing::instrument(skip(session))]@@ -38,7 +37,7 @@ pub async fn update_user_handler(Ok(())}-#[tracing::instrument(name = "update_user", skip(data, session))]+#[tracing::instrument(skip(data, session))]pub async fn update_network_ty(data: Data<NetworkState>, session: Unit<Arc<UserSession>>) -> Result<(), UserError> {let network_state = data.into_inner();session.update_network_state(network_state);diff --git a/frontend/rust-lib/flowy-user/src/notify/mod.rs b/frontend/rust-lib/flowy-user/src/notify/mod.rsindex 8ea48d1f5a..e77542857f 100644--- a/frontend/rust-lib/flowy-user/src/notify/mod.rs+++ b/frontend/rust-lib/flowy-user/src/notify/mod.rs@@ -1,2 +1,2 @@mod observable;-pub use observable::*;+pub(crate) use observable::*;diff --git a/frontend/rust-lib/flowy-user/src/notify/observable.rs b/frontend/rust-lib/flowy-user/src/notify/observable.rsindex 50a257aa69..e2d69b9672 100644--- a/frontend/rust-lib/flowy-user/src/notify/observable.rs+++ b/frontend/rust-lib/flowy-user/src/notify/observable.rs@@ -1,6 +1,5 @@use dart_notify::DartNotifyBuilder;-use flowy_derive::{ProtoBuf, ProtoBuf_Enum};-+use flowy_derive::ProtoBuf_Enum;const OBSERVABLE_CATEGORY: &str = "User";#[derive(ProtoBuf_Enum, Debug)]@@ -23,21 +22,3 @@ impl std::convert::From<UserNotification> for i32 {pub(crate) fn dart_notify(id: &str, ty: UserNotification) -> DartNotifyBuilder {DartNotifyBuilder::new(id, ty, OBSERVABLE_CATEGORY)}--#[derive(ProtoBuf_Enum, Debug, Clone)]-pub enum NetworkType {- UnknownNetworkType = 0,- Wifi = 1,- Cell = 2,- Ethernet = 3,-}--impl std::default::Default for NetworkType {- fn default() -> Self { NetworkType::UnknownNetworkType }-}--#[derive(ProtoBuf, Debug, Default, Clone)]-pub struct NetworkState {- #[pb(index = 1)]- pub ty: NetworkType,-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/auth.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/auth.rsdeleted file mode 100644index 9a6cf2f3ff..0000000000--- a/frontend/rust-lib/flowy-user/src/protobuf/model/auth.rs+++ /dev/null@@ -1,1661 +0,0 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit-// @generated--// https://github.com/rust-lang/rust-clippy/issues/702-#![allow(unknown_lints)]-#![allow(clippy::all)]--#![allow(unused_attributes)]-#![cfg_attr(rustfmt, rustfmt::skip)]--#![allow(box_pointers)]-#![allow(dead_code)]-#![allow(missing_docs)]-#![allow(non_camel_case_types)]-#![allow(non_snake_case)]-#![allow(non_upper_case_globals)]-#![allow(trivial_casts)]-#![allow(unused_imports)]-#![allow(unused_results)]-//! Generated file from `auth.proto`--/// Generated files are compatible only with the same version-/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;--#[derive(PartialEq,Clone,Default)]-pub struct SignInRequest {- // message fields- pub email: ::std::string::String,- pub password: ::std::string::String,- pub name: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a SignInRequest {- fn default() -> &'a SignInRequest {- <SignInRequest as ::protobuf::Message>::default_instance()- }-}--impl SignInRequest {- pub fn new() -> SignInRequest {- ::std::default::Default::default()- }-- // string email = 1;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::std::string::String::new())- }-- // string password = 2;--- pub fn get_password(&self) -> &str {- &self.password- }- pub fn clear_password(&mut self) {- self.password.clear();- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.password = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- &mut self.password- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- ::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 {- 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.email)?;- },- 2 => {- ::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())?;- },- };- }- ::std::result::Result::Ok(())- }-- // Compute sizes of nested messages- #[allow(unused_variables)]- fn compute_size(&self) -> u32 {- let mut my_size = 0;- if !self.email.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.email);- }- if !self.password.is_empty() {- 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());- self.cached_size.set(my_size);- my_size- }-- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {- if !self.email.is_empty() {- os.write_string(1, &self.email)?;- }- if !self.password.is_empty() {- 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())?;- ::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() -> SignInRequest {- SignInRequest::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>(- "email",- |m: &SignInRequest| { &m.email },- |m: &mut SignInRequest| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "password",- |m: &SignInRequest| { &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>(- "SignInRequest",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static SignInRequest {- static instance: ::protobuf::rt::LazyV2<SignInRequest> = ::protobuf::rt::LazyV2::INIT;- instance.get(SignInRequest::new)- }-}--impl ::protobuf::Clear for SignInRequest {- fn clear(&mut self) {- self.email.clear();- self.password.clear();- self.name.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for SignInRequest {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for SignInRequest {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct SignInParams {- // message fields- pub email: ::std::string::String,- pub password: ::std::string::String,- pub name: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a SignInParams {- fn default() -> &'a SignInParams {- <SignInParams as ::protobuf::Message>::default_instance()- }-}--impl SignInParams {- pub fn new() -> SignInParams {- ::std::default::Default::default()- }-- // string email = 1;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::std::string::String::new())- }-- // string password = 2;--- pub fn get_password(&self) -> &str {- &self.password- }- pub fn clear_password(&mut self) {- self.password.clear();- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.password = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- &mut self.password- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- ::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 {- 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.email)?;- },- 2 => {- ::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())?;- },- };- }- ::std::result::Result::Ok(())- }-- // Compute sizes of nested messages- #[allow(unused_variables)]- fn compute_size(&self) -> u32 {- let mut my_size = 0;- if !self.email.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.email);- }- if !self.password.is_empty() {- 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());- self.cached_size.set(my_size);- my_size- }-- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {- if !self.email.is_empty() {- os.write_string(1, &self.email)?;- }- if !self.password.is_empty() {- 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())?;- ::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() -> SignInParams {- SignInParams::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>(- "email",- |m: &SignInParams| { &m.email },- |m: &mut SignInParams| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "password",- |m: &SignInParams| { &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>(- "SignInParams",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static SignInParams {- static instance: ::protobuf::rt::LazyV2<SignInParams> = ::protobuf::rt::LazyV2::INIT;- instance.get(SignInParams::new)- }-}--impl ::protobuf::Clear for SignInParams {- fn clear(&mut self) {- self.email.clear();- self.password.clear();- self.name.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for SignInParams {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for SignInParams {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct SignInResponse {- // message fields- pub user_id: ::std::string::String,- pub name: ::std::string::String,- pub email: ::std::string::String,- pub token: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a SignInResponse {- fn default() -> &'a SignInResponse {- <SignInResponse as ::protobuf::Message>::default_instance()- }-}--impl SignInResponse {- pub fn new() -> SignInResponse {- ::std::default::Default::default()- }-- // string user_id = 1;--- 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())- }-- // 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 email = 3;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::std::string::String::new())- }-- // string token = 4;--- pub fn get_token(&self) -> &str {- &self.token- }- pub fn clear_token(&mut self) {- self.token.clear();- }-- // Param is passed by value, moved- pub fn set_token(&mut self, v: ::std::string::String) {- self.token = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_token(&mut self) -> &mut ::std::string::String {- &mut self.token- }-- // Take field- pub fn take_token(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.token, ::std::string::String::new())- }-}--impl ::protobuf::Message for SignInResponse {- 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.user_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.email)?;- },- 4 => {- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;- },- _ => {- ::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.user_id.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.user_id);- }- if !self.name.is_empty() {- my_size += ::protobuf::rt::string_size(2, &self.name);- }- if !self.email.is_empty() {- my_size += ::protobuf::rt::string_size(3, &self.email);- }- if !self.token.is_empty() {- my_size += ::protobuf::rt::string_size(4, &self.token);- }- 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.user_id.is_empty() {- os.write_string(1, &self.user_id)?;- }- if !self.name.is_empty() {- os.write_string(2, &self.name)?;- }- if !self.email.is_empty() {- os.write_string(3, &self.email)?;- }- if !self.token.is_empty() {- os.write_string(4, &self.token)?;- }- 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() -> SignInResponse {- SignInResponse::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>(- "user_id",- |m: &SignInResponse| { &m.user_id },- |m: &mut SignInResponse| { &mut m.user_id },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "name",- |m: &SignInResponse| { &m.name },- |m: &mut SignInResponse| { &mut m.name },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "email",- |m: &SignInResponse| { &m.email },- |m: &mut SignInResponse| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "token",- |m: &SignInResponse| { &m.token },- |m: &mut SignInResponse| { &mut m.token },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInResponse>(- "SignInResponse",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static SignInResponse {- static instance: ::protobuf::rt::LazyV2<SignInResponse> = ::protobuf::rt::LazyV2::INIT;- instance.get(SignInResponse::new)- }-}--impl ::protobuf::Clear for SignInResponse {- fn clear(&mut self) {- self.user_id.clear();- self.name.clear();- self.email.clear();- self.token.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for SignInResponse {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for SignInResponse {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct SignUpRequest {- // message fields- pub email: ::std::string::String,- pub name: ::std::string::String,- pub password: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a SignUpRequest {- fn default() -> &'a SignUpRequest {- <SignUpRequest as ::protobuf::Message>::default_instance()- }-}--impl SignUpRequest {- pub fn new() -> SignUpRequest {- ::std::default::Default::default()- }-- // string email = 1;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::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 password = 3;--- pub fn get_password(&self) -> &str {- &self.password- }- pub fn clear_password(&mut self) {- self.password.clear();- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.password = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- &mut self.password- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.password, ::std::string::String::new())- }-}--impl ::protobuf::Message for SignUpRequest {- 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.email)?;- },- 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.password)?;- },- _ => {- ::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.email.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.email);- }- if !self.name.is_empty() {- my_size += ::protobuf::rt::string_size(2, &self.name);- }- if !self.password.is_empty() {- my_size += ::protobuf::rt::string_size(3, &self.password);- }- 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.email.is_empty() {- os.write_string(1, &self.email)?;- }- if !self.name.is_empty() {- os.write_string(2, &self.name)?;- }- if !self.password.is_empty() {- os.write_string(3, &self.password)?;- }- 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() -> SignUpRequest {- SignUpRequest::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>(- "email",- |m: &SignUpRequest| { &m.email },- |m: &mut SignUpRequest| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "name",- |m: &SignUpRequest| { &m.name },- |m: &mut SignUpRequest| { &mut m.name },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "password",- |m: &SignUpRequest| { &m.password },- |m: &mut SignUpRequest| { &mut m.password },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpRequest>(- "SignUpRequest",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static SignUpRequest {- static instance: ::protobuf::rt::LazyV2<SignUpRequest> = ::protobuf::rt::LazyV2::INIT;- instance.get(SignUpRequest::new)- }-}--impl ::protobuf::Clear for SignUpRequest {- fn clear(&mut self) {- self.email.clear();- self.name.clear();- self.password.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for SignUpRequest {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for SignUpRequest {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct SignUpParams {- // message fields- pub email: ::std::string::String,- pub name: ::std::string::String,- pub password: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a SignUpParams {- fn default() -> &'a SignUpParams {- <SignUpParams as ::protobuf::Message>::default_instance()- }-}--impl SignUpParams {- pub fn new() -> SignUpParams {- ::std::default::Default::default()- }-- // string email = 1;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::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 password = 3;--- pub fn get_password(&self) -> &str {- &self.password- }- pub fn clear_password(&mut self) {- self.password.clear();- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.password = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- &mut self.password- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.password, ::std::string::String::new())- }-}--impl ::protobuf::Message for SignUpParams {- 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.email)?;- },- 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.password)?;- },- _ => {- ::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.email.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.email);- }- if !self.name.is_empty() {- my_size += ::protobuf::rt::string_size(2, &self.name);- }- if !self.password.is_empty() {- my_size += ::protobuf::rt::string_size(3, &self.password);- }- 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.email.is_empty() {- os.write_string(1, &self.email)?;- }- if !self.name.is_empty() {- os.write_string(2, &self.name)?;- }- if !self.password.is_empty() {- os.write_string(3, &self.password)?;- }- 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() -> SignUpParams {- SignUpParams::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>(- "email",- |m: &SignUpParams| { &m.email },- |m: &mut SignUpParams| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "name",- |m: &SignUpParams| { &m.name },- |m: &mut SignUpParams| { &mut m.name },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "password",- |m: &SignUpParams| { &m.password },- |m: &mut SignUpParams| { &mut m.password },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpParams>(- "SignUpParams",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static SignUpParams {- static instance: ::protobuf::rt::LazyV2<SignUpParams> = ::protobuf::rt::LazyV2::INIT;- instance.get(SignUpParams::new)- }-}--impl ::protobuf::Clear for SignUpParams {- fn clear(&mut self) {- self.email.clear();- self.name.clear();- self.password.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for SignUpParams {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for SignUpParams {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct SignUpResponse {- // message fields- pub user_id: ::std::string::String,- pub name: ::std::string::String,- pub email: ::std::string::String,- pub token: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a SignUpResponse {- fn default() -> &'a SignUpResponse {- <SignUpResponse as ::protobuf::Message>::default_instance()- }-}--impl SignUpResponse {- pub fn new() -> SignUpResponse {- ::std::default::Default::default()- }-- // string user_id = 1;--- 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())- }-- // 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 email = 3;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::std::string::String::new())- }-- // string token = 4;--- pub fn get_token(&self) -> &str {- &self.token- }- pub fn clear_token(&mut self) {- self.token.clear();- }-- // Param is passed by value, moved- pub fn set_token(&mut self, v: ::std::string::String) {- self.token = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_token(&mut self) -> &mut ::std::string::String {- &mut self.token- }-- // Take field- pub fn take_token(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.token, ::std::string::String::new())- }-}--impl ::protobuf::Message for SignUpResponse {- 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.user_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.email)?;- },- 4 => {- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;- },- _ => {- ::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.user_id.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.user_id);- }- if !self.name.is_empty() {- my_size += ::protobuf::rt::string_size(2, &self.name);- }- if !self.email.is_empty() {- my_size += ::protobuf::rt::string_size(3, &self.email);- }- if !self.token.is_empty() {- my_size += ::protobuf::rt::string_size(4, &self.token);- }- 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.user_id.is_empty() {- os.write_string(1, &self.user_id)?;- }- if !self.name.is_empty() {- os.write_string(2, &self.name)?;- }- if !self.email.is_empty() {- os.write_string(3, &self.email)?;- }- if !self.token.is_empty() {- os.write_string(4, &self.token)?;- }- 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() -> SignUpResponse {- SignUpResponse::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>(- "user_id",- |m: &SignUpResponse| { &m.user_id },- |m: &mut SignUpResponse| { &mut m.user_id },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "name",- |m: &SignUpResponse| { &m.name },- |m: &mut SignUpResponse| { &mut m.name },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "email",- |m: &SignUpResponse| { &m.email },- |m: &mut SignUpResponse| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "token",- |m: &SignUpResponse| { &m.token },- |m: &mut SignUpResponse| { &mut m.token },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpResponse>(- "SignUpResponse",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static SignUpResponse {- static instance: ::protobuf::rt::LazyV2<SignUpResponse> = ::protobuf::rt::LazyV2::INIT;- instance.get(SignUpResponse::new)- }-}--impl ::protobuf::Clear for SignUpResponse {- fn clear(&mut self) {- self.user_id.clear();- self.name.clear();- self.email.clear();- self.token.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for SignUpResponse {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for SignUpResponse {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--static file_descriptor_proto_data: &'static [u8] = b"\- \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\x12\x12\- \n\x04name\x18\x03\x20\x01(\tR\x04name\"T\n\x0cSignInParams\x12\x14\n\- \x05email\x18\x01\x20\x01(\tR\x05email\x12\x1a\n\x08password\x18\x02\x20\- \x01(\tR\x08password\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\"i\n\- \x0eSignInResponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\- \x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\- \x03\x20\x01(\tR\x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05toke\- n\"U\n\rSignUpRequest\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\- \x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1a\n\x08password\x18\- \x03\x20\x01(\tR\x08password\"T\n\x0cSignUpParams\x12\x14\n\x05email\x18\- \x01\x20\x01(\tR\x05email\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\- \x12\x1a\n\x08password\x18\x03\x20\x01(\tR\x08password\"i\n\x0eSignUpRes\- ponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\x12\x12\n\x04na\- me\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\x03\x20\x01(\tR\- \x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05tokenJ\xee\t\n\x06\- \x12\x04\0\0!\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\x15\n\x0b\n\x04\- \x04\0\x02\0\x12\x03\x03\x04\x15\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\x10\n\x0c\n\x05\x04\0\- \x02\0\x03\x12\x03\x03\x13\x14\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\- \x18\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\x13\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\- \x04\x16\x17\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\x05\- \x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\- \x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\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\- \x14\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x15\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\x10\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x13\x14\n\x0b\n\x04\- \x04\x01\x02\x01\x12\x03\t\x04\x18\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\x13\n\x0c\n\- \x05\x04\x01\x02\x01\x03\x12\x03\t\x16\x17\n\x0b\n\x04\x04\x01\x02\x02\- \x12\x03\n\x04\x14\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\x0f\n\x0c\n\x05\x04\x01\x02\x02\- \x03\x12\x03\n\x12\x13\n\n\n\x02\x04\x02\x12\x04\x0c\0\x11\x01\n\n\n\x03\- \x04\x02\x01\x12\x03\x0c\x08\x16\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\- \x17\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\x12\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\r\x15\- \x16\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\x15\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\x10\n\- \x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0f\x13\x14\n\x0b\n\x04\x04\x02\- \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\x02\x02\x03\x01\x12\x03\x10\x0b\x10\n\x0c\n\x05\- \x04\x02\x02\x03\x03\x12\x03\x10\x13\x14\n\n\n\x02\x04\x03\x12\x04\x12\0\- \x16\x01\n\n\n\x03\x04\x03\x01\x12\x03\x12\x08\x15\n\x0b\n\x04\x04\x03\- \x02\0\x12\x03\x13\x04\x15\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x13\x04\- \n\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x13\x0b\x10\n\x0c\n\x05\x04\x03\- \x02\0\x03\x12\x03\x13\x13\x14\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x14\- \x04\x14\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x14\x04\n\n\x0c\n\x05\- \x04\x03\x02\x01\x01\x12\x03\x14\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\- \x12\x03\x14\x12\x13\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x15\x04\x18\n\- \x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\x03\x02\- \x02\x01\x12\x03\x15\x0b\x13\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x15\- \x16\x17\n\n\n\x02\x04\x04\x12\x04\x17\0\x1b\x01\n\n\n\x03\x04\x04\x01\- \x12\x03\x17\x08\x14\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x18\x04\x15\n\x0c\- \n\x05\x04\x04\x02\0\x05\x12\x03\x18\x04\n\n\x0c\n\x05\x04\x04\x02\0\x01\- \x12\x03\x18\x0b\x10\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x18\x13\x14\n\- \x0b\n\x04\x04\x04\x02\x01\x12\x03\x19\x04\x14\n\x0c\n\x05\x04\x04\x02\- \x01\x05\x12\x03\x19\x04\n\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03\x19\- \x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x19\x12\x13\n\x0b\n\x04\- \x04\x04\x02\x02\x12\x03\x1a\x04\x18\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\- \x03\x1a\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\x1a\x0b\x13\n\x0c\- \n\x05\x04\x04\x02\x02\x03\x12\x03\x1a\x16\x17\n\n\n\x02\x04\x05\x12\x04\- \x1c\0!\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1c\x08\x16\n\x0b\n\x04\x04\- \x05\x02\0\x12\x03\x1d\x04\x17\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x1d\- \x04\n\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03\x1d\x0b\x12\n\x0c\n\x05\x04\- \x05\x02\0\x03\x12\x03\x1d\x15\x16\n\x0b\n\x04\x04\x05\x02\x01\x12\x03\- \x1e\x04\x14\n\x0c\n\x05\x04\x05\x02\x01\x05\x12\x03\x1e\x04\n\n\x0c\n\- \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;--fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {- ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()-}--pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {- file_descriptor_proto_lazy.get(|| {- parse_descriptor_proto()- })-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rsindex b18e603105..cd35f2090b 100644--- a/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs+++ b/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs@@ -4,17 +4,8 @@mod observable;pub use observable::*;-mod user_table;-pub use user_table::*;-mod errors;pub use errors::*;-mod user_profile;-pub use user_profile::*;-mod event;pub use event::*;--mod auth;-pub use auth::*;diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/observable.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/observable.rsindex 55e1ab55b3..4bd93b10ac 100644--- a/frontend/rust-lib/flowy-user/src/protobuf/model/observable.rs+++ b/frontend/rust-lib/flowy-user/src/protobuf/model/observable.rs@@ -23,154 +23,6 @@/// of protobuf runtime.// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;-#[derive(PartialEq,Clone,Default)]-pub struct NetworkState {- // message fields- pub ty: NetworkType,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a NetworkState {- fn default() -> &'a NetworkState {- <NetworkState as ::protobuf::Message>::default_instance()- }-}--impl NetworkState {- pub fn new() -> NetworkState {- ::std::default::Default::default()- }-- // .NetworkType ty = 1;--- pub fn get_ty(&self) -> NetworkType {- self.ty- }- pub fn clear_ty(&mut self) {- self.ty = NetworkType::UnknownNetworkType;- }-- // Param is passed by value, moved- pub fn set_ty(&mut self, v: NetworkType) {- self.ty = v;- }-}--impl ::protobuf::Message for NetworkState {- 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 1, &mut self.unknown_fields)?- },- _ => {- ::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.ty != NetworkType::UnknownNetworkType {- my_size += ::protobuf::rt::enum_size(1, self.ty);- }- 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.ty != NetworkType::UnknownNetworkType {- os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.ty))?;- }- 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() -> NetworkState {- NetworkState::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::ProtobufTypeEnum<NetworkType>>(- "ty",- |m: &NetworkState| { &m.ty },- |m: &mut NetworkState| { &mut m.ty },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<NetworkState>(- "NetworkState",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static NetworkState {- static instance: ::protobuf::rt::LazyV2<NetworkState> = ::protobuf::rt::LazyV2::INIT;- instance.get(NetworkState::new)- }-}--impl ::protobuf::Clear for NetworkState {- fn clear(&mut self) {- self.ty = NetworkType::UnknownNetworkType;- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for NetworkState {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for NetworkState {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}-#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum UserNotification {Unknown = 0,@@ -230,95 +82,23 @@ impl ::protobuf::reflect::ProtobufValue for UserNotification {}}-#[derive(Clone,PartialEq,Eq,Debug,Hash)]-pub enum NetworkType {- UnknownNetworkType = 0,- Wifi = 1,- Cell = 2,- Ethernet = 3,-}--impl ::protobuf::ProtobufEnum for NetworkType {- fn value(&self) -> i32 {- *self as i32- }-- fn from_i32(value: i32) -> ::std::option::Option<NetworkType> {- match value {- 0 => ::std::option::Option::Some(NetworkType::UnknownNetworkType),- 1 => ::std::option::Option::Some(NetworkType::Wifi),- 2 => ::std::option::Option::Some(NetworkType::Cell),- 3 => ::std::option::Option::Some(NetworkType::Ethernet),- _ => ::std::option::Option::None- }- }-- fn values() -> &'static [Self] {- static values: &'static [NetworkType] = &[- NetworkType::UnknownNetworkType,- NetworkType::Wifi,- NetworkType::Cell,- NetworkType::Ethernet,- ];- values- }-- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;- descriptor.get(|| {- ::protobuf::reflect::EnumDescriptor::new_pb_name::<NetworkType>("NetworkType", file_descriptor_proto())- })- }-}--impl ::std::marker::Copy for NetworkType {-}--impl ::std::default::Default for NetworkType {- fn default() -> Self {- NetworkType::UnknownNetworkType- }-}--impl ::protobuf::reflect::ProtobufValue for NetworkType {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))- }-}-static file_descriptor_proto_data: &'static [u8] = b"\- \n\x10observable.proto\",\n\x0cNetworkState\x12\x1c\n\x02ty\x18\x01\x20\- \x01(\x0e2\x0c.NetworkTypeR\x02ty*\x81\x01\n\x10UserNotification\x12\x0b\- \n\x07Unknown\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12Us\- erProfileUpdated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\- \x19UserWsConnectStateChanged\x10\x04*G\n\x0bNetworkType\x12\x16\n\x12Un\- knownNetworkType\x10\0\x12\x08\n\x04Wifi\x10\x01\x12\x08\n\x04Cell\x10\- \x02\x12\x0c\n\x08Ethernet\x10\x03J\x82\x04\n\x06\x12\x04\0\0\x11\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\x14\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\x0f\n\x0c\n\x05\x04\- \0\x02\0\x01\x12\x03\x03\x10\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\- \x15\x16\n\n\n\x02\x05\0\x12\x04\x05\0\x0b\x01\n\n\n\x03\x05\0\x01\x12\- \x03\x05\x05\x15\n\x0b\n\x04\x05\0\x02\0\x12\x03\x06\x04\x10\n\x0c\n\x05\- \x05\0\x02\0\x01\x12\x03\x06\x04\x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\- \x06\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x07\x04\x18\n\x0c\n\x05\- \x05\0\x02\x01\x01\x12\x03\x07\x04\x13\n\x0c\n\x05\x05\0\x02\x01\x02\x12\- \x03\x07\x16\x17\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x08\x04\x1b\n\x0c\n\- \x05\x05\0\x02\x02\x01\x12\x03\x08\x04\x16\n\x0c\n\x05\x05\0\x02\x02\x02\- \x12\x03\x08\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\x12\x03\t\x04\x19\n\x0c\n\- \x05\x05\0\x02\x03\x01\x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\x03\x02\- \x12\x03\t\x17\x18\n\x0b\n\x04\x05\0\x02\x04\x12\x03\n\x04\"\n\x0c\n\x05\- \x05\0\x02\x04\x01\x12\x03\n\x04\x1d\n\x0c\n\x05\x05\0\x02\x04\x02\x12\- \x03\n\x20!\n\n\n\x02\x05\x01\x12\x04\x0c\0\x11\x01\n\n\n\x03\x05\x01\- \x01\x12\x03\x0c\x05\x10\n\x0b\n\x04\x05\x01\x02\0\x12\x03\r\x04\x1b\n\- \x0c\n\x05\x05\x01\x02\0\x01\x12\x03\r\x04\x16\n\x0c\n\x05\x05\x01\x02\0\- \x02\x12\x03\r\x19\x1a\n\x0b\n\x04\x05\x01\x02\x01\x12\x03\x0e\x04\r\n\- \x0c\n\x05\x05\x01\x02\x01\x01\x12\x03\x0e\x04\x08\n\x0c\n\x05\x05\x01\- \x02\x01\x02\x12\x03\x0e\x0b\x0c\n\x0b\n\x04\x05\x01\x02\x02\x12\x03\x0f\- \x04\r\n\x0c\n\x05\x05\x01\x02\x02\x01\x12\x03\x0f\x04\x08\n\x0c\n\x05\- \x05\x01\x02\x02\x02\x12\x03\x0f\x0b\x0c\n\x0b\n\x04\x05\x01\x02\x03\x12\- \x03\x10\x04\x11\n\x0c\n\x05\x05\x01\x02\x03\x01\x12\x03\x10\x04\x0c\n\- \x0c\n\x05\x05\x01\x02\x03\x02\x12\x03\x10\x0f\x10b\x06proto3\+ \n\x10observable.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\x07Unkno\+ wn\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12UserProfileUp\+ dated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\x19UserWsC\+ onnectStateChanged\x10\x04J\xf7\x01\n\x06\x12\x04\0\0\x08\x01\n\x08\n\+ \x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x08\x01\n\n\n\x03\+ \x05\0\x01\x12\x03\x02\x05\x15\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\+ \x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0b\n\x0c\n\x05\x05\0\+ \x02\0\x02\x12\x03\x03\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x04\+ \x18\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\x13\n\x0c\n\x05\x05\0\+ \x02\x01\x02\x12\x03\x04\x16\x17\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\+ \x04\x1b\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\x16\n\x0c\n\x05\+ \x05\0\x02\x02\x02\x12\x03\x05\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\x12\x03\+ \x06\x04\x19\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x14\n\x0c\n\+ \x05\x05\0\x02\x03\x02\x12\x03\x06\x17\x18\n\x0b\n\x04\x05\0\x02\x04\x12\+ \x03\x07\x04\"\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\x1d\n\x0c\n\+ \x05\x05\0\x02\x04\x02\x12\x03\x07\x20!b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/user_profile.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/user_profile.rsdeleted file mode 100644index 842cbed2b6..0000000000--- a/frontend/rust-lib/flowy-user/src/protobuf/model/user_profile.rs+++ /dev/null@@ -1,1351 +0,0 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit-// @generated--// https://github.com/rust-lang/rust-clippy/issues/702-#![allow(unknown_lints)]-#![allow(clippy::all)]--#![allow(unused_attributes)]-#![cfg_attr(rustfmt, rustfmt::skip)]--#![allow(box_pointers)]-#![allow(dead_code)]-#![allow(missing_docs)]-#![allow(non_camel_case_types)]-#![allow(non_snake_case)]-#![allow(non_upper_case_globals)]-#![allow(trivial_casts)]-#![allow(unused_imports)]-#![allow(unused_results)]-//! Generated file from `user_profile.proto`--/// Generated files are compatible only with the same version-/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;--#[derive(PartialEq,Clone,Default)]-pub struct UserToken {- // message fields- pub token: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a UserToken {- fn default() -> &'a UserToken {- <UserToken as ::protobuf::Message>::default_instance()- }-}--impl UserToken {- pub fn new() -> UserToken {- ::std::default::Default::default()- }-- // string token = 1;--- pub fn get_token(&self) -> &str {- &self.token- }- pub fn clear_token(&mut self) {- self.token.clear();- }-- // Param is passed by value, moved- pub fn set_token(&mut self, v: ::std::string::String) {- self.token = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_token(&mut self) -> &mut ::std::string::String {- &mut self.token- }-- // Take field- pub fn take_token(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.token, ::std::string::String::new())- }-}--impl ::protobuf::Message for UserToken {- 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.token)?;- },- _ => {- ::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.token.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.token);- }- 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.token.is_empty() {- os.write_string(1, &self.token)?;- }- 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() -> UserToken {- UserToken::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>(- "token",- |m: &UserToken| { &m.token },- |m: &mut UserToken| { &mut m.token },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserToken>(- "UserToken",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static UserToken {- static instance: ::protobuf::rt::LazyV2<UserToken> = ::protobuf::rt::LazyV2::INIT;- instance.get(UserToken::new)- }-}--impl ::protobuf::Clear for UserToken {- fn clear(&mut self) {- self.token.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for UserToken {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for UserToken {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct UserProfile {- // message fields- pub id: ::std::string::String,- pub email: ::std::string::String,- pub name: ::std::string::String,- pub token: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a UserProfile {- fn default() -> &'a UserProfile {- <UserProfile as ::protobuf::Message>::default_instance()- }-}--impl UserProfile {- pub fn new() -> UserProfile {- ::std::default::Default::default()- }-- // string id = 1;--- pub fn get_id(&self) -> &str {- &self.id- }- pub fn clear_id(&mut self) {- self.id.clear();- }-- // Param is passed by value, moved- pub fn set_id(&mut self, v: ::std::string::String) {- self.id = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_id(&mut self) -> &mut ::std::string::String {- &mut self.id- }-- // Take field- pub fn take_id(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.id, ::std::string::String::new())- }-- // string email = 2;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::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())- }-- // string token = 4;--- pub fn get_token(&self) -> &str {- &self.token- }- pub fn clear_token(&mut self) {- self.token.clear();- }-- // Param is passed by value, moved- pub fn set_token(&mut self, v: ::std::string::String) {- self.token = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_token(&mut self) -> &mut ::std::string::String {- &mut self.token- }-- // Take field- pub fn take_token(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.token, ::std::string::String::new())- }-}--impl ::protobuf::Message for UserProfile {- 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.id)?;- },- 2 => {- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.email)?;- },- 3 => {- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;- },- 4 => {- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;- },- _ => {- ::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.id.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.id);- }- if !self.email.is_empty() {- my_size += ::protobuf::rt::string_size(2, &self.email);- }- if !self.name.is_empty() {- my_size += ::protobuf::rt::string_size(3, &self.name);- }- if !self.token.is_empty() {- my_size += ::protobuf::rt::string_size(4, &self.token);- }- 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.id.is_empty() {- os.write_string(1, &self.id)?;- }- if !self.email.is_empty() {- os.write_string(2, &self.email)?;- }- if !self.name.is_empty() {- os.write_string(3, &self.name)?;- }- if !self.token.is_empty() {- os.write_string(4, &self.token)?;- }- 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() -> UserProfile {- UserProfile::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>(- "id",- |m: &UserProfile| { &m.id },- |m: &mut UserProfile| { &mut m.id },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "email",- |m: &UserProfile| { &m.email },- |m: &mut UserProfile| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "name",- |m: &UserProfile| { &m.name },- |m: &mut UserProfile| { &mut m.name },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "token",- |m: &UserProfile| { &m.token },- |m: &mut UserProfile| { &mut m.token },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserProfile>(- "UserProfile",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static UserProfile {- static instance: ::protobuf::rt::LazyV2<UserProfile> = ::protobuf::rt::LazyV2::INIT;- instance.get(UserProfile::new)- }-}--impl ::protobuf::Clear for UserProfile {- fn clear(&mut self) {- self.id.clear();- self.email.clear();- self.name.clear();- self.token.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for UserProfile {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for UserProfile {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct UpdateUserRequest {- // message fields- pub id: ::std::string::String,- // message oneof groups- pub one_of_name: ::std::option::Option<UpdateUserRequest_oneof_one_of_name>,- pub one_of_email: ::std::option::Option<UpdateUserRequest_oneof_one_of_email>,- pub one_of_password: ::std::option::Option<UpdateUserRequest_oneof_one_of_password>,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a UpdateUserRequest {- fn default() -> &'a UpdateUserRequest {- <UpdateUserRequest as ::protobuf::Message>::default_instance()- }-}--#[derive(Clone,PartialEq,Debug)]-pub enum UpdateUserRequest_oneof_one_of_name {- name(::std::string::String),-}--#[derive(Clone,PartialEq,Debug)]-pub enum UpdateUserRequest_oneof_one_of_email {- email(::std::string::String),-}--#[derive(Clone,PartialEq,Debug)]-pub enum UpdateUserRequest_oneof_one_of_password {- password(::std::string::String),-}--impl UpdateUserRequest {- pub fn new() -> UpdateUserRequest {- ::std::default::Default::default()- }-- // string id = 1;--- pub fn get_id(&self) -> &str {- &self.id- }- pub fn clear_id(&mut self) {- self.id.clear();- }-- // Param is passed by value, moved- pub fn set_id(&mut self, v: ::std::string::String) {- self.id = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_id(&mut self) -> &mut ::std::string::String {- &mut self.id- }-- // Take field- pub fn take_id(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.id, ::std::string::String::new())- }-- // string name = 2;--- pub fn get_name(&self) -> &str {- match self.one_of_name {- ::std::option::Option::Some(UpdateUserRequest_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(UpdateUserRequest_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(UpdateUserRequest_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(UpdateUserRequest_oneof_one_of_name::name(_)) = self.one_of_name {- } else {- self.one_of_name = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(::std::string::String::new()));- }- match self.one_of_name {- ::std::option::Option::Some(UpdateUserRequest_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(UpdateUserRequest_oneof_one_of_name::name(v)) => v,- _ => panic!(),- }- } else {- ::std::string::String::new()- }- }-- // string email = 3;--- pub fn get_email(&self) -> &str {- match self.one_of_email {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(ref v)) => v,- _ => "",- }- }- pub fn clear_email(&mut self) {- self.one_of_email = ::std::option::Option::None;- }-- pub fn has_email(&self) -> bool {- match self.one_of_email {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(..)) => true,- _ => false,- }- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(v))- }-- // Mutable pointer to the field.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(_)) = self.one_of_email {- } else {- self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(::std::string::String::new()));- }- match self.one_of_email {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(ref mut v)) => v,- _ => panic!(),- }- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- if self.has_email() {- match self.one_of_email.take() {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(v)) => v,- _ => panic!(),- }- } else {- ::std::string::String::new()- }- }-- // string password = 4;--- pub fn get_password(&self) -> &str {- match self.one_of_password {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(ref v)) => v,- _ => "",- }- }- pub fn clear_password(&mut self) {- self.one_of_password = ::std::option::Option::None;- }-- pub fn has_password(&self) -> bool {- match self.one_of_password {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(..)) => true,- _ => false,- }- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(v))- }-- // Mutable pointer to the field.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(_)) = self.one_of_password {- } else {- self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(::std::string::String::new()));- }- match self.one_of_password {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(ref mut v)) => v,- _ => panic!(),- }- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- if self.has_password() {- match self.one_of_password.take() {- ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(v)) => v,- _ => panic!(),- }- } else {- ::std::string::String::new()- }- }-}--impl ::protobuf::Message for UpdateUserRequest {- 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.id)?;- },- 2 => {- 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(UpdateUserRequest_oneof_one_of_name::name(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_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(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_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(is.read_string()?));- },- _ => {- ::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.id.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.id);- }- if let ::std::option::Option::Some(ref v) = self.one_of_name {- match v {- &UpdateUserRequest_oneof_one_of_name::name(ref v) => {- my_size += ::protobuf::rt::string_size(2, &v);- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_email {- match v {- &UpdateUserRequest_oneof_one_of_email::email(ref v) => {- my_size += ::protobuf::rt::string_size(3, &v);- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_password {- match v {- &UpdateUserRequest_oneof_one_of_password::password(ref v) => {- my_size += ::protobuf::rt::string_size(4, &v);- },- };- }- 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.id.is_empty() {- os.write_string(1, &self.id)?;- }- if let ::std::option::Option::Some(ref v) = self.one_of_name {- match v {- &UpdateUserRequest_oneof_one_of_name::name(ref v) => {- os.write_string(2, v)?;- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_email {- match v {- &UpdateUserRequest_oneof_one_of_email::email(ref v) => {- os.write_string(3, v)?;- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_password {- match v {- &UpdateUserRequest_oneof_one_of_password::password(ref v) => {- os.write_string(4, 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() -> UpdateUserRequest {- UpdateUserRequest::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>(- "id",- |m: &UpdateUserRequest| { &m.id },- |m: &mut UpdateUserRequest| { &mut m.id },- ));- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(- "name",- UpdateUserRequest::has_name,- UpdateUserRequest::get_name,- ));- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(- "email",- UpdateUserRequest::has_email,- UpdateUserRequest::get_email,- ));- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(- "password",- UpdateUserRequest::has_password,- UpdateUserRequest::get_password,- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserRequest>(- "UpdateUserRequest",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static UpdateUserRequest {- static instance: ::protobuf::rt::LazyV2<UpdateUserRequest> = ::protobuf::rt::LazyV2::INIT;- instance.get(UpdateUserRequest::new)- }-}--impl ::protobuf::Clear for UpdateUserRequest {- fn clear(&mut self) {- self.id.clear();- self.one_of_name = ::std::option::Option::None;- self.one_of_email = ::std::option::Option::None;- self.one_of_password = ::std::option::Option::None;- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for UpdateUserRequest {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for UpdateUserRequest {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--#[derive(PartialEq,Clone,Default)]-pub struct UpdateUserParams {- // message fields- pub id: ::std::string::String,- // message oneof groups- pub one_of_name: ::std::option::Option<UpdateUserParams_oneof_one_of_name>,- pub one_of_email: ::std::option::Option<UpdateUserParams_oneof_one_of_email>,- pub one_of_password: ::std::option::Option<UpdateUserParams_oneof_one_of_password>,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a UpdateUserParams {- fn default() -> &'a UpdateUserParams {- <UpdateUserParams as ::protobuf::Message>::default_instance()- }-}--#[derive(Clone,PartialEq,Debug)]-pub enum UpdateUserParams_oneof_one_of_name {- name(::std::string::String),-}--#[derive(Clone,PartialEq,Debug)]-pub enum UpdateUserParams_oneof_one_of_email {- email(::std::string::String),-}--#[derive(Clone,PartialEq,Debug)]-pub enum UpdateUserParams_oneof_one_of_password {- password(::std::string::String),-}--impl UpdateUserParams {- pub fn new() -> UpdateUserParams {- ::std::default::Default::default()- }-- // string id = 1;--- pub fn get_id(&self) -> &str {- &self.id- }- pub fn clear_id(&mut self) {- self.id.clear();- }-- // Param is passed by value, moved- pub fn set_id(&mut self, v: ::std::string::String) {- self.id = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_id(&mut self) -> &mut ::std::string::String {- &mut self.id- }-- // Take field- pub fn take_id(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.id, ::std::string::String::new())- }-- // string name = 2;--- pub fn get_name(&self) -> &str {- match self.one_of_name {- ::std::option::Option::Some(UpdateUserParams_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(UpdateUserParams_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(UpdateUserParams_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(UpdateUserParams_oneof_one_of_name::name(_)) = self.one_of_name {- } else {- self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(::std::string::String::new()));- }- match self.one_of_name {- ::std::option::Option::Some(UpdateUserParams_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(UpdateUserParams_oneof_one_of_name::name(v)) => v,- _ => panic!(),- }- } else {- ::std::string::String::new()- }- }-- // string email = 3;--- pub fn get_email(&self) -> &str {- match self.one_of_email {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(ref v)) => v,- _ => "",- }- }- pub fn clear_email(&mut self) {- self.one_of_email = ::std::option::Option::None;- }-- pub fn has_email(&self) -> bool {- match self.one_of_email {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(..)) => true,- _ => false,- }- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(v))- }-- // Mutable pointer to the field.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(_)) = self.one_of_email {- } else {- self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(::std::string::String::new()));- }- match self.one_of_email {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(ref mut v)) => v,- _ => panic!(),- }- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- if self.has_email() {- match self.one_of_email.take() {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(v)) => v,- _ => panic!(),- }- } else {- ::std::string::String::new()- }- }-- // string password = 4;--- pub fn get_password(&self) -> &str {- match self.one_of_password {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(ref v)) => v,- _ => "",- }- }- pub fn clear_password(&mut self) {- self.one_of_password = ::std::option::Option::None;- }-- pub fn has_password(&self) -> bool {- match self.one_of_password {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(..)) => true,- _ => false,- }- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(v))- }-- // Mutable pointer to the field.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(_)) = self.one_of_password {- } else {- self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(::std::string::String::new()));- }- match self.one_of_password {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(ref mut v)) => v,- _ => panic!(),- }- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- if self.has_password() {- match self.one_of_password.take() {- ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(v)) => v,- _ => panic!(),- }- } else {- ::std::string::String::new()- }- }-}--impl ::protobuf::Message for UpdateUserParams {- 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.id)?;- },- 2 => {- 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(UpdateUserParams_oneof_one_of_name::name(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_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(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_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(is.read_string()?));- },- _ => {- ::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.id.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.id);- }- if let ::std::option::Option::Some(ref v) = self.one_of_name {- match v {- &UpdateUserParams_oneof_one_of_name::name(ref v) => {- my_size += ::protobuf::rt::string_size(2, &v);- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_email {- match v {- &UpdateUserParams_oneof_one_of_email::email(ref v) => {- my_size += ::protobuf::rt::string_size(3, &v);- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_password {- match v {- &UpdateUserParams_oneof_one_of_password::password(ref v) => {- my_size += ::protobuf::rt::string_size(4, &v);- },- };- }- 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.id.is_empty() {- os.write_string(1, &self.id)?;- }- if let ::std::option::Option::Some(ref v) = self.one_of_name {- match v {- &UpdateUserParams_oneof_one_of_name::name(ref v) => {- os.write_string(2, v)?;- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_email {- match v {- &UpdateUserParams_oneof_one_of_email::email(ref v) => {- os.write_string(3, v)?;- },- };- }- if let ::std::option::Option::Some(ref v) = self.one_of_password {- match v {- &UpdateUserParams_oneof_one_of_password::password(ref v) => {- os.write_string(4, 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() -> UpdateUserParams {- UpdateUserParams::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>(- "id",- |m: &UpdateUserParams| { &m.id },- |m: &mut UpdateUserParams| { &mut m.id },- ));- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(- "name",- UpdateUserParams::has_name,- UpdateUserParams::get_name,- ));- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(- "email",- UpdateUserParams::has_email,- UpdateUserParams::get_email,- ));- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(- "password",- UpdateUserParams::has_password,- UpdateUserParams::get_password,- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserParams>(- "UpdateUserParams",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static UpdateUserParams {- static instance: ::protobuf::rt::LazyV2<UpdateUserParams> = ::protobuf::rt::LazyV2::INIT;- instance.get(UpdateUserParams::new)- }-}--impl ::protobuf::Clear for UpdateUserParams {- fn clear(&mut self) {- self.id.clear();- self.one_of_name = ::std::option::Option::None;- self.one_of_email = ::std::option::Option::None;- self.one_of_password = ::std::option::Option::None;- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for UpdateUserParams {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for UpdateUserParams {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--static file_descriptor_proto_data: &'static [u8] = b"\- \n\x12user_profile.proto\"!\n\tUserToken\x12\x14\n\x05token\x18\x01\x20\- \x01(\tR\x05token\"]\n\x0bUserProfile\x12\x0e\n\x02id\x18\x01\x20\x01(\t\- R\x02id\x12\x14\n\x05email\x18\x02\x20\x01(\tR\x05email\x12\x12\n\x04nam\- e\x18\x03\x20\x01(\tR\x04name\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05\- token\"\xa1\x01\n\x11UpdateUserRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\- \tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x16\n\x05\- email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\x08password\x18\x04\- \x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\x0e\n\x0cone_of_email\- B\x11\n\x0fone_of_password\"\xa0\x01\n\x10UpdateUserParams\x12\x0e\n\x02\- id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\- \x04name\x12\x16\n\x05email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\- \x08password\x18\x04\x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\- \x0e\n\x0cone_of_emailB\x11\n\x0fone_of_passwordJ\xdf\x07\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\x04\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x11\n\x0b\n\x04\x04\0\x02\- \0\x12\x03\x03\x04\x15\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\x10\n\x0c\n\x05\x04\0\x02\0\- \x03\x12\x03\x03\x13\x14\n\n\n\x02\x04\x01\x12\x04\x05\0\n\x01\n\n\n\x03\- \x04\x01\x01\x12\x03\x05\x08\x13\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x06\- \x04\x12\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\r\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\- \x06\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x07\x04\x15\n\x0c\n\x05\- \x04\x01\x02\x01\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\- \x12\x03\x07\x0b\x10\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x07\x13\x14\- \n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x08\x04\x14\n\x0c\n\x05\x04\x01\x02\- \x02\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x08\- \x0b\x0f\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x08\x12\x13\n\x0b\n\x04\- \x04\x01\x02\x03\x12\x03\t\x04\x15\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\- \x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\t\x0b\x10\n\x0c\n\- \x05\x04\x01\x02\x03\x03\x12\x03\t\x13\x14\n\n\n\x02\x04\x02\x12\x04\x0b\- \0\x10\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0b\x08\x19\n\x0b\n\x04\x04\x02\- \x02\0\x12\x03\x0c\x04\x12\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0c\x04\- \n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0c\x0b\r\n\x0c\n\x05\x04\x02\- \x02\0\x03\x12\x03\x0c\x10\x11\n\x0b\n\x04\x04\x02\x08\0\x12\x03\r\x04*\- \n\x0c\n\x05\x04\x02\x08\0\x01\x12\x03\r\n\x15\n\x0b\n\x04\x04\x02\x02\- \x01\x12\x03\r\x18(\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\r\x18\x1e\n\- \x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\r\x1f#\n\x0c\n\x05\x04\x02\x02\- \x01\x03\x12\x03\r&'\n\x0b\n\x04\x04\x02\x08\x01\x12\x03\x0e\x04,\n\x0c\- \n\x05\x04\x02\x08\x01\x01\x12\x03\x0e\n\x16\n\x0b\n\x04\x04\x02\x02\x02\- \x12\x03\x0e\x19*\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x0e\x19\x1f\n\- \x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0e\x20%\n\x0c\n\x05\x04\x02\x02\- \x02\x03\x12\x03\x0e()\n\x0b\n\x04\x04\x02\x08\x02\x12\x03\x0f\x042\n\- \x0c\n\x05\x04\x02\x08\x02\x01\x12\x03\x0f\n\x19\n\x0b\n\x04\x04\x02\x02\- \x03\x12\x03\x0f\x1c0\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x0f\x1c\"\- \n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x0f#+\n\x0c\n\x05\x04\x02\x02\- \x03\x03\x12\x03\x0f./\n\n\n\x02\x04\x03\x12\x04\x11\0\x16\x01\n\n\n\x03\- \x04\x03\x01\x12\x03\x11\x08\x18\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x12\- \x04\x12\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\- \x03\x02\0\x01\x12\x03\x12\x0b\r\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\- \x12\x10\x11\n\x0b\n\x04\x04\x03\x08\0\x12\x03\x13\x04*\n\x0c\n\x05\x04\- \x03\x08\0\x01\x12\x03\x13\n\x15\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x13\- \x18(\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x13\x18\x1e\n\x0c\n\x05\- \x04\x03\x02\x01\x01\x12\x03\x13\x1f#\n\x0c\n\x05\x04\x03\x02\x01\x03\- \x12\x03\x13&'\n\x0b\n\x04\x04\x03\x08\x01\x12\x03\x14\x04,\n\x0c\n\x05\- \x04\x03\x08\x01\x01\x12\x03\x14\n\x16\n\x0b\n\x04\x04\x03\x02\x02\x12\- \x03\x14\x19*\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x14\x19\x1f\n\x0c\- \n\x05\x04\x03\x02\x02\x01\x12\x03\x14\x20%\n\x0c\n\x05\x04\x03\x02\x02\- \x03\x12\x03\x14()\n\x0b\n\x04\x04\x03\x08\x02\x12\x03\x15\x042\n\x0c\n\- \x05\x04\x03\x08\x02\x01\x12\x03\x15\n\x19\n\x0b\n\x04\x04\x03\x02\x03\- \x12\x03\x15\x1c0\n\x0c\n\x05\x04\x03\x02\x03\x05\x12\x03\x15\x1c\"\n\- \x0c\n\x05\x04\x03\x02\x03\x01\x12\x03\x15#+\n\x0c\n\x05\x04\x03\x02\x03\- \x03\x12\x03\x15./b\x06proto3\-";--static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;--fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {- ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()-}--pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {- file_descriptor_proto_lazy.get(|| {- parse_descriptor_proto()- })-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/user_table.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/user_table.rsdeleted file mode 100644index ba994bd203..0000000000--- a/frontend/rust-lib/flowy-user/src/protobuf/model/user_table.rs+++ /dev/null@@ -1,341 +0,0 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit-// @generated--// https://github.com/rust-lang/rust-clippy/issues/702-#![allow(unknown_lints)]-#![allow(clippy::all)]--#![allow(unused_attributes)]-#![cfg_attr(rustfmt, rustfmt::skip)]--#![allow(box_pointers)]-#![allow(dead_code)]-#![allow(missing_docs)]-#![allow(non_camel_case_types)]-#![allow(non_snake_case)]-#![allow(non_upper_case_globals)]-#![allow(trivial_casts)]-#![allow(unused_imports)]-#![allow(unused_results)]-//! Generated file from `user_table.proto`--/// Generated files are compatible only with the same version-/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;--#[derive(PartialEq,Clone,Default)]-pub struct User {- // message fields- pub id: ::std::string::String,- pub name: ::std::string::String,- pub email: ::std::string::String,- pub password: ::std::string::String,- // special fields- pub unknown_fields: ::protobuf::UnknownFields,- pub cached_size: ::protobuf::CachedSize,-}--impl<'a> ::std::default::Default for &'a User {- fn default() -> &'a User {- <User as ::protobuf::Message>::default_instance()- }-}--impl User {- pub fn new() -> User {- ::std::default::Default::default()- }-- // string id = 1;--- pub fn get_id(&self) -> &str {- &self.id- }- pub fn clear_id(&mut self) {- self.id.clear();- }-- // Param is passed by value, moved- pub fn set_id(&mut self, v: ::std::string::String) {- self.id = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_id(&mut self) -> &mut ::std::string::String {- &mut self.id- }-- // Take field- pub fn take_id(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.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 email = 3;--- pub fn get_email(&self) -> &str {- &self.email- }- pub fn clear_email(&mut self) {- self.email.clear();- }-- // Param is passed by value, moved- pub fn set_email(&mut self, v: ::std::string::String) {- self.email = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_email(&mut self) -> &mut ::std::string::String {- &mut self.email- }-- // Take field- pub fn take_email(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.email, ::std::string::String::new())- }-- // string password = 4;--- pub fn get_password(&self) -> &str {- &self.password- }- pub fn clear_password(&mut self) {- self.password.clear();- }-- // Param is passed by value, moved- pub fn set_password(&mut self, v: ::std::string::String) {- self.password = v;- }-- // Mutable pointer to the field.- // If field is not initialized, it is initialized with default value first.- pub fn mut_password(&mut self) -> &mut ::std::string::String {- &mut self.password- }-- // Take field- pub fn take_password(&mut self) -> ::std::string::String {- ::std::mem::replace(&mut self.password, ::std::string::String::new())- }-}--impl ::protobuf::Message for User {- 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.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.email)?;- },- 4 => {- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.password)?;- },- _ => {- ::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.id.is_empty() {- my_size += ::protobuf::rt::string_size(1, &self.id);- }- if !self.name.is_empty() {- my_size += ::protobuf::rt::string_size(2, &self.name);- }- if !self.email.is_empty() {- my_size += ::protobuf::rt::string_size(3, &self.email);- }- if !self.password.is_empty() {- my_size += ::protobuf::rt::string_size(4, &self.password);- }- 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.id.is_empty() {- os.write_string(1, &self.id)?;- }- if !self.name.is_empty() {- os.write_string(2, &self.name)?;- }- if !self.email.is_empty() {- os.write_string(3, &self.email)?;- }- if !self.password.is_empty() {- os.write_string(4, &self.password)?;- }- 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() -> User {- User::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>(- "id",- |m: &User| { &m.id },- |m: &mut User| { &mut m.id },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "name",- |m: &User| { &m.name },- |m: &mut User| { &mut m.name },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "email",- |m: &User| { &m.email },- |m: &mut User| { &mut m.email },- ));- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(- "password",- |m: &User| { &m.password },- |m: &mut User| { &mut m.password },- ));- ::protobuf::reflect::MessageDescriptor::new_pb_name::<User>(- "User",- fields,- file_descriptor_proto()- )- })- }-- fn default_instance() -> &'static User {- static instance: ::protobuf::rt::LazyV2<User> = ::protobuf::rt::LazyV2::INIT;- instance.get(User::new)- }-}--impl ::protobuf::Clear for User {- fn clear(&mut self) {- self.id.clear();- self.name.clear();- self.email.clear();- self.password.clear();- self.unknown_fields.clear();- }-}--impl ::std::fmt::Debug for User {- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {- ::protobuf::text_format::fmt(self, f)- }-}--impl ::protobuf::reflect::ProtobufValue for User {- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {- ::protobuf::reflect::ReflectValueRef::Message(self)- }-}--static file_descriptor_proto_data: &'static [u8] = b"\- \n\x10user_table.proto\"\\\n\x04User\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\- \x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\- \x18\x03\x20\x01(\tR\x05email\x12\x1a\n\x08password\x18\x04\x20\x01(\tR\- \x08passwordJ\x86\x02\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\x07\x01\n\n\n\x03\x04\0\x01\x12\- \x03\x02\x08\x0c\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x12\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\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x10\x11\n\x0b\n\x04\- \x04\0\x02\x01\x12\x03\x04\x04\x14\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\x0f\n\x0c\n\x05\- \x04\0\x02\x01\x03\x12\x03\x04\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\- \x05\x04\x15\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\- \x04\0\x02\x02\x01\x12\x03\x05\x0b\x10\n\x0c\n\x05\x04\0\x02\x02\x03\x12\- \x03\x05\x13\x14\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x04\x18\n\x0c\n\- \x05\x04\0\x02\x03\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\x02\x03\x01\- \x12\x03\x06\x0b\x13\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x06\x16\x17b\- \x06proto3\-";--static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;--fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {- ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()-}--pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {- file_descriptor_proto_lazy.get(|| {- parse_descriptor_proto()- })-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/proto/auth.proto b/frontend/rust-lib/flowy-user/src/protobuf/proto/auth.protodeleted file mode 100644index f411f76b7b..0000000000--- a/frontend/rust-lib/flowy-user/src/protobuf/proto/auth.proto+++ /dev/null@@ -1,34 +0,0 @@-syntax = "proto3";--message SignInRequest {- string email = 1;- string password = 2;- string name = 3;-}-message SignInParams {- string email = 1;- string password = 2;- string name = 3;-}-message SignInResponse {- string user_id = 1;- string name = 2;- string email = 3;- string token = 4;-}-message SignUpRequest {- string email = 1;- string name = 2;- string password = 3;-}-message SignUpParams {- string email = 1;- string name = 2;- string password = 3;-}-message SignUpResponse {- string user_id = 1;- string name = 2;- string email = 3;- string token = 4;-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/proto/observable.proto b/frontend/rust-lib/flowy-user/src/protobuf/proto/observable.protoindex bf8cf2b94b..4edff364f6 100644--- a/frontend/rust-lib/flowy-user/src/protobuf/proto/observable.proto+++ b/frontend/rust-lib/flowy-user/src/protobuf/proto/observable.proto@@ -1,8 +1,5 @@syntax = "proto3";-message NetworkState {- NetworkType ty = 1;-}enum UserNotification {Unknown = 0;UserAuthChanged = 1;@@ -10,9 +7,3 @@ enum UserNotification {UserUnauthorized = 3;UserWsConnectStateChanged = 4;}-enum NetworkType {- UnknownNetworkType = 0;- Wifi = 1;- Cell = 2;- Ethernet = 3;-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/proto/user_profile.proto b/frontend/rust-lib/flowy-user/src/protobuf/proto/user_profile.protodeleted file mode 100644index c139f053fc..0000000000--- a/frontend/rust-lib/flowy-user/src/protobuf/proto/user_profile.proto+++ /dev/null@@ -1,23 +0,0 @@-syntax = "proto3";--message UserToken {- string token = 1;-}-message UserProfile {- string id = 1;- string email = 2;- string name = 3;- string token = 4;-}-message UpdateUserRequest {- string id = 1;- oneof one_of_name { string name = 2; };- oneof one_of_email { string email = 3; };- oneof one_of_password { string password = 4; };-}-message UpdateUserParams {- string id = 1;- oneof one_of_name { string name = 2; };- oneof one_of_email { string email = 3; };- oneof one_of_password { string password = 4; };-}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/proto/user_table.proto b/frontend/rust-lib/flowy-user/src/protobuf/proto/user_table.protodeleted file mode 100644index 6ae8d964d1..0000000000--- a/frontend/rust-lib/flowy-user/src/protobuf/proto/user_table.proto+++ /dev/null@@ -1,8 +0,0 @@-syntax = "proto3";--message User {- string id = 1;- string name = 2;- string email = 3;- string password = 4;-}diff --git a/frontend/rust-lib/flowy-user/src/services/user/notifier.rs b/frontend/rust-lib/flowy-user/src/services/user/notifier.rsindex ee47acff58..fd64507ddd 100644--- a/frontend/rust-lib/flowy-user/src/services/user/notifier.rs+++ b/frontend/rust-lib/flowy-user/src/services/user/notifier.rs@@ -1,7 +1,5 @@-use crate::{- entities::{UserProfile, UserStatus},- notify::NetworkState,-};+use crate::entities::{UserProfile, UserStatus};+use lib_infra::entities::network_state::NetworkState;use tokio::sync::{broadcast, mpsc};pub struct UserNotifier {diff --git a/frontend/rust-lib/flowy-user/src/services/user/user_session.rs b/frontend/rust-lib/flowy-user/src/services/user/user_session.rsindex 312290865d..4275922e2e 100644--- a/frontend/rust-lib/flowy-user/src/services/user/user_session.rs+++ b/frontend/rust-lib/flowy-user/src/services/user/user_session.rs@@ -20,7 +20,7 @@ use flowy_database::{ExpressionMethods,UserDatabaseConnection,};-use lib_infra::kv::KV;+use lib_infra::{entities::network_state::NetworkState, kv::KV};use lib_sqlite::ConnectionPool;use lib_ws::{WsController, WsMessageHandler, WsState};use parking_lot::RwLock;@@ -189,9 +189,7 @@ impl UserSession {let _ = self.ws_controller.add_handler(handler);}- pub fn update_network_state(&self, state: NetworkState) {- log::info!("{:?}", state);- }+ pub fn update_network_state(&self, state: NetworkState) { self.notifier.update_network_state(state); }}impl UserSession {diff --git a/frontend/rust-lib/flowy-workspace/src/services/workspace_controller.rs b/frontend/rust-lib/flowy-workspace/src/services/workspace_controller.rsindex b42d786e46..c261e4067a 100644--- a/frontend/rust-lib/flowy-workspace/src/services/workspace_controller.rs+++ b/frontend/rust-lib/flowy-workspace/src/services/workspace_controller.rs@@ -13,7 +13,10 @@ use flowy_workspace_infra::{user_default,};use lazy_static::lazy_static;-use lib_infra::kv::KV;+use lib_infra::{+ entities::network_state::{NetworkState, NetworkType},+ kv::KV,+};use parking_lot::RwLock;use std::{collections::HashMap, sync::Arc};@@ -73,6 +76,15 @@ impl WorkspaceController {Ok(())}+ pub fn network_state_changed(&self, network_state: NetworkState) {+ match network_state.ty {+ NetworkType::UnknownNetworkType => {},+ NetworkType::Wifi => {},+ NetworkType::Cell => {},+ NetworkType::Ethernet => {},+ }+ }+pub async fn user_did_sign_in(&self, token: &str) -> WorkspaceResult<()> {// TODO: (nathan) do something herediff --git a/frontend/rust-lib/lib-infra/Flowy.toml b/frontend/rust-lib/lib-infra/Flowy.tomlindex 49670b944a..f018887748 100644--- a/frontend/rust-lib/lib-infra/Flowy.toml+++ b/frontend/rust-lib/lib-infra/Flowy.toml@@ -1,2 +1,2 @@-proto_crates = ["src/kv"]+proto_crates = ["src/kv", "src/entities"]event_files = []\ No newline at end of filediff --git a/frontend/rust-lib/lib-infra/src/entities/mod.rs b/frontend/rust-lib/lib-infra/src/entities/mod.rsnew file mode 100644index 0000000000..52d57f3d0b--- /dev/null+++ b/frontend/rust-lib/lib-infra/src/entities/mod.rs@@ -0,0 +1 @@+pub mod network_state;diff --git a/frontend/rust-lib/lib-infra/src/entities/network_state.rs b/frontend/rust-lib/lib-infra/src/entities/network_state.rsnew file mode 100644index 0000000000..dd284cddf4--- /dev/null+++ b/frontend/rust-lib/lib-infra/src/entities/network_state.rs@@ -0,0 +1,19 @@+use flowy_derive::{ProtoBuf, ProtoBuf_Enum};++#[derive(ProtoBuf_Enum, Debug, Clone)]+pub enum NetworkType {+ UnknownNetworkType = 0,+ Wifi = 1,+ Cell = 2,+ Ethernet = 3,+}++impl std::default::Default for NetworkType {+ fn default() -> Self { NetworkType::UnknownNetworkType }+}++#[derive(ProtoBuf, Debug, Default, Clone)]+pub struct NetworkState {+ #[pb(index = 1)]+ pub ty: NetworkType,+}diff --git a/frontend/rust-lib/lib-infra/src/lib.rs b/frontend/rust-lib/lib-infra/src/lib.rsindex 89faf8e814..a934281b0e 100644--- a/frontend/rust-lib/lib-infra/src/lib.rs+++ b/frontend/rust-lib/lib-infra/src/lib.rs@@ -4,6 +4,7 @@ extern crate diesel;#[macro_use]extern crate diesel_derives;+pub mod entities;pub mod future;pub mod kv;mod protobuf;diff --git a/frontend/rust-lib/lib-infra/src/protobuf/model/mod.rs b/frontend/rust-lib/lib-infra/src/protobuf/model/mod.rsindex c0968dadf3..535c9c70f6 100644--- a/frontend/rust-lib/lib-infra/src/protobuf/model/mod.rs+++ b/frontend/rust-lib/lib-infra/src/protobuf/model/mod.rs@@ -3,3 +3,6 @@mod kv;pub use kv::*;++mod network_state;+pub use network_state::*;diff --git a/frontend/rust-lib/lib-infra/src/protobuf/model/network_state.rs b/frontend/rust-lib/lib-infra/src/protobuf/model/network_state.rsnew file mode 100644index 0000000000..b74f295a86--- /dev/null+++ b/frontend/rust-lib/lib-infra/src/protobuf/model/network_state.rs@@ -0,0 +1,261 @@+// This file is generated by rust-protobuf 2.22.1. Do not edit+// @generated++// https://github.com/rust-lang/rust-clippy/issues/702+#![allow(unknown_lints)]+#![allow(clippy::all)]++#![allow(unused_attributes)]+#![cfg_attr(rustfmt, rustfmt::skip)]++#![allow(box_pointers)]+#![allow(dead_code)]+#![allow(missing_docs)]+#![allow(non_camel_case_types)]+#![allow(non_snake_case)]+#![allow(non_upper_case_globals)]+#![allow(trivial_casts)]+#![allow(unused_imports)]+#![allow(unused_results)]+//! Generated file from `network_state.proto`++/// Generated files are compatible only with the same version+/// of protobuf runtime.+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;++#[derive(PartialEq,Clone,Default)]+pub struct NetworkState {+ // message fields+ pub ty: NetworkType,+ // special fields+ pub unknown_fields: ::protobuf::UnknownFields,+ pub cached_size: ::protobuf::CachedSize,+}++impl<'a> ::std::default::Default for &'a NetworkState {+ fn default() -> &'a NetworkState {+ <NetworkState as ::protobuf::Message>::default_instance()+ }+}++impl NetworkState {+ pub fn new() -> NetworkState {+ ::std::default::Default::default()+ }++ // .NetworkType ty = 1;+++ pub fn get_ty(&self) -> NetworkType {+ self.ty+ }+ pub fn clear_ty(&mut self) {+ self.ty = NetworkType::UnknownNetworkType;+ }++ // Param is passed by value, moved+ pub fn set_ty(&mut self, v: NetworkType) {+ self.ty = v;+ }+}++impl ::protobuf::Message for NetworkState {+ 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_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 1, &mut self.unknown_fields)?+ },+ _ => {+ ::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.ty != NetworkType::UnknownNetworkType {+ my_size += ::protobuf::rt::enum_size(1, self.ty);+ }+ 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.ty != NetworkType::UnknownNetworkType {+ os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.ty))?;+ }+ 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() -> NetworkState {+ NetworkState::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::ProtobufTypeEnum<NetworkType>>(+ "ty",+ |m: &NetworkState| { &m.ty },+ |m: &mut NetworkState| { &mut m.ty },+ ));+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<NetworkState>(+ "NetworkState",+ fields,+ file_descriptor_proto()+ )+ })+ }++ fn default_instance() -> &'static NetworkState {+ static instance: ::protobuf::rt::LazyV2<NetworkState> = ::protobuf::rt::LazyV2::INIT;+ instance.get(NetworkState::new)+ }+}++impl ::protobuf::Clear for NetworkState {+ fn clear(&mut self) {+ self.ty = NetworkType::UnknownNetworkType;+ self.unknown_fields.clear();+ }+}++impl ::std::fmt::Debug for NetworkState {+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {+ ::protobuf::text_format::fmt(self, f)+ }+}++impl ::protobuf::reflect::ProtobufValue for NetworkState {+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {+ ::protobuf::reflect::ReflectValueRef::Message(self)+ }+}++#[derive(Clone,PartialEq,Eq,Debug,Hash)]+pub enum NetworkType {+ UnknownNetworkType = 0,+ Wifi = 1,+ Cell = 2,+ Ethernet = 3,+}++impl ::protobuf::ProtobufEnum for NetworkType {+ fn value(&self) -> i32 {+ *self as i32+ }++ fn from_i32(value: i32) -> ::std::option::Option<NetworkType> {+ match value {+ 0 => ::std::option::Option::Some(NetworkType::UnknownNetworkType),+ 1 => ::std::option::Option::Some(NetworkType::Wifi),+ 2 => ::std::option::Option::Some(NetworkType::Cell),+ 3 => ::std::option::Option::Some(NetworkType::Ethernet),+ _ => ::std::option::Option::None+ }+ }++ fn values() -> &'static [Self] {+ static values: &'static [NetworkType] = &[+ NetworkType::UnknownNetworkType,+ NetworkType::Wifi,+ NetworkType::Cell,+ NetworkType::Ethernet,+ ];+ values+ }++ fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {+ static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;+ descriptor.get(|| {+ ::protobuf::reflect::EnumDescriptor::new_pb_name::<NetworkType>("NetworkType", file_descriptor_proto())+ })+ }+}++impl ::std::marker::Copy for NetworkType {+}++impl ::std::default::Default for NetworkType {+ fn default() -> Self {+ NetworkType::UnknownNetworkType+ }+}++impl ::protobuf::reflect::ProtobufValue for NetworkType {+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {+ ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))+ }+}++static file_descriptor_proto_data: &'static [u8] = b"\+ \n\x13network_state.proto\",\n\x0cNetworkState\x12\x1c\n\x02ty\x18\x01\+ \x20\x01(\x0e2\x0c.NetworkTypeR\x02ty*G\n\x0bNetworkType\x12\x16\n\x12Un\+ knownNetworkType\x10\0\x12\x08\n\x04Wifi\x10\x01\x12\x08\n\x04Cell\x10\+ \x02\x12\x0c\n\x08Ethernet\x10\x03J\x9d\x02\n\x06\x12\x04\0\0\n\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\x14\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\x0f\n\x0c\n\x05\x04\+ \0\x02\0\x01\x12\x03\x03\x10\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\+ \x15\x16\n\n\n\x02\x05\0\x12\x04\x05\0\n\x01\n\n\n\x03\x05\0\x01\x12\x03\+ \x05\x05\x10\n\x0b\n\x04\x05\0\x02\0\x12\x03\x06\x04\x1b\n\x0c\n\x05\x05\+ \0\x02\0\x01\x12\x03\x06\x04\x16\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x06\+ \x19\x1a\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x07\x04\r\n\x0c\n\x05\x05\0\+ \x02\x01\x01\x12\x03\x07\x04\x08\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\+ \x07\x0b\x0c\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x08\x04\r\n\x0c\n\x05\x05\+ \0\x02\x02\x01\x12\x03\x08\x04\x08\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\+ \x08\x0b\x0c\n\x0b\n\x04\x05\0\x02\x03\x12\x03\t\x04\x11\n\x0c\n\x05\x05\+ \0\x02\x03\x01\x12\x03\t\x04\x0c\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\t\+ \x0f\x10b\x06proto3\+";++static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;++fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {+ ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()+}++pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {+ file_descriptor_proto_lazy.get(|| {+ parse_descriptor_proto()+ })+}diff --git a/frontend/rust-lib/lib-infra/src/protobuf/proto/network_state.proto b/frontend/rust-lib/lib-infra/src/protobuf/proto/network_state.protonew file mode 100644index 0000000000..06a4aa5f3c--- /dev/null+++ b/frontend/rust-lib/lib-infra/src/protobuf/proto/network_state.proto@@ -0,0 +1,11 @@+syntax = "proto3";++message NetworkState {+ NetworkType ty = 1;+}+enum NetworkType {+ UnknownNetworkType = 0;+ Wifi = 1;+ Cell = 2;+ Ethernet = 3;+}diff --git a/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rsindex 65c73dd1d1..bbb6284bf4 100644--- a/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs+++ b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs@@ -17,13 +17,13 @@ pub fn category_from_str(type_str: &str) -> TypeCategory {"u8" => TypeCategory::Bytes,"String" => TypeCategory::Str,"KeyValue"+ | "NetworkState"| "WorkspaceError"| "DocError"| "FFIRequest"| "FFIResponse"| "SubscribeObject"| "UserError"- | "NetworkState"| "QueryAppRequest"| "AppIdentifier"| "CreateAppRequest"@@ -80,14 +80,14 @@ pub fn category_from_str(type_str: &str) -> TypeCategory {| "UpdateUserRequest"| "UpdateUserParams"=> TypeCategory::Protobuf,- "WorkspaceEvent"+ "NetworkType"+ | "WorkspaceEvent"| "WorkspaceNotification"| "ErrorCode"| "DocObservable"| "FFIStatusCode"| "UserEvent"| "UserNotification"- | "NetworkType"| "TrashType"| "ViewType"| "ExportType"