pub trait Kontrol {
fn address(&self) -> String;
fn method(&self) -> Method;
fn kontrol(&self, kong: &Kong) -> Response;
fn get_input(&self, _request: &Request) -> Option<Value> { ... }
fn validate(&self, input: Option<Value>) -> Result<Option<Value>, ()> { ... }
fn url_params(
&self,
router: &Router<fn(_: &Kong, _: &Request) -> Response>,
url: &str
) -> Result<Params, KError> { ... }
}
Expand description
🎮 API Enpoint kontrollers