DVShorebirdPatchSource class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
mayOffer
→ DVPatchOfferGate?
-
Asked before a patch is offered; null offers always.
final
-
onInstall
→ DVPatchInstallHook?
-
Called for every install counted.
final
-
publishToken
→ String?
-
What a publish or rollback request must bear as
Authorization: Bearer.
Null or empty is a source that serves and never publishes.
final
-
root
→ String
-
The directory patches are kept in.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
architectures({required String appId, required String releaseVersion, required String platform})
→ List<String>
-
The architectures
appId releaseVersion has patches for on
platform, sorted.
-
check(Map<String, Object?> request, {required Uri downloadBase})
→ Map<String, Object?>
-
The updater's patch check, answered.
-
handle(HttpRequest request, {String prefix = ''})
→ Future<bool>
-
Serves the patch source to a dart:io
request under prefix. Returns
false, having written nothing, for a request that is not one of its own.
-
installTotal({String? month})
→ int
-
Installs counted in
month (the current one when null) across every
app this source serves: what a hosted project is billed on.
-
installUsage(String appId, {String? month})
→ DVPatchInstallUsage
-
appId's counted installs in month (YYYY-MM, UTC), the current
month when null.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
patches(DVShorebirdPatchTarget target)
→ List<DVShorebirdPatch>
-
Every patch published for
target, oldest first.
-
publish(DVShorebirdPatchTarget target, {required List<int> diff, required String patchedHash, String channel = 'stable', String? hashSignature, int rolloutPercent = 100})
→ DVShorebirdPatch
-
Stores
diff as the next patch for target.
-
recordEvent(Map<String, Object?> body)
→ DVShorebirdPatchInstall?
-
Reads the updater's
{"event": {...}} and counts it when it is an
install not counted before. Returns the install counted, or null for
another event type or a repeat.
-
registerRelease({required String appId, required String releaseVersion, required String platform, String? patchPublicKey})
→ DVShorebirdRelease
-
Records a release, and the key its devices verify patches with. From
then on publish takes for it only patches signed by that key.
-
releaseRecord({required String appId, required String releaseVersion, required String platform})
→ DVShorebirdRelease?
-
The release registered for
appId releaseVersion on platform, or
null when none was.
-
respond(Request request, {String prefix = ''})
→ Future<Response?>
-
Serves the check, downloads, events, publishing and rollback under
prefix, in the Request and Response shape a Dartvel server answers
in. Null, having read nothing, for a request that is none of them, so
the application answers it.
-
rollBack(DVShorebirdPatchTarget target, int number)
→ void
-
Marks patch
number of target rolled back. Devices running it drop it
at their next check.
-
rollBackRelease({required String appId, required String releaseVersion, required String platform, required int number})
→ List<String>
-
Rolls back patch
number on every architecture of the release that has
it, and returns those architectures. Throws StateError when none does.
-
rolloutRelease({required String appId, required String releaseVersion, required String platform, required int number, required int percent})
→ List<String>
-
Sets patch
number's rollout to percent on every architecture of the
release that has it, and returns those architectures.
-
setRollout(DVShorebirdPatchTarget target, int number, int percent)
→ void
-
Sets the share of devices patch
number of target is offered to.
-
toString()
→ String
-
A string representation of this object.
inherited
Constants
-
installEventType
→ const String
-
The event type the updater reports a booted patch with
(
library/src/events.rs in shorebirdtech/updater). Failures, downloads
and update failures are reported under other types and are not
installs.
-
ledgerName
→ const String
-
The name under root the install ledger is kept in, which is therefore
not an app id.