chore(dart): 删除 passport 模块的 info.proto 相关代码

- 删除了 info.pb.dart、info.pbenum.dart 和 info.pbgrpc.dart 文件
- 这些文件是根据 info.proto 自动生成的,包含了一些不再需要的类和接口
This commit is contained in:
yanweidong 2025-09-12 20:06:29 +08:00
parent e9e4874f27
commit 10e5d9ea7b
22 changed files with 1415 additions and 3015 deletions

View File

@ -1,6 +1,6 @@
// This is a generated file - do not edit.
//
// Generated from info.proto.
// Generated from account.proto.
// @dart = 3.3
@ -17,283 +17,263 @@ import 'package:protobuf/protobuf.dart' as $pb;
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
class BindRequest extends $pb.GeneratedMessage {
factory BindRequest({
$core.String? action,
$core.String? phone,
$core.String? code,
$core.String? password,
$core.String? nickname,
}) {
final result = create();
if (action != null) result.action = action;
if (phone != null) result.phone = phone;
if (code != null) result.code = code;
if (password != null) result.password = password;
if (nickname != null) result.nickname = nickname;
return result;
}
BindRequest._();
factory BindRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory BindRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'BindRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'action')
..aOS(2, _omitFieldNames ? '' : 'phone')
..aOS(3, _omitFieldNames ? '' : 'code')
..aOS(4, _omitFieldNames ? '' : 'password')
..aOS(5, _omitFieldNames ? '' : 'nickname')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
BindRequest clone() => BindRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
BindRequest copyWith(void Function(BindRequest) updates) =>
super.copyWith((message) => updates(message as BindRequest))
as BindRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static BindRequest create() => BindRequest._();
@$core.override
BindRequest createEmptyInstance() => create();
static $pb.PbList<BindRequest> createRepeated() => $pb.PbList<BindRequest>();
@$core.pragma('dart2js:noInline')
static BindRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<BindRequest>(create);
static BindRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get action => $_getSZ(0);
@$pb.TagNumber(1)
set action($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasAction() => $_has(0);
@$pb.TagNumber(1)
void clearAction() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get phone => $_getSZ(1);
@$pb.TagNumber(2)
set phone($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasPhone() => $_has(1);
@$pb.TagNumber(2)
void clearPhone() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get code => $_getSZ(2);
@$pb.TagNumber(3)
set code($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasCode() => $_has(2);
@$pb.TagNumber(3)
void clearCode() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get password => $_getSZ(3);
@$pb.TagNumber(4)
set password($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasPassword() => $_has(3);
@$pb.TagNumber(4)
void clearPassword() => $_clearField(4);
@$pb.TagNumber(5)
$core.String get nickname => $_getSZ(4);
@$pb.TagNumber(5)
set nickname($core.String value) => $_setString(4, value);
@$pb.TagNumber(5)
$core.bool hasNickname() => $_has(4);
@$pb.TagNumber(5)
void clearNickname() => $_clearField(5);
}
class GetDataReply extends $pb.GeneratedMessage {
factory GetDataReply({
///
class GetFullReply extends $pb.GeneratedMessage {
factory GetFullReply({
$core.String? identity,
$core.String? account,
$core.String? phone,
$core.String? email,
$core.String? rights,
$core.String? nickname,
$core.String? avatar,
$core.String? birthday,
$core.int? sex,
$core.int? country,
$core.int? province,
$core.int? city,
$core.int? area,
$core.String? sign,
$core.int? approve,
$core.String? cover,
$core.int? score,
$core.int? level,
$core.Iterable<$core.MapEntry<$core.String, $core.bool>>? verify,
}) {
final result = create();
if (identity != null) result.identity = identity;
if (account != null) result.account = account;
if (phone != null) result.phone = phone;
if (email != null) result.email = email;
if (rights != null) result.rights = rights;
if (nickname != null) result.nickname = nickname;
if (avatar != null) result.avatar = avatar;
if (birthday != null) result.birthday = birthday;
if (sex != null) result.sex = sex;
if (country != null) result.country = country;
if (province != null) result.province = province;
if (city != null) result.city = city;
if (area != null) result.area = area;
if (sign != null) result.sign = sign;
if (approve != null) result.approve = approve;
if (cover != null) result.cover = cover;
if (score != null) result.score = score;
if (level != null) result.level = level;
if (verify != null) result.verify.addEntries(verify);
return result;
}
GetDataReply._();
GetFullReply._();
factory GetDataReply.fromBuffer($core.List<$core.int> data,
factory GetFullReply.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory GetDataReply.fromJson($core.String json,
factory GetFullReply.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'GetDataReply',
_omitMessageNames ? '' : 'GetFullReply',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'account')
..aOS(2, _omitFieldNames ? '' : 'phone')
..aOS(3, _omitFieldNames ? '' : 'nickname')
..aOS(4, _omitFieldNames ? '' : 'avatar')
..aOS(5, _omitFieldNames ? '' : 'birthday')
..a<$core.int>(6, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.O3)
..a<$core.int>(7, _omitFieldNames ? '' : 'province', $pb.PbFieldType.O3)
..a<$core.int>(8, _omitFieldNames ? '' : 'city', $pb.PbFieldType.O3)
..a<$core.int>(9, _omitFieldNames ? '' : 'area', $pb.PbFieldType.O3)
..aOS(10, _omitFieldNames ? '' : 'sign')
..a<$core.int>(11, _omitFieldNames ? '' : 'approve', $pb.PbFieldType.O3)
..aOS(1, _omitFieldNames ? '' : 'identity')
..aOS(2, _omitFieldNames ? '' : 'account')
..aOS(3, _omitFieldNames ? '' : 'phone')
..aOS(4, _omitFieldNames ? '' : 'email')
..aOS(5, _omitFieldNames ? '' : 'rights')
..aOS(6, _omitFieldNames ? '' : 'nickname')
..aOS(7, _omitFieldNames ? '' : 'avatar')
..aOS(8, _omitFieldNames ? '' : 'birthday')
..a<$core.int>(9, _omitFieldNames ? '' : 'sex', $pb.PbFieldType.O3)
..a<$core.int>(10, _omitFieldNames ? '' : 'country', $pb.PbFieldType.O3)
..a<$core.int>(11, _omitFieldNames ? '' : 'province', $pb.PbFieldType.O3)
..a<$core.int>(12, _omitFieldNames ? '' : 'city', $pb.PbFieldType.O3)
..a<$core.int>(13, _omitFieldNames ? '' : 'area', $pb.PbFieldType.O3)
..aOS(14, _omitFieldNames ? '' : 'sign')
..aOS(15, _omitFieldNames ? '' : 'cover')
..a<$core.int>(16, _omitFieldNames ? '' : 'score', $pb.PbFieldType.O3)
..a<$core.int>(17, _omitFieldNames ? '' : 'level', $pb.PbFieldType.O3)
..m<$core.String, $core.bool>(18, _omitFieldNames ? '' : 'verify',
entryClassName: 'GetFullReply.VerifyEntry',
keyFieldType: $pb.PbFieldType.OS,
valueFieldType: $pb.PbFieldType.OB,
packageName: const $pb.PackageName('passport'))
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
GetDataReply clone() => GetDataReply()..mergeFromMessage(this);
GetFullReply clone() => GetFullReply()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
GetDataReply copyWith(void Function(GetDataReply) updates) =>
super.copyWith((message) => updates(message as GetDataReply))
as GetDataReply;
GetFullReply copyWith(void Function(GetFullReply) updates) =>
super.copyWith((message) => updates(message as GetFullReply))
as GetFullReply;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static GetDataReply create() => GetDataReply._();
static GetFullReply create() => GetFullReply._();
@$core.override
GetDataReply createEmptyInstance() => create();
static $pb.PbList<GetDataReply> createRepeated() =>
$pb.PbList<GetDataReply>();
GetFullReply createEmptyInstance() => create();
static $pb.PbList<GetFullReply> createRepeated() =>
$pb.PbList<GetFullReply>();
@$core.pragma('dart2js:noInline')
static GetDataReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<GetDataReply>(create);
static GetDataReply? _defaultInstance;
static GetFullReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<GetFullReply>(create);
static GetFullReply? _defaultInstance;
@$pb.TagNumber(1)
$core.String get account => $_getSZ(0);
$core.String get identity => $_getSZ(0);
@$pb.TagNumber(1)
set account($core.String value) => $_setString(0, value);
set identity($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasAccount() => $_has(0);
$core.bool hasIdentity() => $_has(0);
@$pb.TagNumber(1)
void clearAccount() => $_clearField(1);
void clearIdentity() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get phone => $_getSZ(1);
$core.String get account => $_getSZ(1);
@$pb.TagNumber(2)
set phone($core.String value) => $_setString(1, value);
set account($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasPhone() => $_has(1);
$core.bool hasAccount() => $_has(1);
@$pb.TagNumber(2)
void clearPhone() => $_clearField(2);
void clearAccount() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get nickname => $_getSZ(2);
$core.String get phone => $_getSZ(2);
@$pb.TagNumber(3)
set nickname($core.String value) => $_setString(2, value);
set phone($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasNickname() => $_has(2);
$core.bool hasPhone() => $_has(2);
@$pb.TagNumber(3)
void clearNickname() => $_clearField(3);
void clearPhone() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get avatar => $_getSZ(3);
$core.String get email => $_getSZ(3);
@$pb.TagNumber(4)
set avatar($core.String value) => $_setString(3, value);
set email($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasAvatar() => $_has(3);
$core.bool hasEmail() => $_has(3);
@$pb.TagNumber(4)
void clearAvatar() => $_clearField(4);
void clearEmail() => $_clearField(4);
@$pb.TagNumber(5)
$core.String get birthday => $_getSZ(4);
$core.String get rights => $_getSZ(4);
@$pb.TagNumber(5)
set birthday($core.String value) => $_setString(4, value);
set rights($core.String value) => $_setString(4, value);
@$pb.TagNumber(5)
$core.bool hasBirthday() => $_has(4);
$core.bool hasRights() => $_has(4);
@$pb.TagNumber(5)
void clearBirthday() => $_clearField(5);
void clearRights() => $_clearField(5);
@$pb.TagNumber(6)
$core.int get sex => $_getIZ(5);
$core.String get nickname => $_getSZ(5);
@$pb.TagNumber(6)
set sex($core.int value) => $_setSignedInt32(5, value);
set nickname($core.String value) => $_setString(5, value);
@$pb.TagNumber(6)
$core.bool hasSex() => $_has(5);
$core.bool hasNickname() => $_has(5);
@$pb.TagNumber(6)
void clearSex() => $_clearField(6);
void clearNickname() => $_clearField(6);
@$pb.TagNumber(7)
$core.int get province => $_getIZ(6);
$core.String get avatar => $_getSZ(6);
@$pb.TagNumber(7)
set province($core.int value) => $_setSignedInt32(6, value);
set avatar($core.String value) => $_setString(6, value);
@$pb.TagNumber(7)
$core.bool hasProvince() => $_has(6);
$core.bool hasAvatar() => $_has(6);
@$pb.TagNumber(7)
void clearProvince() => $_clearField(7);
void clearAvatar() => $_clearField(7);
@$pb.TagNumber(8)
$core.int get city => $_getIZ(7);
$core.String get birthday => $_getSZ(7);
@$pb.TagNumber(8)
set city($core.int value) => $_setSignedInt32(7, value);
set birthday($core.String value) => $_setString(7, value);
@$pb.TagNumber(8)
$core.bool hasCity() => $_has(7);
$core.bool hasBirthday() => $_has(7);
@$pb.TagNumber(8)
void clearCity() => $_clearField(8);
void clearBirthday() => $_clearField(8);
@$pb.TagNumber(9)
$core.int get area => $_getIZ(8);
$core.int get sex => $_getIZ(8);
@$pb.TagNumber(9)
set area($core.int value) => $_setSignedInt32(8, value);
set sex($core.int value) => $_setSignedInt32(8, value);
@$pb.TagNumber(9)
$core.bool hasArea() => $_has(8);
$core.bool hasSex() => $_has(8);
@$pb.TagNumber(9)
void clearArea() => $_clearField(9);
void clearSex() => $_clearField(9);
@$pb.TagNumber(10)
$core.String get sign => $_getSZ(9);
$core.int get country => $_getIZ(9);
@$pb.TagNumber(10)
set sign($core.String value) => $_setString(9, value);
set country($core.int value) => $_setSignedInt32(9, value);
@$pb.TagNumber(10)
$core.bool hasSign() => $_has(9);
$core.bool hasCountry() => $_has(9);
@$pb.TagNumber(10)
void clearSign() => $_clearField(10);
void clearCountry() => $_clearField(10);
@$pb.TagNumber(11)
$core.int get approve => $_getIZ(10);
$core.int get province => $_getIZ(10);
@$pb.TagNumber(11)
set approve($core.int value) => $_setSignedInt32(10, value);
set province($core.int value) => $_setSignedInt32(10, value);
@$pb.TagNumber(11)
$core.bool hasApprove() => $_has(10);
$core.bool hasProvince() => $_has(10);
@$pb.TagNumber(11)
void clearApprove() => $_clearField(11);
void clearProvince() => $_clearField(11);
@$pb.TagNumber(12)
$core.int get city => $_getIZ(11);
@$pb.TagNumber(12)
set city($core.int value) => $_setSignedInt32(11, value);
@$pb.TagNumber(12)
$core.bool hasCity() => $_has(11);
@$pb.TagNumber(12)
void clearCity() => $_clearField(12);
@$pb.TagNumber(13)
$core.int get area => $_getIZ(12);
@$pb.TagNumber(13)
set area($core.int value) => $_setSignedInt32(12, value);
@$pb.TagNumber(13)
$core.bool hasArea() => $_has(12);
@$pb.TagNumber(13)
void clearArea() => $_clearField(13);
@$pb.TagNumber(14)
$core.String get sign => $_getSZ(13);
@$pb.TagNumber(14)
set sign($core.String value) => $_setString(13, value);
@$pb.TagNumber(14)
$core.bool hasSign() => $_has(13);
@$pb.TagNumber(14)
void clearSign() => $_clearField(14);
@$pb.TagNumber(15)
$core.String get cover => $_getSZ(14);
@$pb.TagNumber(15)
set cover($core.String value) => $_setString(14, value);
@$pb.TagNumber(15)
$core.bool hasCover() => $_has(14);
@$pb.TagNumber(15)
void clearCover() => $_clearField(15);
@$pb.TagNumber(16)
$core.int get score => $_getIZ(15);
@$pb.TagNumber(16)
set score($core.int value) => $_setSignedInt32(15, value);
@$pb.TagNumber(16)
$core.bool hasScore() => $_has(15);
@$pb.TagNumber(16)
void clearScore() => $_clearField(16);
@$pb.TagNumber(17)
$core.int get level => $_getIZ(16);
@$pb.TagNumber(17)
set level($core.int value) => $_setSignedInt32(16, value);
@$pb.TagNumber(17)
$core.bool hasLevel() => $_has(16);
@$pb.TagNumber(17)
void clearLevel() => $_clearField(17);
@$pb.TagNumber(18)
$pb.PbMap<$core.String, $core.bool> get verify => $_getMap(17);
}
class SetDataRequest extends $pb.GeneratedMessage {

View File

@ -1,6 +1,6 @@
// This is a generated file - do not edit.
//
// Generated from info.proto.
// Generated from account.proto.
// @dart = 3.3

View File

@ -0,0 +1,158 @@
// This is a generated file - do not edit.
//
// Generated from account.proto.
// @dart = 3.3
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names
import 'dart:async' as $async;
import 'dart:core' as $core;
import 'package:grpc/service_api.dart' as $grpc;
import 'package:protobuf/protobuf.dart' as $pb;
import 'account.pb.dart' as $1;
import 'blocks.pb.dart' as $0;
export 'account.pb.dart';
/// Passport()-
@$pb.GrpcServiceName('passport.Account')
class AccountClient extends $grpc.Client {
/// The hostname for this service.
static const $core.String defaultHost = '';
/// OAuth scopes needed for the client.
static const $core.List<$core.String> oauthScopes = [
'',
];
AccountClient(super.channel, {super.options, super.interceptors});
///
$grpc.ResponseFuture<$1.GetFullReply> get(
$0.Empty request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$get, request, options: options);
}
/// ,0
$grpc.ResponseFuture<$0.StatusReply> setData(
$1.SetDataRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$setData, request, options: options);
}
///
$grpc.ResponseFuture<$0.StatusReply> setPassword(
$1.SetPasswordRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$setPassword, request, options: options);
}
///
$grpc.ResponseFuture<$1.StatisticsReply> statistics(
$1.StatisticsRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$statistics, request, options: options);
}
// method descriptors
static final _$get = $grpc.ClientMethod<$0.Empty, $1.GetFullReply>(
'/passport.Account/Get',
($0.Empty value) => value.writeToBuffer(),
$1.GetFullReply.fromBuffer);
static final _$setData =
$grpc.ClientMethod<$1.SetDataRequest, $0.StatusReply>(
'/passport.Account/SetData',
($1.SetDataRequest value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
static final _$setPassword =
$grpc.ClientMethod<$1.SetPasswordRequest, $0.StatusReply>(
'/passport.Account/SetPassword',
($1.SetPasswordRequest value) => value.writeToBuffer(),
$0.StatusReply.fromBuffer);
static final _$statistics =
$grpc.ClientMethod<$1.StatisticsRequest, $1.StatisticsReply>(
'/passport.Account/Statistics',
($1.StatisticsRequest value) => value.writeToBuffer(),
$1.StatisticsReply.fromBuffer);
}
@$pb.GrpcServiceName('passport.Account')
abstract class AccountServiceBase extends $grpc.Service {
$core.String get $name => 'passport.Account';
AccountServiceBase() {
$addMethod($grpc.ServiceMethod<$0.Empty, $1.GetFullReply>(
'Get',
get_Pre,
false,
false,
($core.List<$core.int> value) => $0.Empty.fromBuffer(value),
($1.GetFullReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$1.SetDataRequest, $0.StatusReply>(
'SetData',
setData_Pre,
false,
false,
($core.List<$core.int> value) => $1.SetDataRequest.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$1.SetPasswordRequest, $0.StatusReply>(
'SetPassword',
setPassword_Pre,
false,
false,
($core.List<$core.int> value) =>
$1.SetPasswordRequest.fromBuffer(value),
($0.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$1.StatisticsRequest, $1.StatisticsReply>(
'Statistics',
statistics_Pre,
false,
false,
($core.List<$core.int> value) => $1.StatisticsRequest.fromBuffer(value),
($1.StatisticsReply value) => value.writeToBuffer()));
}
$async.Future<$1.GetFullReply> get_Pre(
$grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async {
return get($call, await $request);
}
$async.Future<$1.GetFullReply> get($grpc.ServiceCall call, $0.Empty request);
$async.Future<$0.StatusReply> setData_Pre($grpc.ServiceCall $call,
$async.Future<$1.SetDataRequest> $request) async {
return setData($call, await $request);
}
$async.Future<$0.StatusReply> setData(
$grpc.ServiceCall call, $1.SetDataRequest request);
$async.Future<$0.StatusReply> setPassword_Pre($grpc.ServiceCall $call,
$async.Future<$1.SetPasswordRequest> $request) async {
return setPassword($call, await $request);
}
$async.Future<$0.StatusReply> setPassword(
$grpc.ServiceCall call, $1.SetPasswordRequest request);
$async.Future<$1.StatisticsReply> statistics_Pre($grpc.ServiceCall $call,
$async.Future<$1.StatisticsRequest> $request) async {
return statistics($call, await $request);
}
$async.Future<$1.StatisticsReply> statistics(
$grpc.ServiceCall call, $1.StatisticsRequest request);
}

View File

@ -1,6 +1,6 @@
// This is a generated file - do not edit.
//
// Generated from info.proto.
// Generated from account.proto.
// @dart = 3.3
@ -14,49 +14,61 @@ import 'dart:convert' as $convert;
import 'dart:core' as $core;
import 'dart:typed_data' as $typed_data;
@$core.Deprecated('Use bindRequestDescriptor instead')
const BindRequest$json = {
'1': 'BindRequest',
@$core.Deprecated('Use getFullReplyDescriptor instead')
const GetFullReply$json = {
'1': 'GetFullReply',
'2': [
{'1': 'action', '3': 1, '4': 1, '5': 9, '10': 'action'},
{'1': 'phone', '3': 2, '4': 1, '5': 9, '10': 'phone'},
{'1': 'code', '3': 3, '4': 1, '5': 9, '10': 'code'},
{'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'},
{'1': 'nickname', '3': 5, '4': 1, '5': 9, '10': 'nickname'},
{'1': 'identity', '3': 1, '4': 1, '5': 9, '10': 'identity'},
{'1': 'account', '3': 2, '4': 1, '5': 9, '10': 'account'},
{'1': 'phone', '3': 3, '4': 1, '5': 9, '10': 'phone'},
{'1': 'email', '3': 4, '4': 1, '5': 9, '10': 'email'},
{'1': 'rights', '3': 5, '4': 1, '5': 9, '10': 'rights'},
{'1': 'nickname', '3': 6, '4': 1, '5': 9, '10': 'nickname'},
{'1': 'avatar', '3': 7, '4': 1, '5': 9, '10': 'avatar'},
{'1': 'birthday', '3': 8, '4': 1, '5': 9, '10': 'birthday'},
{'1': 'sex', '3': 9, '4': 1, '5': 5, '10': 'sex'},
{'1': 'country', '3': 10, '4': 1, '5': 5, '10': 'country'},
{'1': 'province', '3': 11, '4': 1, '5': 5, '10': 'province'},
{'1': 'city', '3': 12, '4': 1, '5': 5, '10': 'city'},
{'1': 'area', '3': 13, '4': 1, '5': 5, '10': 'area'},
{'1': 'sign', '3': 14, '4': 1, '5': 9, '10': 'sign'},
{'1': 'cover', '3': 15, '4': 1, '5': 9, '10': 'cover'},
{'1': 'score', '3': 16, '4': 1, '5': 5, '10': 'score'},
{'1': 'level', '3': 17, '4': 1, '5': 5, '10': 'level'},
{
'1': 'verify',
'3': 18,
'4': 3,
'5': 11,
'6': '.passport.GetFullReply.VerifyEntry',
'10': 'verify'
},
],
'3': [GetFullReply_VerifyEntry$json],
};
/// Descriptor for `BindRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List bindRequestDescriptor = $convert.base64Decode(
'CgtCaW5kUmVxdWVzdBIWCgZhY3Rpb24YASABKAlSBmFjdGlvbhIUCgVwaG9uZRgCIAEoCVIFcG'
'hvbmUSEgoEY29kZRgDIAEoCVIEY29kZRIaCghwYXNzd29yZBgEIAEoCVIIcGFzc3dvcmQSGgoI'
'bmlja25hbWUYBSABKAlSCG5pY2tuYW1l');
@$core.Deprecated('Use getDataReplyDescriptor instead')
const GetDataReply$json = {
'1': 'GetDataReply',
@$core.Deprecated('Use getFullReplyDescriptor instead')
const GetFullReply_VerifyEntry$json = {
'1': 'VerifyEntry',
'2': [
{'1': 'account', '3': 1, '4': 1, '5': 9, '10': 'account'},
{'1': 'phone', '3': 2, '4': 1, '5': 9, '10': 'phone'},
{'1': 'nickname', '3': 3, '4': 1, '5': 9, '10': 'nickname'},
{'1': 'avatar', '3': 4, '4': 1, '5': 9, '10': 'avatar'},
{'1': 'birthday', '3': 5, '4': 1, '5': 9, '10': 'birthday'},
{'1': 'sex', '3': 6, '4': 1, '5': 5, '10': 'sex'},
{'1': 'province', '3': 7, '4': 1, '5': 5, '10': 'province'},
{'1': 'city', '3': 8, '4': 1, '5': 5, '10': 'city'},
{'1': 'area', '3': 9, '4': 1, '5': 5, '10': 'area'},
{'1': 'sign', '3': 10, '4': 1, '5': 9, '10': 'sign'},
{'1': 'approve', '3': 11, '4': 1, '5': 5, '10': 'approve'},
{'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
{'1': 'value', '3': 2, '4': 1, '5': 8, '10': 'value'},
],
'7': {'7': true},
};
/// Descriptor for `GetDataReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getDataReplyDescriptor = $convert.base64Decode(
'CgxHZXREYXRhUmVwbHkSGAoHYWNjb3VudBgBIAEoCVIHYWNjb3VudBIUCgVwaG9uZRgCIAEoCV'
'IFcGhvbmUSGgoIbmlja25hbWUYAyABKAlSCG5pY2tuYW1lEhYKBmF2YXRhchgEIAEoCVIGYXZh'
'dGFyEhoKCGJpcnRoZGF5GAUgASgJUghiaXJ0aGRheRIQCgNzZXgYBiABKAVSA3NleBIaCghwcm'
'92aW5jZRgHIAEoBVIIcHJvdmluY2USEgoEY2l0eRgIIAEoBVIEY2l0eRISCgRhcmVhGAkgASgF'
'UgRhcmVhEhIKBHNpZ24YCiABKAlSBHNpZ24SGAoHYXBwcm92ZRgLIAEoBVIHYXBwcm92ZQ==');
/// Descriptor for `GetFullReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getFullReplyDescriptor = $convert.base64Decode(
'CgxHZXRGdWxsUmVwbHkSGgoIaWRlbnRpdHkYASABKAlSCGlkZW50aXR5EhgKB2FjY291bnQYAi'
'ABKAlSB2FjY291bnQSFAoFcGhvbmUYAyABKAlSBXBob25lEhQKBWVtYWlsGAQgASgJUgVlbWFp'
'bBIWCgZyaWdodHMYBSABKAlSBnJpZ2h0cxIaCghuaWNrbmFtZRgGIAEoCVIIbmlja25hbWUSFg'
'oGYXZhdGFyGAcgASgJUgZhdmF0YXISGgoIYmlydGhkYXkYCCABKAlSCGJpcnRoZGF5EhAKA3Nl'
'eBgJIAEoBVIDc2V4EhgKB2NvdW50cnkYCiABKAVSB2NvdW50cnkSGgoIcHJvdmluY2UYCyABKA'
'VSCHByb3ZpbmNlEhIKBGNpdHkYDCABKAVSBGNpdHkSEgoEYXJlYRgNIAEoBVIEYXJlYRISCgRz'
'aWduGA4gASgJUgRzaWduEhQKBWNvdmVyGA8gASgJUgVjb3ZlchIUCgVzY29yZRgQIAEoBVIFc2'
'NvcmUSFAoFbGV2ZWwYESABKAVSBWxldmVsEjoKBnZlcmlmeRgSIAMoCzIiLnBhc3Nwb3J0Lkdl'
'dEZ1bGxSZXBseS5WZXJpZnlFbnRyeVIGdmVyaWZ5GjkKC1ZlcmlmeUVudHJ5EhAKA2tleRgBIA'
'EoCVIDa2V5EhQKBXZhbHVlGAIgASgIUgV2YWx1ZToCOAE=');
@$core.Deprecated('Use setDataRequestDescriptor instead')
const SetDataRequest$json = {

View File

@ -1,188 +0,0 @@
// This is a generated file - do not edit.
//
// Generated from info.proto.
// @dart = 3.3
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names
import 'dart:async' as $async;
import 'dart:core' as $core;
import 'package:grpc/service_api.dart' as $grpc;
import 'package:protobuf/protobuf.dart' as $pb;
import 'blocks.pb.dart' as $1;
import 'info.pb.dart' as $0;
export 'info.pb.dart';
/// Passport()-
/// *Token验证
@$pb.GrpcServiceName('passport.Info')
class InfoClient extends $grpc.Client {
/// The hostname for this service.
static const $core.String defaultHost = '';
/// OAuth scopes needed for the client.
static const $core.List<$core.String> oauthScopes = [
'',
];
InfoClient(super.channel, {super.options, super.interceptors});
///
$grpc.ResponseFuture<$1.StatusReply> bind(
$0.BindRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$bind, request, options: options);
}
///
$grpc.ResponseFuture<$0.GetDataReply> getData(
$1.Empty request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$getData, request, options: options);
}
///
/// 0
$grpc.ResponseFuture<$1.StatusReply> setData(
$0.SetDataRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$setData, request, options: options);
}
///
$grpc.ResponseFuture<$1.StatusReply> setPassword(
$0.SetPasswordRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$setPassword, request, options: options);
}
///
$grpc.ResponseFuture<$0.StatisticsReply> statistics(
$0.StatisticsRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$statistics, request, options: options);
}
// method descriptors
static final _$bind = $grpc.ClientMethod<$0.BindRequest, $1.StatusReply>(
'/passport.Info/Bind',
($0.BindRequest value) => value.writeToBuffer(),
$1.StatusReply.fromBuffer);
static final _$getData = $grpc.ClientMethod<$1.Empty, $0.GetDataReply>(
'/passport.Info/GetData',
($1.Empty value) => value.writeToBuffer(),
$0.GetDataReply.fromBuffer);
static final _$setData =
$grpc.ClientMethod<$0.SetDataRequest, $1.StatusReply>(
'/passport.Info/SetData',
($0.SetDataRequest value) => value.writeToBuffer(),
$1.StatusReply.fromBuffer);
static final _$setPassword =
$grpc.ClientMethod<$0.SetPasswordRequest, $1.StatusReply>(
'/passport.Info/SetPassword',
($0.SetPasswordRequest value) => value.writeToBuffer(),
$1.StatusReply.fromBuffer);
static final _$statistics =
$grpc.ClientMethod<$0.StatisticsRequest, $0.StatisticsReply>(
'/passport.Info/Statistics',
($0.StatisticsRequest value) => value.writeToBuffer(),
$0.StatisticsReply.fromBuffer);
}
@$pb.GrpcServiceName('passport.Info')
abstract class InfoServiceBase extends $grpc.Service {
$core.String get $name => 'passport.Info';
InfoServiceBase() {
$addMethod($grpc.ServiceMethod<$0.BindRequest, $1.StatusReply>(
'Bind',
bind_Pre,
false,
false,
($core.List<$core.int> value) => $0.BindRequest.fromBuffer(value),
($1.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$1.Empty, $0.GetDataReply>(
'GetData',
getData_Pre,
false,
false,
($core.List<$core.int> value) => $1.Empty.fromBuffer(value),
($0.GetDataReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.SetDataRequest, $1.StatusReply>(
'SetData',
setData_Pre,
false,
false,
($core.List<$core.int> value) => $0.SetDataRequest.fromBuffer(value),
($1.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.SetPasswordRequest, $1.StatusReply>(
'SetPassword',
setPassword_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.SetPasswordRequest.fromBuffer(value),
($1.StatusReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.StatisticsRequest, $0.StatisticsReply>(
'Statistics',
statistics_Pre,
false,
false,
($core.List<$core.int> value) => $0.StatisticsRequest.fromBuffer(value),
($0.StatisticsReply value) => value.writeToBuffer()));
}
$async.Future<$1.StatusReply> bind_Pre(
$grpc.ServiceCall $call, $async.Future<$0.BindRequest> $request) async {
return bind($call, await $request);
}
$async.Future<$1.StatusReply> bind(
$grpc.ServiceCall call, $0.BindRequest request);
$async.Future<$0.GetDataReply> getData_Pre(
$grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async {
return getData($call, await $request);
}
$async.Future<$0.GetDataReply> getData(
$grpc.ServiceCall call, $1.Empty request);
$async.Future<$1.StatusReply> setData_Pre($grpc.ServiceCall $call,
$async.Future<$0.SetDataRequest> $request) async {
return setData($call, await $request);
}
$async.Future<$1.StatusReply> setData(
$grpc.ServiceCall call, $0.SetDataRequest request);
$async.Future<$1.StatusReply> setPassword_Pre($grpc.ServiceCall $call,
$async.Future<$0.SetPasswordRequest> $request) async {
return setPassword($call, await $request);
}
$async.Future<$1.StatusReply> setPassword(
$grpc.ServiceCall call, $0.SetPasswordRequest request);
$async.Future<$0.StatisticsReply> statistics_Pre($grpc.ServiceCall $call,
$async.Future<$0.StatisticsRequest> $request) async {
return statistics($call, await $request);
}
$async.Future<$0.StatisticsReply> statistics(
$grpc.ServiceCall call, $0.StatisticsRequest request);
}

View File

@ -1,864 +0,0 @@
// This is a generated file - do not edit.
//
// Generated from login.proto.
// @dart = 3.3
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: curly_braces_in_flow_control_structures
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names
import 'dart:core' as $core;
import 'package:fixnum/fixnum.dart' as $fixnum;
import 'package:protobuf/protobuf.dart' as $pb;
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
class LoginByPwdRequest extends $pb.GeneratedMessage {
factory LoginByPwdRequest({
$core.String? account,
$core.String? password,
$core.String? device,
}) {
final result = create();
if (account != null) result.account = account;
if (password != null) result.password = password;
if (device != null) result.device = device;
return result;
}
LoginByPwdRequest._();
factory LoginByPwdRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory LoginByPwdRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'LoginByPwdRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'account')
..aOS(2, _omitFieldNames ? '' : 'password')
..aOS(3, _omitFieldNames ? '' : 'device')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginByPwdRequest clone() => LoginByPwdRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginByPwdRequest copyWith(void Function(LoginByPwdRequest) updates) =>
super.copyWith((message) => updates(message as LoginByPwdRequest))
as LoginByPwdRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static LoginByPwdRequest create() => LoginByPwdRequest._();
@$core.override
LoginByPwdRequest createEmptyInstance() => create();
static $pb.PbList<LoginByPwdRequest> createRepeated() =>
$pb.PbList<LoginByPwdRequest>();
@$core.pragma('dart2js:noInline')
static LoginByPwdRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<LoginByPwdRequest>(create);
static LoginByPwdRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get account => $_getSZ(0);
@$pb.TagNumber(1)
set account($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasAccount() => $_has(0);
@$pb.TagNumber(1)
void clearAccount() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get password => $_getSZ(1);
@$pb.TagNumber(2)
set password($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasPassword() => $_has(1);
@$pb.TagNumber(2)
void clearPassword() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get device => $_getSZ(2);
@$pb.TagNumber(3)
set device($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasDevice() => $_has(2);
@$pb.TagNumber(3)
void clearDevice() => $_clearField(3);
}
class LoginByCodeRequest extends $pb.GeneratedMessage {
factory LoginByCodeRequest({
$core.String? country,
$core.String? phone,
$core.String? code,
$core.String? device,
$core.String? name,
}) {
final result = create();
if (country != null) result.country = country;
if (phone != null) result.phone = phone;
if (code != null) result.code = code;
if (device != null) result.device = device;
if (name != null) result.name = name;
return result;
}
LoginByCodeRequest._();
factory LoginByCodeRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory LoginByCodeRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'LoginByCodeRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'country')
..aOS(2, _omitFieldNames ? '' : 'phone')
..aOS(3, _omitFieldNames ? '' : 'code')
..aOS(4, _omitFieldNames ? '' : 'device')
..aOS(5, _omitFieldNames ? '' : 'name')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginByCodeRequest clone() => LoginByCodeRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginByCodeRequest copyWith(void Function(LoginByCodeRequest) updates) =>
super.copyWith((message) => updates(message as LoginByCodeRequest))
as LoginByCodeRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static LoginByCodeRequest create() => LoginByCodeRequest._();
@$core.override
LoginByCodeRequest createEmptyInstance() => create();
static $pb.PbList<LoginByCodeRequest> createRepeated() =>
$pb.PbList<LoginByCodeRequest>();
@$core.pragma('dart2js:noInline')
static LoginByCodeRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<LoginByCodeRequest>(create);
static LoginByCodeRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get country => $_getSZ(0);
@$pb.TagNumber(1)
set country($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasCountry() => $_has(0);
@$pb.TagNumber(1)
void clearCountry() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get phone => $_getSZ(1);
@$pb.TagNumber(2)
set phone($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasPhone() => $_has(1);
@$pb.TagNumber(2)
void clearPhone() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get code => $_getSZ(2);
@$pb.TagNumber(3)
set code($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasCode() => $_has(2);
@$pb.TagNumber(3)
void clearCode() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get device => $_getSZ(3);
@$pb.TagNumber(4)
set device($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasDevice() => $_has(3);
@$pb.TagNumber(4)
void clearDevice() => $_clearField(4);
@$pb.TagNumber(5)
$core.String get name => $_getSZ(4);
@$pb.TagNumber(5)
set name($core.String value) => $_setString(4, value);
@$pb.TagNumber(5)
$core.bool hasName() => $_has(4);
@$pb.TagNumber(5)
void clearName() => $_clearField(5);
}
class WeChatByCodeRequest extends $pb.GeneratedMessage {
factory WeChatByCodeRequest({
$core.String? code,
$fixnum.Int64? agencyId,
$fixnum.Int64? staffId,
}) {
final result = create();
if (code != null) result.code = code;
if (agencyId != null) result.agencyId = agencyId;
if (staffId != null) result.staffId = staffId;
return result;
}
WeChatByCodeRequest._();
factory WeChatByCodeRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory WeChatByCodeRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'WeChatByCodeRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'code')
..aInt64(2, _omitFieldNames ? '' : 'agencyId')
..aInt64(3, _omitFieldNames ? '' : 'staffId')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByCodeRequest clone() => WeChatByCodeRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByCodeRequest copyWith(void Function(WeChatByCodeRequest) updates) =>
super.copyWith((message) => updates(message as WeChatByCodeRequest))
as WeChatByCodeRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static WeChatByCodeRequest create() => WeChatByCodeRequest._();
@$core.override
WeChatByCodeRequest createEmptyInstance() => create();
static $pb.PbList<WeChatByCodeRequest> createRepeated() =>
$pb.PbList<WeChatByCodeRequest>();
@$core.pragma('dart2js:noInline')
static WeChatByCodeRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<WeChatByCodeRequest>(create);
static WeChatByCodeRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get code => $_getSZ(0);
@$pb.TagNumber(1)
set code($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasCode() => $_has(0);
@$pb.TagNumber(1)
void clearCode() => $_clearField(1);
@$pb.TagNumber(2)
$fixnum.Int64 get agencyId => $_getI64(1);
@$pb.TagNumber(2)
set agencyId($fixnum.Int64 value) => $_setInt64(1, value);
@$pb.TagNumber(2)
$core.bool hasAgencyId() => $_has(1);
@$pb.TagNumber(2)
void clearAgencyId() => $_clearField(2);
@$pb.TagNumber(3)
$fixnum.Int64 get staffId => $_getI64(2);
@$pb.TagNumber(3)
set staffId($fixnum.Int64 value) => $_setInt64(2, value);
@$pb.TagNumber(3)
$core.bool hasStaffId() => $_has(2);
@$pb.TagNumber(3)
void clearStaffId() => $_clearField(3);
}
class WeChatByPhoneReply extends $pb.GeneratedMessage {
factory WeChatByPhoneReply({
$core.String? account,
}) {
final result = create();
if (account != null) result.account = account;
return result;
}
WeChatByPhoneReply._();
factory WeChatByPhoneReply.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory WeChatByPhoneReply.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'WeChatByPhoneReply',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'account')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByPhoneReply clone() => WeChatByPhoneReply()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByPhoneReply copyWith(void Function(WeChatByPhoneReply) updates) =>
super.copyWith((message) => updates(message as WeChatByPhoneReply))
as WeChatByPhoneReply;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static WeChatByPhoneReply create() => WeChatByPhoneReply._();
@$core.override
WeChatByPhoneReply createEmptyInstance() => create();
static $pb.PbList<WeChatByPhoneReply> createRepeated() =>
$pb.PbList<WeChatByPhoneReply>();
@$core.pragma('dart2js:noInline')
static WeChatByPhoneReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<WeChatByPhoneReply>(create);
static WeChatByPhoneReply? _defaultInstance;
@$pb.TagNumber(1)
$core.String get account => $_getSZ(0);
@$pb.TagNumber(1)
set account($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasAccount() => $_has(0);
@$pb.TagNumber(1)
void clearAccount() => $_clearField(1);
}
class WeChatByCodeReply extends $pb.GeneratedMessage {
factory WeChatByCodeReply({
$core.String? sessionKey,
$core.String? openId,
$core.String? identity,
$core.String? account,
}) {
final result = create();
if (sessionKey != null) result.sessionKey = sessionKey;
if (openId != null) result.openId = openId;
if (identity != null) result.identity = identity;
if (account != null) result.account = account;
return result;
}
WeChatByCodeReply._();
factory WeChatByCodeReply.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory WeChatByCodeReply.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'WeChatByCodeReply',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'sessionKey')
..aOS(2, _omitFieldNames ? '' : 'openId')
..aOS(3, _omitFieldNames ? '' : 'identity')
..aOS(4, _omitFieldNames ? '' : 'account')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByCodeReply clone() => WeChatByCodeReply()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByCodeReply copyWith(void Function(WeChatByCodeReply) updates) =>
super.copyWith((message) => updates(message as WeChatByCodeReply))
as WeChatByCodeReply;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static WeChatByCodeReply create() => WeChatByCodeReply._();
@$core.override
WeChatByCodeReply createEmptyInstance() => create();
static $pb.PbList<WeChatByCodeReply> createRepeated() =>
$pb.PbList<WeChatByCodeReply>();
@$core.pragma('dart2js:noInline')
static WeChatByCodeReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<WeChatByCodeReply>(create);
static WeChatByCodeReply? _defaultInstance;
@$pb.TagNumber(1)
$core.String get sessionKey => $_getSZ(0);
@$pb.TagNumber(1)
set sessionKey($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasSessionKey() => $_has(0);
@$pb.TagNumber(1)
void clearSessionKey() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get openId => $_getSZ(1);
@$pb.TagNumber(2)
set openId($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasOpenId() => $_has(1);
@$pb.TagNumber(2)
void clearOpenId() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get identity => $_getSZ(2);
@$pb.TagNumber(3)
set identity($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasIdentity() => $_has(2);
@$pb.TagNumber(3)
void clearIdentity() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get account => $_getSZ(3);
@$pb.TagNumber(4)
set account($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasAccount() => $_has(3);
@$pb.TagNumber(4)
void clearAccount() => $_clearField(4);
}
class WeChatByPhoneRequest extends $pb.GeneratedMessage {
factory WeChatByPhoneRequest({
$core.String? sessionKey,
$core.String? openId,
$core.String? data,
$core.String? iv,
$core.String? identity,
}) {
final result = create();
if (sessionKey != null) result.sessionKey = sessionKey;
if (openId != null) result.openId = openId;
if (data != null) result.data = data;
if (iv != null) result.iv = iv;
if (identity != null) result.identity = identity;
return result;
}
WeChatByPhoneRequest._();
factory WeChatByPhoneRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory WeChatByPhoneRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'WeChatByPhoneRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'sessionKey')
..aOS(2, _omitFieldNames ? '' : 'openId')
..aOS(3, _omitFieldNames ? '' : 'data')
..aOS(4, _omitFieldNames ? '' : 'iv')
..aOS(5, _omitFieldNames ? '' : 'identity')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByPhoneRequest clone() =>
WeChatByPhoneRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatByPhoneRequest copyWith(void Function(WeChatByPhoneRequest) updates) =>
super.copyWith((message) => updates(message as WeChatByPhoneRequest))
as WeChatByPhoneRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static WeChatByPhoneRequest create() => WeChatByPhoneRequest._();
@$core.override
WeChatByPhoneRequest createEmptyInstance() => create();
static $pb.PbList<WeChatByPhoneRequest> createRepeated() =>
$pb.PbList<WeChatByPhoneRequest>();
@$core.pragma('dart2js:noInline')
static WeChatByPhoneRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<WeChatByPhoneRequest>(create);
static WeChatByPhoneRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get sessionKey => $_getSZ(0);
@$pb.TagNumber(1)
set sessionKey($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasSessionKey() => $_has(0);
@$pb.TagNumber(1)
void clearSessionKey() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get openId => $_getSZ(1);
@$pb.TagNumber(2)
set openId($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasOpenId() => $_has(1);
@$pb.TagNumber(2)
void clearOpenId() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get data => $_getSZ(2);
@$pb.TagNumber(3)
set data($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasData() => $_has(2);
@$pb.TagNumber(3)
void clearData() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get iv => $_getSZ(3);
@$pb.TagNumber(4)
set iv($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasIv() => $_has(3);
@$pb.TagNumber(4)
void clearIv() => $_clearField(4);
@$pb.TagNumber(5)
$core.String get identity => $_getSZ(4);
@$pb.TagNumber(5)
set identity($core.String value) => $_setString(4, value);
@$pb.TagNumber(5)
$core.bool hasIdentity() => $_has(4);
@$pb.TagNumber(5)
void clearIdentity() => $_clearField(5);
}
class WeChatGetUserinfoReply extends $pb.GeneratedMessage {
factory WeChatGetUserinfoReply({
$fixnum.Int64? id,
$core.String? account,
$core.String? identity,
$core.String? nickName,
$core.String? avatar,
$core.String? rights,
$core.String? token,
}) {
final result = create();
if (id != null) result.id = id;
if (account != null) result.account = account;
if (identity != null) result.identity = identity;
if (nickName != null) result.nickName = nickName;
if (avatar != null) result.avatar = avatar;
if (rights != null) result.rights = rights;
if (token != null) result.token = token;
return result;
}
WeChatGetUserinfoReply._();
factory WeChatGetUserinfoReply.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory WeChatGetUserinfoReply.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'WeChatGetUserinfoReply',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aInt64(1, _omitFieldNames ? '' : 'id')
..aOS(2, _omitFieldNames ? '' : 'account')
..aOS(3, _omitFieldNames ? '' : 'identity')
..aOS(4, _omitFieldNames ? '' : 'nickName')
..aOS(5, _omitFieldNames ? '' : 'avatar')
..aOS(6, _omitFieldNames ? '' : 'rights')
..aOS(7, _omitFieldNames ? '' : 'token')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatGetUserinfoReply clone() =>
WeChatGetUserinfoReply()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
WeChatGetUserinfoReply copyWith(
void Function(WeChatGetUserinfoReply) updates) =>
super.copyWith((message) => updates(message as WeChatGetUserinfoReply))
as WeChatGetUserinfoReply;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static WeChatGetUserinfoReply create() => WeChatGetUserinfoReply._();
@$core.override
WeChatGetUserinfoReply createEmptyInstance() => create();
static $pb.PbList<WeChatGetUserinfoReply> createRepeated() =>
$pb.PbList<WeChatGetUserinfoReply>();
@$core.pragma('dart2js:noInline')
static WeChatGetUserinfoReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<WeChatGetUserinfoReply>(create);
static WeChatGetUserinfoReply? _defaultInstance;
@$pb.TagNumber(1)
$fixnum.Int64 get id => $_getI64(0);
@$pb.TagNumber(1)
set id($fixnum.Int64 value) => $_setInt64(0, value);
@$pb.TagNumber(1)
$core.bool hasId() => $_has(0);
@$pb.TagNumber(1)
void clearId() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get account => $_getSZ(1);
@$pb.TagNumber(2)
set account($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasAccount() => $_has(1);
@$pb.TagNumber(2)
void clearAccount() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get identity => $_getSZ(2);
@$pb.TagNumber(3)
set identity($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasIdentity() => $_has(2);
@$pb.TagNumber(3)
void clearIdentity() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get nickName => $_getSZ(3);
@$pb.TagNumber(4)
set nickName($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasNickName() => $_has(3);
@$pb.TagNumber(4)
void clearNickName() => $_clearField(4);
@$pb.TagNumber(5)
$core.String get avatar => $_getSZ(4);
@$pb.TagNumber(5)
set avatar($core.String value) => $_setString(4, value);
@$pb.TagNumber(5)
$core.bool hasAvatar() => $_has(4);
@$pb.TagNumber(5)
void clearAvatar() => $_clearField(5);
@$pb.TagNumber(6)
$core.String get rights => $_getSZ(5);
@$pb.TagNumber(6)
set rights($core.String value) => $_setString(5, value);
@$pb.TagNumber(6)
$core.bool hasRights() => $_has(5);
@$pb.TagNumber(6)
void clearRights() => $_clearField(6);
@$pb.TagNumber(7)
$core.String get token => $_getSZ(6);
@$pb.TagNumber(7)
set token($core.String value) => $_setString(6, value);
@$pb.TagNumber(7)
$core.bool hasToken() => $_has(6);
@$pb.TagNumber(7)
void clearToken() => $_clearField(7);
}
class LoginByAppleIDRequest extends $pb.GeneratedMessage {
factory LoginByAppleIDRequest({
$core.String? appleId,
$core.String? desc,
$core.String? device,
}) {
final result = create();
if (appleId != null) result.appleId = appleId;
if (desc != null) result.desc = desc;
if (device != null) result.device = device;
return result;
}
LoginByAppleIDRequest._();
factory LoginByAppleIDRequest.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory LoginByAppleIDRequest.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'LoginByAppleIDRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'appleId')
..aOS(2, _omitFieldNames ? '' : 'desc')
..aOS(3, _omitFieldNames ? '' : 'device')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginByAppleIDRequest clone() =>
LoginByAppleIDRequest()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginByAppleIDRequest copyWith(
void Function(LoginByAppleIDRequest) updates) =>
super.copyWith((message) => updates(message as LoginByAppleIDRequest))
as LoginByAppleIDRequest;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static LoginByAppleIDRequest create() => LoginByAppleIDRequest._();
@$core.override
LoginByAppleIDRequest createEmptyInstance() => create();
static $pb.PbList<LoginByAppleIDRequest> createRepeated() =>
$pb.PbList<LoginByAppleIDRequest>();
@$core.pragma('dart2js:noInline')
static LoginByAppleIDRequest getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<LoginByAppleIDRequest>(create);
static LoginByAppleIDRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get appleId => $_getSZ(0);
@$pb.TagNumber(1)
set appleId($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasAppleId() => $_has(0);
@$pb.TagNumber(1)
void clearAppleId() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get desc => $_getSZ(1);
@$pb.TagNumber(2)
set desc($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasDesc() => $_has(1);
@$pb.TagNumber(2)
void clearDesc() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get device => $_getSZ(2);
@$pb.TagNumber(3)
set device($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasDevice() => $_has(2);
@$pb.TagNumber(3)
void clearDevice() => $_clearField(3);
}
class LoginReply extends $pb.GeneratedMessage {
factory LoginReply({
$fixnum.Int64? id,
$core.String? identity,
$core.String? token,
$core.String? phone,
$core.String? name,
$core.Iterable<$core.MapEntry<$core.String, $core.String>>? extend,
}) {
final result = create();
if (id != null) result.id = id;
if (identity != null) result.identity = identity;
if (token != null) result.token = token;
if (phone != null) result.phone = phone;
if (name != null) result.name = name;
if (extend != null) result.extend.addEntries(extend);
return result;
}
LoginReply._();
factory LoginReply.fromBuffer($core.List<$core.int> data,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromBuffer(data, registry);
factory LoginReply.fromJson($core.String json,
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
create()..mergeFromJson(json, registry);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
_omitMessageNames ? '' : 'LoginReply',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aInt64(1, _omitFieldNames ? '' : 'id')
..aOS(2, _omitFieldNames ? '' : 'identity')
..aOS(3, _omitFieldNames ? '' : 'token')
..aOS(4, _omitFieldNames ? '' : 'phone')
..aOS(5, _omitFieldNames ? '' : 'name')
..m<$core.String, $core.String>(6, _omitFieldNames ? '' : 'extend',
entryClassName: 'LoginReply.ExtendEntry',
keyFieldType: $pb.PbFieldType.OS,
valueFieldType: $pb.PbFieldType.OS,
packageName: const $pb.PackageName('passport'))
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginReply clone() => LoginReply()..mergeFromMessage(this);
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
LoginReply copyWith(void Function(LoginReply) updates) =>
super.copyWith((message) => updates(message as LoginReply)) as LoginReply;
@$core.override
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static LoginReply create() => LoginReply._();
@$core.override
LoginReply createEmptyInstance() => create();
static $pb.PbList<LoginReply> createRepeated() => $pb.PbList<LoginReply>();
@$core.pragma('dart2js:noInline')
static LoginReply getDefault() => _defaultInstance ??=
$pb.GeneratedMessage.$_defaultFor<LoginReply>(create);
static LoginReply? _defaultInstance;
@$pb.TagNumber(1)
$fixnum.Int64 get id => $_getI64(0);
@$pb.TagNumber(1)
set id($fixnum.Int64 value) => $_setInt64(0, value);
@$pb.TagNumber(1)
$core.bool hasId() => $_has(0);
@$pb.TagNumber(1)
void clearId() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get identity => $_getSZ(1);
@$pb.TagNumber(2)
set identity($core.String value) => $_setString(1, value);
@$pb.TagNumber(2)
$core.bool hasIdentity() => $_has(1);
@$pb.TagNumber(2)
void clearIdentity() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get token => $_getSZ(2);
@$pb.TagNumber(3)
set token($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasToken() => $_has(2);
@$pb.TagNumber(3)
void clearToken() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get phone => $_getSZ(3);
@$pb.TagNumber(4)
set phone($core.String value) => $_setString(3, value);
@$pb.TagNumber(4)
$core.bool hasPhone() => $_has(3);
@$pb.TagNumber(4)
void clearPhone() => $_clearField(4);
@$pb.TagNumber(5)
$core.String get name => $_getSZ(4);
@$pb.TagNumber(5)
set name($core.String value) => $_setString(4, value);
@$pb.TagNumber(5)
$core.bool hasName() => $_has(4);
@$pb.TagNumber(5)
void clearName() => $_clearField(5);
@$pb.TagNumber(6)
$pb.PbMap<$core.String, $core.String> get extend => $_getMap(5);
}
const $core.bool _omitFieldNames =
$core.bool.fromEnvironment('protobuf.omit_field_names');
const $core.bool _omitMessageNames =
$core.bool.fromEnvironment('protobuf.omit_message_names');

View File

@ -49,36 +49,6 @@ class LoginClient extends $grpc.Client {
return $createUnaryCall(_$code, request, options: options);
}
/// Wechat登录
$grpc.ResponseFuture<$0.WeChatByCodeReply> wechatByCode(
$0.WeChatByCodeRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$wechatByCode, request, options: options);
}
$grpc.ResponseFuture<$0.WeChatByPhoneReply> wechatByPhone(
$0.WeChatByPhoneRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$wechatByPhone, request, options: options);
}
$grpc.ResponseFuture<$0.WeChatGetUserinfoReply> wechatGetUserinfo(
$0.WeChatByPhoneRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$wechatGetUserinfo, request, options: options);
}
/// AppleID登录
$grpc.ResponseFuture<$0.LoginReply> appleId(
$0.LoginByAppleIDRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$appleId, request, options: options);
}
///
$grpc.ResponseFuture<$0.LoginReply> codeAndRegister(
$0.LoginByCodeRequest request, {
@ -98,26 +68,6 @@ class LoginClient extends $grpc.Client {
'/passport.Login/Code',
($0.LoginByCodeRequest value) => value.writeToBuffer(),
$0.LoginReply.fromBuffer);
static final _$wechatByCode =
$grpc.ClientMethod<$0.WeChatByCodeRequest, $0.WeChatByCodeReply>(
'/passport.Login/WechatByCode',
($0.WeChatByCodeRequest value) => value.writeToBuffer(),
$0.WeChatByCodeReply.fromBuffer);
static final _$wechatByPhone =
$grpc.ClientMethod<$0.WeChatByPhoneRequest, $0.WeChatByPhoneReply>(
'/passport.Login/WechatByPhone',
($0.WeChatByPhoneRequest value) => value.writeToBuffer(),
$0.WeChatByPhoneReply.fromBuffer);
static final _$wechatGetUserinfo =
$grpc.ClientMethod<$0.WeChatByPhoneRequest, $0.WeChatGetUserinfoReply>(
'/passport.Login/WechatGetUserinfo',
($0.WeChatByPhoneRequest value) => value.writeToBuffer(),
$0.WeChatGetUserinfoReply.fromBuffer);
static final _$appleId =
$grpc.ClientMethod<$0.LoginByAppleIDRequest, $0.LoginReply>(
'/passport.Login/AppleId',
($0.LoginByAppleIDRequest value) => value.writeToBuffer(),
$0.LoginReply.fromBuffer);
static final _$codeAndRegister =
$grpc.ClientMethod<$0.LoginByCodeRequest, $0.LoginReply>(
'/passport.Login/CodeAndRegister',
@ -145,41 +95,6 @@ abstract class LoginServiceBase extends $grpc.Service {
($core.List<$core.int> value) =>
$0.LoginByCodeRequest.fromBuffer(value),
($0.LoginReply value) => value.writeToBuffer()));
$addMethod(
$grpc.ServiceMethod<$0.WeChatByCodeRequest, $0.WeChatByCodeReply>(
'WechatByCode',
wechatByCode_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.WeChatByCodeRequest.fromBuffer(value),
($0.WeChatByCodeReply value) => value.writeToBuffer()));
$addMethod(
$grpc.ServiceMethod<$0.WeChatByPhoneRequest, $0.WeChatByPhoneReply>(
'WechatByPhone',
wechatByPhone_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.WeChatByPhoneRequest.fromBuffer(value),
($0.WeChatByPhoneReply value) => value.writeToBuffer()));
$addMethod(
$grpc.ServiceMethod<$0.WeChatByPhoneRequest, $0.WeChatGetUserinfoReply>(
'WechatGetUserinfo',
wechatGetUserinfo_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.WeChatByPhoneRequest.fromBuffer(value),
($0.WeChatGetUserinfoReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.LoginByAppleIDRequest, $0.LoginReply>(
'AppleId',
appleId_Pre,
false,
false,
($core.List<$core.int> value) =>
$0.LoginByAppleIDRequest.fromBuffer(value),
($0.LoginReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.LoginByCodeRequest, $0.LoginReply>(
'CodeAndRegister',
codeAndRegister_Pre,
@ -206,40 +121,6 @@ abstract class LoginServiceBase extends $grpc.Service {
$async.Future<$0.LoginReply> code(
$grpc.ServiceCall call, $0.LoginByCodeRequest request);
$async.Future<$0.WeChatByCodeReply> wechatByCode_Pre($grpc.ServiceCall $call,
$async.Future<$0.WeChatByCodeRequest> $request) async {
return wechatByCode($call, await $request);
}
$async.Future<$0.WeChatByCodeReply> wechatByCode(
$grpc.ServiceCall call, $0.WeChatByCodeRequest request);
$async.Future<$0.WeChatByPhoneReply> wechatByPhone_Pre(
$grpc.ServiceCall $call,
$async.Future<$0.WeChatByPhoneRequest> $request) async {
return wechatByPhone($call, await $request);
}
$async.Future<$0.WeChatByPhoneReply> wechatByPhone(
$grpc.ServiceCall call, $0.WeChatByPhoneRequest request);
$async.Future<$0.WeChatGetUserinfoReply> wechatGetUserinfo_Pre(
$grpc.ServiceCall $call,
$async.Future<$0.WeChatByPhoneRequest> $request) async {
return wechatGetUserinfo($call, await $request);
}
$async.Future<$0.WeChatGetUserinfoReply> wechatGetUserinfo(
$grpc.ServiceCall call, $0.WeChatByPhoneRequest request);
$async.Future<$0.LoginReply> appleId_Pre($grpc.ServiceCall $call,
$async.Future<$0.LoginByAppleIDRequest> $request) async {
return appleId($call, await $request);
}
$async.Future<$0.LoginReply> appleId(
$grpc.ServiceCall call, $0.LoginByAppleIDRequest request);
$async.Future<$0.LoginReply> codeAndRegister_Pre($grpc.ServiceCall $call,
$async.Future<$0.LoginByCodeRequest> $request) async {
return codeAndRegister($call, await $request);

View File

@ -20,14 +20,13 @@ const LoginByPwdRequest$json = {
'2': [
{'1': 'account', '3': 1, '4': 1, '5': 9, '10': 'account'},
{'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},
{'1': 'device', '3': 3, '4': 1, '5': 9, '10': 'device'},
],
};
/// Descriptor for `LoginByPwdRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List loginByPwdRequestDescriptor = $convert.base64Decode(
'ChFMb2dpbkJ5UHdkUmVxdWVzdBIYCgdhY2NvdW50GAEgASgJUgdhY2NvdW50EhoKCHBhc3N3b3'
'JkGAIgASgJUghwYXNzd29yZBIWCgZkZXZpY2UYAyABKAlSBmRldmljZQ==');
'JkGAIgASgJUghwYXNzd29yZA==');
@$core.Deprecated('Use loginByCodeRequestDescriptor instead')
const LoginByCodeRequest$json = {
@ -36,115 +35,13 @@ const LoginByCodeRequest$json = {
{'1': 'country', '3': 1, '4': 1, '5': 9, '10': 'country'},
{'1': 'phone', '3': 2, '4': 1, '5': 9, '10': 'phone'},
{'1': 'code', '3': 3, '4': 1, '5': 9, '10': 'code'},
{'1': 'device', '3': 4, '4': 1, '5': 9, '10': 'device'},
{'1': 'name', '3': 5, '4': 1, '5': 9, '10': 'name'},
],
};
/// Descriptor for `LoginByCodeRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List loginByCodeRequestDescriptor = $convert.base64Decode(
'ChJMb2dpbkJ5Q29kZVJlcXVlc3QSGAoHY291bnRyeRgBIAEoCVIHY291bnRyeRIUCgVwaG9uZR'
'gCIAEoCVIFcGhvbmUSEgoEY29kZRgDIAEoCVIEY29kZRIWCgZkZXZpY2UYBCABKAlSBmRldmlj'
'ZRISCgRuYW1lGAUgASgJUgRuYW1l');
@$core.Deprecated('Use weChatByCodeRequestDescriptor instead')
const WeChatByCodeRequest$json = {
'1': 'WeChatByCodeRequest',
'2': [
{'1': 'code', '3': 1, '4': 1, '5': 9, '10': 'code'},
{'1': 'agency_id', '3': 2, '4': 1, '5': 3, '10': 'agencyId'},
{'1': 'staff_id', '3': 3, '4': 1, '5': 3, '10': 'staffId'},
],
};
/// Descriptor for `WeChatByCodeRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List weChatByCodeRequestDescriptor = $convert.base64Decode(
'ChNXZUNoYXRCeUNvZGVSZXF1ZXN0EhIKBGNvZGUYASABKAlSBGNvZGUSGwoJYWdlbmN5X2lkGA'
'IgASgDUghhZ2VuY3lJZBIZCghzdGFmZl9pZBgDIAEoA1IHc3RhZmZJZA==');
@$core.Deprecated('Use weChatByPhoneReplyDescriptor instead')
const WeChatByPhoneReply$json = {
'1': 'WeChatByPhoneReply',
'2': [
{'1': 'account', '3': 1, '4': 1, '5': 9, '10': 'account'},
],
};
/// Descriptor for `WeChatByPhoneReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List weChatByPhoneReplyDescriptor =
$convert.base64Decode(
'ChJXZUNoYXRCeVBob25lUmVwbHkSGAoHYWNjb3VudBgBIAEoCVIHYWNjb3VudA==');
@$core.Deprecated('Use weChatByCodeReplyDescriptor instead')
const WeChatByCodeReply$json = {
'1': 'WeChatByCodeReply',
'2': [
{'1': 'session_key', '3': 1, '4': 1, '5': 9, '10': 'sessionKey'},
{'1': 'open_id', '3': 2, '4': 1, '5': 9, '10': 'openId'},
{'1': 'identity', '3': 3, '4': 1, '5': 9, '10': 'identity'},
{'1': 'account', '3': 4, '4': 1, '5': 9, '10': 'account'},
],
};
/// Descriptor for `WeChatByCodeReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List weChatByCodeReplyDescriptor = $convert.base64Decode(
'ChFXZUNoYXRCeUNvZGVSZXBseRIfCgtzZXNzaW9uX2tleRgBIAEoCVIKc2Vzc2lvbktleRIXCg'
'dvcGVuX2lkGAIgASgJUgZvcGVuSWQSGgoIaWRlbnRpdHkYAyABKAlSCGlkZW50aXR5EhgKB2Fj'
'Y291bnQYBCABKAlSB2FjY291bnQ=');
@$core.Deprecated('Use weChatByPhoneRequestDescriptor instead')
const WeChatByPhoneRequest$json = {
'1': 'WeChatByPhoneRequest',
'2': [
{'1': 'session_key', '3': 1, '4': 1, '5': 9, '10': 'sessionKey'},
{'1': 'open_id', '3': 2, '4': 1, '5': 9, '10': 'openId'},
{'1': 'data', '3': 3, '4': 1, '5': 9, '10': 'data'},
{'1': 'iv', '3': 4, '4': 1, '5': 9, '10': 'iv'},
{'1': 'identity', '3': 5, '4': 1, '5': 9, '10': 'identity'},
],
};
/// Descriptor for `WeChatByPhoneRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List weChatByPhoneRequestDescriptor = $convert.base64Decode(
'ChRXZUNoYXRCeVBob25lUmVxdWVzdBIfCgtzZXNzaW9uX2tleRgBIAEoCVIKc2Vzc2lvbktleR'
'IXCgdvcGVuX2lkGAIgASgJUgZvcGVuSWQSEgoEZGF0YRgDIAEoCVIEZGF0YRIOCgJpdhgEIAEo'
'CVICaXYSGgoIaWRlbnRpdHkYBSABKAlSCGlkZW50aXR5');
@$core.Deprecated('Use weChatGetUserinfoReplyDescriptor instead')
const WeChatGetUserinfoReply$json = {
'1': 'WeChatGetUserinfoReply',
'2': [
{'1': 'id', '3': 1, '4': 1, '5': 3, '10': 'id'},
{'1': 'account', '3': 2, '4': 1, '5': 9, '10': 'account'},
{'1': 'identity', '3': 3, '4': 1, '5': 9, '10': 'identity'},
{'1': 'nick_name', '3': 4, '4': 1, '5': 9, '10': 'nickName'},
{'1': 'avatar', '3': 5, '4': 1, '5': 9, '10': 'avatar'},
{'1': 'rights', '3': 6, '4': 1, '5': 9, '10': 'rights'},
{'1': 'token', '3': 7, '4': 1, '5': 9, '10': 'token'},
],
};
/// Descriptor for `WeChatGetUserinfoReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List weChatGetUserinfoReplyDescriptor = $convert.base64Decode(
'ChZXZUNoYXRHZXRVc2VyaW5mb1JlcGx5Eg4KAmlkGAEgASgDUgJpZBIYCgdhY2NvdW50GAIgAS'
'gJUgdhY2NvdW50EhoKCGlkZW50aXR5GAMgASgJUghpZGVudGl0eRIbCgluaWNrX25hbWUYBCAB'
'KAlSCG5pY2tOYW1lEhYKBmF2YXRhchgFIAEoCVIGYXZhdGFyEhYKBnJpZ2h0cxgGIAEoCVIGcm'
'lnaHRzEhQKBXRva2VuGAcgASgJUgV0b2tlbg==');
@$core.Deprecated('Use loginByAppleIDRequestDescriptor instead')
const LoginByAppleIDRequest$json = {
'1': 'LoginByAppleIDRequest',
'2': [
{'1': 'apple_id', '3': 1, '4': 1, '5': 9, '10': 'appleId'},
{'1': 'desc', '3': 2, '4': 1, '5': 9, '10': 'desc'},
{'1': 'device', '3': 3, '4': 1, '5': 9, '10': 'device'},
],
};
/// Descriptor for `LoginByAppleIDRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List loginByAppleIDRequestDescriptor = $convert.base64Decode(
'ChVMb2dpbkJ5QXBwbGVJRFJlcXVlc3QSGQoIYXBwbGVfaWQYASABKAlSB2FwcGxlSWQSEgoEZG'
'VzYxgCIAEoCVIEZGVzYxIWCgZkZXZpY2UYAyABKAlSBmRldmljZQ==');
'gCIAEoCVIFcGhvbmUSEgoEY29kZRgDIAEoCVIEY29kZQ==');
@$core.Deprecated('Use loginReplyDescriptor instead')
const LoginReply$json = {
@ -153,11 +50,9 @@ const LoginReply$json = {
{'1': 'id', '3': 1, '4': 1, '5': 3, '10': 'id'},
{'1': 'identity', '3': 2, '4': 1, '5': 9, '10': 'identity'},
{'1': 'token', '3': 3, '4': 1, '5': 9, '10': 'token'},
{'1': 'phone', '3': 4, '4': 1, '5': 9, '10': 'phone'},
{'1': 'name', '3': 5, '4': 1, '5': 9, '10': 'name'},
{
'1': 'extend',
'3': 6,
'3': 4,
'4': 3,
'5': 11,
'6': '.passport.LoginReply.ExtendEntry',
@ -180,7 +75,6 @@ const LoginReply_ExtendEntry$json = {
/// Descriptor for `LoginReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List loginReplyDescriptor = $convert.base64Decode(
'CgpMb2dpblJlcGx5Eg4KAmlkGAEgASgDUgJpZBIaCghpZGVudGl0eRgCIAEoCVIIaWRlbnRpdH'
'kSFAoFdG9rZW4YAyABKAlSBXRva2VuEhQKBXBob25lGAQgASgJUgVwaG9uZRISCgRuYW1lGAUg'
'ASgJUgRuYW1lEjgKBmV4dGVuZBgGIAMoCzIgLnBhc3Nwb3J0LkxvZ2luUmVwbHkuRXh0ZW5kRW'
'50cnlSBmV4dGVuZBo5CgtFeHRlbmRFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgC'
'IAEoCVIFdmFsdWU6AjgB');
'kSFAoFdG9rZW4YAyABKAlSBXRva2VuEjgKBmV4dGVuZBgEIAMoCzIgLnBhc3Nwb3J0LkxvZ2lu'
'UmVwbHkuRXh0ZW5kRW50cnlSBmV4dGVuZBo5CgtFeHRlbmRFbnRyeRIQCgNrZXkYASABKAlSA2'
'tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgB');

View File

@ -19,34 +19,22 @@ export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
class RegisterRequest extends $pb.GeneratedMessage {
factory RegisterRequest({
$core.String? origin,
$core.String? email,
$core.String? account,
$core.String? phone,
$core.String? password,
$core.String? code,
$core.String? wechatUnionId,
$core.String? wechatOpenId,
$core.String? appleId,
$core.String? userName,
$core.String? type,
$core.String? device,
$fixnum.Int64? agencyId,
$fixnum.Int64? staffId,
$fixnum.Int64? ownerId,
$core.String? ownerIdentity,
}) {
final result = create();
if (origin != null) result.origin = origin;
if (email != null) result.email = email;
if (account != null) result.account = account;
if (phone != null) result.phone = phone;
if (password != null) result.password = password;
if (code != null) result.code = code;
if (wechatUnionId != null) result.wechatUnionId = wechatUnionId;
if (wechatOpenId != null) result.wechatOpenId = wechatOpenId;
if (appleId != null) result.appleId = appleId;
if (userName != null) result.userName = userName;
if (type != null) result.type = type;
if (device != null) result.device = device;
if (agencyId != null) result.agencyId = agencyId;
if (staffId != null) result.staffId = staffId;
if (ownerId != null) result.ownerId = ownerId;
@ -67,21 +55,15 @@ class RegisterRequest extends $pb.GeneratedMessage {
_omitMessageNames ? '' : 'RegisterRequest',
package: const $pb.PackageName(_omitMessageNames ? '' : 'passport'),
createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'origin')
..aOS(1, _omitFieldNames ? '' : 'email')
..aOS(2, _omitFieldNames ? '' : 'account')
..aOS(3, _omitFieldNames ? '' : 'phone')
..aOS(4, _omitFieldNames ? '' : 'password')
..aOS(5, _omitFieldNames ? '' : 'code')
..aOS(6, _omitFieldNames ? '' : 'wechatUnionId')
..aOS(7, _omitFieldNames ? '' : 'wechatOpenId')
..aOS(8, _omitFieldNames ? '' : 'appleId')
..aOS(9, _omitFieldNames ? '' : 'userName')
..aOS(10, _omitFieldNames ? '' : 'type')
..aOS(11, _omitFieldNames ? '' : 'device')
..aInt64(12, _omitFieldNames ? '' : 'agencyId')
..aInt64(13, _omitFieldNames ? '' : 'staffId')
..aInt64(14, _omitFieldNames ? '' : 'owner_id')
..aOS(15, _omitFieldNames ? '' : 'owner_identity')
..aInt64(6, _omitFieldNames ? '' : 'agencyId')
..aInt64(7, _omitFieldNames ? '' : 'staffId')
..aInt64(8, _omitFieldNames ? '' : 'owner_id')
..aOS(9, _omitFieldNames ? '' : 'owner_identity')
..hasRequiredFields = false;
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
@ -106,13 +88,13 @@ class RegisterRequest extends $pb.GeneratedMessage {
static RegisterRequest? _defaultInstance;
@$pb.TagNumber(1)
$core.String get origin => $_getSZ(0);
$core.String get email => $_getSZ(0);
@$pb.TagNumber(1)
set origin($core.String value) => $_setString(0, value);
set email($core.String value) => $_setString(0, value);
@$pb.TagNumber(1)
$core.bool hasOrigin() => $_has(0);
$core.bool hasEmail() => $_has(0);
@$pb.TagNumber(1)
void clearOrigin() => $_clearField(1);
void clearEmail() => $_clearField(1);
@$pb.TagNumber(2)
$core.String get account => $_getSZ(1);
@ -151,108 +133,52 @@ class RegisterRequest extends $pb.GeneratedMessage {
void clearCode() => $_clearField(5);
@$pb.TagNumber(6)
$core.String get wechatUnionId => $_getSZ(5);
$fixnum.Int64 get agencyId => $_getI64(5);
@$pb.TagNumber(6)
set wechatUnionId($core.String value) => $_setString(5, value);
set agencyId($fixnum.Int64 value) => $_setInt64(5, value);
@$pb.TagNumber(6)
$core.bool hasWechatUnionId() => $_has(5);
$core.bool hasAgencyId() => $_has(5);
@$pb.TagNumber(6)
void clearWechatUnionId() => $_clearField(6);
void clearAgencyId() => $_clearField(6);
@$pb.TagNumber(7)
$core.String get wechatOpenId => $_getSZ(6);
$fixnum.Int64 get staffId => $_getI64(6);
@$pb.TagNumber(7)
set wechatOpenId($core.String value) => $_setString(6, value);
set staffId($fixnum.Int64 value) => $_setInt64(6, value);
@$pb.TagNumber(7)
$core.bool hasWechatOpenId() => $_has(6);
$core.bool hasStaffId() => $_has(6);
@$pb.TagNumber(7)
void clearWechatOpenId() => $_clearField(7);
void clearStaffId() => $_clearField(7);
@$pb.TagNumber(8)
$core.String get appleId => $_getSZ(7);
$fixnum.Int64 get ownerId => $_getI64(7);
@$pb.TagNumber(8)
set appleId($core.String value) => $_setString(7, value);
set ownerId($fixnum.Int64 value) => $_setInt64(7, value);
@$pb.TagNumber(8)
$core.bool hasAppleId() => $_has(7);
$core.bool hasOwnerId() => $_has(7);
@$pb.TagNumber(8)
void clearAppleId() => $_clearField(8);
void clearOwnerId() => $_clearField(8);
@$pb.TagNumber(9)
$core.String get userName => $_getSZ(8);
$core.String get ownerIdentity => $_getSZ(8);
@$pb.TagNumber(9)
set userName($core.String value) => $_setString(8, value);
set ownerIdentity($core.String value) => $_setString(8, value);
@$pb.TagNumber(9)
$core.bool hasUserName() => $_has(8);
$core.bool hasOwnerIdentity() => $_has(8);
@$pb.TagNumber(9)
void clearUserName() => $_clearField(9);
@$pb.TagNumber(10)
$core.String get type => $_getSZ(9);
@$pb.TagNumber(10)
set type($core.String value) => $_setString(9, value);
@$pb.TagNumber(10)
$core.bool hasType() => $_has(9);
@$pb.TagNumber(10)
void clearType() => $_clearField(10);
@$pb.TagNumber(11)
$core.String get device => $_getSZ(10);
@$pb.TagNumber(11)
set device($core.String value) => $_setString(10, value);
@$pb.TagNumber(11)
$core.bool hasDevice() => $_has(10);
@$pb.TagNumber(11)
void clearDevice() => $_clearField(11);
@$pb.TagNumber(12)
$fixnum.Int64 get agencyId => $_getI64(11);
@$pb.TagNumber(12)
set agencyId($fixnum.Int64 value) => $_setInt64(11, value);
@$pb.TagNumber(12)
$core.bool hasAgencyId() => $_has(11);
@$pb.TagNumber(12)
void clearAgencyId() => $_clearField(12);
@$pb.TagNumber(13)
$fixnum.Int64 get staffId => $_getI64(12);
@$pb.TagNumber(13)
set staffId($fixnum.Int64 value) => $_setInt64(12, value);
@$pb.TagNumber(13)
$core.bool hasStaffId() => $_has(12);
@$pb.TagNumber(13)
void clearStaffId() => $_clearField(13);
@$pb.TagNumber(14)
$fixnum.Int64 get ownerId => $_getI64(13);
@$pb.TagNumber(14)
set ownerId($fixnum.Int64 value) => $_setInt64(13, value);
@$pb.TagNumber(14)
$core.bool hasOwnerId() => $_has(13);
@$pb.TagNumber(14)
void clearOwnerId() => $_clearField(14);
@$pb.TagNumber(15)
$core.String get ownerIdentity => $_getSZ(14);
@$pb.TagNumber(15)
set ownerIdentity($core.String value) => $_setString(14, value);
@$pb.TagNumber(15)
$core.bool hasOwnerIdentity() => $_has(14);
@$pb.TagNumber(15)
void clearOwnerIdentity() => $_clearField(15);
void clearOwnerIdentity() => $_clearField(9);
}
class RegisterReply extends $pb.GeneratedMessage {
factory RegisterReply({
$fixnum.Int64? id,
$core.String? identity,
$core.String? dataBind,
$core.String? token,
$core.Iterable<$core.MapEntry<$core.String, $core.String>>? extend,
}) {
final result = create();
if (id != null) result.id = id;
if (identity != null) result.identity = identity;
if (dataBind != null) result.dataBind = dataBind;
if (token != null) result.token = token;
if (extend != null) result.extend.addEntries(extend);
return result;
@ -273,7 +199,6 @@ class RegisterReply extends $pb.GeneratedMessage {
createEmptyInstance: create)
..aInt64(1, _omitFieldNames ? '' : 'id')
..aOS(2, _omitFieldNames ? '' : 'identity')
..aOS(3, _omitFieldNames ? '' : 'dataBind')
..aOS(4, _omitFieldNames ? '' : 'token')
..m<$core.String, $core.String>(5, _omitFieldNames ? '' : 'extend',
entryClassName: 'RegisterReply.ExtendEntry',
@ -321,26 +246,17 @@ class RegisterReply extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
void clearIdentity() => $_clearField(2);
@$pb.TagNumber(3)
$core.String get dataBind => $_getSZ(2);
@$pb.TagNumber(3)
set dataBind($core.String value) => $_setString(2, value);
@$pb.TagNumber(3)
$core.bool hasDataBind() => $_has(2);
@$pb.TagNumber(3)
void clearDataBind() => $_clearField(3);
@$pb.TagNumber(4)
$core.String get token => $_getSZ(3);
$core.String get token => $_getSZ(2);
@$pb.TagNumber(4)
set token($core.String value) => $_setString(3, value);
set token($core.String value) => $_setString(2, value);
@$pb.TagNumber(4)
$core.bool hasToken() => $_has(3);
$core.bool hasToken() => $_has(2);
@$pb.TagNumber(4)
void clearToken() => $_clearField(4);
@$pb.TagNumber(5)
$pb.PbMap<$core.String, $core.String> get extend => $_getMap(4);
$pb.PbMap<$core.String, $core.String> get extend => $_getMap(3);
}
const $core.bool _omitFieldNames =

View File

@ -49,22 +49,6 @@ class RegisterClient extends $grpc.Client {
return $createUnaryCall(_$code, request, options: options);
}
/// Wechat注册
$grpc.ResponseFuture<$0.RegisterReply> wechat(
$0.RegisterRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$wechat, request, options: options);
}
/// AppleID注册
$grpc.ResponseFuture<$0.RegisterReply> appleId(
$0.RegisterRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$appleId, request, options: options);
}
// method descriptors
static final _$pwd = $grpc.ClientMethod<$0.RegisterRequest, $0.RegisterReply>(
@ -76,16 +60,6 @@ class RegisterClient extends $grpc.Client {
'/passport.Register/Code',
($0.RegisterRequest value) => value.writeToBuffer(),
$0.RegisterReply.fromBuffer);
static final _$wechat =
$grpc.ClientMethod<$0.RegisterRequest, $0.RegisterReply>(
'/passport.Register/Wechat',
($0.RegisterRequest value) => value.writeToBuffer(),
$0.RegisterReply.fromBuffer);
static final _$appleId =
$grpc.ClientMethod<$0.RegisterRequest, $0.RegisterReply>(
'/passport.Register/AppleId',
($0.RegisterRequest value) => value.writeToBuffer(),
$0.RegisterReply.fromBuffer);
}
@$pb.GrpcServiceName('passport.Register')
@ -107,20 +81,6 @@ abstract class RegisterServiceBase extends $grpc.Service {
false,
($core.List<$core.int> value) => $0.RegisterRequest.fromBuffer(value),
($0.RegisterReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.RegisterRequest, $0.RegisterReply>(
'Wechat',
wechat_Pre,
false,
false,
($core.List<$core.int> value) => $0.RegisterRequest.fromBuffer(value),
($0.RegisterReply value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.RegisterRequest, $0.RegisterReply>(
'AppleId',
appleId_Pre,
false,
false,
($core.List<$core.int> value) => $0.RegisterRequest.fromBuffer(value),
($0.RegisterReply value) => value.writeToBuffer()));
}
$async.Future<$0.RegisterReply> pwd_Pre($grpc.ServiceCall $call,
@ -138,20 +98,4 @@ abstract class RegisterServiceBase extends $grpc.Service {
$async.Future<$0.RegisterReply> code(
$grpc.ServiceCall call, $0.RegisterRequest request);
$async.Future<$0.RegisterReply> wechat_Pre($grpc.ServiceCall $call,
$async.Future<$0.RegisterRequest> $request) async {
return wechat($call, await $request);
}
$async.Future<$0.RegisterReply> wechat(
$grpc.ServiceCall call, $0.RegisterRequest request);
$async.Future<$0.RegisterReply> appleId_Pre($grpc.ServiceCall $call,
$async.Future<$0.RegisterRequest> $request) async {
return appleId($call, await $request);
}
$async.Future<$0.RegisterReply> appleId(
$grpc.ServiceCall call, $0.RegisterRequest request);
}

View File

@ -18,34 +18,25 @@ import 'dart:typed_data' as $typed_data;
const RegisterRequest$json = {
'1': 'RegisterRequest',
'2': [
{'1': 'origin', '3': 1, '4': 1, '5': 9, '10': 'origin'},
{'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
{'1': 'account', '3': 2, '4': 1, '5': 9, '10': 'account'},
{'1': 'phone', '3': 3, '4': 1, '5': 9, '10': 'phone'},
{'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'},
{'1': 'code', '3': 5, '4': 1, '5': 9, '10': 'code'},
{'1': 'wechat_union_id', '3': 6, '4': 1, '5': 9, '10': 'wechatUnionId'},
{'1': 'wechat_open_id', '3': 7, '4': 1, '5': 9, '10': 'wechatOpenId'},
{'1': 'apple_id', '3': 8, '4': 1, '5': 9, '10': 'appleId'},
{'1': 'user_name', '3': 9, '4': 1, '5': 9, '10': 'userName'},
{'1': 'type', '3': 10, '4': 1, '5': 9, '10': 'type'},
{'1': 'device', '3': 11, '4': 1, '5': 9, '10': 'device'},
{'1': 'agency_id', '3': 12, '4': 1, '5': 3, '10': 'agencyId'},
{'1': 'staff_id', '3': 13, '4': 1, '5': 3, '10': 'staffId'},
{'1': 'owner_id', '3': 14, '4': 1, '5': 3, '10': 'owner_id'},
{'1': 'owner_identity', '3': 15, '4': 1, '5': 9, '10': 'owner_identity'},
{'1': 'agency_id', '3': 6, '4': 1, '5': 3, '10': 'agencyId'},
{'1': 'staff_id', '3': 7, '4': 1, '5': 3, '10': 'staffId'},
{'1': 'owner_id', '3': 8, '4': 1, '5': 3, '10': 'owner_id'},
{'1': 'owner_identity', '3': 9, '4': 1, '5': 9, '10': 'owner_identity'},
],
};
/// Descriptor for `RegisterRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List registerRequestDescriptor = $convert.base64Decode(
'Cg9SZWdpc3RlclJlcXVlc3QSFgoGb3JpZ2luGAEgASgJUgZvcmlnaW4SGAoHYWNjb3VudBgCIA'
'EoCVIHYWNjb3VudBIUCgVwaG9uZRgDIAEoCVIFcGhvbmUSGgoIcGFzc3dvcmQYBCABKAlSCHBh'
'c3N3b3JkEhIKBGNvZGUYBSABKAlSBGNvZGUSJgoPd2VjaGF0X3VuaW9uX2lkGAYgASgJUg13ZW'
'NoYXRVbmlvbklkEiQKDndlY2hhdF9vcGVuX2lkGAcgASgJUgx3ZWNoYXRPcGVuSWQSGQoIYXBw'
'bGVfaWQYCCABKAlSB2FwcGxlSWQSGwoJdXNlcl9uYW1lGAkgASgJUgh1c2VyTmFtZRISCgR0eX'
'BlGAogASgJUgR0eXBlEhYKBmRldmljZRgLIAEoCVIGZGV2aWNlEhsKCWFnZW5jeV9pZBgMIAEo'
'A1IIYWdlbmN5SWQSGQoIc3RhZmZfaWQYDSABKANSB3N0YWZmSWQSGgoIb3duZXJfaWQYDiABKA'
'NSCG93bmVyX2lkEiYKDm93bmVyX2lkZW50aXR5GA8gASgJUg5vd25lcl9pZGVudGl0eQ==');
'Cg9SZWdpc3RlclJlcXVlc3QSFAoFZW1haWwYASABKAlSBWVtYWlsEhgKB2FjY291bnQYAiABKA'
'lSB2FjY291bnQSFAoFcGhvbmUYAyABKAlSBXBob25lEhoKCHBhc3N3b3JkGAQgASgJUghwYXNz'
'd29yZBISCgRjb2RlGAUgASgJUgRjb2RlEhsKCWFnZW5jeV9pZBgGIAEoA1IIYWdlbmN5SWQSGQ'
'oIc3RhZmZfaWQYByABKANSB3N0YWZmSWQSGgoIb3duZXJfaWQYCCABKANSCG93bmVyX2lkEiYK'
'Dm93bmVyX2lkZW50aXR5GAkgASgJUg5vd25lcl9pZGVudGl0eQ==');
@$core.Deprecated('Use registerReplyDescriptor instead')
const RegisterReply$json = {
@ -53,7 +44,6 @@ const RegisterReply$json = {
'2': [
{'1': 'id', '3': 1, '4': 1, '5': 3, '10': 'id'},
{'1': 'identity', '3': 2, '4': 1, '5': 9, '10': 'identity'},
{'1': 'data_bind', '3': 3, '4': 1, '5': 9, '10': 'dataBind'},
{'1': 'token', '3': 4, '4': 1, '5': 9, '10': 'token'},
{
'1': 'extend',
@ -80,7 +70,6 @@ const RegisterReply_ExtendEntry$json = {
/// Descriptor for `RegisterReply`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List registerReplyDescriptor = $convert.base64Decode(
'Cg1SZWdpc3RlclJlcGx5Eg4KAmlkGAEgASgDUgJpZBIaCghpZGVudGl0eRgCIAEoCVIIaWRlbn'
'RpdHkSGwoJZGF0YV9iaW5kGAMgASgJUghkYXRhQmluZBIUCgV0b2tlbhgEIAEoCVIFdG9rZW4S'
'OwoGZXh0ZW5kGAUgAygLMiMucGFzc3BvcnQuUmVnaXN0ZXJSZXBseS5FeHRlbmRFbnRyeVIGZX'
'h0ZW5kGjkKC0V4dGVuZEVudHJ5EhAKA2tleRgBIAEoCVIDa2V5EhQKBXZhbHVlGAIgASgJUgV2'
'YWx1ZToCOAE=');
'RpdHkSFAoFdG9rZW4YBCABKAlSBXRva2VuEjsKBmV4dGVuZBgFIAMoCzIjLnBhc3Nwb3J0LlJl'
'Z2lzdGVyUmVwbHkuRXh0ZW5kRW50cnlSBmV4dGVuZBo5CgtFeHRlbmRFbnRyeRIQCgNrZXkYAS'
'ABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgB');

View File

@ -1,42 +1,15 @@
# Info
# Account
Passport(会员通行证)模块-数据
*此模块需要Token验证
- [/passport.Info/Bind](#passportinfobind)
- [/passport.Info/GetData](#passportinfogetdata)
- [/passport.Info/SetData](#passportinfosetdata)
- [/passport.Info/SetPassword](#passportinfosetpassword)
- [/passport.Info/Statistics](#passportinfostatistics)
- [/passport.Account/Get](#passportaccountget)
- [/passport.Account/SetData](#passportaccountsetdata)
- [/passport.Account/SetPassword](#passportaccountsetpassword)
- [/passport.Account/Statistics](#passportaccountstatistics)
## /passport.Info/Bind
## /passport.Account/Get
绑定资料
### Request
```javascript
{
action: "", // type<string>, 操作动作
phone: "", // type<string>, 手机号码 必填
code: "", // type<string>, 验证码
password: "", // type<string>, 密码 必填
nickname: "", // type<string>, 昵称
}
```
### Reply
```javascript
{
status: "0", // type<int64>, 状态码
identity: "", // type<string>, 标识码
message: "", // type<string>, 状态说明
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /passport.Info/GetData
获取会员的所有信息数据
通过会员所有信息
### Request
@ -47,23 +20,31 @@
### Reply
```javascript
{
identity: "", // type<string>, 唯一标识
account: "", // type<string>, 帐号
phone: "", // type<string>, 手机号
phone: "", // type<string>, 手机号码 必填
email: "", // type<string>, 验证码
rights: "", // type<string>, 权限
nickname: "", // type<string>, 昵称
avatar: "", // type<string>, 头像
birthday: "", // type<string>, 生日
sex: 0, // type<int32>, 性别1为男性2为女性
country: 0, // type<int32>, 国家
province: 0, // type<int32>, 省
city: 0, // type<int32>, 市
area: 0, // type<int32>, 区
sign: "", // type<string>, 签名
approve: 0, // type<int32>, 状态:-2,认证未通过0为未认证1为审核中2为认证成功
cover: "", // type<string>, 背景&封面
score: 0, // type<int32>, 积分
level: 0, // type<int32>, 等级
verify: {
"": false
}, // map<string,bool>, 数据
}
```
## /passport.Info/SetData
## /passport.Account/SetData
更新会员的信息数据
字段值为空或是0将不更新此数据
更新会员的信息数据,字段值为空或是0将不更新此数据
### Request
@ -89,7 +70,7 @@
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /passport.Info/SetPassword
## /passport.Account/SetPassword
更新会员的密码
@ -111,7 +92,7 @@
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /passport.Info/Statistics
## /passport.Account/Statistics
获取会员的相关统计数据

View File

@ -4,10 +4,6 @@
- [/passport.Login/Pwd](#passportloginpwd)
- [/passport.Login/Code](#passportlogincode)
- [/passport.Login/WechatByCode](#passportloginwechatbycode)
- [/passport.Login/WechatByPhone](#passportloginwechatbyphone)
- [/passport.Login/WechatGetUserinfo](#passportloginwechatgetuserinfo)
- [/passport.Login/AppleId](#passportloginappleid)
- [/passport.Login/CodeAndRegister](#passportlogincodeandregister)
## /passport.Login/Pwd
@ -20,7 +16,6 @@
{
account: "", // type<string>, 账号 必填
password: "", // type<string>, 密码 必填
device: "", // type<string>, 设备 必填
}
```
@ -30,8 +25,6 @@
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
phone: "", // type<string>
name: "", // type<string>
extend: {
"": ""
}, // map<string,string>, 扩展字段
@ -48,8 +41,6 @@
country: "", // type<string>, 国家
phone: "", // type<string>, 手机号码
code: "", // type<string>, 验证码
device: "", // type<string>, 设备
name: "", // type<string>
}
```
@ -59,106 +50,6 @@
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
phone: "", // type<string>
name: "", // type<string>
extend: {
"": ""
}, // map<string,string>, 扩展字段
}
```
## /passport.Login/WechatByCode
通过Wechat登录
### Request
```javascript
{
code: "", // type<string>, WeChat code
agency_id: "0", // type<int64>, 代理ID
staff_id: "0", // type<int64>, 工作人员ID
}
```
### Reply
```javascript
{
session_key: "", // type<string>, WeChat session key
open_id: "", // type<string>, WeChat open id
identity: "", // type<string>, identity
account: "", // type<string>, account
}
```
## /passport.Login/WechatByPhone
### Request
```javascript
{
session_key: "", // type<string>, WeChat session key
open_id: "", // type<string>, open_id
data: "", // type<string>, data
iv: "", // type<string>, iv
identity: "", // type<string>, identiy
}
```
### Reply
```javascript
{
account: "", // type<string>, WeChat code
}
```
## /passport.Login/WechatGetUserinfo
### Request
```javascript
{
session_key: "", // type<string>, WeChat session key
open_id: "", // type<string>, open_id
data: "", // type<string>, data
iv: "", // type<string>, iv
identity: "", // type<string>, identiy
}
```
### Reply
```javascript
{
id: "0", // type<int64>
account: "", // type<string>
identity: "", // type<string>
nick_name: "", // type<string>
avatar: "", // type<string>
rights: "", // type<string>
token: "", // type<string>
}
```
## /passport.Login/AppleId
通过AppleID登录
### Request
```javascript
{
apple_id: "", // type<string>, apple id
desc: "", // type<string>, 描述
device: "", // type<string>, 设备
}
```
### Reply
```javascript
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
phone: "", // type<string>
name: "", // type<string>
extend: {
"": ""
}, // map<string,string>, 扩展字段
@ -175,8 +66,6 @@
country: "", // type<string>, 国家
phone: "", // type<string>, 手机号码
code: "", // type<string>, 验证码
device: "", // type<string>, 设备
name: "", // type<string>
}
```
@ -186,8 +75,6 @@
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
phone: "", // type<string>
name: "", // type<string>
extend: {
"": ""
}, // map<string,string>, 扩展字段

View File

@ -6,10 +6,10 @@
},
"tags": [
{
"name": "Forget"
"name": "Account"
},
{
"name": "Info"
"name": "Forget"
},
{
"name": "Login"
@ -50,16 +50,28 @@
}
}
},
"passportGetDataReply": {
"passportGetFullReply": {
"type": "object",
"properties": {
"identity": {
"type": "string",
"title": "唯一标识"
},
"account": {
"type": "string",
"title": "帐号"
},
"phone": {
"type": "string",
"title": "手机号"
"title": "手机号码 必填"
},
"email": {
"type": "string",
"title": "验证码"
},
"rights": {
"type": "string",
"title": "权限"
},
"nickname": {
"type": "string",
@ -78,6 +90,11 @@
"format": "int32",
"title": "性别1为男性2为女性"
},
"country": {
"type": "integer",
"format": "int32",
"title": "国家"
},
"province": {
"type": "integer",
"format": "int32",
@ -97,12 +114,29 @@
"type": "string",
"title": "签名"
},
"approve": {
"cover": {
"type": "string",
"title": "背景\u0026封面"
},
"score": {
"type": "integer",
"format": "int32",
"title": "状态:-2,认证未通过0为未认证1为审核中2为认证成功"
"title": "积分"
},
"level": {
"type": "integer",
"format": "int32",
"title": "等级"
},
"verify": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"title": "数据"
}
}
},
"title": "获取会员的完整信息"
},
"passportLoginReply": {
"type": "object",
@ -119,12 +153,6 @@
"type": "string",
"title": "用户凭证"
},
"phone": {
"type": "string"
},
"name": {
"type": "string"
},
"extend": {
"type": "object",
"additionalProperties": {
@ -145,10 +173,6 @@
"type": "string",
"title": "用户唯一码"
},
"dataBind": {
"type": "string",
"title": "数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码"
},
"token": {
"type": "string",
"title": "用户Header所需Token"
@ -198,63 +222,6 @@
}
}
},
"passportWeChatByCodeReply": {
"type": "object",
"properties": {
"sessionKey": {
"type": "string",
"title": "WeChat session key"
},
"openId": {
"type": "string",
"title": "WeChat open id"
},
"identity": {
"type": "string",
"title": "identity"
},
"account": {
"type": "string",
"title": "account"
}
}
},
"passportWeChatByPhoneReply": {
"type": "object",
"properties": {
"account": {
"type": "string",
"title": "WeChat code"
}
}
},
"passportWeChatGetUserinfoReply": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"account": {
"type": "string"
},
"identity": {
"type": "string"
},
"nickName": {
"type": "string"
},
"avatar": {
"type": "string"
},
"rights": {
"type": "string"
},
"token": {
"type": "string"
}
}
},
"protobufAny": {
"type": "object",
"properties": {

View File

@ -4,8 +4,6 @@
- [/passport.Register/Pwd](#passportregisterpwd)
- [/passport.Register/Code](#passportregistercode)
- [/passport.Register/Wechat](#passportregisterwechat)
- [/passport.Register/AppleId](#passportregisterappleid)
## /passport.Register/Pwd
@ -15,17 +13,11 @@
### Request
```javascript
{
origin: "", // type<string>, 来源,归属
email: "", // type<string>, 邮箱
account: "", // type<string>, 帐号
phone: "", // type<string>, 手机号
password: "", // type<string>, 密码
code: "", // type<string>, 验证码
wechat_union_id: "", // type<string>, 微信UnionID
wechat_open_id: "", // type<string>, 微信OpenID
apple_id: "", // type<string>, Apple ID
user_name: "", // type<string>, 姓名
type: "", // type<string>, 类型
device: "", // type<string>, 设备
agency_id: "0", // type<int64>, 代理ID
staff_id: "0", // type<int64>, 工作人员ID
owner_id: "0", // type<int64>, 所属ID
@ -38,7 +30,6 @@
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
data_bind: "", // type<string>, 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
token: "", // type<string>, 用户Header所需Token
extend: {
"": ""
@ -53,17 +44,11 @@
### Request
```javascript
{
origin: "", // type<string>, 来源,归属
email: "", // type<string>, 邮箱
account: "", // type<string>, 帐号
phone: "", // type<string>, 手机号
password: "", // type<string>, 密码
code: "", // type<string>, 验证码
wechat_union_id: "", // type<string>, 微信UnionID
wechat_open_id: "", // type<string>, 微信OpenID
apple_id: "", // type<string>, Apple ID
user_name: "", // type<string>, 姓名
type: "", // type<string>, 类型
device: "", // type<string>, 设备
agency_id: "0", // type<int64>, 代理ID
staff_id: "0", // type<int64>, 工作人员ID
owner_id: "0", // type<int64>, 所属ID
@ -76,83 +61,6 @@
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
data_bind: "", // type<string>, 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
token: "", // type<string>, 用户Header所需Token
extend: {
"": ""
}, // map<string,string>, 扩展字段
}
```
## /passport.Register/Wechat
Wechat注册
### Request
```javascript
{
origin: "", // type<string>, 来源,归属
account: "", // type<string>, 帐号
phone: "", // type<string>, 手机号
password: "", // type<string>, 密码
code: "", // type<string>, 验证码
wechat_union_id: "", // type<string>, 微信UnionID
wechat_open_id: "", // type<string>, 微信OpenID
apple_id: "", // type<string>, Apple ID
user_name: "", // type<string>, 姓名
type: "", // type<string>, 类型
device: "", // type<string>, 设备
agency_id: "0", // type<int64>, 代理ID
staff_id: "0", // type<int64>, 工作人员ID
owner_id: "0", // type<int64>, 所属ID
owner_identity: "", // type<string>, 所属唯一码
}
```
### Reply
```javascript
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
data_bind: "", // type<string>, 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
token: "", // type<string>, 用户Header所需Token
extend: {
"": ""
}, // map<string,string>, 扩展字段
}
```
## /passport.Register/AppleId
AppleID注册
### Request
```javascript
{
origin: "", // type<string>, 来源,归属
account: "", // type<string>, 帐号
phone: "", // type<string>, 手机号
password: "", // type<string>, 密码
code: "", // type<string>, 验证码
wechat_union_id: "", // type<string>, 微信UnionID
wechat_open_id: "", // type<string>, 微信OpenID
apple_id: "", // type<string>, Apple ID
user_name: "", // type<string>, 姓名
type: "", // type<string>, 类型
device: "", // type<string>, 设备
agency_id: "0", // type<int64>, 代理ID
staff_id: "0", // type<int64>, 工作人员ID
owner_id: "0", // type<int64>, 所属ID
owner_identity: "", // type<string>, 所属唯一码
}
```
### Reply
```javascript
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
data_bind: "", // type<string>, 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
token: "", // type<string>, 用户Header所需Token
extend: {
"": ""

View File

@ -0,0 +1,565 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.8
// protoc (unknown)
// source: account.proto
package passport
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 获取会员的完整信息
type GetFullReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一标识
Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // 帐号
Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` // 手机号码 必填
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // 验证码
Rights string `protobuf:"bytes,5,opt,name=rights,proto3" json:"rights,omitempty"` // 权限
Nickname string `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname,omitempty"` // 昵称
Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` // 头像
Birthday string `protobuf:"bytes,8,opt,name=birthday,proto3" json:"birthday,omitempty"` // 生日
Sex int32 `protobuf:"varint,9,opt,name=sex,proto3" json:"sex,omitempty"` // 性别1为男性2为女性
Country int32 `protobuf:"varint,10,opt,name=country,proto3" json:"country,omitempty"` // 国家
Province int32 `protobuf:"varint,11,opt,name=province,proto3" json:"province,omitempty"` // 省
City int32 `protobuf:"varint,12,opt,name=city,proto3" json:"city,omitempty"` // 市
Area int32 `protobuf:"varint,13,opt,name=area,proto3" json:"area,omitempty"` // 区
Sign string `protobuf:"bytes,14,opt,name=sign,proto3" json:"sign,omitempty"` // 签名
Cover string `protobuf:"bytes,15,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面
Score int32 `protobuf:"varint,16,opt,name=score,proto3" json:"score,omitempty"` // 积分
Level int32 `protobuf:"varint,17,opt,name=level,proto3" json:"level,omitempty"` // 等级
Verify map[string]bool `protobuf:"bytes,18,rep,name=verify,proto3" json:"verify,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // 数据
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetFullReply) Reset() {
*x = GetFullReply{}
mi := &file_account_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetFullReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFullReply) ProtoMessage() {}
func (x *GetFullReply) ProtoReflect() protoreflect.Message {
mi := &file_account_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetFullReply.ProtoReflect.Descriptor instead.
func (*GetFullReply) Descriptor() ([]byte, []int) {
return file_account_proto_rawDescGZIP(), []int{0}
}
func (x *GetFullReply) GetIdentity() string {
if x != nil {
return x.Identity
}
return ""
}
func (x *GetFullReply) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
func (x *GetFullReply) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
func (x *GetFullReply) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *GetFullReply) GetRights() string {
if x != nil {
return x.Rights
}
return ""
}
func (x *GetFullReply) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}
func (x *GetFullReply) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *GetFullReply) GetBirthday() string {
if x != nil {
return x.Birthday
}
return ""
}
func (x *GetFullReply) GetSex() int32 {
if x != nil {
return x.Sex
}
return 0
}
func (x *GetFullReply) GetCountry() int32 {
if x != nil {
return x.Country
}
return 0
}
func (x *GetFullReply) GetProvince() int32 {
if x != nil {
return x.Province
}
return 0
}
func (x *GetFullReply) GetCity() int32 {
if x != nil {
return x.City
}
return 0
}
func (x *GetFullReply) GetArea() int32 {
if x != nil {
return x.Area
}
return 0
}
func (x *GetFullReply) GetSign() string {
if x != nil {
return x.Sign
}
return ""
}
func (x *GetFullReply) GetCover() string {
if x != nil {
return x.Cover
}
return ""
}
func (x *GetFullReply) GetScore() int32 {
if x != nil {
return x.Score
}
return 0
}
func (x *GetFullReply) GetLevel() int32 {
if x != nil {
return x.Level
}
return 0
}
func (x *GetFullReply) GetVerify() map[string]bool {
if x != nil {
return x.Verify
}
return nil
}
type SetDataRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname,omitempty"` //昵称
Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` //头像
Birthday string `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"` //生日
Sex int32 `protobuf:"varint,4,opt,name=sex,proto3" json:"sex,omitempty"` //性别1为男性2为女性
Province int32 `protobuf:"varint,5,opt,name=province,proto3" json:"province,omitempty"` //省
City int32 `protobuf:"varint,6,opt,name=city,proto3" json:"city,omitempty"` //市
Area int32 `protobuf:"varint,7,opt,name=area,proto3" json:"area,omitempty"` //区
Sign string `protobuf:"bytes,8,opt,name=sign,proto3" json:"sign,omitempty"` //签名
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SetDataRequest) Reset() {
*x = SetDataRequest{}
mi := &file_account_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SetDataRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetDataRequest) ProtoMessage() {}
func (x *SetDataRequest) ProtoReflect() protoreflect.Message {
mi := &file_account_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetDataRequest.ProtoReflect.Descriptor instead.
func (*SetDataRequest) Descriptor() ([]byte, []int) {
return file_account_proto_rawDescGZIP(), []int{1}
}
func (x *SetDataRequest) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}
func (x *SetDataRequest) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *SetDataRequest) GetBirthday() string {
if x != nil {
return x.Birthday
}
return ""
}
func (x *SetDataRequest) GetSex() int32 {
if x != nil {
return x.Sex
}
return 0
}
func (x *SetDataRequest) GetProvince() int32 {
if x != nil {
return x.Province
}
return 0
}
func (x *SetDataRequest) GetCity() int32 {
if x != nil {
return x.City
}
return 0
}
func (x *SetDataRequest) GetArea() int32 {
if x != nil {
return x.Area
}
return 0
}
func (x *SetDataRequest) GetSign() string {
if x != nil {
return x.Sign
}
return ""
}
type SetPasswordRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` // 旧密码
NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` // 新密码
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SetPasswordRequest) Reset() {
*x = SetPasswordRequest{}
mi := &file_account_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SetPasswordRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetPasswordRequest) ProtoMessage() {}
func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message {
mi := &file_account_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead.
func (*SetPasswordRequest) Descriptor() ([]byte, []int) {
return file_account_proto_rawDescGZIP(), []int{2}
}
func (x *SetPasswordRequest) GetOldPassword() string {
if x != nil {
return x.OldPassword
}
return ""
}
func (x *SetPasswordRequest) GetNewPassword() string {
if x != nil {
return x.NewPassword
}
return ""
}
type StatisticsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Field []string `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty"` //要获取的统计数据字段。
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatisticsRequest) Reset() {
*x = StatisticsRequest{}
mi := &file_account_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StatisticsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatisticsRequest) ProtoMessage() {}
func (x *StatisticsRequest) ProtoReflect() protoreflect.Message {
mi := &file_account_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatisticsRequest.ProtoReflect.Descriptor instead.
func (*StatisticsRequest) Descriptor() ([]byte, []int) {
return file_account_proto_rawDescGZIP(), []int{3}
}
func (x *StatisticsRequest) GetField() []string {
if x != nil {
return x.Field
}
return nil
}
type StatisticsReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data map[string]int64 `protobuf:"bytes,1,rep,name=Data,proto3" json:"Data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` //数据以Map格式输出
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatisticsReply) Reset() {
*x = StatisticsReply{}
mi := &file_account_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StatisticsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatisticsReply) ProtoMessage() {}
func (x *StatisticsReply) ProtoReflect() protoreflect.Message {
mi := &file_account_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatisticsReply.ProtoReflect.Descriptor instead.
func (*StatisticsReply) Descriptor() ([]byte, []int) {
return file_account_proto_rawDescGZIP(), []int{4}
}
func (x *StatisticsReply) GetData() map[string]int64 {
if x != nil {
return x.Data
}
return nil
}
var File_account_proto protoreflect.FileDescriptor
const file_account_proto_rawDesc = "" +
"\n" +
"\raccount.proto\x12\bpassport\x1a\fblocks.proto\"\x95\x04\n" +
"\fGetFullReply\x12\x1a\n" +
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
"\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" +
"\x05phone\x18\x03 \x01(\tR\x05phone\x12\x14\n" +
"\x05email\x18\x04 \x01(\tR\x05email\x12\x16\n" +
"\x06rights\x18\x05 \x01(\tR\x06rights\x12\x1a\n" +
"\bnickname\x18\x06 \x01(\tR\bnickname\x12\x16\n" +
"\x06avatar\x18\a \x01(\tR\x06avatar\x12\x1a\n" +
"\bbirthday\x18\b \x01(\tR\bbirthday\x12\x10\n" +
"\x03sex\x18\t \x01(\x05R\x03sex\x12\x18\n" +
"\acountry\x18\n" +
" \x01(\x05R\acountry\x12\x1a\n" +
"\bprovince\x18\v \x01(\x05R\bprovince\x12\x12\n" +
"\x04city\x18\f \x01(\x05R\x04city\x12\x12\n" +
"\x04area\x18\r \x01(\x05R\x04area\x12\x12\n" +
"\x04sign\x18\x0e \x01(\tR\x04sign\x12\x14\n" +
"\x05cover\x18\x0f \x01(\tR\x05cover\x12\x14\n" +
"\x05score\x18\x10 \x01(\x05R\x05score\x12\x14\n" +
"\x05level\x18\x11 \x01(\x05R\x05level\x12:\n" +
"\x06verify\x18\x12 \x03(\v2\".passport.GetFullReply.VerifyEntryR\x06verify\x1a9\n" +
"\vVerifyEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"\xca\x01\n" +
"\x0eSetDataRequest\x12\x1a\n" +
"\bnickname\x18\x01 \x01(\tR\bnickname\x12\x16\n" +
"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12\x1a\n" +
"\bbirthday\x18\x03 \x01(\tR\bbirthday\x12\x10\n" +
"\x03sex\x18\x04 \x01(\x05R\x03sex\x12\x1a\n" +
"\bprovince\x18\x05 \x01(\x05R\bprovince\x12\x12\n" +
"\x04city\x18\x06 \x01(\x05R\x04city\x12\x12\n" +
"\x04area\x18\a \x01(\x05R\x04area\x12\x12\n" +
"\x04sign\x18\b \x01(\tR\x04sign\"Z\n" +
"\x12SetPasswordRequest\x12!\n" +
"\fold_password\x18\x03 \x01(\tR\voldPassword\x12!\n" +
"\fnew_password\x18\x04 \x01(\tR\vnewPassword\")\n" +
"\x11StatisticsRequest\x12\x14\n" +
"\x05field\x18\x01 \x03(\tR\x05field\"\x83\x01\n" +
"\x0fStatisticsReply\x127\n" +
"\x04Data\x18\x01 \x03(\v2#.passport.StatisticsReply.DataEntryR\x04Data\x1a7\n" +
"\tDataEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x03R\x05value:\x028\x012\x87\x02\n" +
"\aAccount\x120\n" +
"\x03Get\x12\x0f.passport.Empty\x1a\x16.passport.GetFullReply\"\x00\x12<\n" +
"\aSetData\x12\x18.passport.SetDataRequest\x1a\x15.passport.StatusReply\"\x00\x12D\n" +
"\vSetPassword\x12\x1c.passport.SetPasswordRequest\x1a\x15.passport.StatusReply\"\x00\x12F\n" +
"\n" +
"Statistics\x12\x1b.passport.StatisticsRequest\x1a\x19.passport.StatisticsReply\"\x00B\fZ\n" +
".;passportb\x06proto3"
var (
file_account_proto_rawDescOnce sync.Once
file_account_proto_rawDescData []byte
)
func file_account_proto_rawDescGZIP() []byte {
file_account_proto_rawDescOnce.Do(func() {
file_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)))
})
return file_account_proto_rawDescData
}
var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_account_proto_goTypes = []any{
(*GetFullReply)(nil), // 0: passport.GetFullReply
(*SetDataRequest)(nil), // 1: passport.SetDataRequest
(*SetPasswordRequest)(nil), // 2: passport.SetPasswordRequest
(*StatisticsRequest)(nil), // 3: passport.StatisticsRequest
(*StatisticsReply)(nil), // 4: passport.StatisticsReply
nil, // 5: passport.GetFullReply.VerifyEntry
nil, // 6: passport.StatisticsReply.DataEntry
(*Empty)(nil), // 7: passport.Empty
(*StatusReply)(nil), // 8: passport.StatusReply
}
var file_account_proto_depIdxs = []int32{
5, // 0: passport.GetFullReply.verify:type_name -> passport.GetFullReply.VerifyEntry
6, // 1: passport.StatisticsReply.Data:type_name -> passport.StatisticsReply.DataEntry
7, // 2: passport.Account.Get:input_type -> passport.Empty
1, // 3: passport.Account.SetData:input_type -> passport.SetDataRequest
2, // 4: passport.Account.SetPassword:input_type -> passport.SetPasswordRequest
3, // 5: passport.Account.Statistics:input_type -> passport.StatisticsRequest
0, // 6: passport.Account.Get:output_type -> passport.GetFullReply
8, // 7: passport.Account.SetData:output_type -> passport.StatusReply
8, // 8: passport.Account.SetPassword:output_type -> passport.StatusReply
4, // 9: passport.Account.Statistics:output_type -> passport.StatisticsReply
6, // [6:10] is the sub-list for method output_type
2, // [2:6] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_account_proto_init() }
func file_account_proto_init() {
if File_account_proto != nil {
return
}
file_blocks_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_account_proto_goTypes,
DependencyIndexes: file_account_proto_depIdxs,
MessageInfos: file_account_proto_msgTypes,
}.Build()
File_account_proto = out.File
file_account_proto_goTypes = nil
file_account_proto_depIdxs = nil
}

View File

@ -0,0 +1,247 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: account.proto
package passport
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Account_Get_FullMethodName = "/passport.Account/Get"
Account_SetData_FullMethodName = "/passport.Account/SetData"
Account_SetPassword_FullMethodName = "/passport.Account/SetPassword"
Account_Statistics_FullMethodName = "/passport.Account/Statistics"
)
// AccountClient is the client API for Account service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Passport(会员通行证)模块-数据
type AccountClient interface {
// 通过会员所有信息
Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFullReply, error)
// 更新会员的信息数据,字段值为空或是0将不更新此数据
SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 更新会员的密码
SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error)
// 获取会员的相关统计数据
Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsReply, error)
}
type accountClient struct {
cc grpc.ClientConnInterface
}
func NewAccountClient(cc grpc.ClientConnInterface) AccountClient {
return &accountClient{cc}
}
func (c *accountClient) Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFullReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetFullReply)
err := c.cc.Invoke(ctx, Account_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Account_SetData_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatusReply)
err := c.cc.Invoke(ctx, Account_SetPassword_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountClient) Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatisticsReply)
err := c.cc.Invoke(ctx, Account_Statistics_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// AccountServer is the server API for Account service.
// All implementations must embed UnimplementedAccountServer
// for forward compatibility.
//
// Passport(会员通行证)模块-数据
type AccountServer interface {
// 通过会员所有信息
Get(context.Context, *Empty) (*GetFullReply, error)
// 更新会员的信息数据,字段值为空或是0将不更新此数据
SetData(context.Context, *SetDataRequest) (*StatusReply, error)
// 更新会员的密码
SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error)
// 获取会员的相关统计数据
Statistics(context.Context, *StatisticsRequest) (*StatisticsReply, error)
mustEmbedUnimplementedAccountServer()
}
// UnimplementedAccountServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedAccountServer struct{}
func (UnimplementedAccountServer) Get(context.Context, *Empty) (*GetFullReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedAccountServer) SetData(context.Context, *SetDataRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetData not implemented")
}
func (UnimplementedAccountServer) SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetPassword not implemented")
}
func (UnimplementedAccountServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Statistics not implemented")
}
func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
func (UnimplementedAccountServer) testEmbeddedByValue() {}
// UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AccountServer will
// result in compilation errors.
type UnsafeAccountServer interface {
mustEmbedUnimplementedAccountServer()
}
func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) {
// If the following call pancis, it indicates UnimplementedAccountServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Account_ServiceDesc, srv)
}
func _Account_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Account_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServer).Get(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Account_SetData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetDataRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServer).SetData(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Account_SetData_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServer).SetData(ctx, req.(*SetDataRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Account_SetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetPasswordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServer).SetPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Account_SetPassword_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServer).SetPassword(ctx, req.(*SetPasswordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Account_Statistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatisticsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServer).Statistics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Account_Statistics_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServer).Statistics(ctx, req.(*StatisticsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Account_ServiceDesc is the grpc.ServiceDesc for Account service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Account_ServiceDesc = grpc.ServiceDesc{
ServiceName: "passport.Account",
HandlerType: (*AccountServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _Account_Get_Handler,
},
{
MethodName: "SetData",
Handler: _Account_SetData_Handler,
},
{
MethodName: "SetPassword",
Handler: _Account_SetPassword_Handler,
},
{
MethodName: "Statistics",
Handler: _Account_Statistics_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "account.proto",
}

View File

@ -25,7 +25,6 @@ type LoginByPwdRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // 账号 必填
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码 必填
Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` // 设备 必填
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -74,20 +73,11 @@ func (x *LoginByPwdRequest) GetPassword() string {
return ""
}
func (x *LoginByPwdRequest) GetDevice() string {
if x != nil {
return x.Device
}
return ""
}
type LoginByCodeRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"` // 国家
Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"` // 手机号码
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 验证码
Device string `protobuf:"bytes,4,opt,name=device,proto3" json:"device,omitempty"` // 设备
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -143,435 +133,19 @@ func (x *LoginByCodeRequest) GetCode() string {
return ""
}
func (x *LoginByCodeRequest) GetDevice() string {
if x != nil {
return x.Device
}
return ""
}
func (x *LoginByCodeRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type WeChatByCodeRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // WeChat code
AgencyId int64 `protobuf:"varint,2,opt,name=agency_id,json=agencyId,proto3" json:"agency_id,omitempty"` // 代理ID
StaffId int64 `protobuf:"varint,3,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"` // 工作人员ID
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WeChatByCodeRequest) Reset() {
*x = WeChatByCodeRequest{}
mi := &file_login_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WeChatByCodeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WeChatByCodeRequest) ProtoMessage() {}
func (x *WeChatByCodeRequest) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WeChatByCodeRequest.ProtoReflect.Descriptor instead.
func (*WeChatByCodeRequest) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{2}
}
func (x *WeChatByCodeRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *WeChatByCodeRequest) GetAgencyId() int64 {
if x != nil {
return x.AgencyId
}
return 0
}
func (x *WeChatByCodeRequest) GetStaffId() int64 {
if x != nil {
return x.StaffId
}
return 0
}
type WeChatByPhoneReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // WeChat code
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WeChatByPhoneReply) Reset() {
*x = WeChatByPhoneReply{}
mi := &file_login_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WeChatByPhoneReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WeChatByPhoneReply) ProtoMessage() {}
func (x *WeChatByPhoneReply) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WeChatByPhoneReply.ProtoReflect.Descriptor instead.
func (*WeChatByPhoneReply) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{3}
}
func (x *WeChatByPhoneReply) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
type WeChatByCodeReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionKey string `protobuf:"bytes,1,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"` // WeChat session key
OpenId string `protobuf:"bytes,2,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` // WeChat open id
Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // identity
Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"` // account
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WeChatByCodeReply) Reset() {
*x = WeChatByCodeReply{}
mi := &file_login_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WeChatByCodeReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WeChatByCodeReply) ProtoMessage() {}
func (x *WeChatByCodeReply) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WeChatByCodeReply.ProtoReflect.Descriptor instead.
func (*WeChatByCodeReply) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{4}
}
func (x *WeChatByCodeReply) GetSessionKey() string {
if x != nil {
return x.SessionKey
}
return ""
}
func (x *WeChatByCodeReply) GetOpenId() string {
if x != nil {
return x.OpenId
}
return ""
}
func (x *WeChatByCodeReply) GetIdentity() string {
if x != nil {
return x.Identity
}
return ""
}
func (x *WeChatByCodeReply) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
type WeChatByPhoneRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
SessionKey string `protobuf:"bytes,1,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"` // WeChat session key
OpenId string `protobuf:"bytes,2,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` // open_id
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // data
Iv string `protobuf:"bytes,4,opt,name=iv,proto3" json:"iv,omitempty"` // iv
Identity string `protobuf:"bytes,5,opt,name=identity,proto3" json:"identity,omitempty"` // identiy
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WeChatByPhoneRequest) Reset() {
*x = WeChatByPhoneRequest{}
mi := &file_login_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WeChatByPhoneRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WeChatByPhoneRequest) ProtoMessage() {}
func (x *WeChatByPhoneRequest) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WeChatByPhoneRequest.ProtoReflect.Descriptor instead.
func (*WeChatByPhoneRequest) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{5}
}
func (x *WeChatByPhoneRequest) GetSessionKey() string {
if x != nil {
return x.SessionKey
}
return ""
}
func (x *WeChatByPhoneRequest) GetOpenId() string {
if x != nil {
return x.OpenId
}
return ""
}
func (x *WeChatByPhoneRequest) GetData() string {
if x != nil {
return x.Data
}
return ""
}
func (x *WeChatByPhoneRequest) GetIv() string {
if x != nil {
return x.Iv
}
return ""
}
func (x *WeChatByPhoneRequest) GetIdentity() string {
if x != nil {
return x.Identity
}
return ""
}
type WeChatGetUserinfoReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
NickName string `protobuf:"bytes,4,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"`
Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
Rights string `protobuf:"bytes,6,opt,name=rights,proto3" json:"rights,omitempty"`
Token string `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WeChatGetUserinfoReply) Reset() {
*x = WeChatGetUserinfoReply{}
mi := &file_login_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WeChatGetUserinfoReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WeChatGetUserinfoReply) ProtoMessage() {}
func (x *WeChatGetUserinfoReply) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WeChatGetUserinfoReply.ProtoReflect.Descriptor instead.
func (*WeChatGetUserinfoReply) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{6}
}
func (x *WeChatGetUserinfoReply) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *WeChatGetUserinfoReply) GetAccount() string {
if x != nil {
return x.Account
}
return ""
}
func (x *WeChatGetUserinfoReply) GetIdentity() string {
if x != nil {
return x.Identity
}
return ""
}
func (x *WeChatGetUserinfoReply) GetNickName() string {
if x != nil {
return x.NickName
}
return ""
}
func (x *WeChatGetUserinfoReply) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *WeChatGetUserinfoReply) GetRights() string {
if x != nil {
return x.Rights
}
return ""
}
func (x *WeChatGetUserinfoReply) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type LoginByAppleIDRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
AppleId string `protobuf:"bytes,1,opt,name=apple_id,json=appleId,proto3" json:"apple_id,omitempty"` // apple id
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // 描述
Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` // 设备
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LoginByAppleIDRequest) Reset() {
*x = LoginByAppleIDRequest{}
mi := &file_login_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LoginByAppleIDRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LoginByAppleIDRequest) ProtoMessage() {}
func (x *LoginByAppleIDRequest) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[7]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LoginByAppleIDRequest.ProtoReflect.Descriptor instead.
func (*LoginByAppleIDRequest) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{7}
}
func (x *LoginByAppleIDRequest) GetAppleId() string {
if x != nil {
return x.AppleId
}
return ""
}
func (x *LoginByAppleIDRequest) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}
func (x *LoginByAppleIDRequest) GetDevice() string {
if x != nil {
return x.Device
}
return ""
}
type LoginReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` //用户凭证
Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
Extend map[string]string `protobuf:"bytes,6,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` //用户凭证
Extend map[string]string `protobuf:"bytes,4,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LoginReply) Reset() {
*x = LoginReply{}
mi := &file_login_proto_msgTypes[8]
mi := &file_login_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -583,7 +157,7 @@ func (x *LoginReply) String() string {
func (*LoginReply) ProtoMessage() {}
func (x *LoginReply) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[8]
mi := &file_login_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -596,7 +170,7 @@ func (x *LoginReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
func (*LoginReply) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{8}
return file_login_proto_rawDescGZIP(), []int{2}
}
func (x *LoginReply) GetId() int64 {
@ -620,20 +194,6 @@ func (x *LoginReply) GetToken() string {
return ""
}
func (x *LoginReply) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
func (x *LoginReply) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *LoginReply) GetExtend() map[string]string {
if x != nil {
return x.Extend
@ -645,66 +205,26 @@ var File_login_proto protoreflect.FileDescriptor
const file_login_proto_rawDesc = "" +
"\n" +
"\vlogin.proto\x12\bpassport\"a\n" +
"\vlogin.proto\x12\bpassport\"I\n" +
"\x11LoginByPwdRequest\x12\x18\n" +
"\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" +
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x16\n" +
"\x06device\x18\x03 \x01(\tR\x06device\"\x84\x01\n" +
"\bpassword\x18\x02 \x01(\tR\bpassword\"X\n" +
"\x12LoginByCodeRequest\x12\x18\n" +
"\acountry\x18\x01 \x01(\tR\acountry\x12\x14\n" +
"\x05phone\x18\x02 \x01(\tR\x05phone\x12\x12\n" +
"\x04code\x18\x03 \x01(\tR\x04code\x12\x16\n" +
"\x06device\x18\x04 \x01(\tR\x06device\x12\x12\n" +
"\x04name\x18\x05 \x01(\tR\x04name\"a\n" +
"\x13WeChatByCodeRequest\x12\x12\n" +
"\x04code\x18\x01 \x01(\tR\x04code\x12\x1b\n" +
"\tagency_id\x18\x02 \x01(\x03R\bagencyId\x12\x19\n" +
"\bstaff_id\x18\x03 \x01(\x03R\astaffId\".\n" +
"\x12WeChatByPhoneReply\x12\x18\n" +
"\aaccount\x18\x01 \x01(\tR\aaccount\"\x83\x01\n" +
"\x11WeChatByCodeReply\x12\x1f\n" +
"\vsession_key\x18\x01 \x01(\tR\n" +
"sessionKey\x12\x17\n" +
"\aopen_id\x18\x02 \x01(\tR\x06openId\x12\x1a\n" +
"\bidentity\x18\x03 \x01(\tR\bidentity\x12\x18\n" +
"\aaccount\x18\x04 \x01(\tR\aaccount\"\x90\x01\n" +
"\x14WeChatByPhoneRequest\x12\x1f\n" +
"\vsession_key\x18\x01 \x01(\tR\n" +
"sessionKey\x12\x17\n" +
"\aopen_id\x18\x02 \x01(\tR\x06openId\x12\x12\n" +
"\x04data\x18\x03 \x01(\tR\x04data\x12\x0e\n" +
"\x02iv\x18\x04 \x01(\tR\x02iv\x12\x1a\n" +
"\bidentity\x18\x05 \x01(\tR\bidentity\"\xc1\x01\n" +
"\x16WeChatGetUserinfoReply\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x18\n" +
"\aaccount\x18\x02 \x01(\tR\aaccount\x12\x1a\n" +
"\bidentity\x18\x03 \x01(\tR\bidentity\x12\x1b\n" +
"\tnick_name\x18\x04 \x01(\tR\bnickName\x12\x16\n" +
"\x06avatar\x18\x05 \x01(\tR\x06avatar\x12\x16\n" +
"\x06rights\x18\x06 \x01(\tR\x06rights\x12\x14\n" +
"\x05token\x18\a \x01(\tR\x05token\"^\n" +
"\x15LoginByAppleIDRequest\x12\x19\n" +
"\bapple_id\x18\x01 \x01(\tR\aappleId\x12\x12\n" +
"\x04desc\x18\x02 \x01(\tR\x04desc\x12\x16\n" +
"\x06device\x18\x03 \x01(\tR\x06device\"\xed\x01\n" +
"\x04code\x18\x03 \x01(\tR\x04code\"\xc3\x01\n" +
"\n" +
"LoginReply\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" +
"\x05token\x18\x03 \x01(\tR\x05token\x12\x14\n" +
"\x05phone\x18\x04 \x01(\tR\x05phone\x12\x12\n" +
"\x04name\x18\x05 \x01(\tR\x04name\x128\n" +
"\x06extend\x18\x06 \x03(\v2 .passport.LoginReply.ExtendEntryR\x06extend\x1a9\n" +
"\x05token\x18\x03 \x01(\tR\x05token\x128\n" +
"\x06extend\x18\x04 \x03(\v2 .passport.LoginReply.ExtendEntryR\x06extend\x1a9\n" +
"\vExtendEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x86\x04\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xca\x01\n" +
"\x05Login\x12:\n" +
"\x03Pwd\x12\x1b.passport.LoginByPwdRequest\x1a\x14.passport.LoginReply\"\x00\x12<\n" +
"\x04Code\x12\x1c.passport.LoginByCodeRequest\x1a\x14.passport.LoginReply\"\x00\x12L\n" +
"\fWechatByCode\x12\x1d.passport.WeChatByCodeRequest\x1a\x1b.passport.WeChatByCodeReply\"\x00\x12O\n" +
"\rWechatByPhone\x12\x1e.passport.WeChatByPhoneRequest\x1a\x1c.passport.WeChatByPhoneReply\"\x00\x12W\n" +
"\x11WechatGetUserinfo\x12\x1e.passport.WeChatByPhoneRequest\x1a .passport.WeChatGetUserinfoReply\"\x00\x12B\n" +
"\aAppleId\x12\x1f.passport.LoginByAppleIDRequest\x1a\x14.passport.LoginReply\"\x00\x12G\n" +
"\x04Code\x12\x1c.passport.LoginByCodeRequest\x1a\x14.passport.LoginReply\"\x00\x12G\n" +
"\x0fCodeAndRegister\x12\x1c.passport.LoginByCodeRequest\x1a\x14.passport.LoginReply\"\x00B\fZ\n" +
".;passportb\x06proto3"
@ -720,37 +240,23 @@ func file_login_proto_rawDescGZIP() []byte {
return file_login_proto_rawDescData
}
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_login_proto_goTypes = []any{
(*LoginByPwdRequest)(nil), // 0: passport.LoginByPwdRequest
(*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest
(*WeChatByCodeRequest)(nil), // 2: passport.WeChatByCodeRequest
(*WeChatByPhoneReply)(nil), // 3: passport.WeChatByPhoneReply
(*WeChatByCodeReply)(nil), // 4: passport.WeChatByCodeReply
(*WeChatByPhoneRequest)(nil), // 5: passport.WeChatByPhoneRequest
(*WeChatGetUserinfoReply)(nil), // 6: passport.WeChatGetUserinfoReply
(*LoginByAppleIDRequest)(nil), // 7: passport.LoginByAppleIDRequest
(*LoginReply)(nil), // 8: passport.LoginReply
nil, // 9: passport.LoginReply.ExtendEntry
(*LoginByPwdRequest)(nil), // 0: passport.LoginByPwdRequest
(*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest
(*LoginReply)(nil), // 2: passport.LoginReply
nil, // 3: passport.LoginReply.ExtendEntry
}
var file_login_proto_depIdxs = []int32{
9, // 0: passport.LoginReply.extend:type_name -> passport.LoginReply.ExtendEntry
3, // 0: passport.LoginReply.extend:type_name -> passport.LoginReply.ExtendEntry
0, // 1: passport.Login.Pwd:input_type -> passport.LoginByPwdRequest
1, // 2: passport.Login.Code:input_type -> passport.LoginByCodeRequest
2, // 3: passport.Login.WechatByCode:input_type -> passport.WeChatByCodeRequest
5, // 4: passport.Login.WechatByPhone:input_type -> passport.WeChatByPhoneRequest
5, // 5: passport.Login.WechatGetUserinfo:input_type -> passport.WeChatByPhoneRequest
7, // 6: passport.Login.AppleId:input_type -> passport.LoginByAppleIDRequest
1, // 7: passport.Login.CodeAndRegister:input_type -> passport.LoginByCodeRequest
8, // 8: passport.Login.Pwd:output_type -> passport.LoginReply
8, // 9: passport.Login.Code:output_type -> passport.LoginReply
4, // 10: passport.Login.WechatByCode:output_type -> passport.WeChatByCodeReply
3, // 11: passport.Login.WechatByPhone:output_type -> passport.WeChatByPhoneReply
6, // 12: passport.Login.WechatGetUserinfo:output_type -> passport.WeChatGetUserinfoReply
8, // 13: passport.Login.AppleId:output_type -> passport.LoginReply
8, // 14: passport.Login.CodeAndRegister:output_type -> passport.LoginReply
8, // [8:15] is the sub-list for method output_type
1, // [1:8] is the sub-list for method input_type
1, // 3: passport.Login.CodeAndRegister:input_type -> passport.LoginByCodeRequest
2, // 4: passport.Login.Pwd:output_type -> passport.LoginReply
2, // 5: passport.Login.Code:output_type -> passport.LoginReply
2, // 6: passport.Login.CodeAndRegister:output_type -> passport.LoginReply
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
@ -767,7 +273,7 @@ func file_login_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)),
NumEnums: 0,
NumMessages: 10,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -19,13 +19,9 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Login_Pwd_FullMethodName = "/passport.Login/Pwd"
Login_Code_FullMethodName = "/passport.Login/Code"
Login_WechatByCode_FullMethodName = "/passport.Login/WechatByCode"
Login_WechatByPhone_FullMethodName = "/passport.Login/WechatByPhone"
Login_WechatGetUserinfo_FullMethodName = "/passport.Login/WechatGetUserinfo"
Login_AppleId_FullMethodName = "/passport.Login/AppleId"
Login_CodeAndRegister_FullMethodName = "/passport.Login/CodeAndRegister"
Login_Pwd_FullMethodName = "/passport.Login/Pwd"
Login_Code_FullMethodName = "/passport.Login/Code"
Login_CodeAndRegister_FullMethodName = "/passport.Login/CodeAndRegister"
)
// LoginClient is the client API for Login service.
@ -38,12 +34,6 @@ type LoginClient interface {
Pwd(ctx context.Context, in *LoginByPwdRequest, opts ...grpc.CallOption) (*LoginReply, error)
// 通过验证码登录
Code(ctx context.Context, in *LoginByCodeRequest, opts ...grpc.CallOption) (*LoginReply, error)
// 通过Wechat登录
WechatByCode(ctx context.Context, in *WeChatByCodeRequest, opts ...grpc.CallOption) (*WeChatByCodeReply, error)
WechatByPhone(ctx context.Context, in *WeChatByPhoneRequest, opts ...grpc.CallOption) (*WeChatByPhoneReply, error)
WechatGetUserinfo(ctx context.Context, in *WeChatByPhoneRequest, opts ...grpc.CallOption) (*WeChatGetUserinfoReply, error)
// 通过AppleID登录
AppleId(ctx context.Context, in *LoginByAppleIDRequest, opts ...grpc.CallOption) (*LoginReply, error)
// 通过验证码登录并注册
CodeAndRegister(ctx context.Context, in *LoginByCodeRequest, opts ...grpc.CallOption) (*LoginReply, error)
}
@ -76,46 +66,6 @@ func (c *loginClient) Code(ctx context.Context, in *LoginByCodeRequest, opts ...
return out, nil
}
func (c *loginClient) WechatByCode(ctx context.Context, in *WeChatByCodeRequest, opts ...grpc.CallOption) (*WeChatByCodeReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WeChatByCodeReply)
err := c.cc.Invoke(ctx, Login_WechatByCode_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *loginClient) WechatByPhone(ctx context.Context, in *WeChatByPhoneRequest, opts ...grpc.CallOption) (*WeChatByPhoneReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WeChatByPhoneReply)
err := c.cc.Invoke(ctx, Login_WechatByPhone_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *loginClient) WechatGetUserinfo(ctx context.Context, in *WeChatByPhoneRequest, opts ...grpc.CallOption) (*WeChatGetUserinfoReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WeChatGetUserinfoReply)
err := c.cc.Invoke(ctx, Login_WechatGetUserinfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *loginClient) AppleId(ctx context.Context, in *LoginByAppleIDRequest, opts ...grpc.CallOption) (*LoginReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LoginReply)
err := c.cc.Invoke(ctx, Login_AppleId_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *loginClient) CodeAndRegister(ctx context.Context, in *LoginByCodeRequest, opts ...grpc.CallOption) (*LoginReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LoginReply)
@ -136,12 +86,6 @@ type LoginServer interface {
Pwd(context.Context, *LoginByPwdRequest) (*LoginReply, error)
// 通过验证码登录
Code(context.Context, *LoginByCodeRequest) (*LoginReply, error)
// 通过Wechat登录
WechatByCode(context.Context, *WeChatByCodeRequest) (*WeChatByCodeReply, error)
WechatByPhone(context.Context, *WeChatByPhoneRequest) (*WeChatByPhoneReply, error)
WechatGetUserinfo(context.Context, *WeChatByPhoneRequest) (*WeChatGetUserinfoReply, error)
// 通过AppleID登录
AppleId(context.Context, *LoginByAppleIDRequest) (*LoginReply, error)
// 通过验证码登录并注册
CodeAndRegister(context.Context, *LoginByCodeRequest) (*LoginReply, error)
mustEmbedUnimplementedLoginServer()
@ -160,18 +104,6 @@ func (UnimplementedLoginServer) Pwd(context.Context, *LoginByPwdRequest) (*Login
func (UnimplementedLoginServer) Code(context.Context, *LoginByCodeRequest) (*LoginReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Code not implemented")
}
func (UnimplementedLoginServer) WechatByCode(context.Context, *WeChatByCodeRequest) (*WeChatByCodeReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method WechatByCode not implemented")
}
func (UnimplementedLoginServer) WechatByPhone(context.Context, *WeChatByPhoneRequest) (*WeChatByPhoneReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method WechatByPhone not implemented")
}
func (UnimplementedLoginServer) WechatGetUserinfo(context.Context, *WeChatByPhoneRequest) (*WeChatGetUserinfoReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method WechatGetUserinfo not implemented")
}
func (UnimplementedLoginServer) AppleId(context.Context, *LoginByAppleIDRequest) (*LoginReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method AppleId not implemented")
}
func (UnimplementedLoginServer) CodeAndRegister(context.Context, *LoginByCodeRequest) (*LoginReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method CodeAndRegister not implemented")
}
@ -232,78 +164,6 @@ func _Login_Code_Handler(srv interface{}, ctx context.Context, dec func(interfac
return interceptor(ctx, in, info, handler)
}
func _Login_WechatByCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WeChatByCodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoginServer).WechatByCode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Login_WechatByCode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoginServer).WechatByCode(ctx, req.(*WeChatByCodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Login_WechatByPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WeChatByPhoneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoginServer).WechatByPhone(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Login_WechatByPhone_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoginServer).WechatByPhone(ctx, req.(*WeChatByPhoneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Login_WechatGetUserinfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WeChatByPhoneRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoginServer).WechatGetUserinfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Login_WechatGetUserinfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoginServer).WechatGetUserinfo(ctx, req.(*WeChatByPhoneRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Login_AppleId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginByAppleIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoginServer).AppleId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Login_AppleId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoginServer).AppleId(ctx, req.(*LoginByAppleIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Login_CodeAndRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginByCodeRequest)
if err := dec(in); err != nil {
@ -337,22 +197,6 @@ var Login_ServiceDesc = grpc.ServiceDesc{
MethodName: "Code",
Handler: _Login_Code_Handler,
},
{
MethodName: "WechatByCode",
Handler: _Login_WechatByCode_Handler,
},
{
MethodName: "WechatByPhone",
Handler: _Login_WechatByPhone_Handler,
},
{
MethodName: "WechatGetUserinfo",
Handler: _Login_WechatGetUserinfo_Handler,
},
{
MethodName: "AppleId",
Handler: _Login_AppleId_Handler,
},
{
MethodName: "CodeAndRegister",
Handler: _Login_CodeAndRegister_Handler,

View File

@ -23,21 +23,15 @@ const (
type RegisterRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` //来源,归属
Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` //帐号
Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` //手机号
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` //密码
Code string `protobuf:"bytes,5,opt,name=code,proto3" json:"code,omitempty"` //验证码
WechatUnionId string `protobuf:"bytes,6,opt,name=wechat_union_id,json=wechatUnionId,proto3" json:"wechat_union_id,omitempty"` //微信UnionID
WechatOpenId string `protobuf:"bytes,7,opt,name=wechat_open_id,json=wechatOpenId,proto3" json:"wechat_open_id,omitempty"` //微信OpenID
AppleId string `protobuf:"bytes,8,opt,name=apple_id,json=appleId,proto3" json:"apple_id,omitempty"` //Apple ID
UserName string `protobuf:"bytes,9,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` //姓名
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"` //类型
Device string `protobuf:"bytes,11,opt,name=device,proto3" json:"device,omitempty"` //设备
AgencyId int64 `protobuf:"varint,12,opt,name=agency_id,json=agencyId,proto3" json:"agency_id,omitempty"` // 代理ID
StaffId int64 `protobuf:"varint,13,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"` // 工作人员ID
OwnerId int64 `protobuf:"varint,14,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 所属ID
OwnerIdentity string `protobuf:"bytes,15,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 所属唯一码
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` //邮箱
Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` //帐号
Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` //手机号
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` //密码
Code string `protobuf:"bytes,5,opt,name=code,proto3" json:"code,omitempty"` //验证码
AgencyId int64 `protobuf:"varint,6,opt,name=agency_id,json=agencyId,proto3" json:"agency_id,omitempty"` // 代理ID
StaffId int64 `protobuf:"varint,7,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"` // 工作人员ID
OwnerId int64 `protobuf:"varint,8,opt,name=owner_id,proto3" json:"owner_id,omitempty"` // 所属ID
OwnerIdentity string `protobuf:"bytes,9,opt,name=owner_identity,proto3" json:"owner_identity,omitempty"` // 所属唯一码
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -72,9 +66,9 @@ func (*RegisterRequest) Descriptor() ([]byte, []int) {
return file_register_proto_rawDescGZIP(), []int{0}
}
func (x *RegisterRequest) GetOrigin() string {
func (x *RegisterRequest) GetEmail() string {
if x != nil {
return x.Origin
return x.Email
}
return ""
}
@ -107,48 +101,6 @@ func (x *RegisterRequest) GetCode() string {
return ""
}
func (x *RegisterRequest) GetWechatUnionId() string {
if x != nil {
return x.WechatUnionId
}
return ""
}
func (x *RegisterRequest) GetWechatOpenId() string {
if x != nil {
return x.WechatOpenId
}
return ""
}
func (x *RegisterRequest) GetAppleId() string {
if x != nil {
return x.AppleId
}
return ""
}
func (x *RegisterRequest) GetUserName() string {
if x != nil {
return x.UserName
}
return ""
}
func (x *RegisterRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *RegisterRequest) GetDevice() string {
if x != nil {
return x.Device
}
return ""
}
func (x *RegisterRequest) GetAgencyId() int64 {
if x != nil {
return x.AgencyId
@ -181,7 +133,6 @@ type RegisterReply struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码
DataBind string `protobuf:"bytes,3,opt,name=data_bind,json=dataBind,proto3" json:"data_bind,omitempty"` // 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` //用户Header所需Token
Extend map[string]string `protobuf:"bytes,5,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段
unknownFields protoimpl.UnknownFields
@ -232,13 +183,6 @@ func (x *RegisterReply) GetIdentity() string {
return ""
}
func (x *RegisterReply) GetDataBind() string {
if x != nil {
return x.DataBind
}
return ""
}
func (x *RegisterReply) GetToken() string {
if x != nil {
return x.Token
@ -257,38 +201,28 @@ var File_register_proto protoreflect.FileDescriptor
const file_register_proto_rawDesc = "" +
"\n" +
"\x0eregister.proto\x12\bpassport\"\xb7\x03\n" +
"\x0fRegisterRequest\x12\x16\n" +
"\x06origin\x18\x01 \x01(\tR\x06origin\x12\x18\n" +
"\x0eregister.proto\x12\bpassport\"\x83\x02\n" +
"\x0fRegisterRequest\x12\x14\n" +
"\x05email\x18\x01 \x01(\tR\x05email\x12\x18\n" +
"\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" +
"\x05phone\x18\x03 \x01(\tR\x05phone\x12\x1a\n" +
"\bpassword\x18\x04 \x01(\tR\bpassword\x12\x12\n" +
"\x04code\x18\x05 \x01(\tR\x04code\x12&\n" +
"\x0fwechat_union_id\x18\x06 \x01(\tR\rwechatUnionId\x12$\n" +
"\x0ewechat_open_id\x18\a \x01(\tR\fwechatOpenId\x12\x19\n" +
"\bapple_id\x18\b \x01(\tR\aappleId\x12\x1b\n" +
"\tuser_name\x18\t \x01(\tR\buserName\x12\x12\n" +
"\x04type\x18\n" +
" \x01(\tR\x04type\x12\x16\n" +
"\x06device\x18\v \x01(\tR\x06device\x12\x1b\n" +
"\tagency_id\x18\f \x01(\x03R\bagencyId\x12\x19\n" +
"\bstaff_id\x18\r \x01(\x03R\astaffId\x12\x1a\n" +
"\bowner_id\x18\x0e \x01(\x03R\bowner_id\x12&\n" +
"\x0eowner_identity\x18\x0f \x01(\tR\x0eowner_identity\"\xe6\x01\n" +
"\x04code\x18\x05 \x01(\tR\x04code\x12\x1b\n" +
"\tagency_id\x18\x06 \x01(\x03R\bagencyId\x12\x19\n" +
"\bstaff_id\x18\a \x01(\x03R\astaffId\x12\x1a\n" +
"\bowner_id\x18\b \x01(\x03R\bowner_id\x12&\n" +
"\x0eowner_identity\x18\t \x01(\tR\x0eowner_identity\"\xc9\x01\n" +
"\rRegisterReply\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x1b\n" +
"\tdata_bind\x18\x03 \x01(\tR\bdataBind\x12\x14\n" +
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" +
"\x05token\x18\x04 \x01(\tR\x05token\x12;\n" +
"\x06extend\x18\x05 \x03(\v2#.passport.RegisterReply.ExtendEntryR\x06extend\x1a9\n" +
"\vExtendEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x86\x02\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x85\x01\n" +
"\bRegister\x12;\n" +
"\x03Pwd\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00\x12<\n" +
"\x04Code\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00\x12>\n" +
"\x06Wechat\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00\x12?\n" +
"\aAppleId\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00B\fZ\n" +
"\x04Code\x12\x19.passport.RegisterRequest\x1a\x17.passport.RegisterReply\"\x00B\fZ\n" +
".;passportb\x06proto3"
var (
@ -313,14 +247,10 @@ var file_register_proto_depIdxs = []int32{
2, // 0: passport.RegisterReply.extend:type_name -> passport.RegisterReply.ExtendEntry
0, // 1: passport.Register.Pwd:input_type -> passport.RegisterRequest
0, // 2: passport.Register.Code:input_type -> passport.RegisterRequest
0, // 3: passport.Register.Wechat:input_type -> passport.RegisterRequest
0, // 4: passport.Register.AppleId:input_type -> passport.RegisterRequest
1, // 5: passport.Register.Pwd:output_type -> passport.RegisterReply
1, // 6: passport.Register.Code:output_type -> passport.RegisterReply
1, // 7: passport.Register.Wechat:output_type -> passport.RegisterReply
1, // 8: passport.Register.AppleId:output_type -> passport.RegisterReply
5, // [5:9] is the sub-list for method output_type
1, // [1:5] is the sub-list for method input_type
1, // 3: passport.Register.Pwd:output_type -> passport.RegisterReply
1, // 4: passport.Register.Code:output_type -> passport.RegisterReply
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name

View File

@ -19,10 +19,8 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Register_Pwd_FullMethodName = "/passport.Register/Pwd"
Register_Code_FullMethodName = "/passport.Register/Code"
Register_Wechat_FullMethodName = "/passport.Register/Wechat"
Register_AppleId_FullMethodName = "/passport.Register/AppleId"
Register_Pwd_FullMethodName = "/passport.Register/Pwd"
Register_Code_FullMethodName = "/passport.Register/Code"
)
// RegisterClient is the client API for Register service.
@ -35,10 +33,6 @@ type RegisterClient interface {
Pwd(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
// 手机验证码注册
Code(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
// Wechat注册
Wechat(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
// AppleID注册
AppleId(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
}
type registerClient struct {
@ -69,26 +63,6 @@ func (c *registerClient) Code(ctx context.Context, in *RegisterRequest, opts ...
return out, nil
}
func (c *registerClient) Wechat(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegisterReply)
err := c.cc.Invoke(ctx, Register_Wechat_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *registerClient) AppleId(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegisterReply)
err := c.cc.Invoke(ctx, Register_AppleId_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegisterServer is the server API for Register service.
// All implementations must embed UnimplementedRegisterServer
// for forward compatibility.
@ -99,10 +73,6 @@ type RegisterServer interface {
Pwd(context.Context, *RegisterRequest) (*RegisterReply, error)
// 手机验证码注册
Code(context.Context, *RegisterRequest) (*RegisterReply, error)
// Wechat注册
Wechat(context.Context, *RegisterRequest) (*RegisterReply, error)
// AppleID注册
AppleId(context.Context, *RegisterRequest) (*RegisterReply, error)
mustEmbedUnimplementedRegisterServer()
}
@ -119,12 +89,6 @@ func (UnimplementedRegisterServer) Pwd(context.Context, *RegisterRequest) (*Regi
func (UnimplementedRegisterServer) Code(context.Context, *RegisterRequest) (*RegisterReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Code not implemented")
}
func (UnimplementedRegisterServer) Wechat(context.Context, *RegisterRequest) (*RegisterReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Wechat not implemented")
}
func (UnimplementedRegisterServer) AppleId(context.Context, *RegisterRequest) (*RegisterReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method AppleId not implemented")
}
func (UnimplementedRegisterServer) mustEmbedUnimplementedRegisterServer() {}
func (UnimplementedRegisterServer) testEmbeddedByValue() {}
@ -182,42 +146,6 @@ func _Register_Code_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
func _Register_Wechat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegisterServer).Wechat(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Register_Wechat_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegisterServer).Wechat(ctx, req.(*RegisterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Register_AppleId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegisterServer).AppleId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Register_AppleId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegisterServer).AppleId(ctx, req.(*RegisterRequest))
}
return interceptor(ctx, in, info, handler)
}
// Register_ServiceDesc is the grpc.ServiceDesc for Register service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -233,14 +161,6 @@ var Register_ServiceDesc = grpc.ServiceDesc{
MethodName: "Code",
Handler: _Register_Code_Handler,
},
{
MethodName: "Wechat",
Handler: _Register_Wechat_Handler,
},
{
MethodName: "AppleId",
Handler: _Register_AppleId_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "register.proto",

View File

@ -42,67 +42,18 @@ export type StatusReply = {
export type Empty = {
};
export type VerifyRequest = {
/** 手机号 */
phone?: string;
/** 验证码 */
code?: string;
};
export type ForgetResetRequest = {
/** 唯一码 */
/** 获取会员的完整信息 */
export type GetFullReply = {
/** 唯一标识 */
identity?: string;
/** 密码 */
password?: string;
};
export type ForgetReply = {
/** 用户唯一码 */
identity?: string;
/** 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码 */
dataBind?: string;
/** 用户凭证 */
token?: string;
/** 扩展字段 */
extend?: { [key: string]: string };
};
/** Passport-通行证模块 */
export interface Forget {
}
type RequestType = {
path: string;
method: string;
body: string | null;
};
type RequestHandler = (request: RequestType, meta: { service: string, method: string }) => Promise<unknown>;
export function createForgetClient(
handler: RequestHandler
): Forget {
return {
};
}
export type BindRequest = {
/** 操作动作 */
action?: string;
/** 帐号 */
account?: string;
/** 手机号码 必填 */
phone?: string;
/** 验证码 */
code?: string;
/** 密码 必填 */
password?: string;
/** 昵称 */
nickname?: string;
};
export type GetDataReply = {
/** 帐号 */
account?: string;
/** 手机号 */
phone?: string;
email?: string;
/** 权限 */
rights?: string;
/** 昵称 */
nickname?: string;
/** 头像 */
@ -111,6 +62,8 @@ export type GetDataReply = {
birthday?: string;
/** 性别1为男性2为女性 */
sex?: number;
/** 国家 */
country?: number;
/** 省 */
province?: number;
/** 市 */
@ -119,8 +72,14 @@ export type GetDataReply = {
area?: number;
/** 签名 */
sign?: string;
/** 状态:-2,认证未通过0为未认证1为审核中2为认证成功 */
approve?: number;
/** 背景&封面 */
cover?: string;
/** 积分 */
score?: number;
/** 等级 */
level?: number;
/** 数据 */
verify?: { [key: string]: boolean };
};
export type SetDataRequest = {
@ -160,13 +119,55 @@ export type StatisticsReply = {
};
/** Passport(会员通行证)模块-数据 */
/** *此模块需要Token验证 */
export interface Info {
export interface Account {
}
export function createInfoClient(
type RequestType = {
path: string;
method: string;
body: string | null;
};
type RequestHandler = (request: RequestType, meta: { service: string, method: string }) => Promise<unknown>;
export function createAccountClient(
handler: RequestHandler
): Info {
): Account {
return {
};
}
export type VerifyRequest = {
/** 手机号 */
phone?: string;
/** 验证码 */
code?: string;
};
export type ForgetResetRequest = {
/** 唯一码 */
identity?: string;
/** 密码 */
password?: string;
};
export type ForgetReply = {
/** 用户唯一码 */
identity?: string;
/** 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码 */
dataBind?: string;
/** 用户凭证 */
token?: string;
/** 扩展字段 */
extend?: { [key: string]: string };
};
/** Passport-通行证模块 */
export interface Forget {
}
export function createForgetClient(
handler: RequestHandler
): Forget {
return {
};
}
@ -175,8 +176,6 @@ export type LoginByPwdRequest = {
account?: string;
/** 密码 必填 */
password?: string;
/** 设备 必填 */
device?: string;
};
export type LoginByCodeRequest = {
@ -186,66 +185,6 @@ export type LoginByCodeRequest = {
phone?: string;
/** 验证码 */
code?: string;
/** 设备 */
device?: string;
name?: string;
};
export type WeChatByCodeRequest = {
/** WeChat code */
code?: string;
/** 代理ID */
agencyId?: number;
/** 工作人员ID */
staffId?: number;
};
export type WeChatByPhoneReply = {
/** WeChat code */
account?: string;
};
export type WeChatByCodeReply = {
/** WeChat session key */
sessionKey?: string;
/** WeChat open id */
openId?: string;
/** identity */
identity?: string;
/** account */
account?: string;
};
export type WeChatByPhoneRequest = {
/** WeChat session key */
sessionKey?: string;
/** open_id */
openId?: string;
/** data */
data?: string;
/** iv */
iv?: string;
/** identiy */
identity?: string;
};
export type WeChatGetUserinfoReply = {
id?: number;
account?: string;
identity?: string;
nickName?: string;
avatar?: string;
rights?: string;
token?: string;
};
export type LoginByAppleIDRequest = {
/** apple id */
appleId?: string;
/** 描述 */
desc?: string;
/** 设备 */
device?: string;
};
export type LoginReply = {
@ -254,8 +193,6 @@ export type LoginReply = {
identity?: string;
/** 用户凭证 */
token?: string;
phone?: string;
name?: string;
/** 扩展字段 */
extend?: { [key: string]: string };
};
@ -271,8 +208,8 @@ export function createLoginClient(
};
}
export type RegisterRequest = {
/** 来源,归属 */
origin?: string;
/** 邮箱 */
email?: string;
/** 帐号 */
account?: string;
/** 手机号 */
@ -281,18 +218,6 @@ export type RegisterRequest = {
password?: string;
/** 验证码 */
code?: string;
/** 微信UnionID */
wechatUnionId?: string;
/** 微信OpenID */
wechatOpenId?: string;
/** Apple ID */
appleId?: string;
/** 姓名 */
userName?: string;
/** 类型 */
type?: string;
/** 设备 */
device?: string;
/** 代理ID */
agencyId?: number;
/** 工作人员ID */
@ -307,8 +232,6 @@ export type RegisterReply = {
id?: number;
/** 用户唯一码 */
identity?: string;
/** 数据绑定的相关说明,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码 */
dataBind?: string;
/** 用户Header所需Token */
token?: string;
/** 扩展字段 */