迁移后端认证与拆分 Spacetime 客户端
This commit is contained in:
@@ -2,6 +2,21 @@
|
||||
#[rustfmt::skip]
|
||||
pub mod module_bindings;
|
||||
|
||||
mod mapper;
|
||||
pub use mapper::*;
|
||||
|
||||
pub mod ai;
|
||||
pub mod assets;
|
||||
pub mod auth;
|
||||
pub mod big_fish;
|
||||
pub mod combat;
|
||||
pub mod custom_world;
|
||||
pub mod inventory;
|
||||
pub mod npc;
|
||||
pub mod puzzle;
|
||||
pub mod runtime;
|
||||
pub mod story;
|
||||
|
||||
use std::{
|
||||
error::Error,
|
||||
fmt,
|
||||
@@ -69,9 +84,11 @@ use module_puzzle::{
|
||||
PuzzleWorkProfile as DomainPuzzleWorkProfile,
|
||||
};
|
||||
use module_runtime::{
|
||||
RuntimeBrowseHistoryRecord, RuntimeBrowseHistoryThemeMode, RuntimePlatformTheme,
|
||||
RuntimeBrowseHistoryRecord, RuntimeBrowseHistoryThemeMode as DomainRuntimeBrowseHistoryThemeMode,
|
||||
RuntimePlatformTheme as DomainRuntimePlatformTheme,
|
||||
RuntimeProfileDashboardRecord, RuntimeProfilePlayStatsRecord, RuntimeProfileSaveArchiveRecord,
|
||||
RuntimeProfileWalletLedgerEntryRecord, RuntimeProfileWalletLedgerSourceType,
|
||||
RuntimeProfileWalletLedgerEntryRecord,
|
||||
RuntimeProfileWalletLedgerSourceType as DomainRuntimeProfileWalletLedgerSourceType,
|
||||
RuntimeSettingsRecord, RuntimeSnapshotRecord, build_runtime_browse_history_clear_input,
|
||||
build_runtime_browse_history_list_input, build_runtime_browse_history_record,
|
||||
build_runtime_browse_history_sync_input, build_runtime_profile_dashboard_get_input,
|
||||
@@ -104,6 +121,7 @@ use tokio::{
|
||||
time::timeout,
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
use crate::module_bindings::{
|
||||
AiResultReferenceInput as BindingAiResultReferenceInput,
|
||||
AiResultReferenceKind as BindingAiResultReferenceKind,
|
||||
@@ -360,6 +378,9 @@ use crate::module_bindings::{
|
||||
upsert_runtime_setting_and_return_procedure::upsert_runtime_setting_and_return as _,
|
||||
upsert_runtime_snapshot_and_return_procedure::upsert_runtime_snapshot_and_return as _,
|
||||
};
|
||||
=======
|
||||
use crate::module_bindings::*;
|
||||
>>>>>>> 4f272a50 (迁移后端认证与拆分 Spacetime 客户端)
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SpacetimeClientConfig {
|
||||
@@ -369,6 +390,12 @@ pub struct SpacetimeClientConfig {
|
||||
pub pool_size: u32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct AuthStoreSnapshotRecord {
|
||||
pub snapshot_json: Option<String>,
|
||||
pub updated_at_micros: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct SpacetimeClient {
|
||||
config: SpacetimeClientConfig,
|
||||
@@ -431,6 +458,7 @@ impl SpacetimeClient {
|
||||
Self { config, pool }
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
pub async fn create_ai_task(
|
||||
&self,
|
||||
input: DomainAiTaskCreateInput,
|
||||
@@ -2362,6 +2390,8 @@ impl SpacetimeClient {
|
||||
.await
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> 4f272a50 (迁移后端认证与拆分 Spacetime 客户端)
|
||||
async fn call_after_connect<T>(
|
||||
&self,
|
||||
call: impl FnOnce(&DbConnection, ProcedureResultSender<T>) + Send + 'static,
|
||||
@@ -2596,6 +2626,7 @@ fn send_connect_once(
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
fn map_entity_binding_input(
|
||||
input: module_assets::AssetEntityBindingInput,
|
||||
) -> BindingAssetEntityBindingInput {
|
||||
@@ -7089,6 +7120,8 @@ fn map_inventory_item_source_kind(
|
||||
}
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> 4f272a50 (迁移后端认证与拆分 Spacetime 客户端)
|
||||
impl fmt::Display for SpacetimeClientError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user