durbun_core library

Pure-Dart core of the Dürbün SDK (no Flutter imports): transport, wire protocol, logger, mock engine and the dart:io HTTP capture. Usable from command-line Dart programs (dart run) and from other HTTP adapters.

Flutter apps should use package:durbun/durbun.dart instead.

Classes

DurbunAction
A custom control shown for this app on the desktop (Device tab → app tools). The desktop invokes it through the commands capability.
DurbunActionOption
One choice of a DurbunAction.select action.
DurbunClient
DurbunConnection
State of the connection to the Dürbün desktop.
DurbunHttpClient
Wraps a dart:io HttpClient (the real one or whatever a previous HttpOverrides produced): every member is forwarded, requests are reported, mock rules are applied.
DurbunHttpOverrides
Installs DurbunHttpClient for every dart:io HttpClient() created on this isolate, chaining whatever overrides were there before.
DurbunHttpTuning
Tuning knobs (exposed for tests).
DurbunOptions
Configuration of the Dürbün SDK.
HttpCaptureHost
Recorder plus an internal zone for timers (provided by the SDK client).
MockAction
MockAction (flattened union; type is respond, delay or fail).
MockRule
MockRule.
NetworkRecorder
What the dart:io HTTP wrapper needs from the SDK client.
PendingBody
A captured body whose wire form (WireBody: UTF-8 vs base64, gzip/deflate decoding, truncation) is produced by the transport encoder, off the UI isolate when the background transport is used.
SdkConfig
SdkConfig pushed by the desktop in welcome and config messages.
ServerWelcome
ServerWelcome.

Enums

DurbunActionKind
Kind of an app action shown on the desktop.
DurbunLogLevel
Log levels, identical to the desktop's LogLevel.
DurbunPrintCapture
How print / debugPrint output is captured.

Constants

kDefaultSdkPort → const int
DEFAULT_PORTS.
kProtocolVersion → const int
PROTOCOL_VERSION.
kSdkName → const String
SDK identity sent in hello.sdk.
kSdkVersion → const String

Functions

findMockRule(List<MockRule> rules, String method, String url, [String? appId]) → MockRule?
First enabled matching rule (rules are ordered; first match wins).
mockRuleMatches(MockRule rule, String method, String url, [String? appId]) → bool
Reference matcher (identical semantics in every SDK):

Typedefs

DurbunCommandHandler = FutureOr<Object?> Function(Map<String, Object?> params)