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

Sync.new({@Default('com.atproto.sync.subscribeRepos#sync') String $type, required int seq, required String did, required Map<String, dynamic> blocks, required String rev, required DateTime time, Map<String, dynamic>? $unknown})
const
factory
Sync.fromJson(Map<String, Object?> json)
factory

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

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Sync value)?) → TResult?

Available on Sync, provided by the SyncPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Sync value)?, {required TResult orElse()}) → TResult

Available on Sync, provided by the SyncPatterns extension

A variant of map that fallback to returning orElse.
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 of when that fallback to an orElse 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

A switch-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 of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

validate(Map<String, dynamic> object) bool

Constants

knownProps → const List<String>