use serde::{Deserialize, Serialize}; pub mod rooms; #[derive(Serialize, Deserialize)] pub struct ErrorResponse<'a> { pub code: &'a str, pub message: &'a str, } #[derive(Serialize, Deserialize)] pub struct CreatePlayerRequest<'a> { pub name: &'a str, } #[derive(Serialize, Deserialize)] pub struct StopPlayerRequest<'a> { pub name: &'a str, } #[derive(Serialize, Deserialize)] pub struct ChangePasswordRequest<'a> { pub player_name: &'a str, pub password: &'a str, } pub mod paths { pub const CREATE_PLAYER: &'static str = "/mgmt/create_player"; pub const STOP_PLAYER: &'static str = "/mgmt/stop_player"; pub const SET_PASSWORD: &'static str = "/mgmt/set_password"; } pub mod errors { pub const INVALID_PATH: &'static str = "invalid_path"; pub const MALFORMED_REQUEST: &'static str = "malformed_request"; pub const PLAYER_NOT_FOUND: &'static str = "player_not_found"; }