Refactor appservices, pusher, timeline, transactionids, users
This commit is contained in:
parent
01bf348811
commit
f56424bc8d
18 changed files with 546 additions and 4950 deletions
17
src/service/appservice/data.rs
Normal file
17
src/service/appservice/data.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
pub trait Data {
|
||||
/// Registers an appservice and returns the ID to the caller
|
||||
pub fn register_appservice(&self, yaml: serde_yaml::Value) -> Result<String>;
|
||||
|
||||
/// Remove an appservice registration
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `service_name` - the name you send to register the service previously
|
||||
pub fn unregister_appservice(&self, service_name: &str) -> Result<()>;
|
||||
|
||||
pub fn get_registration(&self, id: &str) -> Result<Option<serde_yaml::Value>>;
|
||||
|
||||
pub fn iter_ids(&self) -> Result<impl Iterator<Item = Result<String>> + '_>;
|
||||
|
||||
pub fn all(&self) -> Result<Vec<(String, serde_yaml::Value)>>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue