DVWebhooksConfig class
dartvel.webhooks in pubspec.yaml.
dartvel:
webhooks:
format: cloudevents # dartvel (default) | cloudevents
mode: structured # cloudevents: structured (default) | binary
source: https://shop.example.com # cloudevents; default /<package>
signature: standard # dartvel (default) | standard
allowPrivateAddresses: false
retention: 30d
disableAfter: 20
maxAttempts: 5
Read through read twice, as dartvel.cache is: by the build, which
refuses a block it cannot honour, and by the generated server at startup,
so the two cannot disagree about a key.
Constructors
- DVWebhooksConfig({bool allowPrivateAddresses = false, Duration retention = const Duration(days: 30), int disableAfter = 20, int maxAttempts = 5, Duration backoff = const Duration(seconds: 30), int maxRedirects = 3, DVWebhookFormat format = DVWebhookFormat.dartvel, DVCloudEventMode cloudEventsMode = DVCloudEventMode.structured, String source = '/dartvel', DVWebhookSignatureScheme signature = DVWebhookSignatureScheme.dartvel})
-
const
Properties
- allowPrivateAddresses → bool
-
Deliver to private, loopback and link-local addresses. Only for a
deployment with no cloud metadata service to reach.
final
- backoff → Duration
-
Backoff between attempts, handed to the job layer.
final
- cloudEventsMode → DVCloudEventMode
-
How a CloudEvent is carried. Structured keeps every attribute inside
the signed body; binary puts them in
ce-headers the body signature does not cover.final - disableAfter → int
-
Consecutive failed attempts after which an endpoint is disabled.
final
- format → DVWebhookFormat
-
The envelope deliveries are written in when they are attempted, so a
change reaches deliveries still waiting as well as new ones.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAttempts → int
-
Attempts at one delivery before it is dead-lettered.
final
- maxRedirects → int
-
Redirects followed per attempt, each one checked like the endpoint.
final
- retention → Duration
-
How long a delivery's payload is kept. The record is kept for good.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signature → DVWebhookSignatureScheme
-
final
- source → String
-
The CloudEvents
source: a URI reference naming this application.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - The block read reads back as this configuration, for the generated server to carry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
read(
Object? block, {String? application}) → DVWebhooksConfig -
Reads
block, the value ofdartvel.webhooks; null is the defaults.