elseware/src/entity/gateway/entitygateway.rs

81 lines
2.4 KiB
Rust
Raw Normal View History

use crate::entity::account::*;
use crate::entity::character::*;
2019-12-09 23:11:27 -08:00
use crate::entity::item::*;
2020-10-03 17:23:39 -06:00
// TODO: all these Options should be Results
2020-06-02 18:51:18 -06:00
#[async_trait::async_trait]
pub trait EntityGateway: Send + Sync + Clone {
async fn create_user(&mut self, _user: NewUserAccountEntity) -> Option<UserAccountEntity> {
unimplemented!()
}
2020-06-02 18:51:18 -06:00
async fn get_user_by_id(&self, _id: UserAccountId) -> Option<UserAccountEntity> {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn get_user_by_name(&self, _username: String) -> Option<UserAccountEntity> {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn save_user(&mut self, _user: &UserAccountEntity) {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn create_user_settings(&mut self, _settings: NewUserSettingsEntity) -> Option<UserSettingsEntity> {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn get_user_settings_by_user(&self, _user: &UserAccountEntity) -> Option<UserSettingsEntity> {
unimplemented!();
}
2020-10-03 17:23:39 -06:00
async fn save_user_settings(&mut self, _settings: &UserSettingsEntity) {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn create_character(&mut self, _char: NewCharacterEntity) -> Option<CharacterEntity> {
unimplemented!();
}
2020-10-03 17:23:39 -06:00
// TODO: just make this a vec sorted by slot order?
2020-06-02 18:51:18 -06:00
async fn get_characters_by_user(&self, _user: &UserAccountEntity) -> [Option<CharacterEntity>; 4] {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn save_character(&mut self, _char: &CharacterEntity) {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn get_guild_card_data_by_user(&self, _user: &UserAccountEntity) -> GuildCardDataEntity {
unimplemented!();
}
2019-12-09 23:11:27 -08:00
2020-06-02 18:51:18 -06:00
async fn create_item(&mut self, _item: NewItemEntity) -> Option<ItemEntity> {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn save_item(&mut self, _item: &ItemEntity) {
2019-12-09 23:11:27 -08:00
unimplemented!();
}
async fn change_item_location(&mut self, _item_id: &ItemEntityId, _item_location: ItemLocation) {
unimplemented!();
}
2020-08-31 23:44:39 -06:00
async fn feed_mag(&mut self, _mag_item_id: &ItemEntityId, _tool_item_id: &ItemEntityId) {
unimplemented!();
}
2020-09-02 22:03:45 -06:00
async fn change_mag_owner(&mut self, _mag_item_id: &ItemEntityId, _character: &CharacterEntity) {
unimplemented!();
}
2020-09-07 08:02:12 -06:00
async fn use_mag_cell(&mut self, _mag_item_id: &ItemEntityId, _mag_cell_id: &ItemEntityId) {
unimplemented!();
}
2020-06-02 18:51:18 -06:00
async fn get_items_by_character(&self, _char: &CharacterEntity) -> Vec<ItemEntity> {
2019-12-09 23:11:27 -08:00
unimplemented!();
}
}