Archived
25 lines
562 B
Rust
25 lines
562 B
Rust
use serde::de::DeserializeOwned;
|
|
use tauri::{AppHandle, Runtime, plugin::PluginApi};
|
|
|
|
use crate::models::SAuthMuatanMasuk;
|
|
|
|
pub fn init<R: Runtime, C: DeserializeOwned>(
|
|
app: &AppHandle<R>,
|
|
_api: PluginApi<R, C>,
|
|
) -> crate::Result<Auth<R>> {
|
|
Ok(Auth(app.clone()))
|
|
}
|
|
|
|
/// Access to the auth APIs.
|
|
pub struct Auth<R: Runtime>(AppHandle<R>);
|
|
|
|
impl<R: Runtime> Auth<R> {
|
|
pub fn masuk(&self, muatan: SAuthMuatanMasuk) -> crate::Result<()> {
|
|
return Ok(());
|
|
}
|
|
|
|
pub fn keluar(&self) -> crate::Result<()> {
|
|
return Ok(());
|
|
}
|
|
}
|