mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-22 00:47:28 -06:00
logging improvements
This commit is contained in:
parent
292664f3fe
commit
ef6ecdab79
@ -47,6 +47,19 @@ impl ApiTracingLayer {
|
||||
}
|
||||
}
|
||||
|
||||
fn simplify_file(file: &str) -> String {
|
||||
let path = std::path::Path::new(file);
|
||||
let path_component_count = path.iter().count();
|
||||
if path.ends_with("mod.rs") && path_component_count >= 2 {
|
||||
let outpath: std::path::PathBuf = path.iter().skip(path_component_count - 2).collect();
|
||||
outpath.to_string_lossy().to_string()
|
||||
} else if let Some(filename) = path.file_name() {
|
||||
filename.to_string_lossy().to_string()
|
||||
} else {
|
||||
file.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: Subscriber + for<'a> registry::LookupSpan<'a>> Layer<S> for ApiTracingLayer {
|
||||
fn on_new_span(
|
||||
&self,
|
||||
@ -86,15 +99,39 @@ impl<S: Subscriber + for<'a> registry::LookupSpan<'a>> Layer<S> for ApiTracingLa
|
||||
let mut recorder = StringRecorder::new();
|
||||
event.record(&mut recorder);
|
||||
let meta = event.metadata();
|
||||
let level = meta.level();
|
||||
let log_level = VeilidLogLevel::from_tracing_level(*level);
|
||||
let level = *meta.level();
|
||||
let target = meta.target();
|
||||
let log_level = VeilidLogLevel::from_tracing_level(level);
|
||||
|
||||
let origin = meta
|
||||
.file()
|
||||
.and_then(|file| meta.line().map(|ln| format!("{}:{}", file, ln)))
|
||||
.unwrap_or_default();
|
||||
let origin = match level {
|
||||
Level::ERROR | Level::WARN => meta
|
||||
.file()
|
||||
.and_then(|file| {
|
||||
meta.line()
|
||||
.map(|ln| format!("{}:{}", simplify_file(file), ln))
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
Level::INFO => "".to_owned(),
|
||||
Level::DEBUG | Level::TRACE => meta
|
||||
.file()
|
||||
.and_then(|file| {
|
||||
meta.line().map(|ln| {
|
||||
format!(
|
||||
"{}{}:{}",
|
||||
if target.is_empty() {
|
||||
"".to_owned()
|
||||
} else {
|
||||
format!("[{}]", target)
|
||||
},
|
||||
simplify_file(file),
|
||||
ln
|
||||
)
|
||||
})
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
};
|
||||
|
||||
let message = format!("{} {}", origin, recorder);
|
||||
let message = format!("{}{}", origin, recorder).trim().to_owned();
|
||||
|
||||
let backtrace = if log_level <= VeilidLogLevel::Error {
|
||||
let bt = backtrace::Backtrace::new();
|
||||
|
@ -373,7 +373,7 @@ impl RPCProcessor {
|
||||
|
||||
#[instrument(level = "debug", skip_all, err)]
|
||||
pub async fn startup(&self) -> EyreResult<()> {
|
||||
debug!("startup rpc processor");
|
||||
log_rpc!(debug "startup rpc processor");
|
||||
{
|
||||
let mut inner = self.inner.lock();
|
||||
|
||||
@ -382,7 +382,7 @@ impl RPCProcessor {
|
||||
inner.stop_source = Some(StopSource::new());
|
||||
|
||||
// spin up N workers
|
||||
trace!(
|
||||
log_rpc!(
|
||||
"Spinning up {} RPC workers",
|
||||
self.unlocked_inner.concurrency
|
||||
);
|
||||
@ -408,7 +408,7 @@ impl RPCProcessor {
|
||||
|
||||
#[instrument(level = "debug", skip_all)]
|
||||
pub async fn shutdown(&self) {
|
||||
debug!("starting rpc processor shutdown");
|
||||
log_rpc!(debug "starting rpc processor shutdown");
|
||||
|
||||
// Stop storage manager from using us
|
||||
self.storage_manager.set_rpc_processor(None).await;
|
||||
@ -424,17 +424,17 @@ impl RPCProcessor {
|
||||
// drop the stop
|
||||
drop(inner.stop_source.take());
|
||||
}
|
||||
debug!("stopping {} rpc worker tasks", unord.len());
|
||||
log_rpc!(debug "stopping {} rpc worker tasks", unord.len());
|
||||
|
||||
// Wait for them to complete
|
||||
while unord.next().await.is_some() {}
|
||||
|
||||
debug!("resetting rpc processor state");
|
||||
log_rpc!(debug "resetting rpc processor state");
|
||||
|
||||
// Release the rpc processor
|
||||
*self.inner.lock() = Self::new_inner();
|
||||
|
||||
debug!("finished rpc processor shutdown");
|
||||
log_rpc!(debug "finished rpc processor shutdown");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -41,6 +41,8 @@ pub struct VeilidAPI {
|
||||
impl VeilidAPI {
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all)]
|
||||
pub(crate) fn new(context: VeilidCoreContext) -> Self {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::new()");
|
||||
Self {
|
||||
inner: Arc::new(Mutex::new(VeilidAPIInner {
|
||||
context: Some(context),
|
||||
@ -51,6 +53,8 @@ impl VeilidAPI {
|
||||
/// Shut down Veilid and terminate the API
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all)]
|
||||
pub async fn shutdown(self) {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::shutdown()");
|
||||
let context = { self.inner.lock().context.take() };
|
||||
if let Some(context) = context {
|
||||
api_shutdown(context).await;
|
||||
@ -168,8 +172,11 @@ impl VeilidAPI {
|
||||
}
|
||||
|
||||
/// Connect to the network
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all)]
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all, ret, err)]
|
||||
pub async fn attach(&self) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::attach()");
|
||||
|
||||
let attachment_manager = self.attachment_manager()?;
|
||||
if !attachment_manager.attach().await {
|
||||
apibail_generic!("Already attached");
|
||||
@ -178,8 +185,11 @@ impl VeilidAPI {
|
||||
}
|
||||
|
||||
/// Disconnect from the network
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all)]
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all, ret, err)]
|
||||
pub async fn detach(&self) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::detach()");
|
||||
|
||||
let attachment_manager = self.attachment_manager()?;
|
||||
if !attachment_manager.detach().await {
|
||||
apibail_generic!("Already detached");
|
||||
@ -193,6 +203,9 @@ impl VeilidAPI {
|
||||
/// Get a new `RoutingContext` object to use to send messages over the Veilid network.
|
||||
#[instrument(target = "veilid_api", level = "debug", skip_all, err, ret)]
|
||||
pub fn routing_context(&self) -> VeilidAPIResult<RoutingContext> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::routing_context()");
|
||||
|
||||
RoutingContext::try_new(self.clone())
|
||||
}
|
||||
|
||||
@ -207,6 +220,9 @@ impl VeilidAPI {
|
||||
pub async fn parse_as_target<S: ToString>(&self, s: S) -> VeilidAPIResult<Target> {
|
||||
let s = s.to_string();
|
||||
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::parse_as_target(s: {:?})", s);
|
||||
|
||||
// Is this a route id?
|
||||
if let Ok(rrid) = RouteId::from_str(&s) {
|
||||
let routing_table = self.routing_table()?;
|
||||
@ -258,6 +274,12 @@ impl VeilidAPI {
|
||||
stability: Stability,
|
||||
sequencing: Sequencing,
|
||||
) -> VeilidAPIResult<(RouteId, Vec<u8>)> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::new_custom_private_route(crypto_kinds: {:?}, stability: {:?}, sequencing: {:?})",
|
||||
crypto_kinds,
|
||||
stability,
|
||||
sequencing);
|
||||
|
||||
for kind in crypto_kinds {
|
||||
Crypto::validate_crypto_kind(*kind)?;
|
||||
}
|
||||
@ -301,6 +323,8 @@ impl VeilidAPI {
|
||||
/// Returns a route id that can be used to send private messages to the node creating this route.
|
||||
#[instrument(target = "veilid_api", level = "debug", skip(self), ret, err)]
|
||||
pub fn import_remote_private_route(&self, blob: Vec<u8>) -> VeilidAPIResult<RouteId> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::import_remote_private_route(blob: {:?})", blob);
|
||||
let rss = self.routing_table()?.route_spec_store();
|
||||
rss.import_remote_private_route_blob(blob)
|
||||
}
|
||||
@ -311,6 +335,8 @@ impl VeilidAPI {
|
||||
/// or received from.
|
||||
#[instrument(target = "veilid_api", level = "debug", skip(self), ret, err)]
|
||||
pub fn release_private_route(&self, route_id: RouteId) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::release_private_route(route_id: {:?})", route_id);
|
||||
let rss = self.routing_table()?.route_spec_store();
|
||||
if !rss.release_route(route_id) {
|
||||
apibail_invalid_argument!("release_private_route", "key", route_id);
|
||||
@ -331,6 +357,9 @@ impl VeilidAPI {
|
||||
call_id: OperationId,
|
||||
message: Vec<u8>,
|
||||
) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"VeilidAPI::app_call_reply(call_id: {:?}, message: {:?})", call_id, message);
|
||||
|
||||
let rpc_processor = self.rpc_processor()?;
|
||||
rpc_processor
|
||||
.app_call_reply(call_id, message)
|
||||
|
@ -74,6 +74,9 @@ impl RoutingContext {
|
||||
/// To customize the safety selection in use, use [RoutingContext::with_safety()].
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
pub fn with_default_safety(self) -> VeilidAPIResult<Self> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::with_default_safety(self: {:?})", self);
|
||||
|
||||
let config = self.api.config()?;
|
||||
let c = config.get();
|
||||
|
||||
@ -88,6 +91,9 @@ impl RoutingContext {
|
||||
/// Use a custom [SafetySelection]. Can be used to disable safety via [SafetySelection::Unsafe]
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
pub fn with_safety(self, safety_selection: SafetySelection) -> VeilidAPIResult<Self> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::with_safety(self: {:?}, safety_selection: {:?})", self, safety_selection);
|
||||
|
||||
Ok(Self {
|
||||
api: self.api.clone(),
|
||||
inner: Arc::new(Mutex::new(RoutingContextInner {})),
|
||||
@ -98,6 +104,9 @@ impl RoutingContext {
|
||||
/// Use a specified [Sequencing] preference, with or without privacy
|
||||
#[instrument(target = "veilid_api", level = "debug", ret)]
|
||||
pub fn with_sequencing(self, sequencing: Sequencing) -> Self {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::with_sequencing(self: {:?}, sequencing: {:?})", self, sequencing);
|
||||
|
||||
Self {
|
||||
api: self.api.clone(),
|
||||
inner: Arc::new(Mutex::new(RoutingContextInner {})),
|
||||
@ -134,6 +143,9 @@ impl RoutingContext {
|
||||
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
async fn get_destination(&self, target: Target) -> VeilidAPIResult<rpc_processor::Destination> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::get_destination(self: {:?}, target: {:?})", self, target);
|
||||
|
||||
let rpc_processor = self.api.rpc_processor()?;
|
||||
rpc_processor
|
||||
.resolve_target_to_destination(target, self.unlocked_inner.safety_selection)
|
||||
@ -154,6 +166,9 @@ impl RoutingContext {
|
||||
/// Returns an answer blob of up to 32768 bytes
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
pub async fn app_call(&self, target: Target, message: Vec<u8>) -> VeilidAPIResult<Vec<u8>> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::app_call(self: {:?}, target: {:?}, message: {:?})", self, target, message);
|
||||
|
||||
let rpc_processor = self.api.rpc_processor()?;
|
||||
|
||||
// Get destination
|
||||
@ -185,6 +200,9 @@ impl RoutingContext {
|
||||
/// * `message` - an arbitrary message blob of up to 32768 bytes
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
pub async fn app_message(&self, target: Target, message: Vec<u8>) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::app_message(self: {:?}, target: {:?}, message: {:?})", self, target, message);
|
||||
|
||||
let rpc_processor = self.api.rpc_processor()?;
|
||||
|
||||
// Get destination
|
||||
@ -221,6 +239,9 @@ impl RoutingContext {
|
||||
schema: DHTSchema,
|
||||
kind: Option<CryptoKind>,
|
||||
) -> VeilidAPIResult<DHTRecordDescriptor> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::create_dht_record(self: {:?}, schema: {:?}, kind: {:?})", self, schema, kind);
|
||||
|
||||
let kind = kind.unwrap_or(best_crypto_kind());
|
||||
Crypto::validate_crypto_kind(kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
@ -246,6 +267,9 @@ impl RoutingContext {
|
||||
key: TypedKey,
|
||||
default_writer: Option<KeyPair>,
|
||||
) -> VeilidAPIResult<DHTRecordDescriptor> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::open_dht_record(self: {:?}, key: {:?}, default_writer: {:?})", self, key, default_writer);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager
|
||||
@ -258,6 +282,9 @@ impl RoutingContext {
|
||||
/// Closing a record allows you to re-open it with a different routing context
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
pub async fn close_dht_record(&self, key: TypedKey) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::close_dht_record(self: {:?}, key: {:?})", self, key);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager.close_record(key).await
|
||||
@ -270,6 +297,9 @@ impl RoutingContext {
|
||||
/// locally, and will prevent its value from being refreshed on the network by this node.
|
||||
#[instrument(target = "veilid_api", level = "debug", ret, err)]
|
||||
pub async fn delete_dht_record(&self, key: TypedKey) -> VeilidAPIResult<()> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::delete_dht_record(self: {:?}, key: {:?})", self, key);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager.delete_record(key).await
|
||||
@ -288,6 +318,9 @@ impl RoutingContext {
|
||||
subkey: ValueSubkey,
|
||||
force_refresh: bool,
|
||||
) -> VeilidAPIResult<Option<ValueData>> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::get_dht_value(self: {:?}, key: {:?}, subkey: {:?}, force_refresh: {:?})", self, key, subkey, force_refresh);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager.get_value(key, subkey, force_refresh).await
|
||||
@ -308,6 +341,9 @@ impl RoutingContext {
|
||||
data: Vec<u8>,
|
||||
writer: Option<KeyPair>,
|
||||
) -> VeilidAPIResult<Option<ValueData>> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::set_dht_value(self: {:?}, key: {:?}, subkey: {:?}, data: {:?}, writer: {:?})", self, key, subkey, data, writer);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager.set_value(key, subkey, data, writer).await
|
||||
@ -340,6 +376,9 @@ impl RoutingContext {
|
||||
expiration: Timestamp,
|
||||
count: u32,
|
||||
) -> VeilidAPIResult<Timestamp> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::watch_dht_values(self: {:?}, key: {:?}, subkeys: {:?}, expiration: {:?}, count: {:?})", self, key, subkeys, expiration, count);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager
|
||||
@ -358,6 +397,9 @@ impl RoutingContext {
|
||||
key: TypedKey,
|
||||
subkeys: ValueSubkeyRangeSet,
|
||||
) -> VeilidAPIResult<bool> {
|
||||
event!(target: "veilid_api", Level::DEBUG,
|
||||
"RoutingContext::cancel_dht_watch(self: {:?}, key: {:?}, subkeys: {:?}", self, key, subkeys);
|
||||
|
||||
Crypto::validate_crypto_kind(key.kind)?;
|
||||
let storage_manager = self.api.storage_manager()?;
|
||||
storage_manager.cancel_watch_values(key, subkeys).await
|
||||
|
@ -16,13 +16,25 @@ pub struct VeilidLayerFilter {
|
||||
impl VeilidLayerFilter {
|
||||
pub fn new(
|
||||
max_level: VeilidConfigLogLevel,
|
||||
ignore_list: Option<Vec<String>>,
|
||||
ignore_log_targets: &[String],
|
||||
) -> VeilidLayerFilter {
|
||||
let mut ignore_list = DEFAULT_LOG_IGNORE_LIST.map(|x| x.to_owned()).to_vec();
|
||||
for igedit in ignore_log_targets {
|
||||
if let Some(rest) = igedit.strip_prefix('-') {
|
||||
for i in 0..ignore_list.len() {
|
||||
if ignore_list[i] == rest {
|
||||
ignore_list.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ignore_list.push(igedit.clone());
|
||||
}
|
||||
}
|
||||
Self {
|
||||
inner: Arc::new(RwLock::new(VeilidLayerFilterInner {
|
||||
max_level: max_level.to_tracing_level_filter(),
|
||||
ignore_list: ignore_list
|
||||
.unwrap_or_else(|| DEFAULT_LOG_IGNORE_LIST.map(|x| x.to_owned()).to_vec()),
|
||||
ignore_list,
|
||||
})),
|
||||
}
|
||||
}
|
||||
|
@ -11,24 +11,30 @@ void veilidInit() {
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
logsInTimings: true,
|
||||
logsInConsole: false),
|
||||
logsInConsole: false,
|
||||
ignoreLogTargets: []),
|
||||
api: VeilidWASMConfigLoggingApi(
|
||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.info,
|
||||
ignoreLogTargets: [])));
|
||||
Veilid.instance.initializeVeilidCore(platformConfig.toJson());
|
||||
} else {
|
||||
var platformConfig = const VeilidFFIConfig(
|
||||
logging: VeilidFFIConfigLogging(
|
||||
terminal: VeilidFFIConfigLoggingTerminal(
|
||||
enabled: false,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
),
|
||||
enabled: false,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
ignoreLogTargets: []),
|
||||
otlp: VeilidFFIConfigLoggingOtlp(
|
||||
enabled: false,
|
||||
level: VeilidConfigLogLevel.trace,
|
||||
grpcEndpoint: "localhost:4317",
|
||||
serviceName: "VeilidExample"),
|
||||
serviceName: "VeilidExample",
|
||||
ignoreLogTargets: []),
|
||||
api: VeilidFFIConfigLoggingApi(
|
||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.info,
|
||||
ignoreLogTargets: [])));
|
||||
Veilid.instance.initializeVeilidCore(platformConfig.toJson());
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ part of 'routing_context.dart';
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
DHTSchema _$DHTSchemaFromJson(Map<String, dynamic> json) {
|
||||
switch (json['kind']) {
|
||||
@ -107,22 +107,22 @@ class _$DHTSchemaCopyWithImpl<$Res, $Val extends DHTSchema>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DHTSchemaDFLTCopyWith<$Res>
|
||||
abstract class _$$DHTSchemaDFLTImplCopyWith<$Res>
|
||||
implements $DHTSchemaCopyWith<$Res> {
|
||||
factory _$$DHTSchemaDFLTCopyWith(
|
||||
_$DHTSchemaDFLT value, $Res Function(_$DHTSchemaDFLT) then) =
|
||||
__$$DHTSchemaDFLTCopyWithImpl<$Res>;
|
||||
factory _$$DHTSchemaDFLTImplCopyWith(
|
||||
_$DHTSchemaDFLTImpl value, $Res Function(_$DHTSchemaDFLTImpl) then) =
|
||||
__$$DHTSchemaDFLTImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int oCnt});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DHTSchemaDFLTCopyWithImpl<$Res>
|
||||
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaDFLT>
|
||||
implements _$$DHTSchemaDFLTCopyWith<$Res> {
|
||||
__$$DHTSchemaDFLTCopyWithImpl(
|
||||
_$DHTSchemaDFLT _value, $Res Function(_$DHTSchemaDFLT) _then)
|
||||
class __$$DHTSchemaDFLTImplCopyWithImpl<$Res>
|
||||
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaDFLTImpl>
|
||||
implements _$$DHTSchemaDFLTImplCopyWith<$Res> {
|
||||
__$$DHTSchemaDFLTImplCopyWithImpl(
|
||||
_$DHTSchemaDFLTImpl _value, $Res Function(_$DHTSchemaDFLTImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -130,7 +130,7 @@ class __$$DHTSchemaDFLTCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? oCnt = null,
|
||||
}) {
|
||||
return _then(_$DHTSchemaDFLT(
|
||||
return _then(_$DHTSchemaDFLTImpl(
|
||||
oCnt: null == oCnt
|
||||
? _value.oCnt
|
||||
: oCnt // ignore: cast_nullable_to_non_nullable
|
||||
@ -141,12 +141,12 @@ class __$$DHTSchemaDFLTCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DHTSchemaDFLT implements DHTSchemaDFLT {
|
||||
const _$DHTSchemaDFLT({required this.oCnt, final String? $type})
|
||||
class _$DHTSchemaDFLTImpl implements DHTSchemaDFLT {
|
||||
const _$DHTSchemaDFLTImpl({required this.oCnt, final String? $type})
|
||||
: $type = $type ?? 'DFLT';
|
||||
|
||||
factory _$DHTSchemaDFLT.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DHTSchemaDFLTFromJson(json);
|
||||
factory _$DHTSchemaDFLTImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DHTSchemaDFLTImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int oCnt;
|
||||
@ -160,10 +160,10 @@ class _$DHTSchemaDFLT implements DHTSchemaDFLT {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DHTSchemaDFLT &&
|
||||
other is _$DHTSchemaDFLTImpl &&
|
||||
(identical(other.oCnt, oCnt) || other.oCnt == oCnt));
|
||||
}
|
||||
|
||||
@ -174,8 +174,8 @@ class _$DHTSchemaDFLT implements DHTSchemaDFLT {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DHTSchemaDFLTCopyWith<_$DHTSchemaDFLT> get copyWith =>
|
||||
__$$DHTSchemaDFLTCopyWithImpl<_$DHTSchemaDFLT>(this, _$identity);
|
||||
_$$DHTSchemaDFLTImplCopyWith<_$DHTSchemaDFLTImpl> get copyWith =>
|
||||
__$$DHTSchemaDFLTImplCopyWithImpl<_$DHTSchemaDFLTImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@ -241,43 +241,43 @@ class _$DHTSchemaDFLT implements DHTSchemaDFLT {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$DHTSchemaDFLTToJson(
|
||||
return _$$DHTSchemaDFLTImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class DHTSchemaDFLT implements DHTSchema {
|
||||
const factory DHTSchemaDFLT({required final int oCnt}) = _$DHTSchemaDFLT;
|
||||
const factory DHTSchemaDFLT({required final int oCnt}) = _$DHTSchemaDFLTImpl;
|
||||
|
||||
factory DHTSchemaDFLT.fromJson(Map<String, dynamic> json) =
|
||||
_$DHTSchemaDFLT.fromJson;
|
||||
_$DHTSchemaDFLTImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get oCnt;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$DHTSchemaDFLTCopyWith<_$DHTSchemaDFLT> get copyWith =>
|
||||
_$$DHTSchemaDFLTImplCopyWith<_$DHTSchemaDFLTImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DHTSchemaSMPLCopyWith<$Res>
|
||||
abstract class _$$DHTSchemaSMPLImplCopyWith<$Res>
|
||||
implements $DHTSchemaCopyWith<$Res> {
|
||||
factory _$$DHTSchemaSMPLCopyWith(
|
||||
_$DHTSchemaSMPL value, $Res Function(_$DHTSchemaSMPL) then) =
|
||||
__$$DHTSchemaSMPLCopyWithImpl<$Res>;
|
||||
factory _$$DHTSchemaSMPLImplCopyWith(
|
||||
_$DHTSchemaSMPLImpl value, $Res Function(_$DHTSchemaSMPLImpl) then) =
|
||||
__$$DHTSchemaSMPLImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int oCnt, List<DHTSchemaMember> members});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DHTSchemaSMPLCopyWithImpl<$Res>
|
||||
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaSMPL>
|
||||
implements _$$DHTSchemaSMPLCopyWith<$Res> {
|
||||
__$$DHTSchemaSMPLCopyWithImpl(
|
||||
_$DHTSchemaSMPL _value, $Res Function(_$DHTSchemaSMPL) _then)
|
||||
class __$$DHTSchemaSMPLImplCopyWithImpl<$Res>
|
||||
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaSMPLImpl>
|
||||
implements _$$DHTSchemaSMPLImplCopyWith<$Res> {
|
||||
__$$DHTSchemaSMPLImplCopyWithImpl(
|
||||
_$DHTSchemaSMPLImpl _value, $Res Function(_$DHTSchemaSMPLImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -286,7 +286,7 @@ class __$$DHTSchemaSMPLCopyWithImpl<$Res>
|
||||
Object? oCnt = null,
|
||||
Object? members = null,
|
||||
}) {
|
||||
return _then(_$DHTSchemaSMPL(
|
||||
return _then(_$DHTSchemaSMPLImpl(
|
||||
oCnt: null == oCnt
|
||||
? _value.oCnt
|
||||
: oCnt // ignore: cast_nullable_to_non_nullable
|
||||
@ -301,16 +301,16 @@ class __$$DHTSchemaSMPLCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DHTSchemaSMPL implements DHTSchemaSMPL {
|
||||
const _$DHTSchemaSMPL(
|
||||
class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL {
|
||||
const _$DHTSchemaSMPLImpl(
|
||||
{required this.oCnt,
|
||||
required final List<DHTSchemaMember> members,
|
||||
final String? $type})
|
||||
: _members = members,
|
||||
$type = $type ?? 'SMPL';
|
||||
|
||||
factory _$DHTSchemaSMPL.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DHTSchemaSMPLFromJson(json);
|
||||
factory _$DHTSchemaSMPLImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DHTSchemaSMPLImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int oCnt;
|
||||
@ -331,10 +331,10 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DHTSchemaSMPL &&
|
||||
other is _$DHTSchemaSMPLImpl &&
|
||||
(identical(other.oCnt, oCnt) || other.oCnt == oCnt) &&
|
||||
const DeepCollectionEquality().equals(other._members, _members));
|
||||
}
|
||||
@ -347,8 +347,8 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DHTSchemaSMPLCopyWith<_$DHTSchemaSMPL> get copyWith =>
|
||||
__$$DHTSchemaSMPLCopyWithImpl<_$DHTSchemaSMPL>(this, _$identity);
|
||||
_$$DHTSchemaSMPLImplCopyWith<_$DHTSchemaSMPLImpl> get copyWith =>
|
||||
__$$DHTSchemaSMPLImplCopyWithImpl<_$DHTSchemaSMPLImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@ -414,7 +414,7 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$DHTSchemaSMPLToJson(
|
||||
return _$$DHTSchemaSMPLImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@ -423,17 +423,17 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
|
||||
abstract class DHTSchemaSMPL implements DHTSchema {
|
||||
const factory DHTSchemaSMPL(
|
||||
{required final int oCnt,
|
||||
required final List<DHTSchemaMember> members}) = _$DHTSchemaSMPL;
|
||||
required final List<DHTSchemaMember> members}) = _$DHTSchemaSMPLImpl;
|
||||
|
||||
factory DHTSchemaSMPL.fromJson(Map<String, dynamic> json) =
|
||||
_$DHTSchemaSMPL.fromJson;
|
||||
_$DHTSchemaSMPLImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get oCnt;
|
||||
List<DHTSchemaMember> get members;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$DHTSchemaSMPLCopyWith<_$DHTSchemaSMPL> get copyWith =>
|
||||
_$$DHTSchemaSMPLImplCopyWith<_$DHTSchemaSMPLImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@ -491,22 +491,22 @@ class _$DHTSchemaMemberCopyWithImpl<$Res, $Val extends DHTSchemaMember>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$_DHTSchemaMemberCopyWith<$Res>
|
||||
abstract class _$$DHTSchemaMemberImplCopyWith<$Res>
|
||||
implements $DHTSchemaMemberCopyWith<$Res> {
|
||||
factory _$$_DHTSchemaMemberCopyWith(
|
||||
_$_DHTSchemaMember value, $Res Function(_$_DHTSchemaMember) then) =
|
||||
__$$_DHTSchemaMemberCopyWithImpl<$Res>;
|
||||
factory _$$DHTSchemaMemberImplCopyWith(_$DHTSchemaMemberImpl value,
|
||||
$Res Function(_$DHTSchemaMemberImpl) then) =
|
||||
__$$DHTSchemaMemberImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({FixedEncodedString43 mKey, int mCnt});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$_DHTSchemaMemberCopyWithImpl<$Res>
|
||||
extends _$DHTSchemaMemberCopyWithImpl<$Res, _$_DHTSchemaMember>
|
||||
implements _$$_DHTSchemaMemberCopyWith<$Res> {
|
||||
__$$_DHTSchemaMemberCopyWithImpl(
|
||||
_$_DHTSchemaMember _value, $Res Function(_$_DHTSchemaMember) _then)
|
||||
class __$$DHTSchemaMemberImplCopyWithImpl<$Res>
|
||||
extends _$DHTSchemaMemberCopyWithImpl<$Res, _$DHTSchemaMemberImpl>
|
||||
implements _$$DHTSchemaMemberImplCopyWith<$Res> {
|
||||
__$$DHTSchemaMemberImplCopyWithImpl(
|
||||
_$DHTSchemaMemberImpl _value, $Res Function(_$DHTSchemaMemberImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -515,7 +515,7 @@ class __$$_DHTSchemaMemberCopyWithImpl<$Res>
|
||||
Object? mKey = null,
|
||||
Object? mCnt = null,
|
||||
}) {
|
||||
return _then(_$_DHTSchemaMember(
|
||||
return _then(_$DHTSchemaMemberImpl(
|
||||
mKey: null == mKey
|
||||
? _value.mKey
|
||||
: mKey // ignore: cast_nullable_to_non_nullable
|
||||
@ -530,12 +530,12 @@ class __$$_DHTSchemaMemberCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$_DHTSchemaMember implements _DHTSchemaMember {
|
||||
const _$_DHTSchemaMember({required this.mKey, required this.mCnt})
|
||||
class _$DHTSchemaMemberImpl implements _DHTSchemaMember {
|
||||
const _$DHTSchemaMemberImpl({required this.mKey, required this.mCnt})
|
||||
: assert(mCnt > 0 && mCnt <= 65535, 'value out of range');
|
||||
|
||||
factory _$_DHTSchemaMember.fromJson(Map<String, dynamic> json) =>
|
||||
_$$_DHTSchemaMemberFromJson(json);
|
||||
factory _$DHTSchemaMemberImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DHTSchemaMemberImplFromJson(json);
|
||||
|
||||
@override
|
||||
final FixedEncodedString43 mKey;
|
||||
@ -548,10 +548,10 @@ class _$_DHTSchemaMember implements _DHTSchemaMember {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_DHTSchemaMember &&
|
||||
other is _$DHTSchemaMemberImpl &&
|
||||
(identical(other.mKey, mKey) || other.mKey == mKey) &&
|
||||
(identical(other.mCnt, mCnt) || other.mCnt == mCnt));
|
||||
}
|
||||
@ -563,12 +563,13 @@ class _$_DHTSchemaMember implements _DHTSchemaMember {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$_DHTSchemaMemberCopyWith<_$_DHTSchemaMember> get copyWith =>
|
||||
__$$_DHTSchemaMemberCopyWithImpl<_$_DHTSchemaMember>(this, _$identity);
|
||||
_$$DHTSchemaMemberImplCopyWith<_$DHTSchemaMemberImpl> get copyWith =>
|
||||
__$$DHTSchemaMemberImplCopyWithImpl<_$DHTSchemaMemberImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$_DHTSchemaMemberToJson(
|
||||
return _$$DHTSchemaMemberImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@ -577,10 +578,10 @@ class _$_DHTSchemaMember implements _DHTSchemaMember {
|
||||
abstract class _DHTSchemaMember implements DHTSchemaMember {
|
||||
const factory _DHTSchemaMember(
|
||||
{required final FixedEncodedString43 mKey,
|
||||
required final int mCnt}) = _$_DHTSchemaMember;
|
||||
required final int mCnt}) = _$DHTSchemaMemberImpl;
|
||||
|
||||
factory _DHTSchemaMember.fromJson(Map<String, dynamic> json) =
|
||||
_$_DHTSchemaMember.fromJson;
|
||||
_$DHTSchemaMemberImpl.fromJson;
|
||||
|
||||
@override
|
||||
FixedEncodedString43 get mKey;
|
||||
@ -588,7 +589,7 @@ abstract class _DHTSchemaMember implements DHTSchemaMember {
|
||||
int get mCnt;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$_DHTSchemaMemberCopyWith<_$_DHTSchemaMember> get copyWith =>
|
||||
_$$DHTSchemaMemberImplCopyWith<_$DHTSchemaMemberImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@ -672,11 +673,11 @@ class _$DHTRecordDescriptorCopyWithImpl<$Res, $Val extends DHTRecordDescriptor>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$_DHTRecordDescriptorCopyWith<$Res>
|
||||
abstract class _$$DHTRecordDescriptorImplCopyWith<$Res>
|
||||
implements $DHTRecordDescriptorCopyWith<$Res> {
|
||||
factory _$$_DHTRecordDescriptorCopyWith(_$_DHTRecordDescriptor value,
|
||||
$Res Function(_$_DHTRecordDescriptor) then) =
|
||||
__$$_DHTRecordDescriptorCopyWithImpl<$Res>;
|
||||
factory _$$DHTRecordDescriptorImplCopyWith(_$DHTRecordDescriptorImpl value,
|
||||
$Res Function(_$DHTRecordDescriptorImpl) then) =
|
||||
__$$DHTRecordDescriptorImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@ -690,11 +691,11 @@ abstract class _$$_DHTRecordDescriptorCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
|
||||
extends _$DHTRecordDescriptorCopyWithImpl<$Res, _$_DHTRecordDescriptor>
|
||||
implements _$$_DHTRecordDescriptorCopyWith<$Res> {
|
||||
__$$_DHTRecordDescriptorCopyWithImpl(_$_DHTRecordDescriptor _value,
|
||||
$Res Function(_$_DHTRecordDescriptor) _then)
|
||||
class __$$DHTRecordDescriptorImplCopyWithImpl<$Res>
|
||||
extends _$DHTRecordDescriptorCopyWithImpl<$Res, _$DHTRecordDescriptorImpl>
|
||||
implements _$$DHTRecordDescriptorImplCopyWith<$Res> {
|
||||
__$$DHTRecordDescriptorImplCopyWithImpl(_$DHTRecordDescriptorImpl _value,
|
||||
$Res Function(_$DHTRecordDescriptorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -705,7 +706,7 @@ class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
|
||||
Object? schema = null,
|
||||
Object? ownerSecret = freezed,
|
||||
}) {
|
||||
return _then(_$_DHTRecordDescriptor(
|
||||
return _then(_$DHTRecordDescriptorImpl(
|
||||
key: null == key
|
||||
? _value.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
@ -728,15 +729,15 @@ class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
|
||||
const _$_DHTRecordDescriptor(
|
||||
class _$DHTRecordDescriptorImpl implements _DHTRecordDescriptor {
|
||||
const _$DHTRecordDescriptorImpl(
|
||||
{required this.key,
|
||||
required this.owner,
|
||||
required this.schema,
|
||||
this.ownerSecret});
|
||||
|
||||
factory _$_DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =>
|
||||
_$$_DHTRecordDescriptorFromJson(json);
|
||||
factory _$DHTRecordDescriptorImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DHTRecordDescriptorImplFromJson(json);
|
||||
|
||||
@override
|
||||
final Typed<FixedEncodedString43> key;
|
||||
@ -753,10 +754,10 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_DHTRecordDescriptor &&
|
||||
other is _$DHTRecordDescriptorImpl &&
|
||||
(identical(other.key, key) || other.key == key) &&
|
||||
(identical(other.owner, owner) || other.owner == owner) &&
|
||||
(identical(other.schema, schema) || other.schema == schema) &&
|
||||
@ -771,13 +772,13 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
|
||||
__$$_DHTRecordDescriptorCopyWithImpl<_$_DHTRecordDescriptor>(
|
||||
_$$DHTRecordDescriptorImplCopyWith<_$DHTRecordDescriptorImpl> get copyWith =>
|
||||
__$$DHTRecordDescriptorImplCopyWithImpl<_$DHTRecordDescriptorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$_DHTRecordDescriptorToJson(
|
||||
return _$$DHTRecordDescriptorImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@ -788,10 +789,10 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
|
||||
{required final Typed<FixedEncodedString43> key,
|
||||
required final FixedEncodedString43 owner,
|
||||
required final DHTSchema schema,
|
||||
final FixedEncodedString43? ownerSecret}) = _$_DHTRecordDescriptor;
|
||||
final FixedEncodedString43? ownerSecret}) = _$DHTRecordDescriptorImpl;
|
||||
|
||||
factory _DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =
|
||||
_$_DHTRecordDescriptor.fromJson;
|
||||
_$DHTRecordDescriptorImpl.fromJson;
|
||||
|
||||
@override
|
||||
Typed<FixedEncodedString43> get key;
|
||||
@ -803,7 +804,7 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
|
||||
FixedEncodedString43? get ownerSecret;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
|
||||
_$$DHTRecordDescriptorImplCopyWith<_$DHTRecordDescriptorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@ -870,10 +871,11 @@ class _$ValueDataCopyWithImpl<$Res, $Val extends ValueData>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$_ValueDataCopyWith<$Res> implements $ValueDataCopyWith<$Res> {
|
||||
factory _$$_ValueDataCopyWith(
|
||||
_$_ValueData value, $Res Function(_$_ValueData) then) =
|
||||
__$$_ValueDataCopyWithImpl<$Res>;
|
||||
abstract class _$$ValueDataImplCopyWith<$Res>
|
||||
implements $ValueDataCopyWith<$Res> {
|
||||
factory _$$ValueDataImplCopyWith(
|
||||
_$ValueDataImpl value, $Res Function(_$ValueDataImpl) then) =
|
||||
__$$ValueDataImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@ -883,11 +885,11 @@ abstract class _$$_ValueDataCopyWith<$Res> implements $ValueDataCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$_ValueDataCopyWithImpl<$Res>
|
||||
extends _$ValueDataCopyWithImpl<$Res, _$_ValueData>
|
||||
implements _$$_ValueDataCopyWith<$Res> {
|
||||
__$$_ValueDataCopyWithImpl(
|
||||
_$_ValueData _value, $Res Function(_$_ValueData) _then)
|
||||
class __$$ValueDataImplCopyWithImpl<$Res>
|
||||
extends _$ValueDataCopyWithImpl<$Res, _$ValueDataImpl>
|
||||
implements _$$ValueDataImplCopyWith<$Res> {
|
||||
__$$ValueDataImplCopyWithImpl(
|
||||
_$ValueDataImpl _value, $Res Function(_$ValueDataImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -897,7 +899,7 @@ class __$$_ValueDataCopyWithImpl<$Res>
|
||||
Object? data = null,
|
||||
Object? writer = null,
|
||||
}) {
|
||||
return _then(_$_ValueData(
|
||||
return _then(_$ValueDataImpl(
|
||||
seq: null == seq
|
||||
? _value.seq
|
||||
: seq // ignore: cast_nullable_to_non_nullable
|
||||
@ -916,15 +918,15 @@ class __$$_ValueDataCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$_ValueData implements _ValueData {
|
||||
const _$_ValueData(
|
||||
class _$ValueDataImpl implements _ValueData {
|
||||
const _$ValueDataImpl(
|
||||
{required this.seq,
|
||||
@Uint8ListJsonConverter.jsIsArray() required this.data,
|
||||
required this.writer})
|
||||
: assert(seq >= 0, 'seq out of range');
|
||||
|
||||
factory _$_ValueData.fromJson(Map<String, dynamic> json) =>
|
||||
_$$_ValueDataFromJson(json);
|
||||
factory _$ValueDataImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ValueDataImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int seq;
|
||||
@ -940,10 +942,10 @@ class _$_ValueData implements _ValueData {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_ValueData &&
|
||||
other is _$ValueDataImpl &&
|
||||
(identical(other.seq, seq) || other.seq == seq) &&
|
||||
const DeepCollectionEquality().equals(other.data, data) &&
|
||||
(identical(other.writer, writer) || other.writer == writer));
|
||||
@ -957,12 +959,12 @@ class _$_ValueData implements _ValueData {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$_ValueDataCopyWith<_$_ValueData> get copyWith =>
|
||||
__$$_ValueDataCopyWithImpl<_$_ValueData>(this, _$identity);
|
||||
_$$ValueDataImplCopyWith<_$ValueDataImpl> get copyWith =>
|
||||
__$$ValueDataImplCopyWithImpl<_$ValueDataImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$_ValueDataToJson(
|
||||
return _$$ValueDataImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@ -972,10 +974,10 @@ abstract class _ValueData implements ValueData {
|
||||
const factory _ValueData(
|
||||
{required final int seq,
|
||||
@Uint8ListJsonConverter.jsIsArray() required final Uint8List data,
|
||||
required final FixedEncodedString43 writer}) = _$_ValueData;
|
||||
required final FixedEncodedString43 writer}) = _$ValueDataImpl;
|
||||
|
||||
factory _ValueData.fromJson(Map<String, dynamic> json) =
|
||||
_$_ValueData.fromJson;
|
||||
_$ValueDataImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get seq;
|
||||
@ -986,7 +988,7 @@ abstract class _ValueData implements ValueData {
|
||||
FixedEncodedString43 get writer;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$_ValueDataCopyWith<_$_ValueData> get copyWith =>
|
||||
_$$ValueDataImplCopyWith<_$ValueDataImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@ -1060,11 +1062,11 @@ class _$SafetySpecCopyWithImpl<$Res, $Val extends SafetySpec>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$_SafetySpecCopyWith<$Res>
|
||||
abstract class _$$SafetySpecImplCopyWith<$Res>
|
||||
implements $SafetySpecCopyWith<$Res> {
|
||||
factory _$$_SafetySpecCopyWith(
|
||||
_$_SafetySpec value, $Res Function(_$_SafetySpec) then) =
|
||||
__$$_SafetySpecCopyWithImpl<$Res>;
|
||||
factory _$$SafetySpecImplCopyWith(
|
||||
_$SafetySpecImpl value, $Res Function(_$SafetySpecImpl) then) =
|
||||
__$$SafetySpecImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@ -1075,11 +1077,11 @@ abstract class _$$_SafetySpecCopyWith<$Res>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$_SafetySpecCopyWithImpl<$Res>
|
||||
extends _$SafetySpecCopyWithImpl<$Res, _$_SafetySpec>
|
||||
implements _$$_SafetySpecCopyWith<$Res> {
|
||||
__$$_SafetySpecCopyWithImpl(
|
||||
_$_SafetySpec _value, $Res Function(_$_SafetySpec) _then)
|
||||
class __$$SafetySpecImplCopyWithImpl<$Res>
|
||||
extends _$SafetySpecCopyWithImpl<$Res, _$SafetySpecImpl>
|
||||
implements _$$SafetySpecImplCopyWith<$Res> {
|
||||
__$$SafetySpecImplCopyWithImpl(
|
||||
_$SafetySpecImpl _value, $Res Function(_$SafetySpecImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -1090,7 +1092,7 @@ class __$$_SafetySpecCopyWithImpl<$Res>
|
||||
Object? sequencing = null,
|
||||
Object? preferredRoute = freezed,
|
||||
}) {
|
||||
return _then(_$_SafetySpec(
|
||||
return _then(_$SafetySpecImpl(
|
||||
hopCount: null == hopCount
|
||||
? _value.hopCount
|
||||
: hopCount // ignore: cast_nullable_to_non_nullable
|
||||
@ -1113,15 +1115,15 @@ class __$$_SafetySpecCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$_SafetySpec implements _SafetySpec {
|
||||
const _$_SafetySpec(
|
||||
class _$SafetySpecImpl implements _SafetySpec {
|
||||
const _$SafetySpecImpl(
|
||||
{required this.hopCount,
|
||||
required this.stability,
|
||||
required this.sequencing,
|
||||
this.preferredRoute});
|
||||
|
||||
factory _$_SafetySpec.fromJson(Map<String, dynamic> json) =>
|
||||
_$$_SafetySpecFromJson(json);
|
||||
factory _$SafetySpecImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$SafetySpecImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int hopCount;
|
||||
@ -1138,10 +1140,10 @@ class _$_SafetySpec implements _SafetySpec {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_SafetySpec &&
|
||||
other is _$SafetySpecImpl &&
|
||||
(identical(other.hopCount, hopCount) ||
|
||||
other.hopCount == hopCount) &&
|
||||
(identical(other.stability, stability) ||
|
||||
@ -1160,12 +1162,12 @@ class _$_SafetySpec implements _SafetySpec {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
|
||||
__$$_SafetySpecCopyWithImpl<_$_SafetySpec>(this, _$identity);
|
||||
_$$SafetySpecImplCopyWith<_$SafetySpecImpl> get copyWith =>
|
||||
__$$SafetySpecImplCopyWithImpl<_$SafetySpecImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$_SafetySpecToJson(
|
||||
return _$$SafetySpecImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@ -1176,10 +1178,10 @@ abstract class _SafetySpec implements SafetySpec {
|
||||
{required final int hopCount,
|
||||
required final Stability stability,
|
||||
required final Sequencing sequencing,
|
||||
final String? preferredRoute}) = _$_SafetySpec;
|
||||
final String? preferredRoute}) = _$SafetySpecImpl;
|
||||
|
||||
factory _SafetySpec.fromJson(Map<String, dynamic> json) =
|
||||
_$_SafetySpec.fromJson;
|
||||
_$SafetySpecImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get hopCount;
|
||||
@ -1191,7 +1193,7 @@ abstract class _SafetySpec implements SafetySpec {
|
||||
String? get preferredRoute;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
|
||||
_$$SafetySpecImplCopyWith<_$SafetySpecImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@ -1249,21 +1251,22 @@ class _$RouteBlobCopyWithImpl<$Res, $Val extends RouteBlob>
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$_RouteBlobCopyWith<$Res> implements $RouteBlobCopyWith<$Res> {
|
||||
factory _$$_RouteBlobCopyWith(
|
||||
_$_RouteBlob value, $Res Function(_$_RouteBlob) then) =
|
||||
__$$_RouteBlobCopyWithImpl<$Res>;
|
||||
abstract class _$$RouteBlobImplCopyWith<$Res>
|
||||
implements $RouteBlobCopyWith<$Res> {
|
||||
factory _$$RouteBlobImplCopyWith(
|
||||
_$RouteBlobImpl value, $Res Function(_$RouteBlobImpl) then) =
|
||||
__$$RouteBlobImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String routeId, @Uint8ListJsonConverter() Uint8List blob});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$_RouteBlobCopyWithImpl<$Res>
|
||||
extends _$RouteBlobCopyWithImpl<$Res, _$_RouteBlob>
|
||||
implements _$$_RouteBlobCopyWith<$Res> {
|
||||
__$$_RouteBlobCopyWithImpl(
|
||||
_$_RouteBlob _value, $Res Function(_$_RouteBlob) _then)
|
||||
class __$$RouteBlobImplCopyWithImpl<$Res>
|
||||
extends _$RouteBlobCopyWithImpl<$Res, _$RouteBlobImpl>
|
||||
implements _$$RouteBlobImplCopyWith<$Res> {
|
||||
__$$RouteBlobImplCopyWithImpl(
|
||||
_$RouteBlobImpl _value, $Res Function(_$RouteBlobImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@ -1272,7 +1275,7 @@ class __$$_RouteBlobCopyWithImpl<$Res>
|
||||
Object? routeId = null,
|
||||
Object? blob = null,
|
||||
}) {
|
||||
return _then(_$_RouteBlob(
|
||||
return _then(_$RouteBlobImpl(
|
||||
routeId: null == routeId
|
||||
? _value.routeId
|
||||
: routeId // ignore: cast_nullable_to_non_nullable
|
||||
@ -1287,12 +1290,12 @@ class __$$_RouteBlobCopyWithImpl<$Res>
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$_RouteBlob implements _RouteBlob {
|
||||
const _$_RouteBlob(
|
||||
class _$RouteBlobImpl implements _RouteBlob {
|
||||
const _$RouteBlobImpl(
|
||||
{required this.routeId, @Uint8ListJsonConverter() required this.blob});
|
||||
|
||||
factory _$_RouteBlob.fromJson(Map<String, dynamic> json) =>
|
||||
_$$_RouteBlobFromJson(json);
|
||||
factory _$RouteBlobImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RouteBlobImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String routeId;
|
||||
@ -1306,10 +1309,10 @@ class _$_RouteBlob implements _RouteBlob {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_RouteBlob &&
|
||||
other is _$RouteBlobImpl &&
|
||||
(identical(other.routeId, routeId) || other.routeId == routeId) &&
|
||||
const DeepCollectionEquality().equals(other.blob, blob));
|
||||
}
|
||||
@ -1322,12 +1325,12 @@ class _$_RouteBlob implements _RouteBlob {
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$_RouteBlobCopyWith<_$_RouteBlob> get copyWith =>
|
||||
__$$_RouteBlobCopyWithImpl<_$_RouteBlob>(this, _$identity);
|
||||
_$$RouteBlobImplCopyWith<_$RouteBlobImpl> get copyWith =>
|
||||
__$$RouteBlobImplCopyWithImpl<_$RouteBlobImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$_RouteBlobToJson(
|
||||
return _$$RouteBlobImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@ -1335,11 +1338,12 @@ class _$_RouteBlob implements _RouteBlob {
|
||||
|
||||
abstract class _RouteBlob implements RouteBlob {
|
||||
const factory _RouteBlob(
|
||||
{required final String routeId,
|
||||
@Uint8ListJsonConverter() required final Uint8List blob}) = _$_RouteBlob;
|
||||
{required final String routeId,
|
||||
@Uint8ListJsonConverter() required final Uint8List blob}) =
|
||||
_$RouteBlobImpl;
|
||||
|
||||
factory _RouteBlob.fromJson(Map<String, dynamic> json) =
|
||||
_$_RouteBlob.fromJson;
|
||||
_$RouteBlobImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get routeId;
|
||||
@ -1348,6 +1352,6 @@ abstract class _RouteBlob implements RouteBlob {
|
||||
Uint8List get blob;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$_RouteBlobCopyWith<_$_RouteBlob> get copyWith =>
|
||||
_$$RouteBlobImplCopyWith<_$RouteBlobImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
@ -6,20 +6,20 @@ part of 'routing_context.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$DHTSchemaDFLT _$$DHTSchemaDFLTFromJson(Map<String, dynamic> json) =>
|
||||
_$DHTSchemaDFLT(
|
||||
_$DHTSchemaDFLTImpl _$$DHTSchemaDFLTImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DHTSchemaDFLTImpl(
|
||||
oCnt: json['o_cnt'] as int,
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DHTSchemaDFLTToJson(_$DHTSchemaDFLT instance) =>
|
||||
Map<String, dynamic> _$$DHTSchemaDFLTImplToJson(_$DHTSchemaDFLTImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'o_cnt': instance.oCnt,
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$DHTSchemaSMPL _$$DHTSchemaSMPLFromJson(Map<String, dynamic> json) =>
|
||||
_$DHTSchemaSMPL(
|
||||
_$DHTSchemaSMPLImpl _$$DHTSchemaSMPLImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DHTSchemaSMPLImpl(
|
||||
oCnt: json['o_cnt'] as int,
|
||||
members: (json['members'] as List<dynamic>)
|
||||
.map(DHTSchemaMember.fromJson)
|
||||
@ -27,28 +27,30 @@ _$DHTSchemaSMPL _$$DHTSchemaSMPLFromJson(Map<String, dynamic> json) =>
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DHTSchemaSMPLToJson(_$DHTSchemaSMPL instance) =>
|
||||
Map<String, dynamic> _$$DHTSchemaSMPLImplToJson(_$DHTSchemaSMPLImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'o_cnt': instance.oCnt,
|
||||
'members': instance.members.map((e) => e.toJson()).toList(),
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$_DHTSchemaMember _$$_DHTSchemaMemberFromJson(Map<String, dynamic> json) =>
|
||||
_$_DHTSchemaMember(
|
||||
_$DHTSchemaMemberImpl _$$DHTSchemaMemberImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DHTSchemaMemberImpl(
|
||||
mKey: FixedEncodedString43.fromJson(json['m_key']),
|
||||
mCnt: json['m_cnt'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_DHTSchemaMemberToJson(_$_DHTSchemaMember instance) =>
|
||||
Map<String, dynamic> _$$DHTSchemaMemberImplToJson(
|
||||
_$DHTSchemaMemberImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'm_key': instance.mKey.toJson(),
|
||||
'm_cnt': instance.mCnt,
|
||||
};
|
||||
|
||||
_$_DHTRecordDescriptor _$$_DHTRecordDescriptorFromJson(
|
||||
_$DHTRecordDescriptorImpl _$$DHTRecordDescriptorImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_DHTRecordDescriptor(
|
||||
_$DHTRecordDescriptorImpl(
|
||||
key: Typed<FixedEncodedString43>.fromJson(json['key']),
|
||||
owner: FixedEncodedString43.fromJson(json['owner']),
|
||||
schema: DHTSchema.fromJson(json['schema']),
|
||||
@ -57,8 +59,8 @@ _$_DHTRecordDescriptor _$$_DHTRecordDescriptorFromJson(
|
||||
: FixedEncodedString43.fromJson(json['owner_secret']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_DHTRecordDescriptorToJson(
|
||||
_$_DHTRecordDescriptor instance) =>
|
||||
Map<String, dynamic> _$$DHTRecordDescriptorImplToJson(
|
||||
_$DHTRecordDescriptorImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key.toJson(),
|
||||
'owner': instance.owner.toJson(),
|
||||
@ -66,28 +68,29 @@ Map<String, dynamic> _$$_DHTRecordDescriptorToJson(
|
||||
'owner_secret': instance.ownerSecret?.toJson(),
|
||||
};
|
||||
|
||||
_$_ValueData _$$_ValueDataFromJson(Map<String, dynamic> json) => _$_ValueData(
|
||||
_$ValueDataImpl _$$ValueDataImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ValueDataImpl(
|
||||
seq: json['seq'] as int,
|
||||
data: const Uint8ListJsonConverter.jsIsArray().fromJson(json['data']),
|
||||
writer: FixedEncodedString43.fromJson(json['writer']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_ValueDataToJson(_$_ValueData instance) =>
|
||||
Map<String, dynamic> _$$ValueDataImplToJson(_$ValueDataImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'seq': instance.seq,
|
||||
'data': const Uint8ListJsonConverter.jsIsArray().toJson(instance.data),
|
||||
'writer': instance.writer.toJson(),
|
||||
};
|
||||
|
||||
_$_SafetySpec _$$_SafetySpecFromJson(Map<String, dynamic> json) =>
|
||||
_$_SafetySpec(
|
||||
_$SafetySpecImpl _$$SafetySpecImplFromJson(Map<String, dynamic> json) =>
|
||||
_$SafetySpecImpl(
|
||||
hopCount: json['hop_count'] as int,
|
||||
stability: Stability.fromJson(json['stability']),
|
||||
sequencing: Sequencing.fromJson(json['sequencing']),
|
||||
preferredRoute: json['preferred_route'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_SafetySpecToJson(_$_SafetySpec instance) =>
|
||||
Map<String, dynamic> _$$SafetySpecImplToJson(_$SafetySpecImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'hop_count': instance.hopCount,
|
||||
'stability': instance.stability.toJson(),
|
||||
@ -95,12 +98,13 @@ Map<String, dynamic> _$$_SafetySpecToJson(_$_SafetySpec instance) =>
|
||||
'preferred_route': instance.preferredRoute,
|
||||
};
|
||||
|
||||
_$_RouteBlob _$$_RouteBlobFromJson(Map<String, dynamic> json) => _$_RouteBlob(
|
||||
_$RouteBlobImpl _$$RouteBlobImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RouteBlobImpl(
|
||||
routeId: json['route_id'] as String,
|
||||
blob: const Uint8ListJsonConverter().fromJson(json['blob']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_RouteBlobToJson(_$_RouteBlob instance) =>
|
||||
Map<String, dynamic> _$$RouteBlobImplToJson(_$RouteBlobImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'route_id': instance.routeId,
|
||||
'blob': const Uint8ListJsonConverter().toJson(instance.blob),
|
||||
|
@ -14,6 +14,7 @@ class VeilidFFIConfigLoggingTerminal with _$VeilidFFIConfigLoggingTerminal {
|
||||
const factory VeilidFFIConfigLoggingTerminal({
|
||||
required bool enabled,
|
||||
required VeilidConfigLogLevel level,
|
||||
@Default([]) List<String> ignoreLogTargets,
|
||||
}) = _VeilidFFIConfigLoggingTerminal;
|
||||
|
||||
factory VeilidFFIConfigLoggingTerminal.fromJson(dynamic json) =>
|
||||
@ -27,6 +28,7 @@ class VeilidFFIConfigLoggingOtlp with _$VeilidFFIConfigLoggingOtlp {
|
||||
required VeilidConfigLogLevel level,
|
||||
required String grpcEndpoint,
|
||||
required String serviceName,
|
||||
@Default([]) List<String> ignoreLogTargets,
|
||||
}) = _VeilidFFIConfigLoggingOtlp;
|
||||
|
||||
factory VeilidFFIConfigLoggingOtlp.fromJson(dynamic json) =>
|
||||
@ -38,6 +40,7 @@ class VeilidFFIConfigLoggingApi with _$VeilidFFIConfigLoggingApi {
|
||||
const factory VeilidFFIConfigLoggingApi({
|
||||
required bool enabled,
|
||||
required VeilidConfigLogLevel level,
|
||||
@Default([]) List<String> ignoreLogTargets,
|
||||
}) = _VeilidFFIConfigLoggingApi;
|
||||
|
||||
factory VeilidFFIConfigLoggingApi.fromJson(dynamic json) =>
|
||||
@ -76,6 +79,7 @@ class VeilidWASMConfigLoggingPerformance
|
||||
required VeilidConfigLogLevel level,
|
||||
required bool logsInTimings,
|
||||
required bool logsInConsole,
|
||||
@Default([]) List<String> ignoreLogTargets,
|
||||
}) = _VeilidWASMConfigLoggingPerformance;
|
||||
|
||||
factory VeilidWASMConfigLoggingPerformance.fromJson(dynamic json) =>
|
||||
@ -88,6 +92,7 @@ class VeilidWASMConfigLoggingApi with _$VeilidWASMConfigLoggingApi {
|
||||
const factory VeilidWASMConfigLoggingApi({
|
||||
required bool enabled,
|
||||
required VeilidConfigLogLevel level,
|
||||
@Default([]) List<String> ignoreLogTargets,
|
||||
}) = _VeilidWASMConfigLoggingApi;
|
||||
|
||||
factory VeilidWASMConfigLoggingApi.fromJson(dynamic json) =>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,191 +6,226 @@ part of 'veilid_config.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$_VeilidFFIConfigLoggingTerminal _$$_VeilidFFIConfigLoggingTerminalFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidFFIConfigLoggingTerminal(
|
||||
enabled: json['enabled'] as bool,
|
||||
level: VeilidConfigLogLevel.fromJson(json['level']),
|
||||
);
|
||||
_$VeilidFFIConfigLoggingTerminalImpl
|
||||
_$$VeilidFFIConfigLoggingTerminalImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidFFIConfigLoggingTerminalImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
level: VeilidConfigLogLevel.fromJson(json['level']),
|
||||
ignoreLogTargets: (json['ignore_log_targets'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidFFIConfigLoggingTerminalToJson(
|
||||
_$_VeilidFFIConfigLoggingTerminal instance) =>
|
||||
Map<String, dynamic> _$$VeilidFFIConfigLoggingTerminalImplToJson(
|
||||
_$VeilidFFIConfigLoggingTerminalImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'level': instance.level.toJson(),
|
||||
'ignore_log_targets': instance.ignoreLogTargets,
|
||||
};
|
||||
|
||||
_$_VeilidFFIConfigLoggingOtlp _$$_VeilidFFIConfigLoggingOtlpFromJson(
|
||||
_$VeilidFFIConfigLoggingOtlpImpl _$$VeilidFFIConfigLoggingOtlpImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidFFIConfigLoggingOtlp(
|
||||
_$VeilidFFIConfigLoggingOtlpImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
level: VeilidConfigLogLevel.fromJson(json['level']),
|
||||
grpcEndpoint: json['grpc_endpoint'] as String,
|
||||
serviceName: json['service_name'] as String,
|
||||
ignoreLogTargets: (json['ignore_log_targets'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidFFIConfigLoggingOtlpToJson(
|
||||
_$_VeilidFFIConfigLoggingOtlp instance) =>
|
||||
Map<String, dynamic> _$$VeilidFFIConfigLoggingOtlpImplToJson(
|
||||
_$VeilidFFIConfigLoggingOtlpImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'level': instance.level.toJson(),
|
||||
'grpc_endpoint': instance.grpcEndpoint,
|
||||
'service_name': instance.serviceName,
|
||||
'ignore_log_targets': instance.ignoreLogTargets,
|
||||
};
|
||||
|
||||
_$_VeilidFFIConfigLoggingApi _$$_VeilidFFIConfigLoggingApiFromJson(
|
||||
_$VeilidFFIConfigLoggingApiImpl _$$VeilidFFIConfigLoggingApiImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidFFIConfigLoggingApi(
|
||||
_$VeilidFFIConfigLoggingApiImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
level: VeilidConfigLogLevel.fromJson(json['level']),
|
||||
ignoreLogTargets: (json['ignore_log_targets'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidFFIConfigLoggingApiToJson(
|
||||
_$_VeilidFFIConfigLoggingApi instance) =>
|
||||
Map<String, dynamic> _$$VeilidFFIConfigLoggingApiImplToJson(
|
||||
_$VeilidFFIConfigLoggingApiImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'level': instance.level.toJson(),
|
||||
'ignore_log_targets': instance.ignoreLogTargets,
|
||||
};
|
||||
|
||||
_$_VeilidFFIConfigLogging _$$_VeilidFFIConfigLoggingFromJson(
|
||||
_$VeilidFFIConfigLoggingImpl _$$VeilidFFIConfigLoggingImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidFFIConfigLogging(
|
||||
_$VeilidFFIConfigLoggingImpl(
|
||||
terminal: VeilidFFIConfigLoggingTerminal.fromJson(json['terminal']),
|
||||
otlp: VeilidFFIConfigLoggingOtlp.fromJson(json['otlp']),
|
||||
api: VeilidFFIConfigLoggingApi.fromJson(json['api']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidFFIConfigLoggingToJson(
|
||||
_$_VeilidFFIConfigLogging instance) =>
|
||||
Map<String, dynamic> _$$VeilidFFIConfigLoggingImplToJson(
|
||||
_$VeilidFFIConfigLoggingImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'terminal': instance.terminal.toJson(),
|
||||
'otlp': instance.otlp.toJson(),
|
||||
'api': instance.api.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidFFIConfig _$$_VeilidFFIConfigFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidFFIConfig(
|
||||
_$VeilidFFIConfigImpl _$$VeilidFFIConfigImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidFFIConfigImpl(
|
||||
logging: VeilidFFIConfigLogging.fromJson(json['logging']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidFFIConfigToJson(_$_VeilidFFIConfig instance) =>
|
||||
Map<String, dynamic> _$$VeilidFFIConfigImplToJson(
|
||||
_$VeilidFFIConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'logging': instance.logging.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidWASMConfigLoggingPerformance
|
||||
_$$_VeilidWASMConfigLoggingPerformanceFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidWASMConfigLoggingPerformance(
|
||||
_$VeilidWASMConfigLoggingPerformanceImpl
|
||||
_$$VeilidWASMConfigLoggingPerformanceImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidWASMConfigLoggingPerformanceImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
level: VeilidConfigLogLevel.fromJson(json['level']),
|
||||
logsInTimings: json['logs_in_timings'] as bool,
|
||||
logsInConsole: json['logs_in_console'] as bool,
|
||||
ignoreLogTargets: (json['ignore_log_targets'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidWASMConfigLoggingPerformanceToJson(
|
||||
_$_VeilidWASMConfigLoggingPerformance instance) =>
|
||||
Map<String, dynamic> _$$VeilidWASMConfigLoggingPerformanceImplToJson(
|
||||
_$VeilidWASMConfigLoggingPerformanceImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'level': instance.level.toJson(),
|
||||
'logs_in_timings': instance.logsInTimings,
|
||||
'logs_in_console': instance.logsInConsole,
|
||||
'ignore_log_targets': instance.ignoreLogTargets,
|
||||
};
|
||||
|
||||
_$_VeilidWASMConfigLoggingApi _$$_VeilidWASMConfigLoggingApiFromJson(
|
||||
_$VeilidWASMConfigLoggingApiImpl _$$VeilidWASMConfigLoggingApiImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidWASMConfigLoggingApi(
|
||||
_$VeilidWASMConfigLoggingApiImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
level: VeilidConfigLogLevel.fromJson(json['level']),
|
||||
ignoreLogTargets: (json['ignore_log_targets'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidWASMConfigLoggingApiToJson(
|
||||
_$_VeilidWASMConfigLoggingApi instance) =>
|
||||
Map<String, dynamic> _$$VeilidWASMConfigLoggingApiImplToJson(
|
||||
_$VeilidWASMConfigLoggingApiImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'level': instance.level.toJson(),
|
||||
'ignore_log_targets': instance.ignoreLogTargets,
|
||||
};
|
||||
|
||||
_$_VeilidWASMConfigLogging _$$_VeilidWASMConfigLoggingFromJson(
|
||||
_$VeilidWASMConfigLoggingImpl _$$VeilidWASMConfigLoggingImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidWASMConfigLogging(
|
||||
_$VeilidWASMConfigLoggingImpl(
|
||||
performance:
|
||||
VeilidWASMConfigLoggingPerformance.fromJson(json['performance']),
|
||||
api: VeilidWASMConfigLoggingApi.fromJson(json['api']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidWASMConfigLoggingToJson(
|
||||
_$_VeilidWASMConfigLogging instance) =>
|
||||
Map<String, dynamic> _$$VeilidWASMConfigLoggingImplToJson(
|
||||
_$VeilidWASMConfigLoggingImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'performance': instance.performance.toJson(),
|
||||
'api': instance.api.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidWASMConfig _$$_VeilidWASMConfigFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidWASMConfig(
|
||||
_$VeilidWASMConfigImpl _$$VeilidWASMConfigImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidWASMConfigImpl(
|
||||
logging: VeilidWASMConfigLogging.fromJson(json['logging']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidWASMConfigToJson(_$_VeilidWASMConfig instance) =>
|
||||
Map<String, dynamic> _$$VeilidWASMConfigImplToJson(
|
||||
_$VeilidWASMConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'logging': instance.logging.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidConfigHTTPS _$$_VeilidConfigHTTPSFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigHTTPS(
|
||||
enabled: json['enabled'] as bool,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
path: json['path'] as String,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigHTTPSToJson(
|
||||
_$_VeilidConfigHTTPS instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'listen_address': instance.listenAddress,
|
||||
'path': instance.path,
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$_VeilidConfigHTTP _$$_VeilidConfigHTTPFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigHTTP(
|
||||
enabled: json['enabled'] as bool,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
path: json['path'] as String,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigHTTPToJson(_$_VeilidConfigHTTP instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'listen_address': instance.listenAddress,
|
||||
'path': instance.path,
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$_VeilidConfigApplication _$$_VeilidConfigApplicationFromJson(
|
||||
_$VeilidConfigHTTPSImpl _$$VeilidConfigHTTPSImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigApplication(
|
||||
_$VeilidConfigHTTPSImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
path: json['path'] as String,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidConfigHTTPSImplToJson(
|
||||
_$VeilidConfigHTTPSImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'listen_address': instance.listenAddress,
|
||||
'path': instance.path,
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$VeilidConfigHTTPImpl _$$VeilidConfigHTTPImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigHTTPImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
path: json['path'] as String,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidConfigHTTPImplToJson(
|
||||
_$VeilidConfigHTTPImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'listen_address': instance.listenAddress,
|
||||
'path': instance.path,
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$VeilidConfigApplicationImpl _$$VeilidConfigApplicationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigApplicationImpl(
|
||||
https: VeilidConfigHTTPS.fromJson(json['https']),
|
||||
http: VeilidConfigHTTP.fromJson(json['http']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigApplicationToJson(
|
||||
_$_VeilidConfigApplication instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigApplicationImplToJson(
|
||||
_$VeilidConfigApplicationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'https': instance.https.toJson(),
|
||||
'http': instance.http.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidConfigUDP _$$_VeilidConfigUDPFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigUDP(
|
||||
_$VeilidConfigUDPImpl _$$VeilidConfigUDPImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigUDPImpl(
|
||||
enabled: json['enabled'] as bool,
|
||||
socketPoolSize: json['socket_pool_size'] as int,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
publicAddress: json['public_address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigUDPToJson(_$_VeilidConfigUDP instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigUDPImplToJson(
|
||||
_$VeilidConfigUDPImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'socket_pool_size': instance.socketPoolSize,
|
||||
@ -198,8 +233,9 @@ Map<String, dynamic> _$$_VeilidConfigUDPToJson(_$_VeilidConfigUDP instance) =>
|
||||
'public_address': instance.publicAddress,
|
||||
};
|
||||
|
||||
_$_VeilidConfigTCP _$$_VeilidConfigTCPFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigTCP(
|
||||
_$VeilidConfigTCPImpl _$$VeilidConfigTCPImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigTCPImpl(
|
||||
connect: json['connect'] as bool,
|
||||
listen: json['listen'] as bool,
|
||||
maxConnections: json['max_connections'] as int,
|
||||
@ -207,7 +243,8 @@ _$_VeilidConfigTCP _$$_VeilidConfigTCPFromJson(Map<String, dynamic> json) =>
|
||||
publicAddress: json['public_address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigTCPToJson(_$_VeilidConfigTCP instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigTCPImplToJson(
|
||||
_$VeilidConfigTCPImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'connect': instance.connect,
|
||||
'listen': instance.listen,
|
||||
@ -216,8 +253,8 @@ Map<String, dynamic> _$$_VeilidConfigTCPToJson(_$_VeilidConfigTCP instance) =>
|
||||
'public_address': instance.publicAddress,
|
||||
};
|
||||
|
||||
_$_VeilidConfigWS _$$_VeilidConfigWSFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigWS(
|
||||
_$VeilidConfigWSImpl _$$VeilidConfigWSImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidConfigWSImpl(
|
||||
connect: json['connect'] as bool,
|
||||
listen: json['listen'] as bool,
|
||||
maxConnections: json['max_connections'] as int,
|
||||
@ -226,7 +263,8 @@ _$_VeilidConfigWS _$$_VeilidConfigWSFromJson(Map<String, dynamic> json) =>
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigWSToJson(_$_VeilidConfigWS instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigWSImplToJson(
|
||||
_$VeilidConfigWSImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'connect': instance.connect,
|
||||
'listen': instance.listen,
|
||||
@ -236,37 +274,39 @@ Map<String, dynamic> _$$_VeilidConfigWSToJson(_$_VeilidConfigWS instance) =>
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$_VeilidConfigWSS _$$_VeilidConfigWSSFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigWSS(
|
||||
connect: json['connect'] as bool,
|
||||
listen: json['listen'] as bool,
|
||||
maxConnections: json['max_connections'] as int,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
path: json['path'] as String,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigWSSToJson(_$_VeilidConfigWSS instance) =>
|
||||
<String, dynamic>{
|
||||
'connect': instance.connect,
|
||||
'listen': instance.listen,
|
||||
'max_connections': instance.maxConnections,
|
||||
'listen_address': instance.listenAddress,
|
||||
'path': instance.path,
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$_VeilidConfigProtocol _$$_VeilidConfigProtocolFromJson(
|
||||
_$VeilidConfigWSSImpl _$$VeilidConfigWSSImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigProtocol(
|
||||
_$VeilidConfigWSSImpl(
|
||||
connect: json['connect'] as bool,
|
||||
listen: json['listen'] as bool,
|
||||
maxConnections: json['max_connections'] as int,
|
||||
listenAddress: json['listen_address'] as String,
|
||||
path: json['path'] as String,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidConfigWSSImplToJson(
|
||||
_$VeilidConfigWSSImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'connect': instance.connect,
|
||||
'listen': instance.listen,
|
||||
'max_connections': instance.maxConnections,
|
||||
'listen_address': instance.listenAddress,
|
||||
'path': instance.path,
|
||||
'url': instance.url,
|
||||
};
|
||||
|
||||
_$VeilidConfigProtocolImpl _$$VeilidConfigProtocolImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigProtocolImpl(
|
||||
udp: VeilidConfigUDP.fromJson(json['udp']),
|
||||
tcp: VeilidConfigTCP.fromJson(json['tcp']),
|
||||
ws: VeilidConfigWS.fromJson(json['ws']),
|
||||
wss: VeilidConfigWSS.fromJson(json['wss']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigProtocolToJson(
|
||||
_$_VeilidConfigProtocol instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigProtocolImplToJson(
|
||||
_$VeilidConfigProtocolImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'udp': instance.udp.toJson(),
|
||||
'tcp': instance.tcp.toJson(),
|
||||
@ -274,22 +314,25 @@ Map<String, dynamic> _$$_VeilidConfigProtocolToJson(
|
||||
'wss': instance.wss.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidConfigTLS _$$_VeilidConfigTLSFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigTLS(
|
||||
_$VeilidConfigTLSImpl _$$VeilidConfigTLSImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigTLSImpl(
|
||||
certificatePath: json['certificate_path'] as String,
|
||||
privateKeyPath: json['private_key_path'] as String,
|
||||
connectionInitialTimeoutMs: json['connection_initial_timeout_ms'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigTLSToJson(_$_VeilidConfigTLS instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigTLSImplToJson(
|
||||
_$VeilidConfigTLSImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'certificate_path': instance.certificatePath,
|
||||
'private_key_path': instance.privateKeyPath,
|
||||
'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs,
|
||||
};
|
||||
|
||||
_$_VeilidConfigDHT _$$_VeilidConfigDHTFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigDHT(
|
||||
_$VeilidConfigDHTImpl _$$VeilidConfigDHTImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigDHTImpl(
|
||||
resolveNodeTimeoutMs: json['resolve_node_timeout_ms'] as int,
|
||||
resolveNodeCount: json['resolve_node_count'] as int,
|
||||
resolveNodeFanout: json['resolve_node_fanout'] as int,
|
||||
@ -317,7 +360,8 @@ _$_VeilidConfigDHT _$$_VeilidConfigDHTFromJson(Map<String, dynamic> json) =>
|
||||
maxWatchExpirationMs: json['max_watch_expiration_ms'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigDHTToJson(_$_VeilidConfigDHT instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigDHTImplToJson(
|
||||
_$VeilidConfigDHTImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'resolve_node_timeout_ms': instance.resolveNodeTimeoutMs,
|
||||
'resolve_node_count': instance.resolveNodeCount,
|
||||
@ -345,8 +389,9 @@ Map<String, dynamic> _$$_VeilidConfigDHTToJson(_$_VeilidConfigDHT instance) =>
|
||||
'max_watch_expiration_ms': instance.maxWatchExpirationMs,
|
||||
};
|
||||
|
||||
_$_VeilidConfigRPC _$$_VeilidConfigRPCFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigRPC(
|
||||
_$VeilidConfigRPCImpl _$$VeilidConfigRPCImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidConfigRPCImpl(
|
||||
concurrency: json['concurrency'] as int,
|
||||
queueSize: json['queue_size'] as int,
|
||||
timeoutMs: json['timeout_ms'] as int,
|
||||
@ -356,7 +401,8 @@ _$_VeilidConfigRPC _$$_VeilidConfigRPCFromJson(Map<String, dynamic> json) =>
|
||||
maxTimestampAheadMs: json['max_timestamp_ahead_ms'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigRPCToJson(_$_VeilidConfigRPC instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigRPCImplToJson(
|
||||
_$VeilidConfigRPCImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'concurrency': instance.concurrency,
|
||||
'queue_size': instance.queueSize,
|
||||
@ -367,9 +413,9 @@ Map<String, dynamic> _$$_VeilidConfigRPCToJson(_$_VeilidConfigRPC instance) =>
|
||||
'max_timestamp_ahead_ms': instance.maxTimestampAheadMs,
|
||||
};
|
||||
|
||||
_$_VeilidConfigRoutingTable _$$_VeilidConfigRoutingTableFromJson(
|
||||
_$VeilidConfigRoutingTableImpl _$$VeilidConfigRoutingTableImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigRoutingTable(
|
||||
_$VeilidConfigRoutingTableImpl(
|
||||
nodeId: (json['node_id'] as List<dynamic>)
|
||||
.map(Typed<FixedEncodedString43>.fromJson)
|
||||
.toList(),
|
||||
@ -385,8 +431,8 @@ _$_VeilidConfigRoutingTable _$$_VeilidConfigRoutingTableFromJson(
|
||||
limitAttachedWeak: json['limit_attached_weak'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigRoutingTableToJson(
|
||||
_$_VeilidConfigRoutingTable instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigRoutingTableImplToJson(
|
||||
_$VeilidConfigRoutingTableImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'node_id': instance.nodeId.map((e) => e.toJson()).toList(),
|
||||
'node_id_secret': instance.nodeIdSecret.map((e) => e.toJson()).toList(),
|
||||
@ -398,9 +444,9 @@ Map<String, dynamic> _$$_VeilidConfigRoutingTableToJson(
|
||||
'limit_attached_weak': instance.limitAttachedWeak,
|
||||
};
|
||||
|
||||
_$_VeilidConfigNetwork _$$_VeilidConfigNetworkFromJson(
|
||||
_$VeilidConfigNetworkImpl _$$VeilidConfigNetworkImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigNetwork(
|
||||
_$VeilidConfigNetworkImpl(
|
||||
connectionInitialTimeoutMs: json['connection_initial_timeout_ms'] as int,
|
||||
connectionInactivityTimeoutMs:
|
||||
json['connection_inactivity_timeout_ms'] as int,
|
||||
@ -426,8 +472,8 @@ _$_VeilidConfigNetwork _$$_VeilidConfigNetworkFromJson(
|
||||
networkKeyPassword: json['network_key_password'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigNetworkToJson(
|
||||
_$_VeilidConfigNetwork instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigNetworkImplToJson(
|
||||
_$VeilidConfigNetworkImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs,
|
||||
'connection_inactivity_timeout_ms':
|
||||
@ -453,37 +499,37 @@ Map<String, dynamic> _$$_VeilidConfigNetworkToJson(
|
||||
'network_key_password': instance.networkKeyPassword,
|
||||
};
|
||||
|
||||
_$_VeilidConfigTableStore _$$_VeilidConfigTableStoreFromJson(
|
||||
_$VeilidConfigTableStoreImpl _$$VeilidConfigTableStoreImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigTableStore(
|
||||
_$VeilidConfigTableStoreImpl(
|
||||
directory: json['directory'] as String,
|
||||
delete: json['delete'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigTableStoreToJson(
|
||||
_$_VeilidConfigTableStore instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigTableStoreImplToJson(
|
||||
_$VeilidConfigTableStoreImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'directory': instance.directory,
|
||||
'delete': instance.delete,
|
||||
};
|
||||
|
||||
_$_VeilidConfigBlockStore _$$_VeilidConfigBlockStoreFromJson(
|
||||
_$VeilidConfigBlockStoreImpl _$$VeilidConfigBlockStoreImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigBlockStore(
|
||||
_$VeilidConfigBlockStoreImpl(
|
||||
directory: json['directory'] as String,
|
||||
delete: json['delete'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigBlockStoreToJson(
|
||||
_$_VeilidConfigBlockStore instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigBlockStoreImplToJson(
|
||||
_$VeilidConfigBlockStoreImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'directory': instance.directory,
|
||||
'delete': instance.delete,
|
||||
};
|
||||
|
||||
_$_VeilidConfigProtectedStore _$$_VeilidConfigProtectedStoreFromJson(
|
||||
_$VeilidConfigProtectedStoreImpl _$$VeilidConfigProtectedStoreImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigProtectedStore(
|
||||
_$VeilidConfigProtectedStoreImpl(
|
||||
allowInsecureFallback: json['allow_insecure_fallback'] as bool,
|
||||
alwaysUseInsecureStorage: json['always_use_insecure_storage'] as bool,
|
||||
directory: json['directory'] as String,
|
||||
@ -494,8 +540,8 @@ _$_VeilidConfigProtectedStore _$$_VeilidConfigProtectedStoreFromJson(
|
||||
json['new_device_encryption_key_password'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigProtectedStoreToJson(
|
||||
_$_VeilidConfigProtectedStore instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigProtectedStoreImplToJson(
|
||||
_$VeilidConfigProtectedStoreImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'allow_insecure_fallback': instance.allowInsecureFallback,
|
||||
'always_use_insecure_storage': instance.alwaysUseInsecureStorage,
|
||||
@ -506,21 +552,21 @@ Map<String, dynamic> _$$_VeilidConfigProtectedStoreToJson(
|
||||
instance.newDeviceEncryptionKeyPassword,
|
||||
};
|
||||
|
||||
_$_VeilidConfigCapabilities _$$_VeilidConfigCapabilitiesFromJson(
|
||||
_$VeilidConfigCapabilitiesImpl _$$VeilidConfigCapabilitiesImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidConfigCapabilities(
|
||||
_$VeilidConfigCapabilitiesImpl(
|
||||
disable:
|
||||
(json['disable'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigCapabilitiesToJson(
|
||||
_$_VeilidConfigCapabilities instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigCapabilitiesImplToJson(
|
||||
_$VeilidConfigCapabilitiesImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'disable': instance.disable,
|
||||
};
|
||||
|
||||
_$_VeilidConfig _$$_VeilidConfigFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidConfig(
|
||||
_$VeilidConfigImpl _$$VeilidConfigImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidConfigImpl(
|
||||
programName: json['program_name'] as String,
|
||||
namespace: json['namespace'] as String,
|
||||
capabilities: VeilidConfigCapabilities.fromJson(json['capabilities']),
|
||||
@ -531,7 +577,7 @@ _$_VeilidConfig _$$_VeilidConfigFromJson(Map<String, dynamic> json) =>
|
||||
network: VeilidConfigNetwork.fromJson(json['network']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidConfigToJson(_$_VeilidConfig instance) =>
|
||||
Map<String, dynamic> _$$VeilidConfigImplToJson(_$VeilidConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'program_name': instance.programName,
|
||||
'namespace': instance.namespace,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,29 +6,29 @@ part of 'veilid_state.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$_LatencyStats _$$_LatencyStatsFromJson(Map<String, dynamic> json) =>
|
||||
_$_LatencyStats(
|
||||
_$LatencyStatsImpl _$$LatencyStatsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$LatencyStatsImpl(
|
||||
fastest: TimestampDuration.fromJson(json['fastest']),
|
||||
average: TimestampDuration.fromJson(json['average']),
|
||||
slowest: TimestampDuration.fromJson(json['slowest']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_LatencyStatsToJson(_$_LatencyStats instance) =>
|
||||
Map<String, dynamic> _$$LatencyStatsImplToJson(_$LatencyStatsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'fastest': instance.fastest.toJson(),
|
||||
'average': instance.average.toJson(),
|
||||
'slowest': instance.slowest.toJson(),
|
||||
};
|
||||
|
||||
_$_TransferStats _$$_TransferStatsFromJson(Map<String, dynamic> json) =>
|
||||
_$_TransferStats(
|
||||
_$TransferStatsImpl _$$TransferStatsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$TransferStatsImpl(
|
||||
total: BigInt.parse(json['total'] as String),
|
||||
maximum: BigInt.parse(json['maximum'] as String),
|
||||
average: BigInt.parse(json['average'] as String),
|
||||
minimum: BigInt.parse(json['minimum'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_TransferStatsToJson(_$_TransferStats instance) =>
|
||||
Map<String, dynamic> _$$TransferStatsImplToJson(_$TransferStatsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'total': instance.total.toString(),
|
||||
'maximum': instance.maximum.toString(),
|
||||
@ -36,21 +36,22 @@ Map<String, dynamic> _$$_TransferStatsToJson(_$_TransferStats instance) =>
|
||||
'minimum': instance.minimum.toString(),
|
||||
};
|
||||
|
||||
_$_TransferStatsDownUp _$$_TransferStatsDownUpFromJson(
|
||||
_$TransferStatsDownUpImpl _$$TransferStatsDownUpImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_TransferStatsDownUp(
|
||||
_$TransferStatsDownUpImpl(
|
||||
down: TransferStats.fromJson(json['down']),
|
||||
up: TransferStats.fromJson(json['up']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_TransferStatsDownUpToJson(
|
||||
_$_TransferStatsDownUp instance) =>
|
||||
Map<String, dynamic> _$$TransferStatsDownUpImplToJson(
|
||||
_$TransferStatsDownUpImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'down': instance.down.toJson(),
|
||||
'up': instance.up.toJson(),
|
||||
};
|
||||
|
||||
_$_RPCStats _$$_RPCStatsFromJson(Map<String, dynamic> json) => _$_RPCStats(
|
||||
_$RPCStatsImpl _$$RPCStatsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RPCStatsImpl(
|
||||
messagesSent: json['messages_sent'] as int,
|
||||
messagesRcvd: json['messages_rcvd'] as int,
|
||||
questionsInFlight: json['questions_in_flight'] as int,
|
||||
@ -67,7 +68,7 @@ _$_RPCStats _$$_RPCStatsFromJson(Map<String, dynamic> json) => _$_RPCStats(
|
||||
failedToSend: json['failed_to_send'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_RPCStatsToJson(_$_RPCStats instance) =>
|
||||
Map<String, dynamic> _$$RPCStatsImplToJson(_$RPCStatsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'messages_sent': instance.messagesSent,
|
||||
'messages_rcvd': instance.messagesRcvd,
|
||||
@ -79,7 +80,8 @@ Map<String, dynamic> _$$_RPCStatsToJson(_$_RPCStats instance) =>
|
||||
'failed_to_send': instance.failedToSend,
|
||||
};
|
||||
|
||||
_$_PeerStats _$$_PeerStatsFromJson(Map<String, dynamic> json) => _$_PeerStats(
|
||||
_$PeerStatsImpl _$$PeerStatsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PeerStatsImpl(
|
||||
timeAdded: Timestamp.fromJson(json['time_added']),
|
||||
rpcStats: RPCStats.fromJson(json['rpc_stats']),
|
||||
transfer: TransferStatsDownUp.fromJson(json['transfer']),
|
||||
@ -88,7 +90,7 @@ _$_PeerStats _$$_PeerStatsFromJson(Map<String, dynamic> json) => _$_PeerStats(
|
||||
: LatencyStats.fromJson(json['latency']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_PeerStatsToJson(_$_PeerStats instance) =>
|
||||
Map<String, dynamic> _$$PeerStatsImplToJson(_$PeerStatsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'time_added': instance.timeAdded.toJson(),
|
||||
'rpc_stats': instance.rpcStats.toJson(),
|
||||
@ -96,8 +98,8 @@ Map<String, dynamic> _$$_PeerStatsToJson(_$_PeerStats instance) =>
|
||||
'latency': instance.latency?.toJson(),
|
||||
};
|
||||
|
||||
_$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) =>
|
||||
_$_PeerTableData(
|
||||
_$PeerTableDataImpl _$$PeerTableDataImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PeerTableDataImpl(
|
||||
nodeIds: (json['node_ids'] as List<dynamic>)
|
||||
.map(Typed<FixedEncodedString43>.fromJson)
|
||||
.toList(),
|
||||
@ -105,21 +107,22 @@ _$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) =>
|
||||
peerStats: PeerStats.fromJson(json['peer_stats']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_PeerTableDataToJson(_$_PeerTableData instance) =>
|
||||
Map<String, dynamic> _$$PeerTableDataImplToJson(_$PeerTableDataImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'node_ids': instance.nodeIds.map((e) => e.toJson()).toList(),
|
||||
'peer_address': instance.peerAddress,
|
||||
'peer_stats': instance.peerStats.toJson(),
|
||||
};
|
||||
|
||||
_$VeilidLog _$$VeilidLogFromJson(Map<String, dynamic> json) => _$VeilidLog(
|
||||
_$VeilidLogImpl _$$VeilidLogImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidLogImpl(
|
||||
logLevel: VeilidLogLevel.fromJson(json['log_level']),
|
||||
message: json['message'] as String,
|
||||
backtrace: json['backtrace'] as String?,
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidLogToJson(_$VeilidLog instance) =>
|
||||
Map<String, dynamic> _$$VeilidLogImplToJson(_$VeilidLogImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'log_level': instance.logLevel.toJson(),
|
||||
'message': instance.message,
|
||||
@ -127,8 +130,9 @@ Map<String, dynamic> _$$VeilidLogToJson(_$VeilidLog instance) =>
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidAppMessage _$$VeilidAppMessageFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidAppMessage(
|
||||
_$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidAppMessageImpl(
|
||||
message: const Uint8ListJsonConverter().fromJson(json['message']),
|
||||
sender: json['sender'] == null
|
||||
? null
|
||||
@ -136,15 +140,16 @@ _$VeilidAppMessage _$$VeilidAppMessageFromJson(Map<String, dynamic> json) =>
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidAppMessageToJson(_$VeilidAppMessage instance) =>
|
||||
Map<String, dynamic> _$$VeilidAppMessageImplToJson(
|
||||
_$VeilidAppMessageImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'message': const Uint8ListJsonConverter().toJson(instance.message),
|
||||
'sender': instance.sender?.toJson(),
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidAppCall _$$VeilidAppCallFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidAppCall(
|
||||
_$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidAppCallImpl(
|
||||
message: const Uint8ListJsonConverter().fromJson(json['message']),
|
||||
callId: json['call_id'] as String,
|
||||
sender: json['sender'] == null
|
||||
@ -153,7 +158,7 @@ _$VeilidAppCall _$$VeilidAppCallFromJson(Map<String, dynamic> json) =>
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidAppCallToJson(_$VeilidAppCall instance) =>
|
||||
Map<String, dynamic> _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'message': const Uint8ListJsonConverter().toJson(instance.message),
|
||||
'call_id': instance.callId,
|
||||
@ -161,17 +166,17 @@ Map<String, dynamic> _$$VeilidAppCallToJson(_$VeilidAppCall instance) =>
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidUpdateAttachment _$$VeilidUpdateAttachmentFromJson(
|
||||
_$VeilidUpdateAttachmentImpl _$$VeilidUpdateAttachmentImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidUpdateAttachment(
|
||||
_$VeilidUpdateAttachmentImpl(
|
||||
state: AttachmentState.fromJson(json['state']),
|
||||
publicInternetReady: json['public_internet_ready'] as bool,
|
||||
localNetworkReady: json['local_network_ready'] as bool,
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidUpdateAttachmentToJson(
|
||||
_$VeilidUpdateAttachment instance) =>
|
||||
Map<String, dynamic> _$$VeilidUpdateAttachmentImplToJson(
|
||||
_$VeilidUpdateAttachmentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'state': instance.state.toJson(),
|
||||
'public_internet_ready': instance.publicInternetReady,
|
||||
@ -179,9 +184,9 @@ Map<String, dynamic> _$$VeilidUpdateAttachmentToJson(
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidUpdateNetwork _$$VeilidUpdateNetworkFromJson(
|
||||
_$VeilidUpdateNetworkImpl _$$VeilidUpdateNetworkImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidUpdateNetwork(
|
||||
_$VeilidUpdateNetworkImpl(
|
||||
started: json['started'] as bool,
|
||||
bpsDown: BigInt.parse(json['bps_down'] as String),
|
||||
bpsUp: BigInt.parse(json['bps_up'] as String),
|
||||
@ -190,8 +195,8 @@ _$VeilidUpdateNetwork _$$VeilidUpdateNetworkFromJson(
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidUpdateNetworkToJson(
|
||||
_$VeilidUpdateNetwork instance) =>
|
||||
Map<String, dynamic> _$$VeilidUpdateNetworkImplToJson(
|
||||
_$VeilidUpdateNetworkImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'started': instance.started,
|
||||
'bps_down': instance.bpsDown.toString(),
|
||||
@ -200,22 +205,23 @@ Map<String, dynamic> _$$VeilidUpdateNetworkToJson(
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidUpdateConfig _$$VeilidUpdateConfigFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidUpdateConfig(
|
||||
_$VeilidUpdateConfigImpl _$$VeilidUpdateConfigImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidUpdateConfigImpl(
|
||||
config: VeilidConfig.fromJson(json['config']),
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidUpdateConfigToJson(
|
||||
_$VeilidUpdateConfig instance) =>
|
||||
Map<String, dynamic> _$$VeilidUpdateConfigImplToJson(
|
||||
_$VeilidUpdateConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'config': instance.config.toJson(),
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidUpdateRouteChange _$$VeilidUpdateRouteChangeFromJson(
|
||||
_$VeilidUpdateRouteChangeImpl _$$VeilidUpdateRouteChangeImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidUpdateRouteChange(
|
||||
_$VeilidUpdateRouteChangeImpl(
|
||||
deadRoutes: (json['dead_routes'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
@ -225,17 +231,17 @@ _$VeilidUpdateRouteChange _$$VeilidUpdateRouteChangeFromJson(
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidUpdateRouteChangeToJson(
|
||||
_$VeilidUpdateRouteChange instance) =>
|
||||
Map<String, dynamic> _$$VeilidUpdateRouteChangeImplToJson(
|
||||
_$VeilidUpdateRouteChangeImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'dead_routes': instance.deadRoutes,
|
||||
'dead_remote_routes': instance.deadRemoteRoutes,
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$VeilidUpdateValueChange _$$VeilidUpdateValueChangeFromJson(
|
||||
_$VeilidUpdateValueChangeImpl _$$VeilidUpdateValueChangeImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidUpdateValueChange(
|
||||
_$VeilidUpdateValueChangeImpl(
|
||||
key: Typed<FixedEncodedString43>.fromJson(json['key']),
|
||||
subkeys: (json['subkeys'] as List<dynamic>)
|
||||
.map(ValueSubkeyRange.fromJson)
|
||||
@ -245,8 +251,8 @@ _$VeilidUpdateValueChange _$$VeilidUpdateValueChangeFromJson(
|
||||
$type: json['kind'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VeilidUpdateValueChangeToJson(
|
||||
_$VeilidUpdateValueChange instance) =>
|
||||
Map<String, dynamic> _$$VeilidUpdateValueChangeImplToJson(
|
||||
_$VeilidUpdateValueChangeImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key.toJson(),
|
||||
'subkeys': instance.subkeys.map((e) => e.toJson()).toList(),
|
||||
@ -255,25 +261,25 @@ Map<String, dynamic> _$$VeilidUpdateValueChangeToJson(
|
||||
'kind': instance.$type,
|
||||
};
|
||||
|
||||
_$_VeilidStateAttachment _$$_VeilidStateAttachmentFromJson(
|
||||
_$VeilidStateAttachmentImpl _$$VeilidStateAttachmentImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidStateAttachment(
|
||||
_$VeilidStateAttachmentImpl(
|
||||
state: AttachmentState.fromJson(json['state']),
|
||||
publicInternetReady: json['public_internet_ready'] as bool,
|
||||
localNetworkReady: json['local_network_ready'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidStateAttachmentToJson(
|
||||
_$_VeilidStateAttachment instance) =>
|
||||
Map<String, dynamic> _$$VeilidStateAttachmentImplToJson(
|
||||
_$VeilidStateAttachmentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'state': instance.state.toJson(),
|
||||
'public_internet_ready': instance.publicInternetReady,
|
||||
'local_network_ready': instance.localNetworkReady,
|
||||
};
|
||||
|
||||
_$_VeilidStateNetwork _$$_VeilidStateNetworkFromJson(
|
||||
_$VeilidStateNetworkImpl _$$VeilidStateNetworkImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$_VeilidStateNetwork(
|
||||
_$VeilidStateNetworkImpl(
|
||||
started: json['started'] as bool,
|
||||
bpsDown: BigInt.parse(json['bps_down'] as String),
|
||||
bpsUp: BigInt.parse(json['bps_up'] as String),
|
||||
@ -281,8 +287,8 @@ _$_VeilidStateNetwork _$$_VeilidStateNetworkFromJson(
|
||||
(json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidStateNetworkToJson(
|
||||
_$_VeilidStateNetwork instance) =>
|
||||
Map<String, dynamic> _$$VeilidStateNetworkImplToJson(
|
||||
_$VeilidStateNetworkImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'started': instance.started,
|
||||
'bps_down': instance.bpsDown.toString(),
|
||||
@ -290,25 +296,26 @@ Map<String, dynamic> _$$_VeilidStateNetworkToJson(
|
||||
'peers': instance.peers.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
|
||||
_$_VeilidStateConfig _$$_VeilidStateConfigFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidStateConfig(
|
||||
_$VeilidStateConfigImpl _$$VeilidStateConfigImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VeilidStateConfigImpl(
|
||||
config: VeilidConfig.fromJson(json['config']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidStateConfigToJson(
|
||||
_$_VeilidStateConfig instance) =>
|
||||
Map<String, dynamic> _$$VeilidStateConfigImplToJson(
|
||||
_$VeilidStateConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'config': instance.config.toJson(),
|
||||
};
|
||||
|
||||
_$_VeilidState _$$_VeilidStateFromJson(Map<String, dynamic> json) =>
|
||||
_$_VeilidState(
|
||||
_$VeilidStateImpl _$$VeilidStateImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VeilidStateImpl(
|
||||
attachment: VeilidStateAttachment.fromJson(json['attachment']),
|
||||
network: VeilidStateNetwork.fromJson(json['network']),
|
||||
config: VeilidStateConfig.fromJson(json['config']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$_VeilidStateToJson(_$_VeilidState instance) =>
|
||||
Map<String, dynamic> _$$VeilidStateImplToJson(_$VeilidStateImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'attachment': instance.attachment.toJson(),
|
||||
'network': instance.network.toJson(),
|
||||
|
@ -8,7 +8,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
environment:
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
flutter: '>=3.10.6'
|
||||
flutter: '>=3.19.1'
|
||||
|
||||
dependencies:
|
||||
change_case: ^2.0.1
|
||||
|
@ -99,6 +99,7 @@ const APIRESULT_VOID: APIResult<()> = APIResult::Ok(());
|
||||
pub struct VeilidFFIConfigLoggingTerminal {
|
||||
pub enabled: bool,
|
||||
pub level: veilid_core::VeilidConfigLogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@ -107,12 +108,14 @@ pub struct VeilidFFIConfigLoggingOtlp {
|
||||
pub level: veilid_core::VeilidConfigLogLevel,
|
||||
pub grpc_endpoint: String,
|
||||
pub service_name: String,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct VeilidFFIConfigLoggingApi {
|
||||
pub enabled: bool,
|
||||
pub level: veilid_core::VeilidConfigLogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@ -205,7 +208,7 @@ pub extern "C" fn initialize_veilid_core(platform_config: FfiStr) {
|
||||
cfg_if! {
|
||||
if #[cfg(target_os = "android")] {
|
||||
let filter =
|
||||
veilid_core::VeilidLayerFilter::new(platform_config.logging.terminal.level, None);
|
||||
veilid_core::VeilidLayerFilter::new(platform_config.logging.terminal.level, &platform_config.logging.terminal.ignore_log_targets);
|
||||
let layer = paranoid_android::layer("veilid-flutter")
|
||||
.with_ansi(false)
|
||||
.with_filter(filter.clone());
|
||||
@ -213,7 +216,7 @@ pub extern "C" fn initialize_veilid_core(platform_config: FfiStr) {
|
||||
layers.push(layer.boxed());
|
||||
} else {
|
||||
let filter =
|
||||
veilid_core::VeilidLayerFilter::new(platform_config.logging.terminal.level, None);
|
||||
veilid_core::VeilidLayerFilter::new(platform_config.logging.terminal.level, &platform_config.logging.terminal.ignore_log_targets);
|
||||
let layer = tracing_subscriber::fmt::Layer::new()
|
||||
.compact()
|
||||
.with_writer(std::io::stdout)
|
||||
@ -263,7 +266,10 @@ pub extern "C" fn initialize_veilid_core(platform_config: FfiStr) {
|
||||
.map_err(|e| format!("failed to install OpenTelemetry tracer: {}", e))
|
||||
.unwrap();
|
||||
|
||||
let filter = veilid_core::VeilidLayerFilter::new(platform_config.logging.otlp.level, None);
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
platform_config.logging.otlp.level,
|
||||
&platform_config.logging.otlp.ignore_log_targets,
|
||||
);
|
||||
let layer = tracing_opentelemetry::layer()
|
||||
.with_tracer(tracer)
|
||||
.with_filter(filter.clone());
|
||||
@ -273,7 +279,10 @@ pub extern "C" fn initialize_veilid_core(platform_config: FfiStr) {
|
||||
|
||||
// API logger
|
||||
if platform_config.logging.api.enabled {
|
||||
let filter = veilid_core::VeilidLayerFilter::new(platform_config.logging.api.level, None);
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
platform_config.logging.api.level,
|
||||
&platform_config.logging.api.ignore_log_targets,
|
||||
);
|
||||
let layer = veilid_core::ApiTracingLayer::get().with_filter(filter.clone());
|
||||
filters.insert("api", filter);
|
||||
layers.push(layer.boxed());
|
||||
|
@ -415,6 +415,7 @@ impl NamedSocketAddrs {
|
||||
pub struct Terminal {
|
||||
pub enabled: bool,
|
||||
pub level: LogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@ -428,18 +429,21 @@ pub struct File {
|
||||
pub path: String,
|
||||
pub append: bool,
|
||||
pub level: LogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct System {
|
||||
pub enabled: bool,
|
||||
pub level: LogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct Api {
|
||||
pub enabled: bool,
|
||||
pub level: LogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@ -447,6 +451,7 @@ pub struct Otlp {
|
||||
pub enabled: bool,
|
||||
pub level: LogLevel,
|
||||
pub grpc_endpoint: NamedSocketAddrs,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
|
@ -61,7 +61,7 @@ impl VeilidLogs {
|
||||
if settingsr.logging.terminal.enabled {
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
convert_loglevel(settingsr.logging.terminal.level),
|
||||
None,
|
||||
&settingsr.logging.terminal.ignore_log_targets,
|
||||
);
|
||||
let layer = fmt::Layer::new()
|
||||
.compact()
|
||||
@ -72,7 +72,7 @@ impl VeilidLogs {
|
||||
}
|
||||
|
||||
// OpenTelemetry logger
|
||||
#[cfg(feature="opentelemetry-otlp")]
|
||||
#[cfg(feature = "opentelemetry-otlp")]
|
||||
if settingsr.logging.otlp.enabled {
|
||||
let grpc_endpoint = settingsr.logging.otlp.grpc_endpoint.name.clone();
|
||||
|
||||
@ -111,7 +111,7 @@ impl VeilidLogs {
|
||||
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
convert_loglevel(settingsr.logging.otlp.level),
|
||||
None,
|
||||
&settingsr.logging.otlp.ignore_log_targets,
|
||||
);
|
||||
let layer = tracing_opentelemetry::layer()
|
||||
.with_tracer(tracer)
|
||||
@ -147,7 +147,7 @@ impl VeilidLogs {
|
||||
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
convert_loglevel(settingsr.logging.file.level),
|
||||
None,
|
||||
&settingsr.logging.file.ignore_log_targets,
|
||||
);
|
||||
let layer = fmt::Layer::new()
|
||||
.compact()
|
||||
@ -162,7 +162,7 @@ impl VeilidLogs {
|
||||
if settingsr.logging.api.enabled {
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
convert_loglevel(settingsr.logging.api.level),
|
||||
None,
|
||||
&settingsr.logging.api.ignore_log_targets,
|
||||
);
|
||||
let layer = veilid_core::ApiTracingLayer::get().with_filter(filter.clone());
|
||||
filters.insert("api", filter);
|
||||
@ -175,7 +175,7 @@ impl VeilidLogs {
|
||||
if settingsr.logging.system.enabled {
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
convert_loglevel(settingsr.logging.system.level),
|
||||
None,
|
||||
&settingsr.logging.system.ignore_log_targets,
|
||||
);
|
||||
let layer = tracing_journald::layer().wrap_err("failed to set up journald logging")?
|
||||
.with_filter(filter.clone());
|
||||
|
@ -69,7 +69,7 @@ macro_rules! log_rpc {
|
||||
(warn $fmt:literal, $($arg:expr),+) => {
|
||||
warn!(target:"rpc", $fmt, $($arg),+);
|
||||
};
|
||||
(debug $text:expr) => { error!(
|
||||
(debug $text:expr) => { debug!(
|
||||
target: "rpc",
|
||||
"{}",
|
||||
$text,
|
||||
|
@ -145,6 +145,7 @@ pub struct VeilidWASMConfigLoggingPerformance {
|
||||
pub level: veilid_core::VeilidConfigLogLevel,
|
||||
pub logs_in_timings: bool,
|
||||
pub logs_in_console: bool,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@ -152,6 +153,7 @@ pub struct VeilidWASMConfigLoggingPerformance {
|
||||
pub struct VeilidWASMConfigLoggingAPI {
|
||||
pub enabled: bool,
|
||||
pub level: veilid_core::VeilidConfigLogLevel,
|
||||
pub ignore_log_targets: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
@ -204,8 +206,10 @@ pub fn initialize_veilid_core(platform_config: String) {
|
||||
|
||||
// Performance logger
|
||||
if platform_config.logging.performance.enabled {
|
||||
let filter =
|
||||
veilid_core::VeilidLayerFilter::new(platform_config.logging.performance.level, None);
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
platform_config.logging.performance.level,
|
||||
&platform_config.logging.performance.ignore_log_targets,
|
||||
);
|
||||
let layer = WASMLayer::new(
|
||||
WASMLayerConfigBuilder::new()
|
||||
.set_report_logs_in_timings(platform_config.logging.performance.logs_in_timings)
|
||||
@ -223,7 +227,10 @@ pub fn initialize_veilid_core(platform_config: String) {
|
||||
|
||||
// API logger
|
||||
if platform_config.logging.api.enabled {
|
||||
let filter = veilid_core::VeilidLayerFilter::new(platform_config.logging.api.level, None);
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
platform_config.logging.api.level,
|
||||
&platform_config.logging.api.ignore_log_targets,
|
||||
);
|
||||
let layer = veilid_core::ApiTracingLayer::get().with_filter(filter.clone());
|
||||
filters.insert("api", filter);
|
||||
layers.push(layer.boxed());
|
||||
|
Loading…
Reference in New Issue
Block a user