WebhookConfig class
Enhanced configuration for webhook fetcher with built-in server support.
- Inheritance
-
- Object
- FetcherConfig
- WebhookConfig
Constructors
-
WebhookConfig({String? webhookUrl, bool useBuiltInServer = false, int? port, String? bindAddress, String webhookPath = '/webhook', String? healthCheckPath, bool corsEnabled = false, InputFile? certificate, String? ipAddress, int? maxConnections, String? secretToken, bool deleteWebhookOnStop = false, List<
UpdateType> ? allowedUpdates, bool dropPendingUpdates = false, int maxConcurrentUpdates = 10}) -
Creates a new webhook configuration.
const
-
WebhookConfig.custom({String? webhookUrl, String? secretToken, List<
UpdateType> ? allowedUpdates, bool dropPendingUpdates = false, int maxConcurrentUpdates = 20}) -
Creates a configuration for custom web server integration.
const
-
WebhookConfig.ngrok(String ngrokUrl, {String path = '/webhook', int port = 8080, List<
UpdateType> ? allowedUpdates, bool dropPendingUpdates = true, int maxConcurrentUpdates = 5}) - Creates a configuration for development with ngrok.
-
WebhookConfig.production({required String webhookUrl, required int port, required String secretToken, String webhookPath = '/webhook', String? healthCheckPath = '/health', bool corsEnabled = false, String? bindAddress, int maxConnections = 40, List<
UpdateType> ? allowedUpdates, bool dropPendingUpdates = false, int maxConcurrentUpdates = 50}) - Creates a configuration for production deployment with built-in server.
-
WebhookConfig.server({required String webhookUrl, required int port, String? secretToken, String webhookPath = '/webhook', String? healthCheckPath = '/health', bool corsEnabled = true, String? bindAddress, List<
UpdateType> ? allowedUpdates, bool dropPendingUpdates = false, int maxConcurrentUpdates = 20}) - Creates a configuration for the built-in server.
Properties
-
allowedUpdates
→ List<
UpdateType> ? -
The allowed update types to receive.
finalinherited
- bindAddress → String?
-
Address to bind the server to (default: '0.0.0.0').
final
- certificate → InputFile?
-
Certificate for self-signed HTTPS.
final
- corsEnabled → bool
-
Whether to enable CORS headers.
final
- deleteWebhookOnStop → bool
-
Whether to delete the webhook when the fetcher stops.
final
- dropPendingUpdates → bool
-
Whether to drop pending updates when starting.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- healthCheckPath → String?
-
Path for health check endpoint (optional).
final
- ipAddress → String?
-
Fixed IP address for webhook.
final
- maxConcurrentUpdates → int
-
Maximum number of updates to process concurrently.
finalinherited
- maxConnections → int?
-
Maximum allowed number of simultaneous HTTPS connections.
final
- port → int?
-
Port for the built-in HTTP server.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secretToken → String?
-
Secret token for webhook validation.
final
- useBuiltInServer → bool
-
Whether to use the built-in HTTP server.
final
- webhookPath → String
-
Path for webhook endpoint (default: '/webhook').
final
- webhookUrl → String?
-
The webhook URL to set with Telegram.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited