2026-07-19 17:05:27 +07:00
|
|
|
//! HTTP adapter — handler functions and DTOs for the CMS REST API.
|
|
|
|
|
//!
|
|
|
|
|
//! Provides hyper-based request handlers and serialisation types for
|
|
|
|
|
//! the CMS HTTP endpoints. Handlers receive domain service trait objects
|
|
|
|
|
//! via dependency injection (Arc-wrapped trait objects) and translate
|
|
|
|
|
//! between HTTP request/response formats and domain types.
|
|
|
|
|
//!
|
|
|
|
|
//! ## Sub-modules
|
|
|
|
|
//! - `dto` — request/response DTO types (JSON serialisation)
|
|
|
|
|
//! - `handlers` — hyper request handler functions
|
|
|
|
|
//!
|
|
|
|
|
//! ## Endpoints
|
|
|
|
|
//! - `GET /settings` — load current application settings
|
|
|
|
|
//! - `PUT /settings` — update application settings
|
|
|
|
|
//! - `GET /memories` — list all memory slugs
|
|
|
|
|
//! - `POST /memories` — create a new memory entry
|
|
|
|
|
//! - `POST /memories/{name}` — (future) update memory
|
2026-07-16 12:32:17 +07:00
|
|
|
|
|
|
|
|
pub mod dto;
|
|
|
|
|
pub mod handlers;
|
|
|
|
|
|
|
|
|
|
pub use dto::{
|
|
|
|
|
ConversationResponse, MemoryCreateRequest, MemoryResponse, SettingsResponse,
|
|
|
|
|
SettingsUpdateRequest,
|
|
|
|
|
};
|
|
|
|
|
pub use handlers::{
|
|
|
|
|
handle_create_memory, handle_get_settings, handle_list_memories, handle_update_settings,
|
|
|
|
|
};
|