mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-07-28 01:15:23 -04:00
flutter unit/integration tests
This commit is contained in:
parent
d586748333
commit
6a8c0830d2
18 changed files with 1357 additions and 520 deletions
|
@ -240,6 +240,31 @@ class RouteBlob with _$RouteBlob {
|
|||
_$RouteBlobFromJson(json as Map<String, dynamic>);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
/// Inspect
|
||||
@freezed
|
||||
class DHTRecordReport with _$DHTRecordReport {
|
||||
const factory DHTRecordReport({
|
||||
required List<ValueSubkeyRange> subkeys,
|
||||
required List<int> localSeqs,
|
||||
required List<int> networkSeqs,
|
||||
}) = _DHTRecordReport;
|
||||
factory DHTRecordReport.fromJson(dynamic json) =>
|
||||
_$DHTRecordReportFromJson(json as Map<String, dynamic>);
|
||||
}
|
||||
|
||||
enum DHTReportScope {
|
||||
local,
|
||||
syncGet,
|
||||
syncSet,
|
||||
updateGet,
|
||||
updateSet;
|
||||
|
||||
factory DHTReportScope.fromJson(dynamic j) =>
|
||||
DHTReportScope.values.byName((j as String).toCamelCase());
|
||||
String toJson() => name.toPascalCase();
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
/// VeilidRoutingContext
|
||||
|
||||
|
@ -247,9 +272,11 @@ abstract class VeilidRoutingContext {
|
|||
void close();
|
||||
|
||||
// Modifiers
|
||||
VeilidRoutingContext withDefaultSafety();
|
||||
VeilidRoutingContext withSafety(SafetySelection safetySelection);
|
||||
VeilidRoutingContext withSequencing(Sequencing sequencing);
|
||||
VeilidRoutingContext withDefaultSafety({bool closeSelf = false});
|
||||
VeilidRoutingContext withSafety(SafetySelection safetySelection,
|
||||
{bool closeSelf = false});
|
||||
VeilidRoutingContext withSequencing(Sequencing sequencing,
|
||||
{bool closeSelf = false});
|
||||
Future<SafetySelection> safety();
|
||||
|
||||
// App call/message
|
||||
|
@ -269,4 +296,7 @@ abstract class VeilidRoutingContext {
|
|||
Future<Timestamp> watchDHTValues(TypedKey key,
|
||||
{List<ValueSubkeyRange>? subkeys, Timestamp? expiration, int? count});
|
||||
Future<bool> cancelDHTWatch(TypedKey key, {List<ValueSubkeyRange>? subkeys});
|
||||
Future<DHTRecordReport> inspectDHTRecord(TypedKey key,
|
||||
{List<ValueSubkeyRange>? subkeys,
|
||||
DHTReportScope scope = DHTReportScope.local});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue