Sync class abstract
Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.
- Available extensions
- Annotations
-
- @freezed
Constructors
Properties
- $type → String
-
no setterinherited
-
$unknown
→ Map<
String, dynamic> ? -
no setterinherited
-
blocks
→ Map<
String, dynamic> -
CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.
no setterinherited
-
copyWith
→ $SyncCopyWith<
Sync> -
Create a copy of Sync
with the given fields replaced by the non-null parameter values.
no setterinherited
- did → String
-
The account this repo event corresponds to. Must match that in the commit object.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- rev → String
-
The rev of the commit. This value must match that in the commit object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seq → int
-
The stream sequence number of this message.
no setterinherited
- time → DateTime
-
Timestamp of when this message was originally broadcast.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Sync value)) → TResult -
Available on Sync, provided by the SyncPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Sync value)?) → TResult? -
Available on Sync, provided by the SyncPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_Sync value)?, {required TResult orElse()}) → TResult -
Available on Sync, provided by the SyncPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String $type, int seq, String did, Map< String, dynamic> blocks, String rev, DateTime time, Map<String, dynamic> ? $unknown)?, {required TResult orElse()}) → TResult -
Available on Sync, provided by the SyncPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Sync to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String $type, int seq, String did, Map< String, dynamic> blocks, String rev, DateTime time, Map<String, dynamic> ? $unknown)) → TResult -
Available on Sync, provided by the SyncPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String $type, int seq, String did, Map< String, dynamic> blocks, String rev, DateTime time, Map<String, dynamic> ? $unknown)?) → TResult? -
Available on Sync, provided by the SyncPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
knownProps
→ const List<
String>