use anyhow::Error; use giterated_models::{error::OperationError, object::{ObjectRequest, ObjectRequestError, ObjectResponse}, user::{DisplayName, User}}; use giterated_plugin::{new_stack::State, plugin}; plugin!( name: "Example Plugin", version: "0.0.1", author: "Amber Kowalski", // Experimental syntax for requesting specific plugin features features: ["tracing", "tokio"], description: "An example plugin to demonstrate the development process of Giterated plugins." ); /// Some kind of global state for the plugin struct PluginState; /// The plugin's initialization function. Ran when the plugin is loaded, used to /// build the plugin's stack. #[plugin::init] pub fn init(builder: &mut PluginStackBuilder) -> Result<(), Error> { builder.insert_state(State); builder .object::() .object::(); builder.value(value_getter); builder.setting_getter(setting_getter); Ok(()) } async fn handler( object: User, operation: ObjectRequest, state_extractor: State ) -> Result> { todo!() } async fn setting_getter( object: User, state_extractor: State ) -> Result> { todo!() }