mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-02 14:26:12 -04:00
xfer
This commit is contained in:
parent
08dab73757
commit
c08878b35a
39 changed files with 771 additions and 218 deletions
|
@ -12,9 +12,9 @@ part 'user_login.g.dart';
|
|||
class UserLogin with _$UserLogin {
|
||||
const factory UserLogin({
|
||||
// Master record key for the user used to index the local accounts table
|
||||
required TypedKey accountMasterKey,
|
||||
required TypedKey accountMasterRecordKey,
|
||||
// The identity secret as unlocked from the local accounts table
|
||||
required TypedSecret secretKey,
|
||||
required TypedSecret identitySecret,
|
||||
// The time this login was most recently used
|
||||
required Timestamp lastActive,
|
||||
}) = _UserLogin;
|
||||
|
|
|
@ -21,9 +21,9 @@ UserLogin _$UserLoginFromJson(Map<String, dynamic> json) {
|
|||
/// @nodoc
|
||||
mixin _$UserLogin {
|
||||
// Master record key for the user used to index the local accounts table
|
||||
Typed<FixedEncodedString43> get accountMasterKey =>
|
||||
Typed<FixedEncodedString43> get accountMasterRecordKey =>
|
||||
throw _privateConstructorUsedError; // The identity secret as unlocked from the local accounts table
|
||||
Typed<FixedEncodedString43> get secretKey =>
|
||||
Typed<FixedEncodedString43> get identitySecret =>
|
||||
throw _privateConstructorUsedError; // The time this login was most recently used
|
||||
Timestamp get lastActive => throw _privateConstructorUsedError;
|
||||
|
||||
|
@ -39,8 +39,8 @@ abstract class $UserLoginCopyWith<$Res> {
|
|||
_$UserLoginCopyWithImpl<$Res, UserLogin>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{Typed<FixedEncodedString43> accountMasterKey,
|
||||
Typed<FixedEncodedString43> secretKey,
|
||||
{Typed<FixedEncodedString43> accountMasterRecordKey,
|
||||
Typed<FixedEncodedString43> identitySecret,
|
||||
Timestamp lastActive});
|
||||
}
|
||||
|
||||
|
@ -57,18 +57,18 @@ class _$UserLoginCopyWithImpl<$Res, $Val extends UserLogin>
|
|||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accountMasterKey = null,
|
||||
Object? secretKey = null,
|
||||
Object? accountMasterRecordKey = null,
|
||||
Object? identitySecret = null,
|
||||
Object? lastActive = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
accountMasterKey: null == accountMasterKey
|
||||
? _value.accountMasterKey
|
||||
: accountMasterKey // ignore: cast_nullable_to_non_nullable
|
||||
accountMasterRecordKey: null == accountMasterRecordKey
|
||||
? _value.accountMasterRecordKey
|
||||
: accountMasterRecordKey // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
secretKey: null == secretKey
|
||||
? _value.secretKey
|
||||
: secretKey // ignore: cast_nullable_to_non_nullable
|
||||
identitySecret: null == identitySecret
|
||||
? _value.identitySecret
|
||||
: identitySecret // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
lastActive: null == lastActive
|
||||
? _value.lastActive
|
||||
|
@ -86,8 +86,8 @@ abstract class _$$_UserLoginCopyWith<$Res> implements $UserLoginCopyWith<$Res> {
|
|||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Typed<FixedEncodedString43> accountMasterKey,
|
||||
Typed<FixedEncodedString43> secretKey,
|
||||
{Typed<FixedEncodedString43> accountMasterRecordKey,
|
||||
Typed<FixedEncodedString43> identitySecret,
|
||||
Timestamp lastActive});
|
||||
}
|
||||
|
||||
|
@ -102,18 +102,18 @@ class __$$_UserLoginCopyWithImpl<$Res>
|
|||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accountMasterKey = null,
|
||||
Object? secretKey = null,
|
||||
Object? accountMasterRecordKey = null,
|
||||
Object? identitySecret = null,
|
||||
Object? lastActive = null,
|
||||
}) {
|
||||
return _then(_$_UserLogin(
|
||||
accountMasterKey: null == accountMasterKey
|
||||
? _value.accountMasterKey
|
||||
: accountMasterKey // ignore: cast_nullable_to_non_nullable
|
||||
accountMasterRecordKey: null == accountMasterRecordKey
|
||||
? _value.accountMasterRecordKey
|
||||
: accountMasterRecordKey // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
secretKey: null == secretKey
|
||||
? _value.secretKey
|
||||
: secretKey // ignore: cast_nullable_to_non_nullable
|
||||
identitySecret: null == identitySecret
|
||||
? _value.identitySecret
|
||||
: identitySecret // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
lastActive: null == lastActive
|
||||
? _value.lastActive
|
||||
|
@ -127,8 +127,8 @@ class __$$_UserLoginCopyWithImpl<$Res>
|
|||
@JsonSerializable()
|
||||
class _$_UserLogin implements _UserLogin {
|
||||
const _$_UserLogin(
|
||||
{required this.accountMasterKey,
|
||||
required this.secretKey,
|
||||
{required this.accountMasterRecordKey,
|
||||
required this.identitySecret,
|
||||
required this.lastActive});
|
||||
|
||||
factory _$_UserLogin.fromJson(Map<String, dynamic> json) =>
|
||||
|
@ -136,17 +136,17 @@ class _$_UserLogin implements _UserLogin {
|
|||
|
||||
// Master record key for the user used to index the local accounts table
|
||||
@override
|
||||
final Typed<FixedEncodedString43> accountMasterKey;
|
||||
final Typed<FixedEncodedString43> accountMasterRecordKey;
|
||||
// The identity secret as unlocked from the local accounts table
|
||||
@override
|
||||
final Typed<FixedEncodedString43> secretKey;
|
||||
final Typed<FixedEncodedString43> identitySecret;
|
||||
// The time this login was most recently used
|
||||
@override
|
||||
final Timestamp lastActive;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserLogin(accountMasterKey: $accountMasterKey, secretKey: $secretKey, lastActive: $lastActive)';
|
||||
return 'UserLogin(accountMasterRecordKey: $accountMasterRecordKey, identitySecret: $identitySecret, lastActive: $lastActive)';
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -154,18 +154,18 @@ class _$_UserLogin implements _UserLogin {
|
|||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_UserLogin &&
|
||||
(identical(other.accountMasterKey, accountMasterKey) ||
|
||||
other.accountMasterKey == accountMasterKey) &&
|
||||
(identical(other.secretKey, secretKey) ||
|
||||
other.secretKey == secretKey) &&
|
||||
(identical(other.accountMasterRecordKey, accountMasterRecordKey) ||
|
||||
other.accountMasterRecordKey == accountMasterRecordKey) &&
|
||||
(identical(other.identitySecret, identitySecret) ||
|
||||
other.identitySecret == identitySecret) &&
|
||||
(identical(other.lastActive, lastActive) ||
|
||||
other.lastActive == lastActive));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, accountMasterKey, secretKey, lastActive);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, accountMasterRecordKey, identitySecret, lastActive);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
|
@ -183,17 +183,17 @@ class _$_UserLogin implements _UserLogin {
|
|||
|
||||
abstract class _UserLogin implements UserLogin {
|
||||
const factory _UserLogin(
|
||||
{required final Typed<FixedEncodedString43> accountMasterKey,
|
||||
required final Typed<FixedEncodedString43> secretKey,
|
||||
{required final Typed<FixedEncodedString43> accountMasterRecordKey,
|
||||
required final Typed<FixedEncodedString43> identitySecret,
|
||||
required final Timestamp lastActive}) = _$_UserLogin;
|
||||
|
||||
factory _UserLogin.fromJson(Map<String, dynamic> json) =
|
||||
_$_UserLogin.fromJson;
|
||||
|
||||
@override // Master record key for the user used to index the local accounts table
|
||||
Typed<FixedEncodedString43> get accountMasterKey;
|
||||
Typed<FixedEncodedString43> get accountMasterRecordKey;
|
||||
@override // The identity secret as unlocked from the local accounts table
|
||||
Typed<FixedEncodedString43> get secretKey;
|
||||
Typed<FixedEncodedString43> get identitySecret;
|
||||
@override // The time this login was most recently used
|
||||
Timestamp get lastActive;
|
||||
@override
|
||||
|
|
|
@ -7,16 +7,17 @@ part of 'user_login.dart';
|
|||
// **************************************************************************
|
||||
|
||||
_$_UserLogin _$$_UserLoginFromJson(Map<String, dynamic> json) => _$_UserLogin(
|
||||
accountMasterKey:
|
||||
Typed<FixedEncodedString43>.fromJson(json['account_master_key']),
|
||||
secretKey: Typed<FixedEncodedString43>.fromJson(json['secret_key']),
|
||||
accountMasterRecordKey: Typed<FixedEncodedString43>.fromJson(
|
||||
json['account_master_record_key']),
|
||||
identitySecret:
|
||||
Typed<FixedEncodedString43>.fromJson(json['identity_secret']),
|
||||
lastActive: Timestamp.fromJson(json['last_active']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_UserLoginToJson(_$_UserLogin instance) =>
|
||||
<String, dynamic>{
|
||||
'account_master_key': instance.accountMasterKey.toJson(),
|
||||
'secret_key': instance.secretKey.toJson(),
|
||||
'account_master_record_key': instance.accountMasterRecordKey.toJson(),
|
||||
'identity_secret': instance.identitySecret.toJson(),
|
||||
'last_active': instance.lastActive.toJson(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue